
	
function xmlhttpPost(strURL,param,paramb) 
{
	  var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) 
    {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    //sleep(20);
   //alert("...");
   // alert("p"+strURL+" "+param+" "+paramb);
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    //alert("p"+strURL+" "+param+" "+paramb);
       //sleep(30);
     //  alert("...");
    self.xmlHttpReq.onreadystatechange = function() {
		if (self.xmlHttpReq.readyState == 4) 
		{
			   // alert("p");
			var s = self.xmlHttpReq.responseText.split("|");
		//	alert("p"+self.xmlHttpReq.responseText);
			if (s[0]=="ok")
			{
				uurl = s[1];
				uid = s[2];
		
				document.getElementById("response").innerHTML ='Redirecting to PayPal...';
				document.getElementById("custom").value =uurl;
				document.payPalForm.action = "https://www.paypal.com/cgi-bin/webscr";
				document.getElementById("return").value ="http://www.limpfish.com/download/"+uurl+"/";
				document.getElementById("item_number").value =s[3];
				document.getElementById("item_name").value =s[4];

				document.payPalForm.submit();

			}
			
		}
	}
    

    self.xmlHttpReq.send("amount="+escape(param)+"&f="+escape(paramb));
       
}
function checkout()
{
document.getElementById("go").disabled=true;

document.getElementById("response").innerHTML ='Please wait...';

amount=''+document.getElementById("amount").value;

f=''+document.getElementById("f").value;

xmlhttpPost("http://www.limpfish.com/donate/",amount,f);
document.getElementById("go").disabled=false;
return false;
}

