// JavaScript Library for PayPal Shopping Cart

var c_email = "ddyment@oratory.com";

function CartItemButton(c_item,c_price,c_region) {
    document.write('<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"><img src="images/xdot.gif" alt="" width="1" height="17" border="0">&ldquo;' + c_item + '&rdquo; (for <b>' + c_region + '</b> delivery)<br><input type="image" src="images/add-cart.gif" width="124" height="26" border="0" name="submit" alt="All prices include shipping and handling." title="All prices include shipping and handling."><img src="images/xdot.gif" width="3" height="1"><input type="hidden" name="add" value="1"><input type="hidden" name="cmd" value="_cart"><input type="hidden" name="business" value="' + c_email + '"><input type="hidden" name="item_name" value="' + c_item + ' - ' + c_region + ' Delivery"><input type="hidden" name="amount" value="' + c_price + '"><input type="hidden" name="no_shipping" value="2"><input type="hidden" name="return" value="http://deceptionary.com/"><input type="hidden" name="cancel_return" value="http://deceptionary.com/"><input type="hidden" name="currency_code" value="USD"></form>');
}

function CartEntry(c_item,c_price_na,c_price_ww) {
    document.write('<div align="right">');
    CartItemButton(c_item,c_price_na,"CA/MX/US");
    CartItemButton(c_item,c_price_ww,"Worldwide");
    document.write('<br><form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_cart"><input type="hidden" name="business" value="' + c_email + '"><img src="images/credit-cards.gif" width="253" height="30"> &nbsp; <input type="image" src="images/view-cart.gif" width="127" height="26" vspace="2" border="0" name="submit" alt="All prices include shipping and handling." title="All prices include shipping and handling."><input type="hidden" name="display" value="1"></form></div>');
}


// Common Sales Text (including optional notification when shop is temporarily closed)

function CartCommon() {
    document.write('<dir class="split-paragraph advert"><p>Alternatively, send a U.S. check or money order payable to:</p><p align="center">Doug Dyment, 1361 Rhode Island Street, San Francisco, CA 94107, USA.</p></dir>');
    if (0) document.write('<p class="notice"><b>Please Note</b>&mdash;I am travelling from 19&ndash;23 July;<br />orders received during this period will be shipped on 24&nbsp;July&nbsp;2010.</p>');
    document.write('<hr>');
}
