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


// Add/Update/Delete Option Data From Product Form
function addToBasket(product_id, qty) {
		
	var service = "../_services/basket.php?action=addToBasket&product_id="+product_id+"&qty="+qty;
	
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request");
		return;
	} 
	xmlHttp.onreadystatechange=addToBasketResponse;
	xmlHttp.open("GET",service,true);
	xmlHttp.send(null);
}

function addToBasketResponse() {
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
		
		var tmp = xmlHttp.responseText;
		alert(tmp);
	}
}





