var xmlHttp

function show_companies_in_city(city_id)
{ 
	
	var id = city_id;
	
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null){
		 alert ("Browser does not support HTTP Request")
		 return
	}
	
	var params = "id="+id+"&sid="+Math.random();
	//alert(params)
	var uri="noshipping_ajax.php"
	//uri=uri+"?id="+banner_id
	//uri=uri+"&url="+banner_url
	//uri=uri+"&sid="+Math.random()
	xmlHttp.open("POST",uri,true)
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", params.length);
	xmlHttp.setRequestHeader("Connection", "close");
	xmlHttp.onreadystatechange=stateChanged2 
	xmlHttp.send(params)
}

function stateChanged2() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
	xmlDoc = xmlHttp.responseXML;
	container = document.getElementById('cclid');
	container.innerHTML = "";
	
	x = xmlDoc.getElementsByTagName("company");
	
	option = document.createElement("option");
	option.innerHTML =   'Alege ...';
	option.value  =  -1 ;
	container.appendChild(option);
	
	for(i=0;i<x.length;i++){		
		
		option = document.createElement("option");
		option.innerHTML =   x[i].childNodes[1].firstChild.nodeValue ;
		option.value  =  x[i].childNodes[0].firstChild.nodeValue ;
		container.appendChild(option);
		 
	}
 } 
}

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;
}
