var xmlHttp;var xmlHttp2;function addToBasket(qty,id,item_desc,net_value,colour,weight)
{var mytime="&ms="+new Date().getTime();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+"&colour="+colour;url=url+"&weight="+weight;url=url+"&mytime="+mytime;xmlHttp.onreadystatechange=thisChanged;xmlHttp.open("GET",url,true);xmlHttp.send(null);var value=0;var div="id_"+id;var url2="/includes/added.php";url2=url2+"?qty="+qty;url2=url2+"&id="+id;url2=url2+"&item_desc="+item_desc;url2=url2+"&net_value="+net_value;url2=url2+"&mytime="+mytime;xmlHttp2.onreadystatechange=addedChanged;xmlHttp2.open("GET",url2,true);xmlHttp2.send(null);function thisChanged()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{document.getElementById("cart_left").innerHTML=xmlHttp.responseText;}}
function addedChanged()
{if(xmlHttp2.readyState==4||xmlHttp2.readyState=="complete")
{document.getElementById(div).innerHTML=xmlHttp2.responseText;}}}
function deleteItem(id)
{var mytime="&ms="+new Date().getTime();xmlHttp=GetXmlHttpObject()
if(xmlHttp==null)
{alert("Browser does not support HTTP Request");return;}
var url="/includes/remove.php";url=url+"?id="+id;url=url+"&mytime="+mytime;xmlHttp.onreadystatechange=itemRemoved;xmlHttp.open("GET",url,true);xmlHttp.send(null);function itemRemoved()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{document.getElementById("the_basket").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;}
