// JavaScript Document
var xmlHttp
//==============================suzdavane na activeX==========================
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;
}
//==============================end===========================================
function getcities(locationid)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="js/getcities.php"
url=url+"?locationid="+locationid
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=state_getcities
xmlHttp.open("GET",url,true)
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8");
xmlHttp.send(null)
}

function state_getcities() 
{ 
document.getElementById('cities').innerHTML = '<select name="city" class="HomeSearchForm" onChange="getsections(this.value)"><option value="0" selected="selected">Please wait...</option>';
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("cities").innerHTML=xmlHttp.responseText
 } 
}



