var url;

//Add to products 
function addproduct(pId,divid)
{
	url="add_product.asp?action=add&pId="+pId;
	//funajax1(divid,url);
	document.location.href = url;
}
//remove to products 
function removeproduct(pId,divid)
{
	url="add_product.asp?action=remove&pId="+pId;
	//funajax1(divid,url);
	document.location.href = url;
}
//Necessary function to call ajax
function funajax1(divid,url)
{
	

var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      document.getElementById(divid).innerHTML=xmlHttp.responseText;
      }
	 if(xmlHttp.readyState==1||xmlHttp.readyState==2||xmlHttp.readyState==3)
	 {
		 document.getElementById(divid).innerHTML='<div style="text-align:center">Loading...<div>';
	 }
    }

  xmlHttp.open("GET",url,true);
  xmlHttp.send(null);
  }


 
