
var xmlHttp;var xmlHttp2;function addToBasket(qty,id,item_desc,net_value)
{xmlHttp=GetXmlHttpObject()
xmlHttp2=GetXmlHttpObject()
if(xmlHttp==null)
{alert("Browser does not support HTTP Request");return;}
var url="/includes/basket.php";url=url+"?qty="+qty;url=url+"&id="+id;url=url+"&item_desc="+item_desc;url=url+"&net_value="+net_value;url=url+"&mysid="+Math.random();xmlHttp.onreadystatechange=thisChanged;xmlHttp.open("GET",url,true);xmlHttp.send(null);function thisChanged()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{document.getElementById("basket").innerHTML=xmlHttp.responseText;}}
if(qty!=0){var url2="/test.php";url2=url2+"?qty="+qty;url2=url2+"&id="+id;url2=url2+"&name="+item_desc;url2=url2+"&net_value="+net_value;url2=url2+"&type=add";url2=url2+"&mysid="+Math.random();jQuery.facebox({ajax:url2});}}
function deleteItem(id)
{xmlHttp=GetXmlHttpObject()
if(xmlHttp==null)
{alert("Browser does not support HTTP Request");return;}
document.getElementById("basket");var url="/includes/remove.php";url=url+"?id="+id;url=url+"&mysid="+Math.random();xmlHttp.onreadystatechange=itemRemoved;xmlHttp.open("GET",url,true);xmlHttp.send(null);function itemRemoved()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{document.getElementById("basket").innerHTML=xmlHttp.responseText;}}}
function getWeight(id,qty,value,div)
{xmlHttp=GetXmlHttpObject()
if(xmlHttp==null)
{alert("Browser does not support HTTP Request");return;}
document.getElementById(div);var url="get_weight.php";url=url+"?id="+id;url=url+"&qty="+qty;url=url+"&value="+value;url=url+"&mysid="+Math.random();xmlHttp.onreadystatechange=weightFound;xmlHttp.open("GET",url,true);xmlHttp.send(null);function weightFound()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{document.getElementById(div).innerHTML=xmlHttp.responseText;}}}
function GetXmlHttpObject()
{var xmlHttp=null;try
{xmlHttp=new XMLHttpRequest();}
catch(e)
{try
{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}}
return xmlHttp;}