function Calckit() { document.form3.codegenerator.value = ''; testpressure = document.form3.testpress.value*1; maxleakage = document.form3.leakage.value*1; fourkitcfm = 50 - testpressure; fivekitcfm = 401.294 - 29.25*(testpressure) - 0.01694*Math.exp(testpressure); sixkitcfm = 1259.1 - 41.8*(testpressure) - 0.14*Math.pow(testpressure,3); eightkitcfm = 1832.6 - 64.95*(testpressure) - 2.8*Math.pow(testpressure,2); if(maxleakage < 5) { document.form3.codegenerator.value = 'Need special low-leakage tube. We can design one for you.'; } else if (testpressure > 40) { document.form3.codegenerator.value = 'This is a high pressure and exceeds the limits of our standard product offering. Contact us to design a custom tube or kit.'; } else if (maxleakage <= fourkitcfm ) { document.form3.codegenerator.value = 'Part number: LTK-4 includes 4-inch diameter orifice tube, a fan, two U-tube manometers, flexible duct, and pressure tubing.'; } else if (maxleakage <= fivekitcfm) { document.form3.codegenerator.value = 'Part number: LTK-5 includes 5-inch diameter orifice tube, a fan, two U-tube manometers, flexible duct, and pressure tubing.'; } else if (maxleakage <= sixkitcfm) { if(maxleakage < 150) { document.form3.codegenerator.value = 'This condition exceeds the limits of our standard product offering. Contact us to design a custom tube or kit.'; } else if(maxleakage>=150) { document.form3.codegenerator.value = 'Part number: LTK-6 includes 6-inch diameter orifice tube, a fan, two U-tube manometers, flexible duct, and pressure tubing.'; } } else if (maxleakage <= eightkitcfm) { if(maxleakage < 250) { document.form3.codegenerator.value = 'This condition exceeds the limits of our standard product offering. Contact us to design a custom tube or kit.'; } else if(maxleakage>=250) { document.form3.codegenerator.value = 'Part number: LTK-8 includes 8-inch diameter orifice tube, a fan, two U-tube manometers, flexible duct, and pressure tubing.'; } } else if (maxleakage > eightkitcfm) { document.form3.codegenerator.value = 'This condition exceeds the limits of our standard product offering. Contact us to design a custom tube or kit.'; } } function CalcKit2() { document.form4.codegenerator.value = ''; var systempressure = document.form4.sysp.value; var ductclass = 1*document.form4.leakageclass.value; var surfacearea = 1*document.form4.surfarea.value; if(ductclass==0) { lclass=3; } if(ductclass==1) { lclass=6; } if(ductclass==2) { lclass=12; } if(ductclass==3) { lclass=24; } if(ductclass==4) { lclass=48; } var LeakFactor = (1*lclass)*Math.pow(systempressure,0.65); var cfmtomeasure = Math.round((LeakFactor/100)*surfacearea) document.form4.codegenerator.value = 'Allowable leakage is '+cfmtomeasure+' cfm' var fourkitcfm = 50 - systempressure; var fivekitcfm = 401.294 - 29.25*(systempressure) - 0.01694*Math.exp(systempressure); var sixkitcfm = 1259.1 - 41.8*(systempressure) - 0.14*Math.pow(systempressure,3); var eightkitcfm = 1832.6 - 64.95*(systempressure) - 2.8*Math.pow(systempressure,2); if(cfmtomeasure < 5) { document.form4.codegenerator2.value = 'Need special low-leak tube. We can design one for you.'; } else if (systempressure > 15) { document.form4.codegenerator2.value = 'This is a high pressure and exceeds the limits of our standard product offering. Contact us to design a custom tube or kit.'; } else if (cfmtomeasure <= fourkitcfm ) { document.form4.codegenerator2.value = 'Part number: LTK-S includes 4-inch diameter orifice tube, a fan, two U-tube manometers, flex duct, and pressure tubing.'; } else if (cfmtomeasure <= fivekitcfm) { document.form4.codegenerator2.value = 'Part number: LTK-L includes 5-inch diameter orifice tube, a fan, two U-tube manometers, flex duct, and pressure tubing.'; } else if (cfmtomeasure <= sixkitcfm) { document.form4.codegenerator2.value = 'Part number: LTK-6 includes 6-inch diameter orifice tube, a fan, two U-tube manometers, flex duct, and pressure tubing.'; } else if (cfmtomeasure <= eightkitcfm) { document.form4.codegenerator2.value = 'Part number: LTK-8 includes 8-inch diameter orifice tube, a fan, two U-tube manometers, flex duct, and pressure tubing.'; } else if (cfmtomeasure > eightkitcfm) { document.form4.codegenerator2.value = 'This condition exceeds the limits of our standard product offering. Contact us to design a custom tube or kit.'; } } function CalcKit3() { document.form5.codegenerator.value = ''; var systempressure = document.form5.sysp.value; var inlineloss = document.form5.feetofflex.value * 0.1223 + document.form5.numbends.value * 0.600; var testpressure = (1 * systempressure + inlineloss); var customerkit=document.form5.mykit.value; var fourkitcfm = Math.round( 50 - testpressure ); var fivekitcfm = Math.round(401.294 - 29.25 * (testpressure) - 0.01694 * Math.exp(testpressure)); var sixkitcfm = Math.round(1259.1 - 41.8 * (testpressure) - 0.14 * Math.pow(testpressure,3)); var eightkitcfm = Math.round(1832.6 - 64.95 * (testpressure) - 2.8 * Math.pow(testpressure,2)); if(fourkitcfm<0) { fourkitcfm=0; } if(fivekitcfm<0) { fivekitcfm=0; } if(sixkitcfm<0) { sixkitcfm=0; } if(eightkitcfm<0) { eightkitcfm=0; } if(customerkit==0) { document.form5.codegenerator.value = 'Maximum leakage LTK-S can measure is '+fourkitcfm+' cfm at a test pressure of '+systempressure+' in.wg. and with an inline loss of '+inlineloss+' in.wg.'; } else if(customerkit==1) { document.form5.codegenerator.value = 'Maximum leakage LTK-L can measure is '+fivekitcfm+' cfm at a test pressure of '+systempressure+' in.wg. and with an inline loss of '+inlineloss+' in.wg.'; } else if(customerkit==2) { document.form5.codegenerator.value = 'Maximum leakage LTK-6 can measure is '+sixkitcfm+' cfm at a test pressure of '+systempressure+' in.wg. and with an inline loss of '+inlineloss+' in.wg.'; } else if(customerkit==3) { document.form5.codegenerator.value = 'Maximum leakage LTK-8 can measure is '+eightkitcfm+' cfm at a test pressure of '+systempressure+' in.wg. and with an inline loss of '+inlineloss+' in.wg.'; } }