// revised 7.27.07 Change this to the email address for your PayPal account
var paypalAccount = new String("payments@rjphoto.net")

// Change this to point to your home page
// Use this if you don't want a link: var HomeURL = new String("")
var HomeURL = new String("http://www.rjphoto.net")

// percentage discount, set to 0 for no discount
var discount = 0;
// var discount = 0;	// Use this for 10% discount

// Edit the description text and price for each item as required
var numOptions = 29;	// this number must match the number of entries below
var description = new Array(numOptions);
var price = new Array(numOptions);

// Edit the description text and price for each item as required
description[0] = "5x7 Color Print";   price[0] = 8.95; // price/description #1
description[1] = "5x7 B&W Print";     price[1] = 8.95; // price/description #2
description[2] = "8x10 Color Print";  price[2] = 25.00; // price/description #3
description[3] = "8x10 B&W Print";   price[3] = 25.00; // price/description #4
description[4] = "8x10 Metallic COLOR Print";     price[4] = 30.00; // price/description #5
description[5] = "8x10 Metallic B&W Print";     price[5] = 30.00; // price/description #6
description[6] = "11X14 Color Print";  price[6] = 40.00; // price/description #7
description[7] = "11x14 B&W Print";    price[7] = 40.00; // price/description #8
description[8] = "11x14 COLOR Metallic Print";     price[8] = 46.00; // price/description #9
description[9] = "11x14 B&W Metallic Print";     price[9] = 46.00; // price/description #10
description[10] = "11x14 inch Gallery Wrap Canvas"; price[10] = 110.00; // price/description #11
description[11] = "16x20 Color Print";   price[11] = 75.00; // price/description #12
description[12] = "16x20 B&W Print";     price[12] = 75.00; // price/description #13
description[13] = "16x20 COLOR Metallic Print";     price[13] = 85.00; // price/description #14
description[14] = "16x20 B&W Metallic Print"; price[14] = 85.00; // price/description #15
description[15] = "16x20 inch Gallery Wrap Canvas";   price[15] = 145.00; // price/description #16
description[16] = "20X30 Color Print";     price[16] = 135.00; // price/description #17
description[17] = "20X30 B&W Print";     price[17] = 135.00; // price/description #18
description[18] = "20x30 COLOR Metallic Print"; price[18] = 150.00; // price/description #19
description[19] = "20x30 B&W Metallic Print ";   price[19] = 150.00; // price/description #20
description[20] = "20x30 inch Gallery Wrap Canvas";     price[20] = 225.00; // price/description #21
description[21] = "30X40 Color Print";     price[21] = 335.00; // price/description #22
description[22] = "30X40 B&W Print"; price[22] = 335.00; // price/description #23
description[23] = "30x40 COLOR Metallic Print";   price[23] = 360.00; // price/description #24
description[24] = "30x40 B&W Metallic Print ";     price[24] = 360.00; // price/description #25
description[25] = "30x40 inch Gallery Wrap Canvas ";   price[25] = 425.00; // price/description #26
description[26] = "Printable Disc (Digital Negatives) of All Images";   price[26] = 500.00; // price/description #27
description[27] = "ADD image to my Album/CD - NO PRINT";   price[27] = 0.00; // price/description #28
description[28] = "Digital Negative THIS IMAGE ONLY - NO PRINT";   price[28] = 50.00; // price/description #29


// Change these values to specify the number of rows and columns per page
var numRows = 4
var numColumns = 6


//---------- Don't change anything below this line! -------------//

function orderPrintSize(filename, reference, desc, amount)
{
    if (discount < 100 && discount > 0)
    {
    	amount = Math.round((100 - discount) * amount);
    }
    else
    {
        amount = Math.round(100 * amount);
    }
    var price = new String(amount);
    price = price.substr(0, price.length - 2) + "." + price.substr(price.length - 2, 2);
    document.write('<tr>')
    document.write('<td valign="top">')
    document.write('<font size="3" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">' + desc + ' $' + price)
    document.write('</font></td>')
    document.write('<td>')
    document.write('<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="paypal">')
    document.write('<input type="hidden" name="cmd" value="_cart">')
    document.write('<input type="hidden" name="business" value="' + paypalAccount + '">')
    document.write('<input type="hidden" name="item_name" value="' + desc + ' - ' + filename + '">')
    document.write('<input type="hidden" name="item_number" value="' + reference + '">')
    document.write('<input type="hidden" name="amount" value="' + price + '">')
    document.write('<input type="hidden" name="add" value="1">')
    document.write('<p><font size="5" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">')
    document.write('<input type="image" name="submit" src="add_to_cart.gif" alt="Order this print" align="bottom" border="0" width="106" height="24">')
    document.write('</font></p>')
    document.write('</form>')
    document.write('</td>')
    document.write('</tr>')
}

function printSizes(filename, reference)
{
    document.write('<font size="3" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">')
    if (discount < 100 && discount > 0)
    {
    	document.write("The prices below include a discount of " + discount + "%");
    }
    document.write('</font>')
    document.write('<table border="0">')
    for (i = 0; i < description.length; i++)
    {
        orderPrintSize(filename, reference, description[i], price[i])
    }
    document.write('</table>')
}

function viewCart()
{
	document.write('<form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="_xclick" target="paypal">')
    	document.write('<input type="hidden" name="cmd" value="_cart">')
    	document.write('<input type="hidden" name="business" value="' + paypalAccount + '">')
    	document.write('<input type="hidden" name="display" value="1">')
    	document.write('<p align="center">')
    	document.write('<input type="image" name="submit" src="view_cart.gif" alt="View the contents of your shopping cart" align="bottom" border="0" width="130" height="32">')
    	document.write('</p>')
	document.write('</form>')
}

