function subtotal(id_product)
{ 
var quantity=document.quantity.quantity.value;
xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="subtotal.php"
url=url+"?id_product="+id_product
url=url+"&quantity="+quantity
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged_st 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged_st() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("subtotal").innerHTML=xmlHttp.responseText 
 } 
}
