var xmlhttp;
var cat_id;
function get_brand_product(url,brand_val,cat)
{
cat_id=cat;
url=url+"?brandId="+brand_val+"&cat_id="+cat_id;

xmlhttp=null;
if (window.XMLHttpRequest)
  {// code for Firefox, Opera, IE7, etc.
  xmlhttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
if (xmlhttp!=null)
  {
  xmlhttp.onreadystatechange=state_Change;
  xmlhttp.open("GET",url,true);
  xmlhttp.send(null);
  }
else
  {
  alert("Failed To Load Brand Product");
  }
}

function state_Change()
{
if (xmlhttp.readyState==4)
  {// 4 = "loaded"
  if (xmlhttp.status==200)
    {// 200 = "OK"
       if(cat_id==1)
	   {
	     document.getElementById('product_brand').innerHTML=xmlhttp.responseText;
	     document.getElementById('slt_product').style.display="block";
	   }
	  else
	   {
	     document.getElementById('product_brand_right').innerHTML=xmlhttp.responseText;
	     document.getElementById('slt_product_right').style.display="block";
	   }
    }
  else
    {
      alert("Failed To Load Brand Product");
    }
  }
}



