<!--
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.trans_amount.value = "";
   document.form1.Stotal.value = "";
   document.form1.KTotal.value = "";
   document.form1.ShipT.value = "";
   document.form1.VAT.value = "";
   document.form1.euro_amount.value = "";
   document.form1.euros.value = "";
   document.form1.dollars.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.2;
	}
	if (local_size == "2")
	{
      Pfactor=0.3;
	}
	if (local_size == "3")
	{
      Pfactor=0.35;
	}
	if (local_size == "4")
	{
      Pfactor=0.45;
	}
	if (local_size == "5")
	{
      Pfactor=0.6;
	}
	if (local_size == "6")
	{
      Pfactor=0.75;
	}
	if (local_size == "7")
	{
      Pfactor=0.85;
	}
	if (local_size == "8")
	{
      Pfactor=0.9;
	}
	if (local_size == "9")
	{
      Pfactor=1.25;
	}
	if (local_size == "10")
	{
      Pfactor=1.30;
	}
	if (local_size == "11")
	{
      Pfactor=1.75;
	}
	if (local_size == "12")
	{
      Pfactor=2.70;
	}
	if (local_size == "13")
	{
      Pfactor=2.85;
	}
	if (local_size == "14")
	{
      Pfactor=2.95;
	}
	if (local_size == "15")
	{
      Pfactor=3.05;
	}
	if (local_size == "16")
	{
      Pfactor=3.15;
	}
	if (local_size == "17")
	{
      Pfactor=3.25;
	}
	if (local_size == "18")
	{
      Pfactor=3.35;
	}

	   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.2;
	}
	if (local_size == "2")
	{
      Pfactor=0.3;
	}
	if (local_size == "3")
	{
      Pfactor=0.35;
	}
	if (local_size == "4")
	{
      Pfactor=0.45;
	}
	if (local_size == "5")
	{
      Pfactor=0.6;
	}
	if (local_size == "6")
	{
      Pfactor=0.75;
	}
	if (local_size == "7")
	{
      Pfactor=0.85;
	}
	if (local_size == "8")
	{
      Pfactor=0.9;
	}
	if (local_size == "9")
	{
      Pfactor=1.25;
	}
	if (local_size == "10")
	{
      Pfactor=1.30;
	}
	if (local_size == "11")
	{
      Pfactor=1.75;
	}
	if (local_size == "12")
	{
      Pfactor=2.70;
	}
	if (local_size == "13")
	{
      Pfactor=2.85;
	}
	if (local_size == "14")
	{
      Pfactor=2.95;
	}
	if (local_size == "15")
	{
      Pfactor=3.05;
	}
	if (local_size == "16")
	{
      Pfactor=3.15;
	}
	if (local_size == "17")
	{
      Pfactor=3.25;
	}
	if (local_size == "18")
	{
      Pfactor=3.35;
	}

	   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.2;
	}
	if (local_size == "2")
	{
      Pfactor=0.3;
	}
	if (local_size == "3")
	{
      Pfactor=0.35;
	}
	if (local_size == "4")
	{
      Pfactor=0.45;
	}
	if (local_size == "5")
	{
      Pfactor=0.6;
	}
	if (local_size == "6")
	{
      Pfactor=0.75;
	}
	if (local_size == "7")
	{
      Pfactor=0.85;
	}
	if (local_size == "8")
	{
      Pfactor=0.9;
	}
	if (local_size == "9")
	{
      Pfactor=1.25;
	}
	if (local_size == "10")
	{
      Pfactor=1.30;
	}
	if (local_size == "11")
	{
      Pfactor=1.75;
	}
	if (local_size == "12")
	{
      Pfactor=2.70;
	}
	if (local_size == "13")
	{
      Pfactor=2.85;
	}
	if (local_size == "14")
	{
      Pfactor=2.95;
	}
	if (local_size == "15")
	{
      Pfactor=3.05;
	}
	if (local_size == "16")
	{
      Pfactor=3.15;
	}
	if (local_size == "17")
	{
      Pfactor=3.25;
	}
	if (local_size == "18")
	{
      Pfactor=3.35;
	}

	   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.2;
	}
	if (local_size == "2")
	{
      Pfactor=0.3;
	}
	if (local_size == "3")
	{
      Pfactor=0.35;
	}
	if (local_size == "4")
	{
      Pfactor=0.45;
	}
	if (local_size == "5")
	{
      Pfactor=0.6;
	}
	if (local_size == "6")
	{
      Pfactor=0.75;
	}
	if (local_size == "7")
	{
      Pfactor=0.85;
	}
	if (local_size == "8")
	{
      Pfactor=0.9;
	}
	if (local_size == "9")
	{
      Pfactor=1.25;
	}
	if (local_size == "10")
	{
      Pfactor=1.30;
	}
	if (local_size == "11")
	{
      Pfactor=1.75;
	}
	if (local_size == "12")
	{
      Pfactor=2.70;
	}
	if (local_size == "13")
	{
      Pfactor=2.85;
	}
	if (local_size == "14")
	{
      Pfactor=2.95;
	}
	if (local_size == "15")
	{
      Pfactor=3.05;
	}
	if (local_size == "16")
	{
      Pfactor=3.15;
	}
	if (local_size == "17")
	{
      Pfactor=3.25;
	}
	if (local_size == "18")
	{
      Pfactor=3.35;
	}

	   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.2;
	}
	if (local_size == "2")
	{
      Pfactor=0.3;
	}
	if (local_size == "3")
	{
      Pfactor=0.35;
	}
	if (local_size == "4")
	{
      Pfactor=0.45;
	}
	if (local_size == "5")
	{
      Pfactor=0.6;
	}
	if (local_size == "6")
	{
      Pfactor=0.75;
	}
	if (local_size == "7")
	{
      Pfactor=0.85;
	}
	if (local_size == "8")
	{
      Pfactor=0.9;
	}
	if (local_size == "9")
	{
      Pfactor=1.25;
	}
	if (local_size == "10")
	{
      Pfactor=1.30;
	}
	if (local_size == "11")
	{
      Pfactor=1.75;
	}
	if (local_size == "12")
	{
      Pfactor=2.70;
	}
	if (local_size == "13")
	{
      Pfactor=2.85;
	}
	if (local_size == "14")
	{
      Pfactor=2.95;
	}
	if (local_size == "15")
	{
      Pfactor=3.05;
	}
	if (local_size == "16")
	{
      Pfactor=3.15;
	}
	if (local_size == "17")
	{
      Pfactor=3.25;
	}
	if (local_size == "18")
	{
      Pfactor=3.35;
	}
	   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, Stotal=0;
   var Ikit=0, Skit=0;
   var Ipp=2.5, ShipT=0, SFactor=0;
   var LTotal=0, ITotal=0, ITrans=0, VAT=0, TCost=0, IAdmin=5;
   
   if (document.form1.Kit.checked)
       Ikit=9.99;

   if (document.form1.UK.checked)
       Ipp=2.5;

   if (document.form1.EURO.checked)
       Ipp=3;

   if (document.form1.USA.checked)
       Ipp=4;

   if (document.form1.AMER.checked)
       Ipp=4.5;

   if (document.form1.AUST.checked)
       Ipp=5.5;

   if (document.form1.ASIA.checked)
       Ipp=6;

   if (document.form1.AFRI.checked)
       Ipp=7;

   if (document.form1.EAST.checked)
       Ipp=5;


   LTotal = TC1+TC2+TC3+TC4+TC5;

   SFactor = LTotal+Ikit;
   if ((SFactor)<15)
	SFactor=15*1;

   Stotal = Math.round((Math.abs((Ipp)*((SFactor)/15)))*100)/100;
   ShipT = Math.round((Math.abs(Stotal+IAdmin))*100)/100;
   ITotal = Math.round((Math.abs((LTotal)+(Ikit)+(ShipT)))*100)/100;
   ITrans = Math.round((Math.abs((ITotal)))*100)/100;
   VAT = Math.round((Math.abs(ITrans))*0.15*100)/100;
   TCost = Math.round((Math.abs((VAT)+(ITrans)))*100)/100;

   if ((TCost)<20.00)
	{
	ShipT= Math.round((Math.abs(17.02-(LTotal)))*100)/100;
	ITrans=17.02;
	VAT=2.98;
	TCost=20.00;
	}

   document.form1.KTotal.value=Math.round((Math.abs(Ikit))*100)/100+"";
   document.form1.Stotal.value=Math.round((Math.abs(LTotal))*100)/100+"";
   document.form1.ShipT.value=ShipT+"";
   document.form1.trans_amount.value=ITrans+"";
   document.form1.VAT.value=VAT+"";
   document.form1.euro_amount.value=TCost+"";
   document.form1.euros.value=Math.round((Math.abs(TCost))*1.7*1)/1+"";
   document.form1.dollars.value=Math.round((Math.abs(TCost))*1.44*1)/1+"";
}
// -->
