var xmlHttp

function showUser1(str)
{ 
	if(str=='')
	{
	var message='<u><b>'+'Please Enter Property Id'+'</u></b>';
	document.getElementById('td1').innerHTML=message;
	document.getElementById('td2').style.visibility =  'hidden';
	
	
	return false;
	}
	else
	{
	
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }
	var url="/ajaxphp/findproperty.php"
	url=url+"?q="+str
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=stateChanged 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
	return true;
	}
	
}

function stateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
			var results = parseInt(""+xmlHttp.responseText);
			
			 //alert(results);
			
			if (results==1)
			{
	//		 alert('availble Propertyid');
			var message1='<u><b>'+'This Property Id Is Available'+'</u></b>';
	document.getElementById('td1').innerHTML=message1;
		document.getElementById('td2').style.visibility = 'visible';	
		document.getElementById('nidhi').style.display='block'    
			document.getElementById('nidhi').focus();
			}
			else 
			{
			//alert("not available");
			var message1='<u><b>'+'This Property Id Is Not Found'+'</u></b>';
	document.getElementById('td1').innerHTML=message1;
		document.getElementById('td2').style.visibility = 'hidden';	
			document.getElementById('nidhi').style.display='block' 
						document.getElementById('nidhi').focus();
			}
			 
		// document.getElementById("txtHint").innerHTML=xmlHttp.responseText 
	 } 
}

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;
}
