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;
}
function changeContact(cId)
{
	if(cId=='')
	{
		alert("Please choose a contact");
		return false;
	}
	else
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
			alert ("Browser does not support HTTP Request")
			return;
		}
		var url="information.php?id="+cId;
			//alert(url);
		xmlHttp.onreadystatechange=getInfo
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	
}


function changeOffice(cId)
{
	if(cId=='')
	{
		alert("Please choose a city");
		return false;
	}
	else
	{
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		{
			alert ("Browser does not support HTTP Request")
			return;
		}
		var url="office.php?id="+cId;
			//alert(url);
		xmlHttp.onreadystatechange=getInfo
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	
}

function getInfo() 
{ 
	 if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 	 
		document.getElementById("showContact").innerHTML=xmlHttp.responseText;
	 } 
	 else 
	 {
		document.getElementById("showContact").innerHTML="<div align='center' style='padding-top:15px;'><img src='images/loader.gif' border='0'  height='20' width='20'></div>";
		
	 }
}