var xmlHttp

function ShowAjax(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url=str
 id=document.frmsearch.province.value
 url=url+"&id="+id
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function stateChanged() 
{ 
	document.getElementById("PlaceShow").innerHTML="<center><div class=content><img src='images/loading.gif'>Loading ...</div><center>";
   //
  
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
	document.getElementById("PlaceShow").innerHTML=xmlHttp.responseText ;
	//alert("DL"+xmlHttp.responseText )
	} 
} 

// OTC

function ShowAjaxOTC(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url=str
 //'id=document.frmsearch.typeofim.value
 //'url=url+"&id="+id
xmlHttp.onreadystatechange=stateChangedOTC
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function stateChangedOTC() 
{ 
	document.getElementById("PlaceShowOTC").innerHTML="<center><div class=content><img src='images/loading.gif'>Loading ...</div><center>";
   // 
   ///alert(xmlHttp.readyState);
   var memai;
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
	document.getElementById("PlaceShowOTC").innerHTML=xmlHttp.responseText;
	} 
} 

//End OTC


// OTC111111111111111111111111111111111111111111

function ShowAjaxOTC1(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url=str
 id=document.frmpost1.typeofim1.value
 url=url+"&id="+id
xmlHttp.onreadystatechange=stateChangedOTC1
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function stateChangedOTC1() 
{ 
	document.getElementById("PlaceShowOTC1").innerHTML="<center><div class=content><img src='images/loading.gif'>Loading ...</div><center>";
   // 
   ///alert(xmlHttp.readyState);
   var memai;
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
	document.getElementById("PlaceShowOTC1").innerHTML=xmlHttp.responseText;
	} 
} 

//End OTC111111111111111111111111111111111111111111111111



function ShowAjax2(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url=str
idp=document.frmsearch.province.value
idq=document.frmsearch.requirement.value
area=document.frmsearch.Area.value
idtype=document.frmsearch.typeofim.value
price1=document.frmsearch.price1.value
price2=document.frmsearch.price2.value

url=url+"&idp="+idp+"&idq="+idq+"&area="+area+"&idtype="+idtype+"&p1="+price1+"&p2="+price2
xmlHttp.onreadystatechange=stateChanged2
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function stateChanged2() 
{ 
	document.getElementById("show12").innerHTML="<center class='content'><div style='background-image:url(images/bgprocess.gif); height:20; width:200px'><img src='images/loading.gif'> &nbsp;&nbsp;&nbsp;&nbsp;Searching ... </div><center>";
   //
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
	document.getElementById("show12").innerHTML=xmlHttp.responseText 
	
	} 
} 
//show district 



function Ajaxupdate(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url=str
 //id=document.frmpost.province1.value
 //url=url+"&id="+id
xmlHttp.onreadystatechange=stateChangedd
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function stateChangedd() 
{ 
	//document.getElementById("Show").innerHTML="<center><div class=DarkText><br><br><img src='images/loading.gif'> Vui lòng ch?, H? th?ng dang t?i d? li?u ...</div><center>";
   //
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
	//document.getElementById("Show").innerHTML=xmlHttp.responseText 
	alert("DL"+xmlHttp.responseText )
	} 
} 




function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}