var xmlHttp


function display_gmap(id)
{
 	//alert(id);
	if(id.length==0)
	 { 
			 document.getElementById("divdisplaygmap").innerHTML="";
			 document.getElementById("divdisplaygmap").style.border="0px";
			 return
	 }
			 
	xmlHttp=GetXmlHttpObject()

	if (xmlHttp==null)
	 {
		alert ("Browser does not support HTTP Request")
		 return
	 } 

	/*var t1 = "**am**";
	var t2 = "**pm**";
	var doctor_name = doctor_name.replace(/&/g, t1);
	doctor_name = doctor_name.replace("?","**pm**");
	*/
	
	var url="/googlemap/load-map.php"
	passdata="id="+id
	//alert(passdata);
	xmlHttp.onreadystatechange=stateChanged
	xmlHttp.open("POST",url,true)
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", passdata.length);
	xmlHttp.send(passdata)
	
} 

function stateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 

    	//document.getElementById("divdisplayimg").style.display='block';
		//document.getElementById("fullimgsection").style.display = 'none';
		document.getElementById("divdisplaygmap").innerHTML=xmlHttp.responseText;
		document.getElementById("divdisplaygmap").style.border="0px solid #A5ACB2";
	 } 
}





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