function item(itemName,objectName) {
	this.name=itemName;
	this.objectName=objectName;
	this.itemNumbers = new Array("4x6", "5x7", "8x10", "12x18");  this.prices = new Array ("29.00", "44.00", "74.00", "149.00"); 
}

function evaluateForm(myItems) {
	var winprops="width=600,height=400,scrollbars,location,resizable,status";
	var winname="cartwin";
	var itemname="Photograph";
	var address="https://www.paypal.com/cart/add=1&business=jeffaxelrod%40email.com";

	// itemnumbers = new Array("4x6", "5x7", "8x10", "12x18");
	// prices = new Array ("29.00", "44.00", "74.00", "149.00");
	url = new Array(myItems.itemNumbers.length);
	for(var i=0; i<myItems.itemNumbers.length; i++)
		url[i]=address
			+"&item_name="+myItems.name
			+"&item_number="+myItems.itemNumbers[i]
			+"&amount="+myItems.prices[i];

	var found=false;
	for(var i=0; i<myItems.itemNumbers.length; i++)
		if(form_name.radio_button[i].checked) {
			found=true;
			window.open(url[i],winname,winprops);
		}
	if(!found)
		alert("Please select a size.");
	else
		alert("Thank you for your order.  Images may not be reproduced or published without express permission of the image author.");
}

function singleImage(myItem) {
	msgWindow=window.open();
	msgWindow.document.write("Test!");
}

function drawForm(myItem)
{
	document.write('<table align=left><tr>');
	document.write('<td><a href = "javascript:history.back()">Back</a></td>');
	document.write('<td> </td>');
	document.write('<td><a href="http://www.theaxelrods.com/jeffphotos">Home</a></td>');
	document.write('</tr></table>');
	document.write('<form name="form_name" onSubmit="return evaluateForm('+myItem.objectName+')">');
	document.write('<center><table border=0>');
	document.write('<tr><td colspan=5><img src=50x150.gif></td></tr>');
	document.write('<tr>');
	document.write('<td><a href='+myItem.name+'1.jpg><img border=0 src='+myItem.name+'1s.jpg></a></td>');
	document.write('<td><img src=50x150.gif></td>');
	document.write('<td><a href='+myItem.name+'2.jpg><img border=0 src='+myItem.name+'2s.jpg></a></td>');
	document.write('<td><img src=50x150.gif></td>');
	document.write('<td><a href='+myItem.name+'3.jpg><img border=0 src='+myItem.name+'3s.jpg></a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td align=center><input type=checkbox name=item1 checked></td>');
	document.write('<td></td>');
	document.write('<td align=center><input type=checkbox name=item2 checked></td>');
	document.write('<td></td>');
	document.write('<td align=center><input type=checkbox name=item3 checked></td>');
	document.write('</tr>');
	document.write('</table>');
	document.write('<br>');
	document.write('<br>');
	document.write('<br>');
	document.write('Order three unframed prints in any of the below sizes:<br>');
	document.write('<table><tr><th align=left></th><th align=left>Size</th><th align=left>Price</th>');  for(var i=0; i<myItem.itemNumbers.length; i++)
	document.write(
		'<tr>'
		+'<td><input type="radio" name="radio_button"></td><td>'
		+myItem.itemNumbers[i]
		+'</td><td><b>$'+myItem.prices[i]
		+'</td></b></tr>');
	document.write('</table>');
	document.write('<input type="submit" name="button_name" value="Add to Cart">');  document.write("</form>");
	document.write('<font size=1>All images Copyright (C) 2002 Jeff Axelrod</small></font>');
}
