// JavaScript Document
function changePrice()
{
  var shipping = 0;
  var cost = 0;
  var total = 0;
  var image_name;
  var real_type;
  image_name = document.pricelist.imageName.value;
  var size_picked;
  size_picked = document.pricelist.size.value;

  var frame_picked;
  frame_picked = document.pricelist.frame.value;

 
  var image_type;
  image_type = document.pricelist.imagetype.value; 
  if (image_type == "Photo")
     {real_type = "Watercolor Paper"; }
     else { real_type = "Canvas"; }

  if (image_type == "Photo")
  {
	  if (size_picked == "14x20")
	  {
		if (frame_picked == "A")
		{	   
			cost=495;
			document.pricelist.subtotal.value = "$" + cost;  
			shipping = 40;			
		}
		else if (frame_picked == "B")
		{
			cost=545;
			document.pricelist.subtotal.value = "$" + cost;  
			shipping = 40;
		}
		else
		{
			cost = 250;
			shipping = 15;
			document.pricelist.subtotal.value = "$" + cost;
			document.pricelist.price.value=cost;
			document.pricelist.product.value = image_name + " Photograph Only";
		}
	   }  
	  else  if (size_picked == "20x30")
	  {
		if (frame_picked == "A")
		{
			cost=895;
			document.pricelist.subtotal.value = "$" + cost;  
			shipping = 50;
		}
		else if (frame_picked == "B")
		{
			cost=995;
			document.pricelist.subtotal.value = "$" + cost;  
			shipping = 50;
		}
		else
		{
			cost = 450;
			shipping = 15;
			document.pricelist.subtotal.value = "$" + cost;
			document.pricelist.price.value=cost;
			document.pricelist.product.value = image_name + " Photograph Only";
		}		 
	  }
	  else  if (size_picked == "30x45")
	  {
		if (frame_picked == "A")
		{
			cost=1995;
			document.pricelist.subtotal.value = "$" + cost;  
			shipping = 100;
		}
		else if (frame_picked == "B")
		{
			cost=2195;
			document.pricelist.subtotal.value = "$" + cost;  
			shipping = 100;
		}
		else
		{
			cost = 1250;
			shipping = 15;
	    	document.pricelist.subtotal.value = "$" + cost;
		}
		 
	  }
  }
  else if (image_type == "Giclee")
  {
  	  if (size_picked == "14x20")
	  {
		if (frame_picked == "GalleryWrap")
		{
			cost=350;
			document.pricelist.subtotal.value = "$" + cost;
			shipping = 40;
		}
		else if (frame_picked == "A")
		{
			cost=495;
			document.pricelist.subtotal.value = "$" + cost;
			shipping = 40;
		}
		else if (frame_picked == "B")
		{
			cost=545;
			document.pricelist.subtotal.value = "$" + cost;
			shipping = 40;
		}
		else
		{
			cost = 250;
			shipping = 15;
			document.pricelist.subtotal.value = "$" + cost;
			document.pricelist.price.value=cost;
		}
	  }  
	  else  if (size_picked == "20x30")
	  {
		if (frame_picked == "GalleryWrap")
		{
			cost=650;
			document.pricelist.subtotal.value = "$" + cost;
			shipping = 50;
		}
		else if (frame_picked == "A")
		{
			cost=895;
			document.pricelist.subtotal.value = "$" + cost;
			shipping = 50;
		}
		else if (frame_picked == "B")
		{
				cost=995;
				document.pricelist.subtotal.value = "$" + cost;
				shipping = 50;
		}
		else
		{
			cost = 450;
			shipping = 15;
			document.pricelist.subtotal.value = "$" + cost;
			document.pricelist.price.value=cost;
		}		 
	  }
	  else  if (size_picked == "30x45")
	  {
		if (frame_picked == "GalleryWrap")
		{
			cost=1550;
			document.pricelist.subtotal.value = "$" + cost;
			shipping = 100;
		}
		else if (frame_picked == "A")
		{
			cost=1995;
			document.pricelist.subtotal.value = "$" + cost;
			shipping = 100;
		}
		else if (frame_picked == "B")
		{
			cost=2195;
			document.pricelist.subtotal.value = "$" + cost;
			shipping = 100;
		}
		else
		{
			cost = 1250;
			shipping = 15;
	    	document.pricelist.subtotal.value = "$" + cost;
			document.pricelist.price.value=cost;
		}		 
	  }
  }
total = cost + shipping;
document.pricelist.subtotal.value="$" + cost;
document.pricelist.shipping.value="$" + shipping;
document.pricelist.total.value="$" + total;
document.pricelist.price.value=total;
if (frame_picked == "Unframed") 
	{ 
		document.pricelist.product.value = image_name + ", " + size_picked + ", " +  real_type +  "," + " Image Only";
	}
else
	{
		document.pricelist.product.value = image_name + ", " + size_picked + ", "  + real_type +  ", "  + frame_picked +  " Frame";
	}
}