 /* -- Adobe GoLive JavaScript Library */
/* -- Global Functions */
CSInit = new Array;
CSExit = new Array;
CSStopExecution=false;
function CSAction(array) {return CSAction2(CSAct, array);}
function CSAction2(fct, array) { 
	var result;
	for (var i=0;i<array.length;i++) {
		if(CSStopExecution) return false; 
		var aa = fct[array[i]];
		if (aa == null) return false;
		var ta = new Array;
		for(var j=1;j<aa.length;j++) {
			if((aa[j]!=null)&&(typeof(aa[j])=="object")&&(aa[j].length==2)){
				if(aa[j][0]=="VAR"){ta[j]=CSStateArray[aa[j][1]];}
				else{if(aa[j][0]=="ACT"){ta[j]=CSAction(new Array(new String(aa[j][1])));}
				else ta[j]=aa[j];}
			} else ta[j]=aa[j];
		}			
		result=aa[0](ta);
	}
	return result;
}
CSAct = new Object;
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
userAgent = window.navigator.userAgent;
browserVers = parseInt(userAgent.charAt(userAgent.indexOf("/")+1),10);
mustInitImg = true;
function initImgID() {var di = document.images; if (mustInitImg && di) { for (var i=0; i<di.length; i++) { if (!di[i].id) di[i].id=di[i].name; } mustInitImg = false;}}
function findElement(n,ly) {
	var d = document;
	if (browserVers < 4)		return d[n];
	if ((browserVers >= 6) && (d.getElementById)) {initImgID; return(d.getElementById(n))}; 
	var cd = ly ? ly.document : d;
	var elem = cd[n];
	if (!elem) {
		for (var i=0;i<cd.layers.length;i++) {
			elem = findElement(n,cd.layers[i]);
			if (elem) return elem;
		}
	}
	return elem;
}
function changeImagesArray(array) {
	if (preloadFlag == true) {
		var d = document; var img;
		for (i=0;i<array.length;i+=2) {
			img = null; var n = array[i];
			if (d.images) {
				if (d.layers) {img = findElement(n,0);}
				else {img = d.images[n];}
			}
			if (!img && d.getElementById) {img = d.getElementById(n);}
			if (!img && d.getElementsByName) {
				var elms = d.getElementsByName(n);
				if (elms) {
					for (j=0;j<elms.length;j++) {
						if (elms[j].src) {img = elms[j]; break;}
					}
				}
			}
			if (img) {img.src = array[i+1];}
		}
	}
}
function changeImages() {
	changeImagesArray(changeImages.arguments);
}
function toggleImages() {
	for (var i=0; i<toggleImages.arguments.length; i+=2) {
		if (selected == toggleImages.arguments[i])
			changeImagesArray(toggleImages.arguments[i+1]);
	}
}
function CSClickReturn () {
	var bAgent = window.navigator.userAgent; 
	var bAppName = window.navigator.appName;
	if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
		return true; /* dont follow link */
	else return false; /* dont follow link */
}

function Clicker(Form2) {
     var Decker;
     Decker = Form2.SystemCombo.value;
     var Primer;
     var FirstCoat;
     var SecondCoat;
     var SandCoat;
     var FourthCoat;
     var FirstCoatProduct;
     var SecondCoatProduct;
     var SandCoatProduct;
     var FourthCoatProduct;
     var PrimerNeeded;
     var FirstNeeded;
     var SecondNeeded;
     var SandNeeded;
     var FourthNeeded;
     var PrimerStr;
     var FirstStr;
     var SecondStr;
     var SandStr;
     var FourthStr;
        Form2.depth.value = "No";
        Form2.width.value = "No";
        Form2.measure.value = "feet";
        Form2.length.value = "Enter Length";
        Form2.DeckOutput.value = "";
   if(Decker != "No" && Form2.DeckArea.value != "Enter Area")
     {
        Form2.DeckOutput.rows = 9;
       }
     if(Decker == "WDA" && Form2.DeckArea.value != "Enter Area"){
      Primer = 350;
      FirstCoat = 45;
      SecondCoat = 0;
      SandCoat = 115;
      FourthCoat = 115;
      
      FirstCoatProduct = "Elasto-Deck 5001";
      SecondCoatProduct = "Elasto-Deck 5001";
      SandCoatProduct = "Elasto-Glaze 6001AL";
      FourthCoatProduct = "Elasto-Glaze 6001AL";
      if(Form2.DeckMeasure.value == "meters"){
       Primer = Primer * 0.0929;
       FirstCoat = FirstCoat *  0.0929;
       SandCoat = SandCoat * 0.0929;
       FourthCoat = FourthCoat * 0.0929;
      }
      PrimerNeeded = Form2.DeckArea.value / Primer;
      FirstNeeded = Form2.DeckArea.value / FirstCoat;
      SandNeeded = Form2.DeckArea.value / SandCoat;
      FourthNeeded = Form2.DeckArea.value / FourthCoat;
      
     // PrimerStr = PrimerNeeded.ToString(10);
     // FirstStr = FirstNeeded.ToString(10);
     // SecondStr = SecondNeeded.ToString(10);
     // FourthStr = FourthNeeded.ToString(10);
       
      Form2.DeckOutput.value = "Primer*: " + 
      Math.ceil(PrimerNeeded) + " gallons" + '\r\n\r\n' + "1st Coat: " + 
      Math.ceil(FirstNeeded) + " gallons" + '\r\n' + FirstCoatProduct + '\r\n\r\n' + "2nd Coat: N/A" + '\r\n\r\n' + "Sand Coat: " + Math.ceil(SandNeeded)+" gallons  "  + '\r\n' + SandCoatProduct + 
      '\r\n\r\n' + "4th Coat: " + Math.ceil(FourthNeeded) +" gallons  " + '\r\n' + FourthCoatProduct + '\r\n\r\n' + 
      "NOTE: *Primer is not required on plywood. Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
     }

     if(Decker == "X2" && Form2.DeckArea.value != "Enter Area"){
      Primer = 300;
      FirstCoat = 60;
      SecondCoat = 60;
      SandCoat = 115;
      FourthCoat = 100;
      FirstCoatProduct = "Elasto-Deck 5001";
      SecondCoatProduct = "Elasto-Deck 5001";
      SandCoatProduct = "Elasto-Glaze 6001AL";
      FourthCoatProduct = "Elasto-Glaze 6001AL";
      if(Form2.DeckMeasure.value == "meters"){
       Primer = Primer * 0.0929;
       FirstCoat = FirstCoat * 0.0929;
       SecondCoat = SecondCoat * 0.0929;
       SandCoat = SandCoat * 0.0929;
       FourthCoat = FourthCoat * 0.0929;
      }
      PrimerNeeded = Form2.DeckArea.value / Primer;
      FirstNeeded = Form2.DeckArea.value / FirstCoat;
      SecondNeeded = Form2.DeckArea.value / SecondCoat;
      SandNeeded = Form2.DeckArea.value / SandCoat;
      FourthNeeded = Form2.DeckArea.value / FourthCoat;

      Form2.DeckOutput.value = "Primer*: " + Math.ceil(PrimerNeeded) + " gallons" + '\r\n\r\n' + "1st Coat: " + Math.ceil(FirstNeeded) + " gallons  " + '\r\n' + FirstCoatProduct + '\r\n\r\n' + "2nd Coat: " + Math.ceil(SecondNeeded) + " gallons" + '\r\n' + SecondCoatProduct + '\r\n\r\n' + "Sand Coat: " + Math.ceil(SandNeeded) + " gallons  "  + '\r\n' + SandCoatProduct + '\r\n\r\n' + "4th Coat: " + Math.ceil(FourthNeeded) + " gallons  " + '\r\n' + FourthCoatProduct + '\r\n\r\n' + "NOTE: *Primer is not required on plywood. Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
     }

     if(Decker == "MR" && Form2.DeckArea.value != "Enter Area"){
      Primer = 300;
      FirstCoat = 45;
      SecondCoat = 0;
      SandCoat = 0;
      FourthCoat = 115;
      FirstCoatProduct = "Elasto-Deck 5001";
      SandCoatProduct = "Elasto-Glaze 6001AL";
      FourthCoatProduct = "Elasto-Glaze 6001AL";
      if(Form2.DeckMeasure.value == "meters"){
       Primer = Primer * 0.0929;
       FirstCoat = FirstCoat * 0.0929;
       FourthCoat = FourthCoat * 0.0929;
      }
      PrimerNeeded = Form2.DeckArea.value / Primer;
      FirstNeeded = Form2.DeckArea.value / FirstCoat;
      FourthNeeded = Form2.DeckArea.value / FourthCoat;

      Form2.DeckOutput.value = "Primer*: " + Math.ceil(PrimerNeeded) + " gallons" + '\r\n\r\n' + "1st Coat: " + Math.ceil(FirstNeeded) + " gallons  " + '\r\n' + FirstCoatProduct + '\r\n\r\n' + "2nd Coat: N/A" + '\r\n\r\n' + "Sand Coat: " + "optional"  + '\r\n' + SandCoatProduct + '\r\n\r\n' + "4th Coat: " + Math.ceil(FourthNeeded) + " gallons  " + '\r\n' + FourthCoatProduct + '\r\n\r\n' + "NOTE: *Primer is not required on plywood. Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
     }

     if(Decker == "TCv" && Form2.DeckArea.value != "Enter Area"){
      Primer = 300;
      FirstCoat = 50;
      SecondCoat = 0;
      SandCoat = 75;
      FourthCoat = 0;
      FirstCoatProduct = "Elasto-Deck 5001";
      SecondCoatProduct = "Elasto-Deck 5001";
      SandCoatProduct = "Elasto-Glaze 6001AL";
      FourthCoatProduct = "Elasto-Glaze 6001AL";
      if(Form2.DeckMeasure.value == "meters"){
       Primer = Primer * 0.0929;
       FirstCoat = FirstCoat * 0.0929;
       SandCoat = SandCoat * 0.0929;
      }
      PrimerNeeded = Form2.DeckArea.value / Primer;
      FirstNeeded = Form2.DeckArea.value / FirstCoat;
      SandNeeded = Form2.DeckArea.value / SandCoat;

      Form2.DeckOutput.value = "Primer: " + Math.ceil(PrimerNeeded) + " gallons" + '\r\n\r\n' + "1st Coat: " + Math.ceil(FirstNeeded) + " gallons  " + '\r\n' + FirstCoatProduct + '\r\n\r\n' + "2nd Coat: N/A" + '\r\n\r\n' + "Sand Coat: " + Math.ceil(SandNeeded) + " gallons  "  + '\r\n' + SandCoatProduct + '\r\n\r\n' + "4th Coat: N/A" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
     }

     if(Decker == "TCa" && Form2.DeckArea.value != "Enter Area"){
      Primer = 300;
      FirstCoat = 45;
      SecondCoat = 0;
               SandCoat = 115;
      FourthCoat = 115;
      FirstCoatProduct = "Elasto-Deck 5001";
      SecondCoatProduct = "Elasto-Deck 5001";
      SandCoatProduct = "Elasto-Glaze 6001AL";
      FourthCoatProduct = "Elasto-Glaze 6001AL";
      if(Form2.DeckMeasure.value == "meters"){
       Primer = Primer * 0.0929;
       FirstCoat = FirstCoat *  0.0929;
       SandCoat = SandCoat * 0.0929;
       FourthCoat = FourthCoat * 0.0929;
      }
      PrimerNeeded = Form2.DeckArea.value / Primer;
      FirstNeeded = Form2.DeckArea.value / FirstCoat;
      SandNeeded = Form2.DeckArea.value / SandCoat;
      FourthNeeded = Form2.DeckArea.value / FourthCoat;

      Form2.DeckOutput.value = "Primer: " + Math.ceil(PrimerNeeded) + " gallons" + '\r\n\r\n' + "1st Coat: " + Math.ceil(FirstNeeded) + " gallons  " + '\r\n' + FirstCoatProduct + '\r\n\r\n' + "2nd Coat: N/A" + '\r\n\r\n' + "Sand Coat: " + Math.ceil(SandNeeded) + " gallons  "  + '\r\n' + SandCoatProduct + '\r\n\r\n' + "4th Coat: " + Math.ceil(FourthNeeded) + " gallons  " + '\r\n' + FourthCoatProduct + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
     }

     if(Decker == "PDS" && Form2.DeckArea.value != "Enter Area"){
         Primer = 300;
      FirstCoat = 60;
         SecondCoat = 60;
      SandCoat = 115;
      FourthCoat = 100;
      FirstCoatProduct = "Elasto-Deck 5001";
      SecondCoatProduct = "Elasto-Deck 5001";
      SandCoatProduct = "Elasto-Glaze 6001AL";
      FourthCoatProduct = "Elasto-Glaze 6001AL";
      if(Form2.DeckMeasure.value == "meters"){
       Primer = Primer * 0.0929;
       FirstCoat = FirstCoat * 0.0929;
       SecondCoat = SecondCoat * 0.0929;
       SandCoat = SandCoat * 0.0929;
       FourthCoat = FourthCoat * 0.0929;
      }
      PrimerNeeded = Form2.DeckArea.value / Primer;
      FirstNeeded = Form2.DeckArea.value / FirstCoat;
      SecondNeeded = Form2.DeckArea.value / SecondCoat;
      SandNeeded = Form2.DeckArea.value / SandCoat;
      FourthNeeded = Form2.DeckArea.value / FourthCoat;

      Form2.DeckOutput.value = "Primer: " + Math.ceil(PrimerNeeded) + " gallons" + '\r\n\r\n' + "1st Coat: " + Math.ceil(FirstNeeded) + " gallons  " + '\r\n' + FirstCoatProduct + '\r\n\r\n' + "2nd Coat: " + Math.ceil(SecondNeeded) + " gallons" + '\r\n' + SecondCoatProduct + '\r\n\r\n' + "Sand Coat: " + Math.ceil(SandNeeded) + " gallons  "  + '\r\n' + SandCoatProduct + '\r\n\r\n' + "4th Coat: " + Math.ceil(FourthNeeded) + " gallons  " + '\r\n' + FourthCoatProduct + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
     } ;

     if(Decker == "HTv" && Form2.DeckArea.value != "Enter Area"){
               Primer = 300;
      FirstCoat = 45;
               SecondCoat = 100;
      SandCoat = 0;
               FourthCoat = 150;
      FirstCoatProduct = "Elasto-Deck 5001 HT";
               SecondCoatProduct = "Elasto-Deck 5001 HT W/Sand";
      SandCoatProduct = "Elasto-Deck 5001 DT W/Sand";
      FourthCoatProduct = "Elasto-Glaze 6001ALHT";
      if(Form2.DeckMeasure.value == "meters"){
       Primer = Primer * 0.0929;
       FirstCoat = FirstCoat * 0.0929;
       SecondCoat = SecondCoat * 0.0929;
       SandCoat = SandCoat * 0.0929;
       FourthCoat = FourthCoat * 0.0929;
      }
      PrimerNeeded = Form2.DeckArea.value / Primer;
      FirstNeeded = Form2.DeckArea.value / FirstCoat;
      SecondNeeded = Form2.DeckArea.value / SecondCoat;
      FourthNeeded = Form2.DeckArea.value / FourthCoat;

      Form2.DeckOutput.value = "Primer: " + Math.ceil(PrimerNeeded) + " gallons" + '\r\n\r\n' + "1st Coat: " + Math.ceil(FirstNeeded) + " gallons  " + '\r\n' + FirstCoatProduct + '\r\n\r\n' + "2nd Coat: " + Math.ceil(SecondNeeded) + " gallons" + '\r\n' + SecondCoatProduct + '\r\n\r\n' + "Sand Coat: N/A" + '\r\n\r\n' + "4th Coat: " + Math.ceil(FourthNeeded) + " gallons  " + '\r\n' + FourthCoatProduct + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
     } ;

     if(Decker == "HTa" && Form2.DeckArea.value != "Enter Area"){
      Primer = 300;
      FirstCoat = 45;
      SecondCoat = 100;
      SandCoat = 100;
      FourthCoat = 150;
      FirstCoatProduct = "Elasto-Deck 5001 HT";
      SecondCoatProduct = "Elasto-Deck 5001 HT W/Sand";
      SandCoatProduct = "Elasto-Deck 5001 HT W/Sand";
      FourthCoatProduct = "Elasto-Glaze 6001ALHT";
      if(Form2.DeckMeasure.value == "meters"){
       Primer = Primer * 0.0929;
       FirstCoat = FirstCoat * 0.0929;
       SecondCoat = SecondCoat * 0.0929;
       SandCoat = SandCoat * 0.0929;
       FourthCoat = FourthCoat * 0.0929;
      }
      PrimerNeeded = Form2.DeckArea.value / Primer;
      FirstNeeded = Form2.DeckArea.value / FirstCoat;
      SecondNeeded = Form2.DeckArea.value / SecondCoat;
      SandNeeded = Form2.DeckArea.value / SandCoat;
      FourthNeeded = Form2.DeckArea.value / FourthCoat;

      Form2.DeckOutput.value = "Primer: " + Math.ceil(PrimerNeeded) + " gallons" + '\r\n\r\n' + "1st Coat: " + Math.ceil(FirstNeeded) + " gallons  " + '\r\n' + FirstCoatProduct + '\r\n\r\n' + "2nd Coat: " + Math.ceil(SecondNeeded) + " gallons" + '\r\n' + SecondCoatProduct + '\r\n\r\n' + "Sand Coat: " + Math.ceil(SandNeeded) + " gallons  "  + '\r\n' + SandCoatProduct + '\r\n\r\n' + "4th Coat: " + Math.ceil(FourthNeeded) + " gallons  " + '\r\n' + FourthCoatProduct + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
     }

     if(Decker == "HTp" && Form2.DeckArea.value != "Enter Area"){
      Primer = 300;
      FirstCoat = 45;
      SecondCoat = 0;
      SandCoat = 0;
      FourthCoat = 100;
      FirstCoatProduct = "Elasto-Deck 5001 HT";
      SecondCoatProduct = "Elasto-Deck 5001 HT W/Sand";
      SandCoatProduct = "Elasto-Deck 5001 DT W/Sand";
      FourthCoatProduct = "Elasto-Glaze 6001ALHT";
      if(Form2.DeckMeasure.value == "meters"){
       Primer = Primer * 0.0929;
       FirstCoat = FirstCoat * 0.0929;
       FourthCoat = FourthCoat * 0.0929;
      }
      PrimerNeeded = Form2.DeckArea.value / Primer;
      FirstNeeded = Form2.DeckArea.value / FirstCoat;
      FourthNeeded = Form2.DeckArea.value / FourthCoat;

      Form2.DeckOutput.value = "Primer: " + Math.ceil(PrimerNeeded) + " gallons" + '\r\n\r\n' + "1st Coat: " + Math.ceil(FirstNeeded) + " gallons  " + '\r\n' + FirstCoatProduct + '\r\n\r\n' + "2nd Coat: N/A" + '\r\n\r\n' + "Sand Coat: N/A" + '\r\n\r\n' + "4th Coat: " + Math.ceil(FourthNeeded) + " gallons  " + '\r\n' + FourthCoatProduct + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
     }

     if(Decker == "PT" && Form2.DeckArea.value != "Enter Area"){
      Primer = 300;
      FirstCoat = 80;
      SecondCoat = 80;
      SandCoat = 0;
      FirstCoatProduct = "Elasto-Deck 6500 PT";
      SecondCoatProduct = "Elasto-Deck 6500 PT W/Sand";
      SandCoatProduct = "Elasto-Deck 6500 PT W/Sand";
      if(Form2.DeckMeasure.value == "meters"){
       Primer = Primer * 0.0929;
       FirstCoat = FirstCoat * 0.0929;
       SecondCoat = SecondCoat * 0.0929;
      }
      PrimerNeeded = Form2.DeckArea.value / Primer;
      FirstNeeded = Form2.DeckArea.value / FirstCoat;
      SecondNeeded = Form2.DeckArea.value / SecondCoat;

      Form2.DeckOutput.value = "Primer: " + Math.ceil(PrimerNeeded) + " gallons" + '\r\n\r\n' + "1st Coat: " + Math.ceil(FirstNeeded) + " gallons  " + '\r\n' + FirstCoatProduct + '\r\n\r\n' + "Sand Coat: " + Math.ceil(SecondNeeded) + " gallons" + '\r\n' + SecondCoatProduct + '\r\n\r\n' + "Top Coat: N/A" + '\r\n\r\n'  + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction."

     }

     if(Decker == "VT" && Form2.DeckArea.value != "Enter Area"){
      Primer = 300;
      FirstCoat = 80;
      SecondCoat = 80;
      SandCoat = 80;
      FirstCoatProduct = "Elasto-Deck 6500 VT";
      SecondCoatProduct = "Elasto-Deck 6500 VT W/Sand";
      SandCoatProduct = "Elasto-Deck 6500 VT W/Sand";
      if(Form2.DeckMeasure.value == "meters"){
       Primer = Primer * 0.0929;
       FirstCoat = FirstCoat * 0.0929;
       SecondCoat = SecondCoat * 0.0929;
       SandCoat = SandCoat * 0.0929;
      }
      PrimerNeeded = Form2.DeckArea.value / Primer;
      FirstNeeded = Form2.DeckArea.value / FirstCoat;
      SecondNeeded = Form2.DeckArea.value / SecondCoat;
      SandNeeded = Form2.DeckArea.value / SandCoat;

      Form2.DeckOutput.value = "Primer: " + Math.ceil(PrimerNeeded) + " gallons" + '\r\n\r\n' + "1st Coat: " + Math.ceil(FirstNeeded) + " gallons  " + '\r\n' + FirstCoatProduct + '\r\n\r\n' + "Sand Coat: " + Math.ceil(SecondNeeded) + " gallons" + '\r\n' + SecondCoatProduct + '\r\n\r\n' + "Top Coat: " + Math.ceil(SandNeeded) + " gallons  "  + '\r\n' + SandCoatProduct + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
     }

     if(Decker == "BT60" && Form2.DeckArea.value != "Enter Area"){
      Primer = 300;
      FirstCoat = 40;
      SecondCoat = 40;
      SandCoat = 0;
      FirstCoatProduct = "Elasto-Deck 5001 HT";
      SecondCoatProduct = "Elasto-Deck 5001 HT W/Sand";
      SandCoatProduct = "Elasto-Deck 5001 HT W/Sand";
      if(Form2.DeckMeasure.value == "meters"){
       Primer = Primer * 0.0929;
       FirstCoat = FirstCoat * 0.0929;
       SecondCoat = SecondCoat * 0.0929;
      }
      PrimerNeeded = Form2.DeckArea.value / Primer;
      FirstNeeded = Form2.DeckArea.value / FirstCoat;
      SecondNeeded = Form2.DeckArea.value / SecondCoat;

      Form2.DeckOutput.value = "Primer: " + Math.ceil(PrimerNeeded) + " gallons" + '\r\n\r\n' + "1st Coat: " + Math.ceil(FirstNeeded) + " gallons  " + '\r\n' + FirstCoatProduct + '\r\n\r\n' + "2nd Coat: " + Math.ceil(SecondNeeded) + " gallons" + '\r\n' + SecondCoatProduct + '\r\n\r\n' + "3rd Coat: N/A" + '\r\n\r\n'  + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction."

     }

     if(Decker == "BT90" && Form2.DeckArea.value != "Enter Area"){
      Primer = 300;
      FirstCoat = 40;
      SecondCoat = 40;
      SandCoat = 40;
      FirstCoatProduct = "Elasto-Deck 5001 HT";
      SecondCoatProduct = "Elasto-Deck 5001 HT W/Sand";
      SandCoatProduct = "Elasto-Deck 5001 HT W/Sand";
      if(Form2.DeckMeasure.value == "meters"){
       Primer = Primer * 0.0929;
       FirstCoat = FirstCoat * 0.0929;
       SecondCoat = SecondCoat * 0.0929;
       SandCoat = SandCoat * 0.0929;
      }
      PrimerNeeded = Form2.DeckArea.value / Primer;
      FirstNeeded = Form2.DeckArea.value / FirstCoat;
      SecondNeeded = Form2.DeckArea.value / SecondCoat;
      SandNeeded = Form2.DeckArea.value / SandCoat;

      Form2.DeckOutput.value = "Primer: " + Math.ceil(PrimerNeeded) + " gallons" + '\r\n\r\n' + "1st Coat: " + Math.ceil(FirstNeeded) + " gallons  " + '\r\n' + FirstCoatProduct + '\r\n\r\n' + "2nd Coat: " + Math.ceil(SecondNeeded) + " gallons" + '\r\n' + SecondCoatProduct + '\r\n\r\n' + "3rd Coat: " + Math.ceil(SandNeeded) + " gallons  "  + '\r\n' + SandCoatProduct + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
     }
     return true;
    }


function Clicker2(Form2) {
    var length;
    length = Form2.length.value;
    var width;
    width = Form2.width.value;
    var depth;
    depth = Form2.depth.value;
     Form2.DeckOutput.rows = 9;
     Form2.SystemCombo.value = "No";
     Form2.DeckMeasure.value = "feet";
     Form2.DeckArea.value = "Enter Area";
     Form2.DeckOutput.value = "";
   if(Form2.length.value != "Enter Length" && Form2.width.value != "No" && Form2.depth.value != "No"){
      if(Form2.measure.value == "meters")
     {
        if(width == "1/4")
        {
            if(depth == "1/4")
            {
                Form2.DeckOutput.value = Math.ceil(length/24.8*.2642) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "3/8")
            {
                Form2.DeckOutput.value = "Too deep for this width";
            }
            if(depth == "1/2")
            {
                Form2.DeckOutput.value = "Too deep for this width";
            }
        }
        if(width == "3/8")
        {
            if(depth == "1/4")
            {
                Form2.DeckOutput.value = Math.ceil(length/16.5*.2642) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "3/8")
            {
                Form2.DeckOutput.value = Math.ceil(length/10.9*.2642) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "1/2")
            {
                Form2.DeckOutput.value = "Too deep for this width";
            }
        }
        if(width == "1/2")
        {
            if(depth == "1/4")
            {
                Form2.DeckOutput.value = Math.ceil(length/12.4*.2642) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "3/8")
            {
                Form2.DeckOutput.value = Math.ceil(length/8.2*.2642) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "1/2")
            {
                Form2.DeckOutput.value = Math.ceil(length/6.2*.2642) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
        }
        if(width == "5/8")
        {
            if(depth == "1/4")
            {
                Form2.DeckOutput.value = Math.ceil(length/9.9*.2642) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "3/8")
            {
                Form2.DeckOutput.value = Math.ceil(length/6.6*.2642) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "1/2")
            {
                Form2.DeckOutput.value = Math.ceil(length/4.9*.2642) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
        }
        if(width == "3/4")
        {
            if(depth == "1/4")
            {
                Form2.DeckOutput.value = Math.ceil(length/8.2*.2642) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "3/8")
            {
                Form2.DeckOutput.value = Math.ceil(length/5.5*.2642) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "1/2")
            {
                Form2.DeckOutput.value = Math.ceil(length/4.1*.2642) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
        }
        if(width == "7/8")
        {
            if(depth == "1/4")
            {
                Form2.DeckOutput.value = Math.ceil(length/7.1*.2642) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "3/8")
            {
                Form2.DeckOutput.value = Math.ceil(length/4.7*.2642) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "1/2")
            {
                Form2.DeckOutput.value = Math.ceil(length/3.5*.2642) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
        }
        if(width == "1")
        {
            if(depth == "1/4")
            {
                Form2.DeckOutput.value = Math.ceil(length/6.2*.2642) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "3/8")
            {
                Form2.DeckOutput.value = Math.ceil(length/4.1*.2642) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "1/2")
            {
                Form2.DeckOutput.value = Math.ceil(length/3.0*.2642) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
        }
    }
    if(Form2.measure.value == "feet")
    {
        if(width == "1/4")
        {
            if(depth == "1/4")
            {
                Form2.DeckOutput.value = Math.ceil(length/308) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "3/8")
            {
                Form2.DeckOutput.value = "Too deep for this width";
            }
            if(depth == "1/2")
            {
                Form2.DeckOutput.value = "Too deep for this width";
            }
        }
        if(width == "3/8")
        {
            if(depth == "1/4")
            {
                Form2.DeckOutput.value = Math.ceil(length/205) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "3/8")
            {
                Form2.DeckOutput.value = Math.ceil(length/136) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "1/2")
            {
                Form2.DeckOutput.value = "Too deep for this width";
            }
        }
        if(width == "1/2")
        {
            if(depth == "1/4")
            {
                Form2.DeckOutput.value = Math.ceil(length/154) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "3/8")
            {
                Form2.DeckOutput.value = Math.ceil(length/102) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "1/2")
            {
                Form2.DeckOutput.value = Math.ceil(length/77) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
        }
        if(width == "5/8")
        {
            if(depth == "1/4")
            {
                Form2.DeckOutput.value = Math.ceil(length/123) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "3/8")
            {
                Form2.DeckOutput.value = Math.ceil(length/82) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "1/2")
            {
                Form2.DeckOutput.value = Math.ceil(length/61) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
        }
        if(width == "3/4")
        {
            if(depth == "1/4")
            {
                Form2.DeckOutput.value = Math.ceil(length/102) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "3/8")
            {
                Form2.DeckOutput.value = Math.ceil(length/68) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "1/2")
            {
                Form2.DeckOutput.value = Math.ceil(length/51) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
        }
        if(width == "7/8")
        {
            if(depth == "1/4")
            {
                Form2.DeckOutput.value = Math.ceil(length/88) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "3/8")
            {
                Form2.DeckOutput.value = Math.ceil(length/58) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "1/2")
            {
                Form2.DeckOutput.value = Math.ceil(length/44) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
        }
        if(width == "1")
        {
            if(depth == "1/4")
            {
                Form2.DeckOutput.value = Math.ceil(length/77) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "3/8")
            {
                Form2.DeckOutput.value = Math.ceil(length/51) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
            if(depth == "1/2")
            {
                Form2.DeckOutput.value = Math.ceil(length/38) + " gallons" + '\r\n\r\n' + "NOTE: Please add your expected waste factor (usually 5%). This material calculator is a guideline only, actual amounts of material needed may vary due to different surface conditions, job conditions, etc. Pacific Polymers assumes no liability for any miscalculations resulting from either user error or calculator malfunction.";
            }
        }
    }}
    return true;
}



/* -- Action Functions */
/* EOF */

