var xmlHttp;

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

function getProducts(cid, iid, pid)
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="includes/products_inc.php"
if (cid != "") {
	url += "?cid="+cid;
}
if (iid != "") {
	url += "&iid="+iid;
}
if (pid != "") {
	url += "&pid="+pid;
}

//document.getElementById("products").innerHTML = url;

document.getElementById("products").innerHTML = "<table border='0' cellpadding='0' cellspacing='0' width='100%'><tr><td id='table_items'><p style='font-weight:bold;'><img src='images/loader_img.gif' style='padding-right:10px;' align=\"left\" />Searching Products... Please Wait...</p></td></tr></table>";

xmlHttp.onreadystatechange=stateChangedAccount
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}


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