<!--
	//Create a boolean variable to check for a valid Internet Explorer instance.
	var xmlhttp = false;
	//Check if we are using IE.
	try {
	//If the Javascript version is greater than 5.
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	//If not, then use the older active x object.
		try {
		//If we are using Internet Explorer.
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
		//Else we must be using a non-IE browser.
			xmlhttp = false;
		}
	}
	//If we are using a non-IE browser, create a javascript instance of the object.
	if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
		xmlhttp = new XMLHttpRequest();
	}

Array.prototype.inArray = function (value)
// Returns true if the passed value is found in the
// array.  Returns false if it is not.
{
    var i;
    for (i=0; i < this.length; i++) {
        // Matches identical (===), not just similar (==).
        if (this[i] === value) {
            return true;
        }
    }
    return false;
};

	function testfrm(serverPage, objID)
	{
		var obj = document.getElementById(objID);
		try
		{
			xmlhttp.open("GET", serverPage,true);
			xmlhttp.onreadystatechange = function()
			{
				if (xmlhttp.readyState==4)
				{
					alert(xmlhttp.responseText);
					alert(document.getElementById(objID).innerHTML)
					document.getElementById(objID).innerHTML = xmlhttp.responseText;
					alert(objID)
				}
				else
				{
					document.getElementById(objID).innerHTML = '<table width="100%"><tr><td height="10" valign="center" align="center" class="text" style="color:000000;"><font style="font-size:9px">Loading</font>&nbsp;&nbsp;12<input type="image" name="imageField" src="'+IMG_SERVER+'/images/loading.gif"/></td></tr></table>';
				}
			}
			xmlhttp.send(null);
		}
		catch(e)
		{
		}
	}
	/////////////////////////////////////////

	function change_user_type(val)
{
	if(val == "existing")
	{
		disableFormElement();
		document.getElementById('div_login').style.display = '';
		document.getElementById('userid').disabled = false;
		document.frm_login.userid.focus();
		document.getElementById('password').disabled = false;
		document.getElementById('loginbutton').disabled = false;
		//document.getElementById('div_status').style.display = 'none';
		document.listproperty_frm.usertype.value = 'exiting';
	}
	else
	{
		enableFormElement();
		document.getElementById('div_login').style.display = 'none';
		//document.getElementById('div_status').style.display = 'none';
		document.getElementById('userid').disabled = true;
		document.getElementById('password').disabled = true;
		document.getElementById('loginbutton').disabled = true;
		document.listproperty_frm.usertype.value = 'new';
	}
}
	////////////////////////////////////////
	// This function is customize for registration and list your property
	function makerequest(serverPage, objID)
	{
		
		// This is the function to call with serverPage as the page to dynamically call and objId is the div id
		var obj = document.getElementById(objID);
		
		try
		{
			
			xmlhttp.open("GET", serverPage,true);
			xmlhttp.onreadystatechange = function()
			{
				if (xmlhttp.readyState==4)
				{
					//obj.innerHTML = xmlhttp.responseText;
					
					obj.innerHTML = xmlhttp.responseText.substr(0,(xmlhttp.responseText.length));						
					mystr = xmlhttp.responseText.substr(0,(xmlhttp.responseText.length));
                    //alert(mystr);
					var thelength=xmlhttp.responseText.length;
					var last_char=xmlhttp.responseText.charAt(thelength-1);
					if(eval('last_char')==0)
					{
						return false;
					}
					else
					{
						return true;
					}
				}
				else
				{
					document.getElementById(objID).innerHTML = '<table width="100%"><tr><td height="10" valign="center" align="center" class="text" style="color:000000;"><font style="font-size:9px">Loading</font>&nbsp;&nbsp;<input type="image" name="imageField" src="'+IMG_SERVER+'/images/loading.gif"/></td></tr></table>';
				}
			}
			xmlhttp.send(null);
		}
		catch(e)
		{
		}
	}
function makerequestfastfree(serverPage, objID)
	{
		
		// This is the function to call with serverPage as the page to dynamically call and objId is the div id
		var obj = document.getElementById(objID);
		try
		{
			//alert(serverPage);
			//alert(objID);
			xmlhttp.open("GET", serverPage,true);
			xmlhttp.onreadystatechange = function()
			{
			if (xmlhttp.readyState==4)
				{
					obj.innerHTML = xmlhttp.responseText;
					
				}
				else
				{
					document.getElementById(objID).innerHTML = '<table width="40%" border="0" align="rignt"  style="border:1px solid #48A1CB;"><tr><td colspan="2" class="text" width = "20%"><font style="font-size:9px">Loading</font>&nbsp;&nbsp;<input type="image" name="imageField" src="'+IMG_SERVER+'/images/loading.gif"/></td></tr><tr><td align="center">&nbsp;</td><td align="center">&nbsp;</td></tr></table>';

				}
			}
			xmlhttp.send(null);
		}
		catch(e)
		{
		}
	}
	function showsms(serverPage, objID)
	{
		// This is the function to call with serverPage as the page to dynamically call and objId is the div id
		var obj = document.getElementById(objID);
		try
		{
			xmlhttp.open("GET", serverPage,true);
			xmlhttp.onreadystatechange = function()
			{
				if (xmlhttp.readyState==4)
				{
					obj.innerHTML = xmlhttp.responseText;
					//alert(obj.innerHTML);
					//alert(xmlhttp.responseText);
					return true;
				}
				else
				{
					document.getElementById(objID).innerHTML = '<table width="100%" class="whitefill"><tr><td height="10" valign="center" align="center" class="text" style="color:000000;"><font style="font-size:9px">Loading</font>&nbsp;&nbsp;<input type="image" name="imageField" src="'+IMG_SERVER+'/images/loading.gif"/></td></tr></table>';
				}
			}
			xmlhttp.send(null);
		}
		catch(e)
		{
		}
	}

	// This function is a general function for any where use

	function makeajaxrequest(serverPage,objID)
	{
		// This is the function to call with serverPage as the page to dynamically call and objId is the div id
		var obj = document.getElementById(objID);
		try
		{
			xmlhttp.open("GET",serverPage,true);
			xmlhttp.onreadystatechange = function()
			{
				if (xmlhttp.readyState==4)
				{
					//alert(xmlhttp.responseText);
					obj.innerHTML = xmlhttp.responseText;
				}
				else
				{
					document.getElementById(objID).innerHTML = 'Processing.....please wait';
				}
			}
			xmlhttp.send(null);
		}
		catch(e)
		{
		}
	}

	function ajaxrequest(serverPage,objID)
	{
		// This is the function to call with serverPage as the page to dynamically call and objId is the div id
		//alert(objID);
		var obj = document.getElementById(objID);
		try
		{
			xmlhttp.open("GET",serverPage,true);
			xmlhttp.onreadystatechange = function()
			{
			if (xmlhttp.readyState==4)
				{
					//alert(xmlhttp.responseText);
					obj.innerHTML = xmlhttp.responseText;
				}
			}
			xmlhttp.send(null);
		}
		catch(e)
		{
		}
    }

	function makeajaxpostrequest(serverPage,objID)
	{
		// This is the function to call with serverPage as the page to dynamically call and objId is the div id
		alert(objID);
		alert(serverPage);
		var obj = document.getElementById(objID);
		try
		{
			xmlhttp.open("POST",serverPage,true);
			xmlhttp.onreadystatechange = function()
			{
			if (xmlhttp.readyState==4)
				{
					obj.innerHTML = xmlhttp.responseText;
				}
			}
			xmlhttp.send(null);
		}
		catch(e)
		{
		}
    }

	// This function is a general function for any where use
	function ajaxlogin(serverPage,objID,type,mode,currentpage,show,propertyid,mobilepage)
	{
		// This is the function to call with serverPage as the page to dynamically call and objId is the div id
		if(currentpage == '' || currentpage == 'undefined')
		{
			currentpage = 'listing';
		}
		if(!mobilepage) mobilepage=0;
		var obj = document.getElementById(objID);
		try
		{
			xmlhttp.open("GET",serverPage,true);
			xmlhttp.onreadystatechange = function()
			{
				if (xmlhttp.readyState==4)
				{
					//obj.innerHTML = xmlhttp.responseText.substr(0,(xmlhttp.responseText.length-1));
					mystr = xmlhttp.responseText.substr(0,(xmlhttp.responseText.length-1));
					var thelength=xmlhttp.responseText.length;
					var last_char=xmlhttp.responseText.charAt(thelength-1);
					//alert(obj.innerHTML)
					if(eval(last_char)==0)
					{
						obj.innerHTML = mystr;
					}
					else
					{
						var b = xmlhttp.responseText;
						var temp = new Array();
						temp = b.split('#');
						if(currentpage == 'listing')
						{
							enableFormElement();
							var msg = "<table border = '0' width='95%' cellpadding='0' cellspacing='0' class='staticorangetb'>"
							msg += "<tr style='line-height:20px;'><td width='100%' class = 'columnhead paddingleft20'>";
							msg += "Welcome <b>" + temp[2] + "</b>,</td></tr><tr style='line-height:20px;'	><td class = 'columnhead paddingleft20'>";
							if(mode == "fast") 
							{
							msg += "Balance Fast Response Listing(s) are <b>" + temp[1] + "</b>"; 
							}
							else if(mode == "fastfree") 
							{
							msg += "List Fast Response Listing for free*<div class='orange' align='right' style='padding-right:10px;'>* Special offer!&nbsp;&nbsp; This offer is valid only for listing done till midnight of 13th May, 2008&nbsp;&nbsp;</div>"; 
							}
							else
							{
							//msg += "Balance Basic Listing(s) are <b>" + temp[13] + "</b>"; 
								msg += "Balance Basic Listing(s) are <b>" + temp[13] + "</b>"; 

							}
							msg += "</td></tr></table>";
							document.listproperty_frm.loginuser.value = temp[0];
							document.listproperty_frm.availListing.value = temp[1];
							document.getElementById('div_login_table').innerHTML = '';
							document.getElementById('div_login_table').innerHTML = msg;
							document.listproperty_frm.contact_name.value = temp[2];
							document.listproperty_frm.contact_email.value = temp[4];
							document.listproperty_frm.mob_country_code.value = temp[5];
							document.listproperty_frm.mobile1.value = temp[6];
							if(temp[7] != "" && temp[8] != "")
							{
								document.listproperty_frm.ph_country_code.value = temp[7];
								document.listproperty_frm.contact_mobile2.value = temp[8];
							}
							document.listproperty_frm.ph_area_code.value = temp[9];
							document.listproperty_frm.phone1.value = temp[10];
							if(temp[11] != "" && temp[12] != "")
							{
								document.listproperty_frm.ph_area_code2.value = temp[11];
								document.listproperty_frm.contact_phone2.value = temp[12];
							}
							document.getElementById('div_welcome').innerHTML = "Welcome <b>" + temp[2] + "</b>&nbsp;&nbsp;";
							document.getElementById('div_toplinks').innerHTML = "<a href=\"/\" class=\"toplinks\" >Home</a>&nbsp;|&nbsp;<a href=\"/help/about-us.php\" class=\"toplinks\" >About Us</a>&nbsp;|&nbsp;<a href=\"/help/faq.php\" class=\"toplinks\" >FAQ's</a>&nbsp;|&nbsp;<a href=\"/help/contact-us.php\" class=\"toplinks\" >Contact Us</a>&nbsp;|&nbsp;<a href=\"/member/logout.php\" class=\"toplinks\" >Logout</a>";
							document.getElementById('div_register_tab').innerHTML = "<a href=\"/member/my-makaan-account.php\"><img src='"+IMG_SERVER+"/images/nav_02.gif' alt=\"My Makaan Account\" border=\"0\" /></a>";

							//document.getElementById('div_msg').innerHTML = '';
							//document.getElementById('div_msg').innerHTML = msg;
							
							if(mode == "fast") 
							{
								if(temp[1] != "0" && temp[1] != '')
								{
									document.getElementById('div_frame').innerHTML  = '';
									document.getElementById('div_frame').style.display = 'none';
								}
								//var msg = "<br>Welcome " + temp[2] + ", Your available fast response listing balance is " +  temp[1] + "<br>";
							}
							else if(mode != "fastfree")
							{
								if(temp[13] != "0" && temp[13] != '')
								{
									document.getElementById('div_frame').innerHTML  = '';
									document.getElementById('div_frame').style.display = 'none';
								}
								else
								{
									document.getElementById('div_frame').style.display = '';
								}
								//var msg = "<br>Welcome " + temp[2] + ", Your available fast response listing balance is " +  temp[1] + "<br>";
							}
						}
						else if(currentpage == 'requirement')
						{
							enableFormElement();
							var msg = "<table border = '0' width='95%' cellpadding='0' cellspacing='0' class='staticorangetb'>"
							msg += "<tr style='line-height:20px;'><td width='100%' class = 'columnhead paddingleft20'>";
							msg += "Welcome <b>" + temp[2] + "</b>,</td></tr><tr style='line-height:20px;'	><td class = 'columnhead paddingleft20'>";
							msg += "Please fill in this form to post your requirement"; 
							msg += "</td></tr></table>";
							document.requiremant_frm.loginuser.value = temp[0];
							document.getElementById('div_login_table').innerHTML = '';
							document.getElementById('div_login_table').innerHTML = msg;
							document.getElementById('div_login_table').style.display = 'none';
							document.requiremant_frm.contact_name.value = temp[2];
							document.requiremant_frm.contact_email.value = temp[4];
							document.requiremant_frm.mob_country_code.value = temp[5];
							document.requiremant_frm.mobile1.value = temp[6];
							if(temp[7] != "" && temp[8] != "")
							{
								document.requiremant_frm.ph_country_code.value = temp[7];
								document.requiremant_frm.contact_mobile2.value = temp[8];
							}
							document.requiremant_frm.ph_area_code.value = temp[9];
							document.requiremant_frm.phone1.value = temp[10];
							if(temp[11] != "" && temp[12] != "")
							{
								document.requiremant_frm.ph_area_code2.value = temp[11];
								document.requiremant_frm.contact_phone2.value = temp[12];
							}
							document.getElementById('div_welcome').innerHTML = "Welcome <b>" + temp[2] + "</b>&nbsp;&nbsp;";
							document.getElementById('div_toplinks').innerHTML = "<a href=\"/\" class=\"toplinks\" >Home</a>&nbsp;|&nbsp;<a href=\"/help/about-us.php\" class=\"toplinks\" >About Us</a>&nbsp;|&nbsp;<a href=\"/help/faq.php\" class=\"toplinks\" >FAQ's</a>&nbsp;|&nbsp;<a href=\"/help/contact-us.php\" class=\"toplinks\" >Contact Us</a>&nbsp;|&nbsp;<a href=\"/member/logout.php\" class=\"toplinks\" >Logout</a>";
							document.getElementById('div_register_tab').innerHTML = "<a href=\"/member/my-makaan-account.php\"><img src='"+IMG_SERVER+"/images/nav_02.gif' alt=\"My Makaan Account\" border=\"0\" /></a>";
						}
						else if(currentpage == 'shortlist')
						{
							if (document.getElementById("div_welcome") != null && document.getElementById("div_welcome") != "undefined")
								document.getElementById('div_welcome').innerHTML = "Welcome <b>" + temp[2] + "</b>&nbsp;&nbsp;";
							document.getElementById('div_toplinks').innerHTML = "<a href=\"/\" class=\"toplinks\" >Home</a>&nbsp;|&nbsp;<a href=\"/help/about-us.php\" class=\"toplinks\" >About Us</a>&nbsp;|&nbsp;<a href=\"/help/faq.php\" class=\"toplinks\" >FAQ's</a>&nbsp;|&nbsp;<a href=\"/help/contact-us.php\" class=\"toplinks\" >Contact Us</a>&nbsp;|&nbsp;<a href=\"/member/logout.php\" class=\"toplinks\" >Logout</a>";
							if (document.getElementById("div_register_tab") != null && document.getElementById("div_register_tab") != "undefined")
								document.getElementById('div_register_tab').innerHTML = "<a href=\"/member/my-makaan-account.php\"><img src='"+IMG_SERVER+"/images/nav_02.gif' alt=\"My Makaan Account\" border=\"0\" /></a>";
							document.getElementById('div_login').innerHTML = '';
							if(show == '1')
							{
								showsms("/search/shortlist.php?show=1",'div_all');
							}
							else if(show == '2')
							{
								showsms("/search/shortlist.php?show=2",'div_all2');
							}
							else if(mobilepage == '1')
							{
								showsms("/search/mobileshortlist.php?pid="+propertyid,'div_'+propertyid);
							}
							else
							{
								showsms("/search/shortlist.php?pid="+propertyid,'div_'+propertyid);
							}
						}
						else if(currentpage == 'homeshortlist')
						{
							document.getElementById('div_all').innerHTML = '';
							showsms("/search/short-list-popup.php?pid="+propertyid,'div_all');
							window.opener.location.reload();
						}
						else if(currentpage == 'shortlistviewpage')
						{
							if (document.getElementById("div_welcome") != null && document.getElementById("div_welcome") != "undefined")
								document.getElementById('div_welcome').innerHTML = "Welcome <b>" + temp[2] + "</b>&nbsp;&nbsp;";
							document.getElementById('div_toplinks').innerHTML = "<a href=\"/\" class=\"toplinks\" >Home</a>&nbsp;|&nbsp;<a href=\"/help/about-us.php\" class=\"toplinks\" >About Us</a>&nbsp;|&nbsp;<a href=\"/help/faq.php\" class=\"toplinks\" >FAQ's</a>&nbsp;|&nbsp;<a href=\"/help/contact-us.php\" class=\"toplinks\" >Contact Us</a>&nbsp;|&nbsp;<a href=\"/member/logout.php\" class=\"toplinks\" >Logout</a>";
							if (document.getElementById("div_register_tab") != null && document.getElementById("div_register_tab") != "undefined")
								document.getElementById('div_register_tab').innerHTML = "<a href=\"/member/my-makaan-account.php\"><img src='"+IMG_SERVER+"/images/nav_02.gif' alt=\"My Makaan Account\" border=\"0\" /></a>";
							document.getElementById('div_login').innerHTML = '';
							if(show == '1')
							{
								showsms("/search/shortlist-propertylisting.php?show=1",'div_all');
							}
							else if(show == '2')
							{
								showsms("/search/shortlist-propertylisting.php?show=2",'div_all2');
							}
							else
							{
								showsms("/search/shortlist-propertylisting.php?pid="+propertyid,'div_'+propertyid);
							}
						}
						else if(currentpage == 'ppc_banner')
						{
							document.getElementById('div_toplinks').innerHTML = "<a href=\"/\" class=\"toplinks\" >Home</a>&nbsp;|&nbsp;<a href=\"/help/about-us.php\" class=\"toplinks\" >About Us</a>&nbsp;|&nbsp;<a href=\"/help/faq.php\" class=\"toplinks\" >FAQ's</a>&nbsp;|&nbsp;<a href=\"/help/contact-us.php\" class=\"toplinks\" >Contact Us</a>&nbsp;|&nbsp;<a href=\"/member/logout.php\" class=\"toplinks\" >Logout</a>";
							document.getElementById('div_register_tab').innerHTML = "<a href=\"/member/my-makaan-account.php\"><img src='"+IMG_SERVER+"/images/nav_02.gif' alt=\"My Makaan Account\" border=\"0\" /></a>";
							document.getElementById('div_login').innerHTML = '';
							document.getElementById('div_content').innerHTML = "<font class='text'>Welcome <b>" + temp[2] + "</b>&nbsp;&nbsp;</font>";
						}
						else
						{
							document.getElementById('div_welcome').innerHTML = "Welcome <b>" + temp[2] + "</b>&nbsp;&nbsp;";
							document.getElementById('div_toplinks').innerHTML = "<a href=\"/\" class=\"toplinks\" >Home</a>&nbsp;|&nbsp;<a href=\"/help/about-us.php\" class=\"toplinks\" >About Us</a>&nbsp;|&nbsp;<a href=\"/help/faq.php\" class=\"toplinks\" >FAQ's</a>&nbsp;|&nbsp;<a href=\"/help/contact-us.php\" class=\"toplinks\" >Contact Us</a>&nbsp;|&nbsp;<a href=\"/member/logout.php\" class=\"toplinks\" >Logout</a>";
							document.getElementById('div_register_tab').innerHTML = "<a href=\"/member/my-makaan-account.php\"><img src='"+IMG_SERVER+"/images/nav_02.gif' alt=\"My Makaan Account\" border=\"0\" /></a>";
							document.getElementById('div_login').innerHTML = '';
						}
					}
				}
				else
				{
					document.getElementById(objID).innerHTML = 'Processing.....please wait';
				}
			}
			xmlhttp.send(null);
		}
		catch(e)
		{
		}
	}


	function new_makerequest(serverPage, objID,obj_ID,id)
	{
		
		// This is the function to call with serverPage as the page to dynamically call and objId is the div id
		var obj = document.getElementById(objID);
		var objs = document.getElementById(obj_ID);
		try
		{
			
			xmlhttp.open("GET", serverPage,true);
			xmlhttp.onreadystatechange = function()
			{
				if (xmlhttp.readyState==4)
				{
					//obj.innerHTML = xmlhttp.responseText;
					if(xmlhttp.responseText.substr(0,(xmlhttp.responseText.length))=="Invalid username or password")
					{
					obj.innerHTML = xmlhttp.responseText.substr(0,(xmlhttp.responseText.length));	
					}
					else
					{
						objs.innerHTML = xmlhttp.responseText.substr(0,(xmlhttp.responseText.length));
						window.location.href = id;

						//change_user_type1('new');
						
						//window.location.href = "list_your_property.php";
						
						//obj.innerHTML = xmlhttp.responseText.substr(0,(xmlhttp.responseText.length));
					
					}
					//mystr = xmlhttp.responseText.substr(0,(xmlhttp.responseText.length));
                    //alert(mystr);
					//if(mystr=='')
					//{
					//	change_user_type('new');
					//}
					
					//var thelength=xmlhttp.responseText.length;
					//var last_char=xmlhttp.responseText.charAt(thelength-1);
					
				}
				//else
				//{
					//document.getElementById(objID).innerHTML = '<table width="100%"><tr><td height="10" valign="center" align="center" class="text" style="color:000000;"><font style="font-size:9px">Loading</font>&nbsp;&nbsp;<input type="image" name="imageField" src="'+IMG_SERVER+'/images/loading.gif"/></td></tr></table>';
				//}
			}
			xmlhttp.send(null);
		}
		catch(e)
		{
		}
	}


function ajax_poll(serverPage,objID,quiz)
{
	// This is the function to call with serverPage as the page to dynamically call and objId is the div id
	var obj = document.getElementById(objID);
	try
	{
		xmlhttp.open("GET",serverPage,true);
		xmlhttp.onreadystatechange = function()
		{
		if (xmlhttp.readyState==4)
			{
				obj.innerHTML = xmlhttp.responseText;
			}
			else
			{
					document.getElementById('no_option').innerHTML= '<table width="100%"><tr><td height="20" valign="center" align="center" class="text" style="color:#ff0000;">Processing.....please wait</td></tr></table>';
			}
		}			
		xmlhttp.send(null);
		//window.open('/ssi/popup/poll.php?quiz='+quiz,'title','toolbar=0,scrollbars=0,resize=no,width=630,height=450');
	}
	catch(e)
	{
	}
}


function compare_property_ajax(serverPage,objCmpID1, objCmpID2)
	{
		// This is the function to call with serverPage as the page to dynamically call and objId is the div id
		var objCmp1 = document.getElementById(objCmpID1);
		var objCmp2 = document.getElementById(objCmpID2);
		try
		{
			xmlhttp.open("GET",serverPage,true);
			xmlhttp.onreadystatechange = function()
			{
				if (xmlhttp.readyState==4)
				{
					objCmp1.innerHTML = xmlhttp.responseText;
					objCmp2.innerHTML = xmlhttp.responseText;
				}
				else
				{
					/*
					document.getElementById(objCmpID1).innerHTML = "Calculating..";
					document.getElementById(objCmpID2).innerHTML = "Calculating..";
					*/
					document.getElementById(objCmpID1).innerHTML = "<img src='"+IMG_SERVER+"/images/compare-button.gif' alt=\"Compare Property\" title=\"Compare Property\" border=\"0\" onmouseover=\"javascript:ajax_showTooltip('<font class=divmsgbold>Compare different properties</font><font class=divmsg><br>Please check atleast two listings that you would like to compare and click on this button.</font>',this);return false;\" onmouseout=\"ajax_hideTooltip();\" />";
					document.getElementById(objCmpID2).innerHTML = "<img src='"+IMG_SERVER+"/images/compare-button.gif' alt=\"Compare Property\" title=\"Compare Property\" border=\"0\" onmouseover=\"javascript:ajax_showTooltip('<font class=divmsgbold>Compare different properties</font><font class=divmsg><br>Please check atleast two listings that you would like to compare and click on this button.</font>',this);return false;\" onmouseout=\"ajax_hideTooltip();\" />";
					
				}
			}
			xmlhttp.send(null);
		}
		catch(e)
		{
		}
	}

	function update_session(checked,id)
	{
		/*
		var serverPage = '/ssi/ajax/add-session.php?pid=' + id + '&status=' + checked;
		xmlhttp.open("GET",serverPage,true);
		xmlhttp.onreadystatechange = function()
		{
			if (xmlhttp.readyState==4)
			{
				document.frm_search.count_id.value =  xmlhttp.responseText;
			}
		}
		xmlhttp.send(null);
		*/
		
		//alert(id);
		if(get_cookie('SELECTED_IDS')==null || get_cookie('SELECTED_IDS')=='')
		{
			//alert(id);
			var temp_array = new Array(1);
			temp_array[0] = id;
		}
		else
		{
			//alert(get_cookie('SELECTED_IDS'));
			temp_array = get_cookie('SELECTED_IDS').split(',');
			//alert(temp_array);
			
			//alert('dsfdsf' + id);
			if(checked == true && !temp_array.inArray(id)){
				temp_array.push(id);
			}else if(checked==false){
			//Remove it from the Session, if it is already there
				for(i = 0;i < temp_array.length; i++ )
				{
					if(temp_array[i] == id)
					{
						temp_array.splice(i,1);
						//unset(temp_array[i]);
					}
				}
			}
		}
		//alert(temp_array);
		set_cookie('SELECTED_IDS', temp_array.join(","));
		count_sel_ids = temp_array.length;
		//alert(count_sel_ids);
		//alert(get_cookie('SELECTED_IDS'));
		document.frm_search.count_id.value =  count_sel_ids;
	}

	function update_comparesession(checked,id)
	{
		//alert(id);
		
		
		if(get_cookie('SELECTED_COMP_IDS')==null || get_cookie('SELECTED_COMP_IDS')=='')
		{
			//alert(id);
			var temp_array = new Array(1);
			temp_array[0] = id;
		}
		else
		{
			//alert(get_cookie('SELECTED_COMP_IDS'));
			temp_array = get_cookie('SELECTED_COMP_IDS').split(',');
			//alert(temp_array);
			
			//alert('dsfdsf' + id);
			if(checked == true && !temp_array.inArray(id)){
				temp_array.push(id);
			}else if(checked==false){
			//Remove it from the Session, if it is already there
				for(i = 0;i < temp_array.length; i++ )
				{
					if(temp_array[i] == id)
					{
						temp_array.splice(i,1);
						//unset(temp_array[i]);
					}
				}
			}
		}
		//alert(temp_array);
		set_cookie('SELECTED_COMP_IDS', temp_array.join(","));
		//count_sel_ids = temp_array.length;
		//alert(count_sel_ids);
		//alert(get_cookie('SELECTED_COMP_IDS'));
	}

	function click_counter(id,page,city)
	{
		var serverPage = '/ssi/popup/clicks-counter.php?case=ppcbanner&id=' + id + '&city=' +city+'&page=' + page;
		xmlhttp.open("GET",serverPage,true);
		xmlhttp.onreadystatechange = function()
		{
			if (xmlhttp.readyState==4)
			{
			}
		}
		xmlhttp.send(null);
	}
	function makeajaxrequesnumber(serverPage,objID)
	{
		// This is the function to call with serverPage as the page to dynamically call and objId is the div id
		//alert(serverPage);
		var obj = document.getElementById(objID);
		try
		{
			xmlhttp.open("GET",serverPage,true);
			xmlhttp.onreadystatechange = function()
			{
				if (xmlhttp.readyState==4)
				{
				//	alert(xmlhttp.responseText);
					obj.innerHTML = xmlhttp.responseText;
				}
				else
				{
				//	obj.innerHTML = '<font style="font-size:9px">Loading</font>&nbsp;&nbsp;<img src="images/loading.gif"/>';

				obj.innerHTML ="<table border=0 width='100%'><tr><td valign='top' class='columnhead' width='30%'></td><td   width='1%' ></td><td  width='79%' valign='middle'><font style='font-size:9px'>Processing.....please wait</font></td> </tr></table>";
				}

			}
			xmlhttp.send(null);
		}
		catch(e)
		{
		}
	}



	function makeajaxrequest_ratingsystem(serverPage,objID)
	{
		// This is the function to call with serverPage as the page to dynamically call and objId is the div id
		//alert(serverPage);
		var obj = document.getElementById(objID);
		try
		{
			xmlhttp.open("GET",serverPage,true);
			xmlhttp.onreadystatechange = function()
			{
				if (xmlhttp.readyState==4)
				{
				//	alert(xmlhttp.responseText);
					obj.innerHTML = xmlhttp.responseText;
				}
				else
				{
				//	obj.innerHTML = '<font style="font-size:9px">Loading</font>&nbsp;&nbsp;<img src="images/loading.gif"/>';

				obj.innerHTML ="<table border=0 height='100%' width='100%'><tr><td valign='middle' align='center'> <img src='http://img.makaan.com/images/submit_process2.gif'></td></tr></table>";
				}

			}
			xmlhttp.send(null);
		}
		catch(e)
		{
		}
	}