// JavaScript Document
 var req;

function validate(frm) 
{
	
     var product=frm.item_name.value;
	 var qunty=frm.quantity.value;
     var size=frm.os0.value;
     var amt=frm.amount.value;
	 var Session=frm.Session.value;
    var url = "cart.php?product="+product+"&amt="+amt+"&qnty="+qunty+"&size="+size+"&session_id="+Session;
	//alert(url);
	if (typeof XMLHttpRequest != "undefined") 
    {
	 req = new XMLHttpRequest();
    } 
    else if (window.ActiveXObject) 
    {
	req = new ActiveXObject("Microsoft.XMLHTTP");
    }
    req.open("POST", url, true);
    req.onreadystatechange = callback;
    req.send(null);
	
	
 }

function callback() 
{
	 if (req.readyState == 4) 
     {
		 
         var mdiv = document.getElementById("Cart"); 
		 
		 mdiv.innerHTML = req.responseText;
			
	 }
	}     
function res(t,v)
	{
	
	var w = "";
	for (i=0; i < t.value.length; i++) {
	x = t.value.charAt(i);
	if (v.indexOf(x,0) != -1)
	w += x;
	}
	t.value = w;
	}	 
