function paypal_view_cart(business) {

    var action = "https://www.paypal.com/cgi-bin/webscr";
    var image  = "https://www.paypal.com/en_US/i/btn/btn_viewcart_LG.gif";

    document.write('<form target="paypal" action="' + action + '" method="post">');
    document.write('    <input type="image" src="' + image + '" border="0" name="submit" alt="View Cart">');
    document.write('    <input type="hidden" name="business" value="' + business + '">');
    document.write('    <input type="hidden" name="cmd" value="_cart">');
    document.write('    <input type="hidden" name="display" value="1">');
    document.write('</form>');
}




function paypal_add_to_cart(business, item_name, item_number, amount) {

    var action = "https://www.paypal.com/cgi-bin/webscr";
    var image  = "https://www.paypal.com/en_US/i/btn/btn_cart_SM.gif";
    var pixel  = "https://www.paypal.com/en_US/i/scr/pixel.gif";

    document.write('<form target="paypal" action="' + action + '" method="post">');
    document.write('    <input type="image" src="' + image + '" border="0" name="submit" alt="Add to Cart">');
    document.write('    <input type="hidden" name="business" value="' + business + '">');
    document.write('    <input type="hidden" name="cmd" value="_cart">');
    document.write('    <input type="hidden" name="add" value="1">');
    document.write('    <input type="hidden" name="item_name" value="' + item_name + '">');
    document.write('    <input type="hidden" name="item_number" value="' + item_number + '">');
    document.write('    <input type="hidden" name="amount" value="' + amount + '">');
    document.write('    <input type="hidden" name="no_shipping" value="0">');
    document.write('    <input type="hidden" name="no_note" value="1">');
    document.write('    <input type="hidden" name="currency_code" value="CAD">');
    document.write('    <input type="hidden" name="lc" value="CA">');
    document.write('    <input type="hidden" name="bn" value="PP-ShopCartBF">');
    document.write('    <img alt="" style="border: none" width="1" height="1" src="' + pixel + '" />');
    document.write('</form>');
}




function paypal_add_to_cart_with_button(button_id) {

    var action = "https://www.paypal.com/cgi-bin/webscr";
    var image  = "https://www.paypal.com/en_US/i/btn/btn_cart_SM.gif";
    var pixel  = "https://www.paypal.com/en_US/i/scr/pixel.gif";

    document.write('<form target="paypal" action="' + action + '" method="post">');
    document.write('    <input type="image" src="' + image + '" border="0" name="submit" alt="Add to Cart">');
    document.write('    <input type="hidden" name="cmd" value="_s-xclick">');
    document.write('    <input type="hidden" name="hosted_button_id" value="' + button_id + '">');
    document.write('    <img alt="" style="border: none" width="1" height="1" src="' + pixel + '" />');
    document.write('</form>');
}