
function ajaxmain(action,id) {
	if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0)	{
		xmlHttp.open("GET", "/mainajax/" + action + "/" + id +  "/?", true);
		xmlHttp.onreadystatechange = ajaxmain_back;
		xmlHttp.send(null);
	} else setTimeout("ajaxmain('"+action+"','"+id+"')", 500);
	return false;
}

function ajaxmain_back() {
	if (xmlHttp.readyState == 4) {
		if (xmlHttp.status == 200) {
			xmlResponse = xmlHttp.responseXML;
			xmlDocumentElement = xmlResponse.documentElement;
			Content = xmlDocumentElement.firstChild.data;
			document.getElementById("basketContent").innerHTML=Content;
		} else {
			alert("There was a problem accessing the server: " +
			xmlHttp.statusText);
		}
	}
}
