function addToCart(itemID, price, qty) {

	var url = "/cart.add.x.php";
	var values = "&qty=" + urlencode(qty);
	values += "&item=" + urlencode(itemID);
	values += "&price=" + urlencode(price);

	var xmlHttp = GetXmlHttpObject();
	xmlHttp.onreadystatechange=function() {
		if(xmlHttp.readyState==4) {
			if (xmlHttp.status == 200) {
				var response = xmlHttp.responseText;
				if (response == "SUCCESS") {
					if (confirm('Item added to cart successfully.\n\nWould you like to view your cart now?')) {
						location='/cart.php';
					}
				} else {
					alert('An error occurred while attempting to add this item to your cart.');
				}
			} else {
				// HTTP Error
				alertmsg("An error occurred while attempting to save.  Please try again.  If the problem persists please contact technical support.", "ERROR");
			}
		}
	}

	xmlHttp.open("POST",url,true);
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttp.send(values);


}
