﻿			
		var price1 =140
		var price2=220
		var price3=300
		var price4=400
		var price5=500
		var curpsize=1
		var curpoption=1
		var mat1=60
		var mat2=100
		var mat3=140
		var frame1=200
		var frame2=260
		var frame3=300
			
			function getAmount5()  {
			
			  curpsize= 5 	
			  window.document.forms[1].total.value=price5
			  window.document.forms[1].amount.value=price5
			  window.document.forms[1].poption[0].checked=true
			  curpoption=1
				storeData()
			}


		function getAmount4()  {
			curpsize=4
			  window.document.forms[1].total.value=price4
			  window.document.forms[1].amount.value=price4
			  window.document.forms[1].poption[0].checked=true
			  curpoption=1
				storeData()

			}



			function getAmount3() 
		 {
			curpsize=3
			curpoption = getPoption()
			switch(curpoption)
			{
			  case 1:
			    window.document.forms[1].total.value=price3
			    break			  
			  case 2:
			    window.document.forms[1].total.value=price3 + mat3
				break		  
			 case 3:
			    window.document.forms[1].total.value=price3 + mat3 + frame3 
				break			 
			  }
				storeData()
			}
	
	
			
			function getAmount2()  
		 {
			curpsize=2
			curpoption = getPoption()
			switch(curpoption)
			{
			  case 1:
			    window.document.forms[1].total.value=price2
			    break			  
			  case 2:
			    window.document.forms[1].total.value=price2 + mat2
				break		  
			 case 3:
			    window.document.forms[1].total.value=price2 + mat2 + frame2 
				break			 
			  }
				storeData()
			}

			function getAmount1() 
			 {
			curpsize=1
			curpoption = getPoption()
		 
			switch(curpoption)
			{
			  case 1:
			    window.document.forms[1].total.value=price1
			    break			  
			  case 2:
			    window.document.forms[1].total.value=price1 + mat1
				break		  
			 case 3:
			    window.document.forms[1].total.value=price1 + mat1 + frame1 
				break			 
			  }
				storeData()
			}
			

		function getType2()
			{
			curpsize = getPsize()
			   curpoption=2
			   switch (curpsize)
			   {
			     case 1:
          		  window.document.forms[1].total.value=price1 + mat1
			        
			     break
			   case 2:
          		  window.document.forms[1].total.value=price2 + mat2
			   
			   break
			   case 3:
			   
          		  window.document.forms[1].total.value=price3 + mat3
			   break
			 		case 4:
		    		      window.document.forms[1].total.value=price4
		    		      window.document.forms[1].poption[0].checked=true
						  curpoption=1

						break
	    		  case 5:
		    		      window.document.forms[1].total.value=price5
		    		      window.document.forms[1].poption[0].checked=true
						  curpoption=1
						break


			   
			   }
				storeData()

			}


			function getType1()
			{
			var tempsize = getPsize() 
			curpsize=tempsize
			   curpoption=1
			   switch (curpsize)
			   {
			     case 1:
    		     window.document.forms[1].total.value=price1		     
			     break
			     
			   case 2:
    		  window.document.forms[1].total.value=price2
			   
			   
			   break
			   case 3:
			   
    		  window.document.forms[1].total.value=price3
			   
			   break
			   
			   }

			}


			function getType3()
			{
			   curpoption=3
			var tempsize = getPsize() 
			curpsize=tempsize
			   switch (curpsize)
			   {
			     case 1:
			        
          		  window.document.forms[1].total.value=price1 + mat1 + frame1
			     
			     break
			   case 2:
          		  window.document.forms[1].total.value=price2 + mat2 + frame2
			   break
			   case 3:
			   
          		  window.document.forms[1].total.value=price3 + mat3 + frame3
			   break
		 		case 4:
		    		      window.document.forms[1].total.value=price4
		    		      window.document.forms[1].poption[0].checked=true
						  curpoption=1

						break
	    		  case 5:
		    		      window.document.forms[1].total.value=price5
		    		      window.document.forms[1].poption[0].checked=true
						  curpoption=1
						break

			   }
				storeData()
			   
			}


	
						
			function storeData()
			{
			    window.document.forms[1].amount.value = window.document.forms[1].total.value
			    window.document.forms[1].item_name.value = window.document.forms[1].fotoname.value
			    window.document.forms[1].item_number.value = window.document.forms[1].fotoid.value
			    
			
			    var userChoise = " "
			    switch (curpsize)
			        {   
			           case 1:
			               userChoise = "Print 8x12"
			              
			              break
			           case 2:
			              userChoise="Print 11x15"
							break		      
					case 3:
					    userChoise="Print 14x18"
					    break
					case 4:
					    userChoise="Print 20x28"
					    break
					case 5:
					    userChoise="Print 23x34"
					    break
					    		  
			        }
			        
			        switch(curpoption)
			        {
			            case 1:
			               userChoise = userChoise + " NOT MATTED"
			               break
			            case 2:
			               userChoise = userChoise + " MATTED"
			               break
			            case 3:
			               userChoise = userChoise + " MATTED and FRAMED"
			               break
			        }
			        
			    window.document.forms[1].on0.value = userChoise
     }
     
     function getPsize()
     {
      var tempsize=0;
      for(var i=0; i<5; i++)
      {
        if(window.document.forms[1].psize[i].checked == true)
        {
           tempsize=i;
           break;
        }
      }
       //    alert("psize = " + tempsize);
      return tempsize + 1;
     }
     
      function getPoption()
     {
      var tempsize=0;
      for(var i=0; i<3; i++)
      {
        if(window.document.forms[1].poption[i].checked == true)
        {
           tempsize=i;
           break;
        }
      }
       //    alert("psize = " + tempsize);
      return tempsize + 1;
     }
        
     function checkForm()
     {
        var noTrade = false
        if (noTrade)
        {
           alert ("Sorry, not accepting new orders currently. Please try again in a week.")
           return false
        }
        else
        {
           return true
        }
     }