function update_price(product_price,id)
{               
    var token     = document.getElementById("price2");
    var text      = document.getElementById("passenger_name_"+id).value;     
    if (window.ActiveXObject)
            {
              httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
            }
            else
            {
              httpRequest = new XMLHttpRequest();
            }
    httpRequest.open("GET", "/inc/rezervovat.inc.php?id2="+id+"&price="+product_price+"&text="+text, true);
    httpRequest.onreadystatechange= function () {processRequest(); } ;
    httpRequest.send(null);
   
}

function processRequest()
{
    var token     = document.getElementById("price2");    
    if(httpRequest.status == 200)
    {
      token.innerHTML = httpRequest.responseText;
    }
    else
    {
      token.innerHTML = '';
    }

}

