// JavaScript Document
//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 IE.
		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();
}

///////////////////////////
var xmlhttps = false;
//Check if we are using IE.
try 
{
	//If the javascript version is greater than 5.
	xmlhttps = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) 
{
	//If not, then use the older active x object.
	try 
	{
		//If we are using IE.
		xmlhttps = new ActiveXObject("Microsoft.XMLHTTP");
	} 
	catch (E) 
	{
		//Else we must be using a non-IE browser.
		xmlhttps = false;
	}
}
//If we are using a non-IE browser, create a javascript instance of the object.
if (!xmlhttps && typeof XMLHttpRequest != 'undefined') 
{
	xmlhttps = new XMLHttpRequest();
}
///////////////////////////

function ad_getCities(str,co)
{
	//alert(str+"   "+co);
	if(str != 0)
	{
		var url="rtn_city.php";
		
		url=url+"?q="+str+"&co="+co;
		//alert(url);
		xmlhttp.open("GET",url,true);
		xmlhttp.onreadystatechange = function()
									 {
										 if(xmlhttp.readyState == 4 && xmlhttp.status == 200)
										 {
											document.getElementById("citydiv1").innerHTML = xmlhttp.responseText;
										 }
									 }
		xmlhttp.send(null);
	}
}
function ad_chk(str)
{
	alert(str);/*var url="1.php";
	url=url+"?q="+str;
	//alert(url);
	xmlhttp.open("GET",url,true);
	xmlhttp.onreadystatechange = function()
								 {
									 if(xmlhttp.readyState == 4 && xmlhttp.status == 200)
									 {
										document.getElementById("div_chk").innerHTML = xmlhttp.responseText;
									 }
								 }
	xmlhttp.send(null);*/

}

