// JavaScript Document
var xmlHttp
function callfun(str)
{ 


	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	alert ("Browser does not support HTTP Request")
	return
	}
var url="ajaxpage_redirect.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged1 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged1() 
{ 
	if (xmlHttp.readyState==2 || xmlHttp.readyState=="complete")
	document.getElementById("txtHint_category").style.display="visible";
	{ 
	 if(xmlHttp.status == 200) {
	document.getElementById("txtHint").style.display="block";
	//alert(document.getElementById('txt_city').innerHTML);
	document.getElementById("citydiv").innerHTML = '';
	document.getElementById("citydiv").innerHTML=xmlHttp.responseText;
	//alert(document.getElementById('txt_city').innerHTML);
	//setTimeout(submit_category(document.getElementById('txt_country').value,'y'),1000)
    submit_category(document.getElementById('txt_country').value,'y');
	 }
   } 
}

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;
} 

