
var xmlHttp 
	function getPatient(val)
	{ 
            data=document.getElementById('doctors').value;
             xmlHttp=GetXmlHttpObject() //create object for xmlhttp
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
		var url="doctor_list.php"
		url=url+"?data="+data//send the value by query string
		xmlHttp.onreadystatechange=stateChanges 
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)
	}
	function stateChanges() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{ 
      		document.getElementById("select").innerHTML=xmlHttp.responseText;
		} 
	} 

	//function to create xmlhttpobject
	function GetXmlHttpObject()
	{ 
		var objXMLHttp=null
		if (window.XMLHttpRequest)
		{
			objXMLHttp=new XMLHttpRequest()
		}
		else if (window.ActiveXObject)
		{
			objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
		}
		return objXMLHttp
	}


function getPatientName(val)
{ 
 data=document.getElementById('patient').value;
 document.getElementById('patients').value=data;
}

function getPatientnb(val)
{ 
  data=document.getElementById('doctors').value;
  document.getElementById('doctor').value=data;

}

function checkeddd(){
 check= document.getElementById('reply').value;
 document.getElementById('doctorview').checked=true;
}

function back(){
    window.location.href="/doctor-log/";
}
function backToPatient(){
    window.location.href="/patient-log/";
}
function backToClient(){
    window.location.href="/client-log/";
}
function backToNewsletter(){
    window.location.href="/news-letter/";
}
function backToPatNewsletter(){
    window.location.href="/patient-newsletter/";
}