// JavaScript Document

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}
//this for onkeyup for text field filtration
var http;
function showProducts(Key)
{	
	//alert(Key);
	document.getElementById("sec_store").value=Key;
	http=GetXmlHttpObject();	
	  if (http==null)
	  {
	  alert ("Browser does not support HTTP Request");
	  return;
	  }	
	var queryString="";	
	queryString +="val="+Key;
	var URL="http://www.gio.in/search_change.php?"+queryString;
	//alert(URL);
	http.open('get',URL);
	
	http.onreadystatechange=value_showProducts;
	http.send(null);
	return false;
}
function value_showProducts()
{

	if(http.readyState==4)
	{	
		document.getElementById('prodname_chng').innerHTML=http.responseText;		
	}
}
var http1;
function showProducts_reg(Key)
{	
	//alert(Key);	
	var cat_id=document.getElementById("sec_store").value;
	http1=GetXmlHttpObject();	
	  if (http==null)
	  {
	  alert ("Browser does not support HTTP Request");
	  return;
	  }	
	var queryString="";	
	queryString +="cat_id="+cat_id+ "&";	
	queryString +="val_reg="+Key;
	var URL="http://www.gio.in/search_change.php?"+queryString;
	//alert(URL);
	http1.open('get',URL);
	
	http1.onreadystatechange=value_showProducts_reg;
	http1.send(null);
	return false;
}
function value_showProducts_reg()
{

	if(http1.readyState==4)
	{	
	//alert(http1.responseText);
		document.getElementById('prodname_chng').innerHTML=http1.responseText;		
	}
}
