var xmlHttpCity

function get_city(str)
{
xmlHttpCity=GetxmlHttpCityObject()
if (xmlHttpCity==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="/js/disc_get_city_ttd2.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttpCity.onreadystatechange=stateChangedCity
xmlHttpCity.open("GET",url,true)
xmlHttpCity.send(null)

}

function stateChangedCity() 
{
if (xmlHttpCity.readyState==4 || xmlHttpCity.readyState=="complete")
 {
 document.getElementById("get_city").innerHTML=xmlHttpCity.responseText 
 }
}

function GetxmlHttpCityObject()
{
var xmlHttpCity=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpCity=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpCity=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpCity=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpCity;
}
