<!--
function getSelectValue(selectObject)
{
		return selectObject.options[selectObject.selectedIndex].value;
}

function OnClear()
{
   document.form1.Quantity1.value = "";
   document.form1.Text1.value = "";
   document.form1.PriceE1.value = "";
   document.form1.Price1.value = "";
   document.form1.TotalC1.value = "";
   document.form1.Height1.selectedIndex=0;
   document.form1.Quantity2.value = "";
   document.form1.Text2.value = "";
   document.form1.PriceE2.value = "";
   document.form1.Price2.value = "";
   document.form1.TotalC2.value = "";
   document.form1.Height2.selectedIndex=0;
   document.form1.Quantity3.value = "";
   document.form1.Text3.value = "";
   document.form1.PriceE3.value = "";
   document.form1.Price3.value = "";
   document.form1.TotalC3.value = "";
   document.form1.Height3.selectedIndex=0;
   document.form1.Quantity4.value = "";
   document.form1.Text4.value = "";
   document.form1.PriceE4.value = "";
   document.form1.Price4.value = "";
   document.form1.TotalC4.value = "";
   document.form1.Height4.selectedIndex=0;
   document.form1.Quantity5.value = "";
   document.form1.Text5.value = "";
   document.form1.PriceE5.value = "";
   document.form1.Price5.value = "";
   document.form1.TotalC5.value = "";
   document.form1.Height5.selectedIndex=0;
   document.form1.numletters1.value="";
   document.form1.numletters2.value="";
   document.form1.numletters3.value="";
   document.form1.numletters4.value="";
   document.form1.numletters5.value="";
   document.form1.Quantity21.value = "";
   document.form1.Quantity22.value = "";
   document.form1.Quantity23.value = "";
   document.form1.Quantity24.value = "";
   document.form1.Quantity25.value = "";
   document.form1.PSubTotal.value = "";
   document.form1.PSelected_Price.value = "";
   document.form1.PKit.value = "";
   document.form1.PShipping.value = "";
   document.form1.PVAT.value = "";
   document.form1.PTotal_Cost.value = "";
}
function OnCalculate()
{
	// Calculate the price
   var Pfactor=0;
   var local_size;
   var TLength=0;
   var TC1=0,TC2=0,TC3=0,TC4=0,TC5=0;

   local_size=document.form1.Height1.options[document.form1.Height1.selectedIndex].value;

	if (local_size == "1")
	{
      Pfactor=0.3;
	}
	if (local_size == "2")
	{
      Pfactor=0.4;
	}
	if (local_size == "3")
	{
      Pfactor=0.45;
	}
	if (local_size == "4")
	{
      Pfactor=0.55;
	}
	if (local_size == "5")
	{
      Pfactor=0.7;
	}
	if (local_size == "6")
	{
      Pfactor=0.85;
	}
	if (local_size == "7")
	{
      Pfactor=0.95;
	}
	if (local_size == "8")
	{
      Pfactor=1.00;
	}
	if (local_size == "9")
	{
      Pfactor=1.35;
	}
	if (local_size == "10")
	{
      Pfactor=1.40;
	}
	if (local_size == "11")
	{
      Pfactor=1.85;
	}
	if (local_size == "12")
	{
      Pfactor=2.80;
	}
	if (local_size == "13")
	{
      Pfactor=2.95;
	}
	if (local_size == "14")
	{
      Pfactor=3.05;
	}
	if (local_size == "15")
	{
      Pfactor=3.15;
	}
	if (local_size == "16")
	{
      Pfactor=3.25;
	}
	if (local_size == "17")
	{
      Pfactor=3.35;
	}
	if (local_size == "18")
	{
      Pfactor=3.45;
	}

	   if (document.form1.Text1.value.length > 0)
		{
		   if (document.form1.Quantity1.value.length < 1)
	 	     {
           alert("A quantity must be entered is Line1");
           return false; 
			  }
   TLength = document.form1.Text1.value.length;
   document.form1.PriceE1.value = Pfactor+"";
   document.form1.Price1.value = Math.round((Math.abs(Pfactor*TLength))*100)/100+"";
   document.form1.TotalC1.value = Math.round((Math.abs((Pfactor*TLength)*(parseInt(document.form1.Quantity1.value))))*100)/100+ "";
   document.form1.Quantity21.value = ""+(parseInt(document.form1.Quantity1.value))+"";
   document.form1.numletters1.value = ""+TLength+"";
		}
   if (document.form1.Text1.value.length < 1)
		TC1=0;
	else
		TC1=(Pfactor*TLength)*(parseInt(document.form1.Quantity1.value));

   local_size=document.form1.Height2.options[document.form1.Height2.selectedIndex].value;

	if (local_size == "1")
	{
      Pfactor=0.3;
	}
	if (local_size == "2")
	{
      Pfactor=0.4;
	}
	if (local_size == "3")
	{
      Pfactor=0.45;
	}
	if (local_size == "4")
	{
      Pfactor=0.55;
	}
	if (local_size == "5")
	{
      Pfactor=0.7;
	}
	if (local_size == "6")
	{
      Pfactor=0.85;
	}
	if (local_size == "7")
	{
      Pfactor=0.95;
	}
	if (local_size == "8")
	{
      Pfactor=1.00;
	}
	if (local_size == "9")
	{
      Pfactor=1.35;
	}
	if (local_size == "10")
	{
      Pfactor=1.40;
	}
	if (local_size == "11")
	{
      Pfactor=1.85;
	}
	if (local_size == "12")
	{
      Pfactor=2.80;
	}
	if (local_size == "13")
	{
      Pfactor=2.95;
	}
	if (local_size == "14")
	{
      Pfactor=3.05;
	}
	if (local_size == "15")
	{
      Pfactor=3.15;
	}
	if (local_size == "16")
	{
      Pfactor=3.25;
	}
	if (local_size == "17")
	{
      Pfactor=3.35;
	}
	if (local_size == "18")
	{
      Pfactor=3.45;
	}

	   if (document.form1.Text2.value.length > 0)
		{
		   if (document.form1.Quantity2.value.length < 1)
	 	     {
           alert("A quantity must be entered is Line2");
           return false; 
			  }

   TLength = document.form1.Text2.value.length;
   document.form1.PriceE2.value = Pfactor+"";
   document.form1.Price2.value = Math.round((Math.abs(Pfactor*TLength))*100)/100+"";
   document.form1.TotalC2.value = Math.round((Math.abs((Pfactor*TLength)*(parseInt(document.form1.Quantity2.value))))*100)/100+ "";
   document.form1.Quantity22.value = ""+(parseInt(document.form1.Quantity2.value))+"";
   document.form1.numletters2.value = ""+TLength+"";
          }
   if (document.form1.Text2.value.length < 1)
		TC2=0;
	else
		TC2=(Pfactor*TLength)*(parseInt(document.form1.Quantity2.value));

//var sTC2 = "", teststring="";
//sTC2=numToString(TC2);
//alert(sTC2.substring(0,sTC2.indexOf(".")+2));
   local_size=document.form1.Height3.options[document.form1.Height3.selectedIndex].value;

	if (local_size == "1")
	{
      Pfactor=0.3;
	}
	if (local_size == "2")
	{
      Pfactor=0.4;
	}
	if (local_size == "3")
	{
      Pfactor=0.45;
	}
	if (local_size == "4")
	{
      Pfactor=0.55;
	}
	if (local_size == "5")
	{
      Pfactor=0.7;
	}
	if (local_size == "6")
	{
      Pfactor=0.85;
	}
	if (local_size == "7")
	{
      Pfactor=0.95;
	}
	if (local_size == "8")
	{
      Pfactor=1.00;
	}
	if (local_size == "9")
	{
      Pfactor=1.35;
	}
	if (local_size == "10")
	{
      Pfactor=1.40;
	}
	if (local_size == "11")
	{
      Pfactor=1.85;
	}
	if (local_size == "12")
	{
      Pfactor=2.80;
	}
	if (local_size == "13")
	{
      Pfactor=2.95;
	}
	if (local_size == "14")
	{
      Pfactor=3.05;
	}
	if (local_size == "15")
	{
      Pfactor=3.15;
	}
	if (local_size == "16")
	{
      Pfactor=3.25;
	}
	if (local_size == "17")
	{
      Pfactor=3.35;
	}
	if (local_size == "18")
	{
      Pfactor=3.45;
	}

	   if (document.form1.Text3.value.length > 0)
		{
		   if (document.form1.Quantity3.value.length < 1)
	 	     {
           alert("A quantity must be entered is Line3");
           return false; 
			  }

   TLength = document.form1.Text3.value.length;
   document.form1.PriceE3.value = Pfactor+"";
   document.form1.Price3.value = Math.round((Math.abs(Pfactor*TLength))*100)/100+"";
   document.form1.TotalC3.value = Math.round((Math.abs((Pfactor*TLength)*(parseInt(document.form1.Quantity3.value))))*100)/100+ "";
   document.form1.Quantity23.value = ""+(parseInt(document.form1.Quantity3.value))+"";
   document.form1.numletters3.value = ""+TLength+"";
         }
   if (document.form1.Text3.value.length < 1)
		TC3=0;
	else
		TC3=(Pfactor*TLength)*(parseInt(document.form1.Quantity3.value));

   local_size=document.form1.Height4.options[document.form1.Height4.selectedIndex].value;

	if (local_size == "1")
	{
      Pfactor=0.3;
	}
	if (local_size == "2")
	{
      Pfactor=0.4;
	}
	if (local_size == "3")
	{
      Pfactor=0.45;
	}
	if (local_size == "4")
	{
      Pfactor=0.55;
	}
	if (local_size == "5")
	{
      Pfactor=0.7;
	}
	if (local_size == "6")
	{
      Pfactor=0.85;
	}
	if (local_size == "7")
	{
      Pfactor=0.95;
	}
	if (local_size == "8")
	{
      Pfactor=1.00;
	}
	if (local_size == "9")
	{
      Pfactor=1.35;
	}
	if (local_size == "10")
	{
      Pfactor=1.40;
	}
	if (local_size == "11")
	{
      Pfactor=1.85;
	}
	if (local_size == "12")
	{
      Pfactor=2.80;
	}
	if (local_size == "13")
	{
      Pfactor=2.95;
	}
	if (local_size == "14")
	{
      Pfactor=3.05;
	}
	if (local_size == "15")
	{
      Pfactor=3.15;
	}
	if (local_size == "16")
	{
      Pfactor=3.25;
	}
	if (local_size == "17")
	{
      Pfactor=3.35;
	}
	if (local_size == "18")
	{
      Pfactor=3.45;
	}

	   if (document.form1.Text4.value.length > 0)
		{
		   if (document.form1.Quantity4.value.length < 1)
	 	     {
           alert("A quantity must be entered is Line4");
           return false; 
			  }

   TLength = document.form1.Text4.value.length;
   document.form1.PriceE4.value = Pfactor+"";
   document.form1.Price4.value = Math.round((Math.abs(Pfactor*TLength))*100)/100+"";
   document.form1.TotalC4.value = Math.round((Math.abs((Pfactor*TLength)*(parseInt(document.form1.Quantity4.value))))*100)/100+ "";
   document.form1.Quantity24.value = ""+(parseInt(document.form1.Quantity4.value))+"";
   document.form1.numletters4.value = ""+TLength+"";
         }
   if (document.form1.Text4.value.length < 1)
		TC4=0;
	else
		TC4=(Pfactor*TLength)*(parseInt(document.form1.Quantity4.value));

   local_size=document.form1.Height5.options[document.form1.Height5.selectedIndex].value;

	if (local_size == "1")
	{
      Pfactor=0.3;
	}
	if (local_size == "2")
	{
      Pfactor=0.4;
	}
	if (local_size == "3")
	{
      Pfactor=0.45;
	}
	if (local_size == "4")
	{
      Pfactor=0.55;
	}
	if (local_size == "5")
	{
      Pfactor=0.7;
	}
	if (local_size == "6")
	{
      Pfactor=0.85;
	}
	if (local_size == "7")
	{
      Pfactor=0.95;
	}
	if (local_size == "8")
	{
      Pfactor=1.00;
	}
	if (local_size == "9")
	{
      Pfactor=1.35;
	}
	if (local_size == "10")
	{
      Pfactor=1.40;
	}
	if (local_size == "11")
	{
      Pfactor=1.85;
	}
	if (local_size == "12")
	{
      Pfactor=2.80;
	}
	if (local_size == "13")
	{
      Pfactor=2.95;
	}
	if (local_size == "14")
	{
      Pfactor=3.05;
	}
	if (local_size == "15")
	{
      Pfactor=3.15;
	}
	if (local_size == "16")
	{
      Pfactor=3.25;
	}
	if (local_size == "17")
	{
      Pfactor=3.35;
	}
	if (local_size == "18")
	{
      Pfactor=3.45;
	}
	if (document.form1.Text5.value.length > 0)
		{
		   if (document.form1.Quantity5.value.length < 1)
	 	     {
           alert("A quantity must be entered is Line5");
           return false; 
			  }

   TLength = document.form1.Text5.value.length;
   document.form1.PriceE5.value = Pfactor+"";
   document.form1.Price5.value = Math.round((Math.abs(Pfactor*TLength))*100)/100+"";
   document.form1.TotalC5.value = Math.round((Math.abs((Pfactor*TLength)*(parseInt(document.form1.Quantity5.value))))*100)/100+ "";
   document.form1.Quantity25.value = ""+(parseInt(document.form1.Quantity5.value))+"";
   document.form1.numletters5.value = ""+TLength+"";
   top.status="Double Image Worksheet";
        }
   if (document.form1.Text5.value.length < 1)
		TC5=0;
	else
		TC5=(Pfactor*TLength)*(parseInt(document.form1.Quantity5.value));

   var test=0, PSelected_Price=0;
   var Ikit=0, Skit=0;
   var Ipp=2.5, PShipping=0, SFactor=0;
   var LTotal=0, ITotal=0, ITrans=0, PVAT=0, TCost=0, IAdmin=5;
   
   if (document.form1.Kit.checked)
       Ikit=9.99;

   if (document.form1.UK.checked)
       Ipp=3;

   if (document.form1.EURO.checked)
       Ipp=3.5;

   if (document.form1.USA.checked)
       Ipp=5;

   if (document.form1.AMER.checked)
       Ipp=6;

   if (document.form1.AUST.checked)
       Ipp=7;

   if (document.form1.ASIA.checked)
       Ipp=7.5;

   if (document.form1.AFRI.checked)
       Ipp=8.5;

   if (document.form1.EAST.checked)
       Ipp=7;


   LTotal = TC1+TC2+TC3+TC4+TC5;

   SFactor = LTotal+Ikit;
   if ((SFactor)<15)
	SFactor=15*1;

   PSelected_Price = Math.round((Math.abs((Ipp)*((SFactor)/15)))*100)/100;
   PShipping = Math.round((Math.abs(PSelected_Price+IAdmin))*100)/100;
   ITotal = Math.round((Math.abs((LTotal)+(Ikit)+(PShipping)))*100)/100;
   ITrans = Math.round((Math.abs((ITotal)))*100)/100;
   PVAT = Math.round((Math.abs(ITrans))*0.15*100)/100;
   TCost = Math.round((Math.abs((PVAT)+(ITrans)))*100)/100;

   if ((TCost)<29.00)
	{
	PShipping= Math.round((Math.abs(29.00-(LTotal)))*100)/100;
	ITrans=29.00;
	PVAT=4.35;
	TCost=33.35;
	}

   document.form1.PKit.value=Math.round((Math.abs(Ikit))*100)/90+"";
   document.form1.PSelected_Price.value=Math.round((Math.abs(LTotal))/100*90*100)/100+"";
   document.form1.PShipping.value=PShipping+"";
   document.form1.PSubTotal.value=ITrans+"";
   document.form1.PVAT.value=PVAT+"";
   document.form1.PTotal_Cost.value=TCost+"";
}
// -->
