var xmlHttp

function showUser(str)
{ 

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="load_add_rent.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {
	 alert("Property added to enquiry list.");
 document.getElementById("loader").style.visibility = "hidden"; 
 	   document.getElementById("floatMenu").style.visibility = "visible"; 
  document.getElementById("add_btn").style.display = "block"; 
  
  
	
	
	     	if(FlashDetect.installed){
  	window.document.checklist.SetVariable("enq", xmlHttp.responseText );
		}else{
	   $('#floatMenu').html('<a class="enq_box" href="enquiry_list.php">Enquiry list ( '+xmlHttp.responseText+')</a>');		
	}
	
	
	
 document.getElementById("theoutput").innerHTML=xmlHttp.responseText 
 } else{ 	
  document.getElementById("loader").style.visibility = "visible"; 

 
 
  document.getElementById("add_btn").style.display = "none"; 
 }
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}
