	var xmlHttp
	var fl
/*	function Del(form1)
	{
       document.form1.action="del_dep.php";
	   document.form1.submit(); 
	}
	
	function Edit(form1)
	{
       document.form1.action="edit_dept.php";
	   document.form1.submit(); 
	}
	
	function Validate(form1)
	{
	  if (document.form1.txtname.value.length == 0) {
		alert("Please enter Department.");
		document.form1.txtname.focus();
		return false;
		}		
		document.form1.action="add_dep.php";
		document.form1.submit();
	}
	
	function clearControls(form1)
	{
		document.form1.txtname.value="";
	}*/

	function showData(str,url,elem)
	{ 
	
		fl = elem;
		xmlHttp = GetXmlHttpObject()
		if (xmlHttp == null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
		 } 
		//var url="getdep.php"
		url = url+"?q="+str
		url = url+"&sid="+Math.random()
		//document.getElementById(elem).innerHTML= "please Wait";
		xmlHttp.onreadystatechange = stateChanged
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)
	}
	
	function stateChanged() 
	{ 
		var elem = fl;
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{ 
			 document.getElementById(elem).innerHTML=xmlHttp.responseText 
		 } 
	}
	
	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;
	}