
var xmlHttp

function NotShowAjax()
{
	document.getElementById('loaderContainer').style.display='none';
	
}

function ShowAjax()
{
	document.getElementById('loaderContainer').style.display='block';
	
}


function ShowDesc(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
ShowAjax();
var url="ajax/getdescription.php"
url=url+"?id=1&option="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function ShowDescDoc(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
ShowAjax();
var url="ajax/getdescription.php"
url=url+"?id=3&option="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {
 	document.getElementById("desc").innerHTML=xmlHttp.responseText ;
 	NotShowAjax();
 } 
}

function ShowCal(month,codedoctor)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 ShowAjax();
var url="ajax/getdescription.php"
url=url+"?id=4&codedoctor="+codedoctor
if(month!="")
 url=url+"&Month="+month
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged2
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}

function stateChanged2() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {  	
	document.getElementById("desccal").innerHTML=xmlHttp.responseText;
	NotShowAjax();	
 } 
}

function ShowCity(str,expert)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
ShowAjax(); 
var url="ajax/getdescription.php"
url=url+"?id=2&option="+str+"&expert="+expert
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged1
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged1() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {  	
	document.getElementById("descity").innerHTML=xmlHttp.responseText;
	NotShowAjax();	
 } 
}


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;
}