function prodsInCat(cat_id)
{
var postVars = "cat_id="+cat_id;
goAjax(postVars,"storeBody","prodByCatListing.php");	
}

function goAjax(postVars,targetDiv,servProcFile) {
// create an ajax function to go get the products in this cat and display them in the main page
 //var postVars = postVars;
// var targetDiv = targetDiv;
 var processFile = "/__shared/_ajx/"+servProcFile ;
 
 var XMLHttpRequestObject = false;
  if (window.XMLHttpRequest) {
	XMLHttpRequestObject = new XMLHttpRequest();
  } else if (window.ActiveXObject) {
	XMLHttpRequestObject = new 
	ActiveXObject("Microsoft.XMLHTTP");
  }

  if(XMLHttpRequestObject) {
	XMLHttpRequestObject.open("POST", processFile); 
    XMLHttpRequestObject.setRequestHeader('Content-Type', 
            'application/x-www-form-urlencoded');  

	XMLHttpRequestObject.onreadystatechange = function() 
	{ 
	  if (XMLHttpRequestObject.readyState == 4 && 
		XMLHttpRequestObject.status == 200) { 
		  document.getElementById(targetDiv).innerHTML =
			XMLHttpRequestObject.responseText;
	  } 
	} 
	XMLHttpRequestObject.send(postVars); 
  } 
}// function goAjax
