//user ajax method by create XmlhttpObject object
function changePrice(quantity,price)
{
	xmlhttp=GetXmlHttpObject();
	if (xmlhttp==null)
  {
	  alert ("Browser does not support HTTP Request");
	  return;
  }
	var tourl = 'change_price.php';
	tourl=tourl+"?price=" + price;
	tourl=tourl+"&quantity=" + quantity;
	xmlhttp.onreadystatechange=stateChanged;
	xmlhttp.open("GET",tourl,true);
	xmlhttp.send(null);
}
function stateChanged()
{
	if (xmlhttp.readyState==4)
	{
		document.getElementById("price_show").innerHTML=xmlhttp.responseText;
	}
}

function GetXmlHttpObject()
{
	if (window.XMLHttpRequest)
	  {
		  // code for IE7+, Firefox, Chrome, Opera, Safari
		  return new XMLHttpRequest();
	  }
	if (window.ActiveXObject)
	  {
		  // code for IE6, IE5
		  return new ActiveXObject("Microsoft.XMLHTTP");
	  }
	return null;
}

//user ajax method by jquery
function getFinalPrice(quantity,price)
{
   $.ajax({
	   type: "POST",
	   url: "change_price.php",
	   data: "quantity="+quantity+"&price="+price,
	   success: function(html){
	    $("#price_show").html(html);
	  }
	});
}

//user ajax method by jquery
function updateCart()
{
	document.cart_quantity.submit();
}