// JavaScript Document

	var photo
	var name
	var howwide
	var howhi
	var edition
	var price
	var psize

function goview(pick)
	{
	name=pick
	doname()
	showprint()
	}

function showprint() { 
	document.getElementById('print').src="images/"+photo;
	document.getElementById('frame').style.width = howwide;
	document.getElementById('frame').style.height = howhi;
	document.getElementById('frame').style.visibility="visible";
	document.getElementById('print').style.visibility="visible";	
	}
	
function hideprint()
{
	document.getElementById('frame').style.visibility="hidden";
	document.getElementById('print').style.visibility="hidden";	
	document.getElementById('print').src="../graphics/white.jpg";
}
		
function buy(pick,edition) 
	{
	name=pick
	doname()
	
	psize=document.getElementById(pick).value;
		
	if (psize=="quote")
	{
		location.href="mailto:%50%72%69%6e%74%73%40%4a%61%6d%65%73%43%6f%6f%6b%2e%62%69%7a?subject=Mural%20Quote&body=I am interested in a mural of "+name+" at an approximate size of:";
		return false;
	}

		if (psize=="")
	{
		alert("Please use the menu to select the size of the image you wish to order.")
		return false;
	}
	price=psize.split(",")[0];
	psize=psize.split(",")[1];	
	
	if (edition == "le")
	{
	edition = "Limited";
	}
	else
	{
	edition = "Open";
	}	
	
	if (confirm("Add this "+edition+" Edition print of "+name+" to your shopping cart?\n     ("+psize+" inches on long side @ $"+price+".00)"))
	{
	document.addcart.item_name.value = name;
	document.addcart.item_number.value = psize+" inch, "+edition+" Edition";
	document.addcart.amount.value = price+'.00';
	document.addcart.shopping_url.value = window.location;
	document.forms["addcart"].submit();
	}
	}
	
function gocart()
	{
	document.forms["viewcart"].submit();
	}


