function getInnerText(data)
{
	 return (data.textContent || data.innerText || data.text || data.firstChild.dataValue) ;
}

//function for displaying errors
function show_error(msg)
{
		var content=document.getElementById("message");
		content.innerHTML=msg;
		content.className="message_error";
		content.style.display="bk";
}

//function to check any items selected
function isSelected()
		{
			var boxes = getElementsByClass("choose");
			var display=false;
			for (i = 0; i < boxes.length; i++){
				if (boxes[i].checked == true){
					 display=true;
					 break;
				}//ends IF
			}//ends FOR
			
			return display;
		}

//function for get elements based on class
function getElementsByClass( searchClass, domdata, tagName) {
		if (domdata == null) domdata = document;
		if (tagName == null) tagName = '*';
		var el = new Array();
		var tags = domdata.getElementsByTagName(tagName);
		var tcl = " "+searchClass+" ";
		for(i=0,j=0; i<tags.length; i++) {
			var test = " " + tags[i].className + " ";
			if (test.indexOf(tcl) != -1)
				el[j++] = tags[i];
		}
		return el;
		}
		

//global variable declaration

var curTab = 0;
var isdots = "";

//function to display ation based on district starts
function getLocation(pname,age,gender,address,nationality,phone,email,height,weight,pcomplaint,dcomplaint,rmedication,history,women)
{	
	var url="common_actionb.php?pname="+pname+"&age="+age+"&gender="+gender+"&address="+address+"&nationality="+nationality+"&phone="+phone+"&email="+email+"&height="+height+"&weight="+weight+"&pcomplaint="+pcomplaint+"&dcomplaint="+dcomplaint+"&rmedication="+rmedication+"&history="+history+"&women="+women;
	process(url,setLocation);	
	document.getElementById('thank').style.display = ""; 
}

function setLocation()
{	
	var data=handleResponse("text");

	
	if(data=="ok")
	{		
	
		setTimeout("shownow()",3000);
	}	

	return false;
}


function shownow(){
	
		document.getElementById('thank').style.display = "none"; 
		document.getElementById('thankyou').style.display = ""; 
		setTimeout("shownow1()",5000);

}


function shownow1(){
	
			document.getElementById('thankyou').style.display = "none"; 
			document.form1.pname.value = "";
			document.form1.age.value = "";
			document.form1.gender.value = "";
			document.form1.address.value = "";
			document.form1.nationality.value = "";
			document.form1.phone.value = "";
			document.form1.email.value = "";
			document.form1.height.value = "";
			document.form1.weight.value = "";
			document.form1.pcomplaint.value = "";
			document.form1.dcomplaint.value = "";
			document.form1.rmedication.value = "";
			document.form1.history.value = "";
			document.form1.women.value = "";

			
			
}


//function to display ation based on district ends



 