	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;
	}
	
	function loadsidemenu(linktype) {
		var url="printdata2.php";
		url=url+"?datatype=sidemenu&linktype="+linktype;	
		
		
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		  {
		  alert ("Your browser does not support AJAX!");
		  return;
		  } 
		
		xmlHttp.onreadystatechange=stateChanged;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	function loadresult(searchloc,pageno) {

		var url="printdata2.php";
		url=url+"?datatype=result&searchloc="+searchloc + "&pageno=" +pageno;	
		xmlHttp4=GetXmlHttpObject();
		if (xmlHttp4==null)

		  {
		  alert ("Your browser does not support AJAX!");
		  return;
		  } 

		xmlHttp4.onreadystatechange=stateChanged4;
		xmlHttp4.open("GET",url,true);
		xmlHttp4.send(null);

	}
	
	function loadmainmenu(linktype) {
		var url="printdata2.php";
		url=url+"?datatype=mainmenu&linktype="+linktype;	
		
		
		xmlHttp2=GetXmlHttpObject();
		if (xmlHttp2==null)
		  {
		  alert ("Your browser does not support AJAX!");
		  return;
		  } 
		
		xmlHttp2.onreadystatechange=stateChanged2;
		xmlHttp2.open("GET",url,true);
		xmlHttp2.send(null);
		
	}

	function loadtopmenu(linktype) {
		var url="printdata2.php";
		url=url+"?datatype=topmenu&linktype="+linktype;	
		
		
		xmlHttp3=GetXmlHttpObject();
		if (xmlHttp3==null)
		  {
		  alert ("Your browser does not support AJAX!");
		  return;
		  } 
		
		xmlHttp3.onreadystatechange=stateChanged3;
		xmlHttp3.open("GET",url,true);
		xmlHttp3.send(null);
		
	}

	function stateChanged() 
	{ 
		if (xmlHttp.readyState==4)
		{ 		
		document.getElementById("sidemenu").innerHTML=xmlHttp.responseText;
		}
	}	
	function stateChanged2() 
	{ 
		if (xmlHttp2.readyState==4)
		{ 		
		document.getElementById("mainmenu").innerHTML=xmlHttp2.responseText;
		}
	}	
	function stateChanged3() 
	{ 
		if (xmlHttp3.readyState==4)
		{ 		
		document.getElementById("topmenu").innerHTML=xmlHttp3.responseText;
		}
	}	
	function stateChanged4() 
	{ 
		if (xmlHttp4.readyState==4)
		{ 		
		document.getElementById("searchresult").innerHTML=xmlHttp4.responseText;
		}
	}		
    