// JavaScript Document
function ajaxsearchresult(page,parameter,responseval)
{
	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");
	    }
	 }
	 if (xmlHttp==null)
{
	alert ("Browser does not support HTTP Request")
 	return
} 
    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4 )
        {
			var ajaxDisplay = document.getElementById(responseval);
			ajaxDisplay.innerHTML="";
			document.getElementById(responseval).style.display='';
			ajaxDisplay.innerHTML = xmlHttp.responseText;
			if(responseval=="listimage")
				loadstyle(1,"");
        }
      }
   xmlHttp.open("GET",page+parameter,true);
   xmlHttp.send(null); 
 }
 function ajaxsearchresult1(page,parameter,responseval)
{
	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");
	    }
	 }
	 if (xmlHttp==null)
{
	alert ("Browser does not support HTTP Request")
 	return
} 
    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4 )
        {
			var ajaxDisplay = document.getElementById(responseval);
			ajaxDisplay.innerHTML="";
			document.getElementById(responseval).style.display='';
			val=xmlHttp.responseText.split("^");
			ajaxDisplay.innerHTML = val[0];
			
				loadstyle(1,val[2],val[1]);
        }
      }
   xmlHttp.open("GET",page+parameter,true);
   xmlHttp.send(null); 
 }
function deleterec(a,redirect)
	{
		var delval=""
		
		for(b=1;b<a;b++)
			{
				temp="ch"+b;
				
				if(document.getElementById(temp).checked==true)
					{
						delval+=document.getElementById(temp).value+"_";
						
					}
			}
			
		if(delval.length>0)
			{
				if(confirm("Are You Sure You Want To Delete This Record")==true)
					{
						window.location=redirect+"/"+delval.substr(0,delval.length-1);
					}
			}
	}