var xmlHttp

function getdetail()
{ 
	
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		 alert ("Browser does not support HTTP Request")
		 return
	}
	var url="search.php"
	str=document.search1.keyword.value;
	alert(str);
	url=url+"?p="+str
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=stateChanged
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function stateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 	{ 
		alert(xmlHttp.responseText )
		document.getElementById("comphp").style.visibility='hidden';
		document.getElementById("comajax").style.visibility='visible';
		document.getElementById("comajax").innerHTML=xmlHttp.responseText 
		
 		//document.getElementById('comajax').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)
    	{
    		try
      		{
      			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      		}
    		catch (e)
      		{
      			alert("Your browser does not support AJAX!");
      			return false;
      		}
		}
  	}
	return xmlHttp;
}
function chk_s_select()
{
	if(document.getElementById('s_search').value=="")
	{
		document.getElementById('s_error').innerHTML="Please Select Availability of Search";
		document.getElementById('s_search').focus();
		return false;
	}/*else if(document.getElementById('keyword').value=="")
	{
		document.getElementById('s_error').innerHTML="Please Enter the Proper Search text";
		document.getElementById('keyword').focus();
		//return false;
	}*/
	return true;
}