var xmlHttp

////////////////////////////////////////////////////////////////////////////////////////
function searchcitychange(id)
{
	//alert(id);
	//id=document.form1.state.value;
	
	//alert(id);
	
	xmlHttp=GetXmlHttpObject()

	if (xmlHttp==null)
  	{
  		alert ("Browser does not support HTTP Request")
  		return
  	} 
	
var url="outputsearchcity.php"
url=url+"?stateid="+id+"&code="+0
url=url+"&sid="+Math.random()
//alert(url);
xmlHttp.onreadystatechange=searchstateCity
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 
function searchstateCity() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 	{ 
 		document.getElementById("searchajcity").innerHTML=xmlHttp.responseText		
 	}
	else
	document.getElementById("searchajcity").innerHTML="<img src='images/123.gif' />";
	
}


function searchlocationchange(id)
{
	//id=document.searchform.city.value;
	
	//alert(id);
	
	xmlHttp=GetXmlHttpObject()

	if (xmlHttp==null)
  	{
  		alert ("Browser does not support HTTP Request")
  		return
  	} 
	
var url="outputsearchlocation.php"
url=url+"?locationid="+id+"&code="+0
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=cityChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 
function cityChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 	{ 
 		document.getElementById("searchajlocation").innerHTML=xmlHttp.responseText
		
 	} 
	else
	document.getElementById("searchajlocation").innerHTML="<img src='images/123.gif' />";
}

///////////////////////////////////////////////////////////////////////////////////////////////


function searchcitychange1(id)
{
	//alert(id);
	//id=document.form1.state.value;
	
	//alert(id);
	
	xmlHttp=GetXmlHttpObject()

	if (xmlHttp==null)
  	{
  		alert ("Browser does not support HTTP Request")
  		return
  	} 
	
var url="outputsearchcity.php"
url=url+"?stateid="+id+"&code="+1
url=url+"&sid="+Math.random()
//alert(url);
xmlHttp.onreadystatechange=searchstateCity1
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 
function searchstateCity1() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 	{ 
 		//alert(xmlHttp.responseText)
		document.getElementById("searchajcity1").innerHTML=xmlHttp.responseText		
 	} 
	else
	document.getElementById("searchajcity1").innerHTML="<img src='images/123.gif' />";
}

function searchlocationchange1(id)
{
	//id=document.searchform.city.value;
	
	//alert(id);
	
	xmlHttp=GetXmlHttpObject()

	if (xmlHttp==null)
  	{
  		alert ("Browser does not support HTTP Request")
  		return
  	} 
	
var url="outputsearchlocation.php"
url=url+"?locationid="+id+"&code="+1
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=searchcityChanged1 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 
function searchcityChanged1() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 	{ 
		document.getElementById("searchajlocation1").innerHTML=xmlHttp.responseText		
 	}
	else
	document.getElementById("searchajlocation1").innerHTML="<img src='images/123.gif' />";
}

///////////////////////////////////////////////////////////////////////////////////////////////

function searchcitychange2(id)
{
	//alert(id);
	//id=document.form1.state.value;
	
	//alert(id);
	
	xmlHttp=GetXmlHttpObject()

	if (xmlHttp==null)
  	{
  		alert ("Browser does not support HTTP Request")
  		return
  	} 
	
var url="outputsearchcity.php"
url=url+"?stateid="+id+"&code="+2
url=url+"&sid="+Math.random()
//alert(url);
xmlHttp.onreadystatechange=searchstateCity2
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 
function searchstateCity2() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 	{ 
 		document.getElementById("searchajcity2").innerHTML=xmlHttp.responseText		
 	}
	else
	document.getElementById("searchajcity2").innerHTML="<img src='images/123.gif' />";
}

function searchlocationchange2(id)
{
	//id=document.searchform.city.value;
	
	//alert(id);
	
	xmlHttp=GetXmlHttpObject()

	if (xmlHttp==null)
  	{
  		alert ("Browser does not support HTTP Request")
  		return
  	} 
	
var url="outputsearchlocation.php"
url=url+"?locationid="+id+"&code="+2
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=searchcityChanged2 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 
function searchcityChanged2() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 	{ 
		document.getElementById("searchajlocation2").innerHTML=xmlHttp.responseText		
 	} 
	else
	document.getElementById("searchajlocation2").innerHTML="<img src='images/123.gif' />";
}
///////////////////////////////////////////////////////////////////////////////////////////////

function searchcitychange3(id)
{
	//alert(id);
	//id=document.form1.state.value;
	
	//alert(id);
	
	xmlHttp=GetXmlHttpObject()

	if (xmlHttp==null)
  	{
  		alert ("Browser does not support HTTP Request")
  		return
  	} 
	
var url="outputsearchcity.php"
url=url+"?stateid="+id+"&code="+3
url=url+"&sid="+Math.random()
//alert(url);
xmlHttp.onreadystatechange=searchstateCity3
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 
function searchstateCity3() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 	{ 
 		document.getElementById("searchajcity3").innerHTML=xmlHttp.responseText		
 	} 
	else
	document.getElementById("searchajcity3").innerHTML="<img src='images/123.gif' />";
}

function searchlocationchange3(id)
{
	//id=document.searchform.city.value;
	
	//alert(id);
	
	xmlHttp=GetXmlHttpObject()

	if (xmlHttp==null)
  	{
  		alert ("Browser does not support HTTP Request")
  		return
  	} 
	
var url="outputsearchlocation.php"
url=url+"?locationid="+id+"&code="+3
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=searchcityChanged3 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 
function searchcityChanged3() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 	{ 
		document.getElementById("searchajlocation3").innerHTML=xmlHttp.responseText		
 	} 
	else
	document.getElementById("searchajlocation3").innerHTML="<img src='images/123.gif' />";
}
///////////////////////////////////////////////////////////////////////////////////////////////

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

