var xmlHttp

function getsearch(str,page,id)
{ 
	//alert(page)
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url=page
	url=url+"?q="+str+"&page="+id
	//alert(url)
	//url=url+"&sid="+(Math.random()/0.1)
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
	xmlHttp.onreadystatechange = stateChanged

}

function stateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("listing").innerHTML=xmlHttp.responseText 
	} 
}

///////////////////////////////////////////////////////////////////////////////////////////////////////

function getsearch_sub_category(str,page,id)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url=page
	url=url+"?q="+str+"&page="+id
	//url=url+"&sid="+(Math.random()/0.1)
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
	xmlHttp.onreadystatechange = stateChanged_sub_category
	
}

function stateChanged_sub_category() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("product_sub_category_id").innerHTML=xmlHttp.responseText;			
		category_combo=document.getElementById("product_sub_category_td").innerHTML;
		var final_combo=category_combo.replace(/rahul/, "");
		document.getElementById("product_sub_category_td").innerHTML=final_combo; 
	} 
}

////////////////////////////////////////////////////////////////////////////////////////////////////

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;
}

