

var xmlHttp;
var xmlHttp2;
////////////////////////////////////////////////////////////////////////////////////
function addToBasket(qty,id,item_desc,net_value,machines)
{

xmlHttp=GetXmlHttpObject()
xmlHttp2=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 } 

//document.getElementById("basket").innerHTML = '<p style="margin:10px 0px 0px 60px;"><img src="graphics/trans_loading.gif" border="0"></p>';

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+"&machines="+machines;
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;
	
	 } 
	}
	
	
	
	
var url2="/includes/reply.php";
url2=url2+"?qty="+qty;
url2=url2+"&id="+id;
url2=url2+"&mysid="+Math.random();
xmlHttp2.onreadystatechange=reply ;
xmlHttp2.open("GET",url2,true);
xmlHttp2.send(null);


function reply() 
	{ 
	if (xmlHttp2.readyState==4 || xmlHttp2.readyState=="complete")
	 { 
		document.getElementById($id). innerHTML=xmlHttp2.responseText;
	
	 } 
	}
	



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