//---------------------------------------------------------------------//
// prices.js - include file for configuring the DSMI PayPal template   //
//---------------------------------------------------------------------//


// Change this to the email address for your PayPal account
var paypalAccount = new String("mklinger@comcast.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.bigkidproductions.com")

// percentage discount, set to 0 for no discount
var discount = 0;
// var discount = 10;	// Use this for 10% discount

var numOptions = 9;	// 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] = "4x6 Glossy print";        price[0] = 3.95; 
description[1] = "5x7 Glossy print";        price[1] = 5.95; 
description[2] = "8x10 Glossy print";       price[2] = 8.95;
description[3] = "11x14 Glossy print";      price[3] = 15.95; 
description[4] = "12x18 Glossy print";      price[4] = 17.95; 

description[5] = "4x6 Matte print";         price[5] = 3.95; 
description[6] = "5x7 Matte print";         price[6] = 5.95; 
description[7] = "8x10 Matte print";        price[7] = 8.95;
description[8] = "11x14 Matte print";       price[8] = 15.95; 
description[9] = "12x18 Matte print";       price[9] = 17.95; 

// Change these values to specify the number of rows and columns per page
var numRows = 4
var numColumns = 5

//---------- Don't change anything below this line! -------------//

function orderPrintSize(filename, reference, desc, amount)
{
    var price = new String(amount);
    price = String(amount);
    document.write('<tr>')
    document.write('<td valign="top">')
    document.write('<font size="5" 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">')
    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>')
}
