  var url = "get_city.php?catid="; // The server-side script 
       function handleHttpResponse() {    
        if (http.readyState == 4) { 
              if(http.status==200) { 
                  var results=http.responseText; 
              document.getElementById('res_city').innerHTML = results; 
              } 
              } else{
		document.getElementById('res_city').innerHTML = "<img src='images/loading.gif' alt='جاري التحميل'>";
			  }
        } 
        
          function get_city() {      
            var mohfza = document.getElementById("country"); 
			 var mvalue = mohfza.options[mohfza.selectedIndex].value;
            http.open("GET", url+mvalue+"&uniq="+Math.random(), true); 
            http.onreadystatechange = handleHttpResponse; 
            http.send(null); 
        }
		          function thecity() {      
            var city = document.getElementById("city"); 
			 var cityvalue = city.options[city.selectedIndex].value;
			var citytester=document.getElementById("citytester"); 
			citytester.value=cityvalue;
        }
		////////////////////////////////	
		
		
		
function getHTTPObject() { 
  var xmlhttp; 

  if(window.XMLHttpRequest){ 
    xmlhttp = new XMLHttpRequest(); 
  } 
  else if (window.ActiveXObject){ 
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 
    if (!xmlhttp){ 
        xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); 
    } 
    
} 
  return xmlhttp; 

  
} 
var http = getHTTPObject(); // We create the HTTP Object 


