function creat_Object()
{ 
var xmlhttp;
// This if condition for Firefox and Opera Browsers 
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') 
{
try 
{
xmlhttp = new XMLHttpRequest();
} 
catch (e) 
{
alert("Your browser is not supporting XMLHTTPRequest");
xmlhttp = false;
}
}
// else condition for ie
else
{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
return xmlhttp;
}

var request = creat_Object();

function server_interaction()
{
	if(request.readyState == 4)
	{
	var answer = request.responseText;
	document.location = document.forms[0].ProductURL.value;
	document.body.style.cursor = "default";
	}
}


function updateCart(CartID, RetailerProductID, ActionType, URL)
{
    document.body.style.cursor = "wait";       
	document.forms[0].ProductURL.value = URL;
	request.open("GET", "updateFinder.ashx?CartID=" + CartID + "&RetailerProductID=" + RetailerProductID + "&ActionType=" + ActionType); 
	request.onreadystatechange = server_interaction;
	request.send('');
}

