/* COPYRIGHT DREW WALLER - fizzstream 2004 - 2008*/

function modquant(t) {
          if(t.id=="qty") {
	document.forms[0].elements["quantity_1"].value=t.options[t.selectedIndex].value;
	document.forms[1].elements["item_quantity_1"].value=t.options[t.selectedIndex].value;
          } else if (t.id=="qty2") {
	document.forms[2].elements["quantity_1"].value=t.options[t.selectedIndex].value;
	document.forms[3].elements["item_quantity_1"].value=t.options[t.selectedIndex].value;
          }
//	alert(t.options[t.selectedIndex].value+"  "+document.forms[3].elements["item_quantity_1"].value);
//	alert(t.id);
	};
/* PayPal */
	function doPayPal(itemname,itemamount){
		var r="http://www.equielements.co.uk/" ;  
		var cr="http://www.equielements.co.uk/index.html" ;  
		var u=self.location.href
		var ustr=u.substr(0,u.lastIndexOf("/"));
		var uniqueID=new Date().getTime();
		var currcode="GBP";

		var sform="<form id='ppform' action='https://www.paypal.com/cgi-bin/webscr' method='POST' target='_self'>"
		  +"<input type='hidden' name='cmd' value='_cart'/>"
		  +"<input type='hidden' name='business' value='bodysilicon@gmail.com'/>"
		  +"<input type='hidden' name='item_name' value='"+uniqueID+"'/>"
		  +"<input type='hidden' name='currency_code' value='"+currcode+"'/>"
		  +"<input type='hidden' name='return' value='"+r+"'/>"
		  +"<input type='hidden' name='cancel_return' value='"+cr+"'/>"
		  +"<input type='image' name='submit' src='assets/btn_buynowCC_LG.gif''/>"
		  +"<input type='hidden' name='upload' value='1'/>";
		sform+="<input type=\"hidden\" name=\"quantity_1\" value=\"1\"/> \
		            <input type=\"hidden\" name=\"shipping_1\" value=\"0\"/> \
		            <input type=\"hidden\" name=\"item_name_1\" value=\""+itemname+"\"/> \
		            <input type=\"hidden\" name=\"amount_1\" value=\""+itemamount+"\"/>";
		sform+="</form>";
		document.write(sform);

	};
	function doGCheckOut(itemname,itemamount,itemdesc){
		var sform="\
<form action=\"https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/523906665511421\" id=\"BB_BuyButtonForm\" method=\"post\" name=\"BB_BuyButtonForm\">\r\n \
    <input name=\"item_name_1\" type=\"hidden\" value=\""+itemname+"\"/>\r\n \
    <input name=\"item_description_1\" type=\"hidden\" value=\""+itemdesc+"\"/>\r\n \
    <input name=\"item_quantity_1\" type=\"hidden\" value=\"1\"/>\r\n \
    <input name=\"item_price_1\" type=\"hidden\" value=\""+itemamount+"\"/>\r\n \
    <input name=\"item_currency_1\" type=\"hidden\" value=\"GBP\"/>\r\n \
    <input name=\"_charset_\" type=\"hidden\" value=\"utf-8\"/>\r\n \
    <input alt=\"\" src=\"https://checkout.google.com/buttons/buy.gif?merchant_id=523906665511421&amp;w=117&amp;h=48&amp;style=white&amp;variant=text&amp;loc=en_UK\" type=\"image\"/>\r\n \
</form>\r\n";
		document.write(sform);
	};