// JavaScript Document

function fdoctors_search()
{
	if((formdr.drname.value=="") || (formdr.drname.value=="Name of the Doctor"))
	{
		alert("Please enter the Doctor's Name")
		return false;
	}
	else
	{
		return true;
	}
}

function doctors_search()
{

	if((frmdr.drname.value=="") || (frmdr.drname.value=="Name of the Doctor"))
	{
		document.getElementById("Sdrname").innerHTML="Please enter the doctor's name"
		return false;
	}
	else
	{
		return true;
	}
}

function fspec_search()
{

	if((formsp.drname.value=="") || (formsp.drname.value=="Name of the Specialty"))
	{
		alert("Please enter the Specialty Name")
		return false;
	}
	else
	{
		return true;
	}
}


function spec_search()
{

	if((frmdr.drname.value=="") || (frmdr.drname.value=="Name of the Doctor"))
	{
		document.getElementById("Sdrname").innerHTML="Please enter the doctor's name"
		return false;
	}
	else
	{
		return true;
	}
}

function hospital_search()
{

	if((frmhp.hosname.value=="") || (frmhp.hosname.value=="Name of the Hospital"))
	{
		document.getElementById("Shosname").innerHTML="Please enter the hospital's name"
		return false;
	}
	else
	{
		return true;
	}
}


function fhospital_search()
{

	if((formhp.hosname.value=="") || (formhp.hosname.value=="Name of the Hospital"))
	{
		alert("Please enter the Hospital Name")
		return false;
	}
	else
	{
		return true;
	}
}

function service_search()
{

	if((frmsr.sername.value=="") || (frmsr.sername.value=="Name of the Service"))
	{
		document.getElementById("Ssername").innerHTML="Please enter the service name"
		return false;
	}
	else
	{
		return true;
	}
}


function fservice_search()
{

	if((formsr.sername.value=="") || (formsr.sername.value=="Name of the Service"))
	{
		alert("Please enter the Service Name")
		return false;
	}
	else
	{
		return true;
	}
}


function clrdr()
{
	frmdr.drname.value=""
	frmdr.action = "doctors-details.asp";
	frmdr.method="post"
	frmdr.submit()
}

function clrsp()
{
	frmdr.drname.value=""
	frmdr.action = "specialist-details.asp";
	frmdr.method="post"
	frmdr.submit()
}

function clrhp()
{
	frmhp.hosname.value=""
	frmhp.action = "hospital-details.asp";
	frmhp.method="post"
	frmhp.submit()
}

function clrsr()
{
	frmsr.sername.value=""
	frmsr.action = "services-details.asp";
	frmsr.method="post"
	frmsr.submit()
}

function clr_dr()
{
	if(frmdr.drname.value=="Name of the Doctor")
		frmdr.drname.value=""
}

function ent_dr()
{
	if(frmdr.drname.value=="")
		frmdr.drname.value="Name of the Doctor"
}

function clr_sr()
{
	if(frmsr.sername.value=="Name of the Service")
		frmsr.sername.value=""
}

function ent_sr()
{
	if(frmsr.sername.value=="")
		frmsr.sername.value="Name of the Service"
}

function clr_hp()
{
	if(frmhp.hosname.value=="Name of the Hospital")
		frmhp.hosname.value=""
}

function ent_hp()
{
	if(frmhp.hosname.value=="")
		frmhp.hosname.value="Name of the Hospital"
}




function Search_doctor(cat)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CatId";
	Input.id = "CatId";
	Input.value = cat;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "DrName";
	Input.id = "DrName";
	Input.value = document.getElementById("drname").value;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "doctors-location.asp";
	Form.method="post"
	Form.submit();
}


function Search_service1(ser)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "serid";
	Input.id = "serid";
	Input.value = ser;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "sername";
	Input.id = "sername";
	Input.value = document.getElementById("sername").value;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "services-location.asp";
	Form.method="post"
	Form.submit();
}

function Search_specialty(cat)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CatId";
	Input.id = "CatId";
	Input.value = cat;
	Form.appendChild(Input);

	document.body.appendChild(Form);
//	Form.action = "doctors-specialty.asp";
	Form.action = "doctors-details.asp";
	Form.method="post"
	Form.submit();
}


function Search_hospital(cat)
{

	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CatId";
	Input.id = "CatId";
	Input.value = cat;
	Form.appendChild(Input);

	document.body.appendChild(Form);
//	Form.action = "hospital-search.asp";
	Form.action = "hospital-details.asp";
	Form.method="post"
	Form.submit();
}

function Search_services(ser)
{
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "ServId";
	Input.id = "ServId";
	Input.value = ser;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	//Form.action = "services-list.asp";
	Form.action = "services-details.asp";
	Form.method="post"
	Form.submit();
}


function Search_service(ser)
{

	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "serid";
	Input.id = "serid";
	Input.value = ser;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "services-details.asp";
	Form.method="post"
	Form.submit();
}



function view_doctors_location(alpha,CatId)
{

		objXMLHttpRequest.onreadystatechange=view_doctors_location_output;
		var Url = "doctors_location_load.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.chennai-doctors.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send('alpha=' + alpha + '&CatId=' + CatId); //Data - to be sent to the server......	
}

function view_doctors_location_output()
{
	if (objXMLHttpRequest.readyState == 4) 
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("$$$");
		a=MsgStr[1]
	var disp;		
		if(a==2)
		{
			disp="Det"
			disp_text="Details"
		}
		else
		{
			disp="Doctors_"+a
			disp_text="Doc_"+a
		}
					
			if (objXMLHttpRequest.status == 200) 
			{
				document.getElementById(disp).innerHTML=objXMLHttpRequest.responseText
				document.getElementById(disp_text).innerHTML ="Close"
				objXMLHttpRequest.abort();
			} 		
			else 
			{
				alert("Problem with the server response " + objXMLHttpRequest.statusText);
			}		

		var browser=navigator.appName
		if (browser=="Netscape")
		{
			var requestTimer = setTimeout(function() { objXMLHttpRequest.abort(); }, 0);
			clearTimeout(requestTimer);
		}
		else
  		{
			objXMLHttpRequest.abort()
		}
	}
	
	else
	{
		document.getElementById(disp).innerHTML = "<font face='verdana' size='2'><em>Loading...</em></font>"
	}
}


function view_services_location(alpha,ServId)
{

		objXMLHttpRequest.onreadystatechange=view_services_location_output;
		var Url = "services_location_load.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.chennai-doctors.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send('alpha=' + alpha + '&ServId=' + ServId); //Data - to be sent to the server......	
}

function view_services_location_output()
{
	if (objXMLHttpRequest.readyState == 4) 
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("$$$");
		a=MsgStr[1]
	var disp;		
		if(a==2)
		{
			disp="Det"
			disp_text="Details"
		}
		else
		{
			disp="Doctors_"+a
			disp_text="Doc_"+a
		}
					
			if (objXMLHttpRequest.status == 200) 
			{
				document.getElementById(disp).innerHTML=objXMLHttpRequest.responseText
				document.getElementById(disp_text).innerHTML ="Close"
				objXMLHttpRequest.abort();
			} 		
			else 
			{
				alert("Problem with the server response " + objXMLHttpRequest.statusText);
			}		

		var browser=navigator.appName
		if (browser=="Netscape")
		{
			var requestTimer = setTimeout(function() { objXMLHttpRequest.abort(); }, 0);
			clearTimeout(requestTimer);
		}
		else
  		{
			objXMLHttpRequest.abort()
		}
	}
	
	else
	{
		document.getElementById(disp).innerHTML = "<font face='verdana' size='2'><em>Loading...</em></font>"
	}
}



function view_service_details(servid,locid)
{

	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "servid";
	Input.id = "servid";
	Input.value = servid;
	Form.appendChild(Input);	

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "LocId";
	Input.id = "LocId";
	Input.value = locid;
	Form.appendChild(Input);
	 
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = 1;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "services-details.asp";
	Form.method="post"
	Form.submit();
}


function view_hospitals_location(alpha,CatId)
{

		objXMLHttpRequest.onreadystatechange=view_hospitals_location_output;
		var Url = "hospitals_location_load.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.chennai-doctors.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send('alpha=' + alpha + '&CatId=' + CatId); //Data - to be sent to the server......	
}

function view_hospitals_location_output()
{
	if (objXMLHttpRequest.readyState == 4) 
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("$$$");
		a=MsgStr[1]
	var disp;		
		if(a==2)
		{
			disp="Det"
			disp_text="Details"
		}
		else
		{
			disp="Doctors_"+a
			disp_text="Doc_"+a
		}
					
			if (objXMLHttpRequest.status == 200) 
			{
				document.getElementById(disp).innerHTML=objXMLHttpRequest.responseText
				document.getElementById(disp_text).innerHTML ="Close"
				objXMLHttpRequest.abort();
			} 		
			else 
			{
				alert("Problem with the server response " + objXMLHttpRequest.statusText);
			}		

		var browser=navigator.appName
		if (browser=="Netscape")
		{
			var requestTimer = setTimeout(function() { objXMLHttpRequest.abort(); }, 0);
			clearTimeout(requestTimer);
		}
		else
  		{
			objXMLHttpRequest.abort()
		}
	}
	
	else
	{
		document.getElementById(disp).innerHTML = "<font face='verdana' size='2'><em>Loading...</em></font>"
	}
}



function view_hospitals_details(CatId,locid)
{

	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CatId";
	Input.id = "CatId";
	Input.value = CatId;
	Form.appendChild(Input);	

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "LocId";
	Input.id = "LocId";
	Input.value = locid;
	Form.appendChild(Input);
	 
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = 1;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "hospital-details.asp";
	Form.method="post"
	Form.submit();
}







function dispclose(Id)
{
		document.getElementById("Doctors_"+Id).innerHTML="";
		document.getElementById("Doc_"+Id).innerHTML ="View"		
}


function view_doctors_details(drid)
{

	if(document.getElementById("Doc_"+drid).innerHTML =="Close")
		drclose(drid)
	else
	{		
		objXMLHttpRequest.onreadystatechange=view_doctors_details_output;
		var Url = "doctors_details_load.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.chennai-doctors.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send('drid=' + drid ); //Data - to be sent to the server......	
	}
}

function view_doctors_details_output()
{
	if (objXMLHttpRequest.readyState == 4) 
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("$$$");
		a=MsgStr[1]
	var disp;		
		if(a==2)
		{
			disp="Det"
			disp_text="Details"
		}
		else
		{
			disp="Dr_"+a
			disp_text="Doc_"+a
		}
					
			if (objXMLHttpRequest.status == 200) 
			{
				document.getElementById(disp).innerHTML=objXMLHttpRequest.responseText
				document.getElementById(disp_text).innerHTML ="Close"
				objXMLHttpRequest.abort();
			} 		
			else 
			{
				alert("Problem with the server response " + objXMLHttpRequest.statusText);
			}		

		var browser=navigator.appName
		if (browser=="Netscape")
		{
			var requestTimer = setTimeout(function() { objXMLHttpRequest.abort(); }, 0);
			clearTimeout(requestTimer);
		}
		else
  		{
			objXMLHttpRequest.abort()
		}
	}
	
	else
	{
		document.getElementById(disp).innerHTML = "<font face='verdana' size='2'><em>Loading...</em></font>"
	}
}



function drclose(Id)
{
		document.getElementById("Dr_"+Id).innerHTML="";
		//document.getElementById("Doc_"+Id).innerHTML ="View"		
		document.getElementById("Doc_"+Id).innerHTML ="<img src='images/img-view-detail-animate.gif' border='0'>"		
}



function view_doctors_address(drid)
{

	if(document.getElementById("Dochide_"+drid).innerHTML =="Close")
		draclose(drid)
	else
	{		
		objXMLHttpRequest.onreadystatechange=view_doctors_address_output;
		var Url = "doctors_address_load.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.chennai-doctors.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send('drid=' + drid ); //Data - to be sent to the server......	
	}
}

function view_doctors_address_output()
{
	if (objXMLHttpRequest.readyState == 4) 
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("$$$");
		a=MsgStr[1]
	var disp;		
		if(a==2)
		{
			disp="Det"
			disp_text="Details"
		}
		else
		{
			disp="Dr_"+a
			disp_text="Dochide_"+a
		}
					
			if (objXMLHttpRequest.status == 200) 
			{
				document.getElementById(disp).innerHTML=objXMLHttpRequest.responseText
				document.getElementById(disp_text).innerHTML ="Close"
				objXMLHttpRequest.abort();
			} 		
			else 
			{
				alert("Problem with the server response " + objXMLHttpRequest.statusText);
			}		

		var browser=navigator.appName
		if (browser=="Netscape")
		{
			var requestTimer = setTimeout(function() { objXMLHttpRequest.abort(); }, 0);
			clearTimeout(requestTimer);
		}
		else
  		{
			objXMLHttpRequest.abort()
		}
	}
	
	else
	{
		document.getElementById(disp).innerHTML = "<font face='verdana' size='2'><em>Loading...</em></font>"
	}
}



function draclose(Id)
{
		document.getElementById("Dr_"+Id).innerHTML="";
		document.getElementById("Dochide_"+Id).innerHTML ="View"		
}


function view_specialist_details(locid,catid)
{

	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CatId";
	Input.id = "CatId";
	Input.value = catid;
	Form.appendChild(Input);	

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "LocId";
	Input.id = "LocId";
	Input.value = locid;
	Form.appendChild(Input);
	 
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "DoctorName";
	Input.id = "DoctorName";
	Input.value = document.getElementById("drname").value;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = 1;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "specialist-details.asp";
	Form.method="post"
	Form.submit();
}

function view_hospital_details(catid,locid)
{

	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CatId";
	Input.id = "CatId";
	Input.value = catid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "LocId";
	Input.id = "LocId";
	Input.value = locid;
	Form.appendChild(Input);

Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = 1;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "hospital-details.asp";
	Form.method="post"
	Form.submit();
}

function view_hospital_details11(locid)
{

	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "LocId";
	Input.id = "LocId";
	Input.value = locid;
	Form.appendChild(Input);

Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = 1;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "hospital-details.asp";
	Form.method="post"
	Form.submit();
}


function view_dr_details(locid,catid)
{

	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CatId";
	Input.id = "CatId";
	Input.value = catid;
	Form.appendChild(Input);	

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "LocId";
	Input.id = "LocId";
	Input.value = locid;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = 1;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "doctors-details.asp";
	Form.method="post"
	Form.submit();
}

function view_doctor_details(catid,locid)
{

	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CatId";
	Input.id = "CatId";
	Input.value = catid;
	Form.appendChild(Input);	

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "LocId";
	Input.id = "LocId";
	Input.value = locid;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = 1;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "doctors-details.asp";
	Form.method="post"
	Form.submit();
}


function view_service_details(servid,locid)
{

	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "servid";
	Input.id = "servid";
	Input.value = servid;
	Form.appendChild(Input);	

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "LocId";
	Input.id = "LocId";
	Input.value = locid;
	Form.appendChild(Input);

	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = 1;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "services-details.asp";
	Form.method="post"
	Form.submit();
}

function Search_Doctors(id,catid,locid,drname)
 {
 
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = id;
	Form.appendChild(Input);
		
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CatId";
	Input.id = "CatId";
	Input.value = catid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "locid";
	Input.id = "locid";
	Input.value = locid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "drname";
	Input.id = "drname";
	Input.value = drname;
	Form.appendChild(Input);		

	document.body.appendChild(Form);
	Form.action = "doctors-details.asp";
	Form.method="post"
	Form.submit();	
}

function Search_Hospitals(id,catid, locid)
 {
 
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = id;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "catid";
	Input.id = "catid";
	Input.value = catid;
	Form.appendChild(Input);
		
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "locid";
	Input.id = "locid";
	Input.value = locid;
	Form.appendChild(Input);

	document.body.appendChild(Form);
	Form.action = "hospital-details.asp";
	Form.method="post"
	Form.submit();	
}

function Search_Specialist(id,catid,locid,drname)
 {
 
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = id;
	Form.appendChild(Input);
		
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "CatId";
	Input.id = "CatId";
	Input.value = catid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "locid";
	Input.id = "locid";
	Input.value = locid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "drname";
	Input.id = "drname";
	Input.value = drname;
	Form.appendChild(Input);		

	document.body.appendChild(Form);
	Form.action = "specialist-details.asp";
	Form.method="post"
	Form.submit();	
}


function Search_Services(id,serid,locid,sername)
 {
 
	Form = document.createElement("form");
	Form.name = "frmSrch";
	Form.id = "frmSrch";
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "mypage";
	Input.id = "mypage";
	Input.value = id;
	Form.appendChild(Input);
		
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "servid";
	Input.id = "serivd";
	Input.value = serid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "locid";
	Input.id = "locid";
	Input.value = locid;
	Form.appendChild(Input);
	
	Input = document.createElement("input");
	Input.type = "hidden";
	Input.name = "sername";
	Input.id = "sername";
	Input.value = sername;
	Form.appendChild(Input);		

	document.body.appendChild(Form);
	Form.action = "services-details.asp";
	Form.method="post"
	Form.submit();	
}


function view_hospital_location(alpha)
{

var HosName;
HosName=document.getElementById("hosname").value;
if(HosName="Name of the Hospital")
HosName="";

	if(document.getElementById("Doc_"+alpha).innerHTML =="Close")
		dispclose(alpha)
	else
	{	
		objXMLHttpRequest.onreadystatechange=view_hospital_location_output;
		var Url = "hospital_location_load.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.chennai-doctors.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send('alpha=' + alpha + '&hosname=' + HosName ); //Data - to be sent to the server......	
	}
}

function view_hospital_location_output()
{
	if (objXMLHttpRequest.readyState == 4) 
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("$$$");
		a=MsgStr[1]
	var disp;		
		if(a==2)
		{
			disp="Det"
			disp_text="Details"
		}
		else
		{
			disp="Doctors_"+a
			disp_text="Doc_"+a
		}
					
			if (objXMLHttpRequest.status == 200) 
			{
				document.getElementById(disp).innerHTML=objXMLHttpRequest.responseText
				document.getElementById(disp_text).innerHTML ="Close"
				objXMLHttpRequest.abort();
			} 		
			else 
			{
				alert("Problem with the server response " + objXMLHttpRequest.statusText);
			}		

		var browser=navigator.appName
		if (browser=="Netscape")
		{
			var requestTimer = setTimeout(function() { objXMLHttpRequest.abort(); }, 0);
			clearTimeout(requestTimer);
		}
		else
  		{
			objXMLHttpRequest.abort()
		}
	}
	
	else
	{
		document.getElementById(disp).innerHTML = "<font face='verdana' size='2'><em>Loading...</em></font>"
	}
}



function dispclose(Id)
{
		document.getElementById("Doctors_"+Id).innerHTML="";
		document.getElementById("Doc_"+Id).innerHTML ="View"		
}




function view_service_location(alpha,serid)
{
var sername;
sername=document.getElementById("sername").value;
if(sername="Name of the Service")
sername="";

	if(document.getElementById("Doc_"+alpha).innerHTML =="Close")
		dispclose(alpha)
	else
	{	
		objXMLHttpRequest.onreadystatechange=view_service_location_output;
		var Url = "service_location_load.asp"; 
		objXMLHttpRequest.open("POST",Url,true);
		objXMLHttpRequest.setRequestHeader("Host","www.chennai-doctors.com");
		objXMLHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		objXMLHttpRequest.setRequestHeader("Content-Length","12");
		objXMLHttpRequest.send('alpha=' + alpha + '&sername=' + sername +'&serid=' + serid); //Data - to be sent to the server......	
	}
}

function view_service_location_output()
{
	if (objXMLHttpRequest.readyState == 4) 
	{
		var	MsgStr = objXMLHttpRequest.responseText.split("$$$");
		a=MsgStr[1]
	var disp;		
		if(a==2)
		{
			disp="Det"
			disp_text="Details"
		}
		else
		{
			disp="Doctors_"+a
			disp_text="Doc_"+a
		}
					
			if (objXMLHttpRequest.status == 200) 
			{
				document.getElementById(disp).innerHTML=objXMLHttpRequest.responseText
				document.getElementById(disp_text).innerHTML ="Close"
				objXMLHttpRequest.abort();
			} 		
			else 
			{
				alert("Problem with the server response " + objXMLHttpRequest.statusText);
			}		

		var browser=navigator.appName
		if (browser=="Netscape")
		{
			var requestTimer = setTimeout(function() { objXMLHttpRequest.abort(); }, 0);
			clearTimeout(requestTimer);
		}
		else
  		{
			objXMLHttpRequest.abort()
		}
	}
	
	else
	{
		document.getElementById(disp).innerHTML = "<font face='verdana' size='2'><em>Loading...</em></font>"
	}
}


function fixloc()
{



var a;
a=document.fixloca.locplace.options[document.fixloca.locplace.selectedIndex].value

document.fixloca.loc.value=a;
document.fixloca.submit()

}

function fixcat()
{
var a;
a=document.fixcatt.catdisp.options[document.fixcatt.catdisp.selectedIndex].value
document.fixcatt.cat.value=a;
document.fixcatt.submit()

}

function locclick(catid)
{
var a;
a=document.frmloc.doclocation.options[document.frmloc.doclocation.selectedIndex].value
view_dr_details(a,catid)
}

function Hlocclick(catid)
{
var a;
a=document.frmloc.doclocation.options[document.frmloc.doclocation.selectedIndex].value
view_hospitals_details(catid,a)
}

function Slocclick(servid)
{
var a;
a=document.frmloc.doclocation.options[document.frmloc.doclocation.selectedIndex].value
view_service_details(servid,a)
}
