function updateCart(IDA, TID)
{
	var QTA = document.getElementById('QTA'+IDA).value;

	CreateXmlHttpObj();

	var requestUrl = "../AJAX/updateCart.php";
	
	var params = "IDA=" + encodeURIComponent(IDA) + "&QTA=" + encodeURIComponent(QTA) + "&TID=" + encodeURIComponent(TID);
					 
	XmlHttpObj.open("POST", requestUrl,  true);

	XmlHttpObj.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	XmlHttpObj.setRequestHeader("Content-length", params.length);
	XmlHttpObj.setRequestHeader("Connection", "close");
	
	XmlHttpObj.onreadystatechange = function ()
	{
		if(XmlHttpObj.readyState == 4)
		{
			if(XmlHttpObj.status == 200)
			{
				if(XmlHttpObj.responseText == 'KO')
				{
					return false;
				}
				else if(XmlHttpObj.responseText == 'OK')
				{
					alert("QUANTITA' ARTICOLO AGGIORNATA");
					window.location = 'modulo.php';
				}
			}
			else 
			{ 
				alert("CONTROLLO : problem retrieving data from the server, status code: "  + XmlHttpObj.status); 
			}
		}
	}
	
	XmlHttpObj.send(params);
}
