
var http = false;


function CreateXmlHttp()
{
	//Creating object of XMLHTTP in IE
	try
	{
		http = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e)
	{
		try
		{
			http = new ActiveXObject("Microsoft.XMLHTTP");
		} 
		catch(oc)
		{
			http = null;
		}
	}
	//Creating object of XMLHTTP in Mozilla and Safari 
	if(!http && typeof XMLHttpRequest != "undefined") 
	{
		http = new XMLHttpRequest();
	}
}


function addToBasket(CID) 
{
	CreateXmlHttp();	
	http.open("GET", "graphics.aspx?atb=" + CID, true);	
	http.onreadystatechange=function() 
	{
		if(http.readyState == 4) {
			updateBasket(http.responseText);
		}
	}
	
	http.send(null);
}


function updateBasket(res) 
{
	document.getElementById('infoField').innerHTML = res;
}


