// THE FOLLOWING JAVASCRIPT PLACES THE BUY AND BASKET LINKS AT THE TOP RIGHT OF THE PAGE.

var dw='';


function Validator(theForm,whichButton) {

<!-- VALIDATES THE DROP DOWN INFO -->
	var error = ""; 
	if (theForm.os0.options[0].selected == true) { error += "Please select from the dropdown list."; }
	if (error != "") {
		alert(error);
		return (false); }
	else { return (true); }
}


<!-- HEADER -->
dw+='<h2 style="margin-top: 2px;">Payment Panel</h2>';

<!-- IF-LOOP CHECKS TO SEE IF THE TRICK IS A FREEBIE OR DELETED TRICK -->
if(prod[p][5]!="") {

<!-- MAIN ADD TO CART FORM -->
dw+='<form name="paypal" target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" onsubmit="return Validator(this,whichPressed);">';
	<!-- DROP-DOWN SELECTION - UK -->
	for (j=0;j<productoptions.length;j++) {
	if (prod[p][0]==productoptions[j][0]) {
	dw+='<p style="margin-top: 0px; margin-bottom: 10px;"><input type="hidden" name="on0" value="'+productoptions[j][1]+'">';
	dw+='<select name="os0">';
	for (i=2;i<productoptions[j].length;i++) {
	dw+='<option value="'+productoptions[j][i]+'">'+productoptions[j][i];
	}
	dw+='</select></p>';
	}
	}
<!-- ADD TO CART BUTTON -->
dw+='<input type="image" name="submit" src="https://static.e-junkie.com/sslpic/16460.9aead88015800c02f963d7203fb07faa.gif" lowsrc="../../graphics/buttons/cart_add.gif" name="submit" alt="Add this item to you shopping cart" onclick="whichPressed=this.value" />';

dw+='<input type="hidden" name="item_name" value="'+prod[p][1]+' ['+prod[p][0]+']" />';
dw+='<input type="hidden" name="amount" value="'+prod[p][5]+'" />';
dw+='<input type="hidden" name="add" value="1" />';
dw+='<input type="hidden" name="cmd" value="_cart" />';
dw+='<input type="hidden" name="business" value="magic_zane@btinternet.com" />';
dw+='<input type="hidden" name="no_note" value="1" />';
dw+='<input type="hidden" name="currency_code" value="GBP" />';
dw+='<input type="hidden" name="lc"value="GB" />';
dw+='<input type="hidden" name="bn" value="PP-ShopCartBF" />';
dw+='</form>';


<!-- VIEW CART BUTTON -->
dw+='<p style="margin-top: 8px; margin-bottom: 0px;"><a href="https://www.paypal.com/cart/display=1&business=magic_zane@btinternet.com" target="_blank"><img src="https://www.e-junkie.com/sslpic/5347.9b3121d3867d37d919ede42cc49d6e88.gif" border="0"></a></p>';


<!-- EMAIL BUTTON -->
dw+='<p style="margin-top: 8px; margin-bottom: 0px;"><a href="JavaScript:;" onclick="window.location.href=\'mailto:'+shopEmailAddress+'?subject=Product Query: '+prod[p][1]+' ('+prod[p][0]+')\'" title="Contact us with any questions about this trick"><img src="../../graphics/buttons/email_query.gif" border="0" style="border:none;"></a></p>';


<!-- PAY BY POST BUTTON -->
dw+='<p style="margin-top: 8px; margin-bottom: 0px;"><a href="../../info/offline_payment.html" title="Click here to find out how to pay by cheque or postal order"><img src="../../graphics/buttons/pay_by_post.gif" border="0" style="border:none;"></a></p>';


<!-- TELEPHONE ENQUIRIES -->
dw+='<p style="margin-top: 8px; margin-bottom: 0px;"><a href="../../info/contact.html" title="Contact us by phone with any questions"><img src="../../graphics/shop/phone_number_prod_page.gif" border="0"></a></p>';


<!-- PAYMENT EXPLAINED LINK -->
dw+='<p style="margin-top: 3px; margin-bottom: 8px;"><a href="../../info/about_payment.html" title="CLICK HERE TO FIND OUT HOW OUR PAYMENT SYSTEM WORKS">[Payment Explained]</a></p>';

}
<!-- END OF IF-LOOP -->


else { dw+='<p>Sorry\, this product is not available for purchase.</p>'; }

document.write(dw);
