function changeCode(){ // clear variables var baseweight = 0; var mc = ""; var err = ""; var ser = ""; var psi = ""; var price = ""; var baseweight = 0; var baseprice = 0; var basedescrip = ""; var actweight = 0; var actprice = 0; var actdescrip = ""; var actvoltage = ""; var failpos = ""; var mountprice = 0; var mountweight = 0; var solprice = 0; var limprice = 0; var solweight = 0; var limweight = 0; var siz = ""; var nqs = "no"; var infotext = ""; var bodymat = "Stainless Steel"; var sizedescrip = ""; var condescrip = "NPT (female)"; var infoflo = ""; var seatmat = "RPTFE"; var sealmat = "RPTFE"; var soldescrip = ""; var solvoltage = ""; var limdescrip = ""; var sol = ""; var lim = ""; var solpic = ""; var limpic = ""; var solt = ""; var solc = ""; var solv = ""; var actt = ""; var actn = ""; var actcad = ""; var posdescrip = ""; var posprice = 0; var posweight = 0; var pos = ""; document.codeform.price.value = ""; // get all user selections if (document.codeform.size[0].checked) {var siz = "A"; var sizedescrip = "1/4 inch"}; if (document.codeform.size[1].checked) {var siz = "B"; var sizedescrip = "3/8 inch"}; if (document.codeform.size[2].checked) {var siz = "C"; var sizedescrip = "1/2 inch"}; if (document.codeform.size[3].checked) {var siz = "D"; var sizedescrip = "3/4 inch"}; if (document.codeform.size[4].checked) {var siz = "E"; var sizedescrip = "1 inch"}; if (document.codeform.size[5].checked) {var siz = "F"; var sizedescrip = "1-1/4 inch"}; if (document.codeform.size[6].checked) {var siz = "G"; var sizedescrip = "1-1/2 inch"}; if (document.codeform.size[7].checked) {var siz = "H"; var sizedescrip = "2 inch"}; if (document.codeform.size[8].checked) {var siz = "J"; var sizedescrip = "3 inch";}; // if (siz == "J"){ // document.getElementById('V4text').innerHTML = "K4 series"; // document.getElementById('R4text').innerHTML = "O4 series"; // document.getElementById('V4').innerHTML = ''; // document.getElementById('R4').innerHTML = ''; // document.getElementById('V424').style.display = "none"; // document.getElementById('V412').style.display = "none"; // document.getElementById('R4120').style.display = "none"; // if (document.codeform.actuator[13].checked) { document.codeform.actuator[16].checked = 1;} // if (document.codeform.actuator[14].checked) { document.codeform.actuator[17].checked = 1;} // if (document.codeform.actuator[15].checked) { document.codeform.actuator[12].checked = 1;} // } else { // document.getElementById('V4text').innerHTML = "V4 series"; // document.getElementById('R4text').innerHTML = "R4 series"; // document.getElementById('V4').innerHTML = ''; // document.getElementById('R4').innerHTML = ''; // document.getElementById('V424').style.display = "table-cell"; // document.getElementById('V412').style.display = "table-cell"; // document.getElementById('R4120').style.display = "table-cell"; // } // Actuators --------------------------- // Pneumatic actuators if (document.codeform.actuator[0].checked) { var act = "08SC"; var actn = "OSR8"; var actpic = "08S"; var failpos = " (Fail to CLOSED)"; var psi = "80"; var solt = "E"; var actt="P"; var actcad = "08S"}; if (document.codeform.actuator[1].checked) { var act = "06SC"; var actn = "OSR6"; var actpic = "08S"; var failpos = " (Fail to CLOSED)"; var psi = "60"; var solt = "E"; var actt="P"; var actcad = "06S"}; if (document.codeform.actuator[2].checked) { var act = "08SO"; var actn = "OSR8"; var actpic = "08S"; var failpos = " (Fail to OPEN)"; var psi = "80"; var solt = "E"; var actt="P"; var actcad = "08S"}; if (document.codeform.actuator[3].checked) { var act = "06SO"; var actn = "OSR6"; var actpic = "08S"; var failpos = " (Fail to OPEN)"; var psi = "60"; var solt = "E"; var actt="P"; var actcad = "06S"}; if (document.codeform.actuator[4].checked) { var act = "08D"; var actn = "ODA8"; var actpic = "08D"; var psi = "80"; var solt = "C"; var actt="P"; var actcad = "08D"}; if (document.codeform.actuator[5].checked) { var act = "06D"; var actn = "ODA6"; var actpic = "08D"; var psi = "60"; var solt = "C"; var actt="P"; var actcad = "06D"}; if (document.codeform.actuator[6].checked) { var act = "E8SC"; var actn = "ESR8"; var actpic = "E8S"; var failpos = " (Fail to CLOSED)"; var psi = "80"; var solt = "E"; var actt="P"; var actcad = "E8S"}; if (document.codeform.actuator[7].checked) { var act = "E6SC"; var actn = "ESR6"; var actpic = "E8S"; var failpos = " (Fail to CLOSED)"; var psi = "60"; var solt = "E"; var actt="P"; var actcad = "E6S"}; if (document.codeform.actuator[8].checked) { var act = "E8SO"; var actn = "ESR8"; var actpic = "E8S"; var failpos = " (Fail to OPEN)"; var psi = "80"; var solt = "E"; var actt="P"; var actcad = "E8S"}; if (document.codeform.actuator[9].checked) { var act = "E6SO"; var actn = "ESR6"; var actpic = "E8S"; var failpos = " (Fail to OPEN)"; var psi = "60"; var solt = "E"; var actt="P"; var actcad = "E6S"}; if (document.codeform.actuator[10].checked) { var act = "E8D"; var actn = "EDA8"; var actpic = "E8D"; var psi = "80"; var solt = "C"; var actt="P"; var actcad = "E8D"}; if (document.codeform.actuator[11].checked) { var act = "E6D"; var actn = "EDA6"; var actpic = "E8D"; var psi = "60"; var solt = "C"; var actt="P"; var actcad = "E6D"}; // Electric actuators if (document.codeform.actuator[12].checked) { var act = "V4A"; var actn = "VEN4AC"; var actpic = "V4"; var actv = "A"; var actvoltage = " 120 VAC"; var actt="E"; var actcad = "V4"}; if (document.codeform.actuator[13].checked) { var act = "V4B"; var actn = "VEN4DC"; var actpic = "V4"; var actv = "B"; var actvoltage = " 24 VDC"; var actt="E"; var actcad = "V4"}; if (document.codeform.actuator[14].checked) { var act = "V4F"; var actn = "VEN4DC"; var actpic = "V4"; var actv = "F"; var actvoltage = " 12 VDC"; var actt="E"; var actcad = "V4"}; if (document.codeform.actuator[15].checked) { var act = "R4A"; var actn = "REN4AC"; var actpic = "R4"; var actv = "A"; var actvoltage = " 120 VAC"; var actt="E"; var actcad = "R4"}; if (document.codeform.actuator[16].checked) { var act = "R4B"; var actn = "REN4DC"; var actpic = "R4"; var actv = "B"; var actvoltage = " 24 VDC"; var actt="E"; var actcad = "R4"}; if (document.codeform.actuator[17].checked) { var act = "R4F"; var actn = "REN4DC"; var actpic = "R4"; var actv = "F"; var actvoltage = " 12 VDC"; var actt="E"; var actcad = "R4"}; if (document.codeform.actuator[18].checked) { var act = "B7A"; var actn = "EXPAC"; var actpic = "B7"; var actv = "A"; var actvoltage = " 120 VAC"; var actt="E"; var actcad = ""}; // Manual Handle actuators if (document.codeform.actuator[19].checked) { var act = "M"; var actn = "MAN"; var actpic = "M"; var actt="M"; var actcad = "M"}; // Solenoids --------------------------- if (actt == "P"){ if (document.codeform.solenoid[0].checked) {var solc = ""}; if (document.codeform.solenoid[1].checked) {var solc = "3"}; if (document.codeform.solenoid[2].checked) {var solc = "4"}; if (document.codeform.solenoid[3].checked) {var solc = "5"}; if (document.codeform.solenoid[4].checked) {var solc = "6"}; if (document.codeform.solenoid[5].checked) {var solc = "2"}; if (document.codeform.solenoidv[0].checked) {var solv = "A"; var solvoltage="120 VAC"}; if (document.codeform.solenoidv[1].checked) {var solv = "B"; var solvoltage="24 VDC"}; if (document.codeform.solenoidv[2].checked) {var solv = "F"; var solvoltage="12 VDC"}; if (solc!=""){var sol=solt+solc+solv; var solpic=solt+"3"; if (solc=="2"){ var solpic=solt+"2";} } } // Limit Switches --------------------------- if (actt == "P"){ if (document.codeform.limit[0].checked) {var lim = ""}; if (document.codeform.limit[1].checked) {var lim = "YF"; var limpic = "YF"}; if (document.codeform.limit[2].checked) {var lim = "UA"; var limpic = "UB"}; if (document.codeform.limit[3].checked) {var lim = "UB"; var limpic = "UB"}; if (document.codeform.limit[4].checked) {var lim = "YO"; var limpic = "YW4"}; if (document.codeform.limit[5].checked) {var lim = "YH"; var limpic = "YW7"}; if (document.codeform.limit[6].checked) {var lim = "YE"; var limpic = "YW7"}; } // Check for exceptions ---------------------------------------------------------- // Alert for Explosion Proof Solenoid & Limit Switch // if ((lim != "") && (solc == "2")){ // alert('Explosion Proof Limit Switches are not QuickShip items but are available.\r\rPlease call 1-800-899-0553 for price and availability.'); // var price = "call 1-800-899-0553" // } // Change YF limit switch to UB for Manual Valves // if ((act == "M") && (lim == "YF")){ // alert('YF limit switches are only for use with Pneumatic Actuators.\rUse UB limit switches for manual valves.\rThe limit switch will be set to UB.') // document.codeform.limit[2].checked = 1; // var lim = "UB" // } if ((siz=="J") && (actpic == "R4" || actpic == "V4")){ // alert('3 inch valves require actuators other than R4 or V4.\nThe correct actuator has been substituted.'); if (actv == "A"){ var act = "K4A"; var actpic = "K4"} if (actv == "B"){ var act = "O4B"; var actpic = "K4"} if (actv == "F"){ var act = "O4F"; var actpic = "K4"} } // Set model code & pic variables --------------------------- var pmc = ""+act+sol+lim; var pic = ""+actpic+solpic+limpic; var mc = siz+"26NRX"+act+sol+lim; var cadmc = siz+"26NRX"+actcad; // mark cads that are not available if (actcad == ""){ var cadmc = ""} if (siz == "J"){ var cadmc = ""} if (cadmc == ""){var cadmc = "NA"; document.getElementById('cadlink').innerHTML = 'CAD files for automated valves CAD File not available at this time'; } else { document.getElementById('cadlink').innerHTML = 'CAD files for automated valves View/Download CAD File'; } // ---------- MANUAL HANDLES Set Alternate Model Codes for 21 series & price // if (pmc =='M'){ var pic = "M"; // if (siz == "A" || siz == "B" || siz == "C" || siz == "D" || siz == "E" || siz == "F" || siz == "G" || siz == "H"){ // var amc = siz+"21NRXM"; // if (warned != "yes"){ // alert('The valve that you have chosen, '+mc+',\rhas a more economical equivalent in the 21 series.\r\rModel '+amc+'\r\rMax Pressure = 1000 PSIG (at 100 deg F).\rThis valve does not include a mounting pad for actuators or limit switches.'); // var warned = 'yes'; } // alert(warned); // } //} //if (pmc =='MUB'){ var pic = "MUB"; // if (siz == "J"){ var price = "call 1-800-899-0553"} // } // Set Prices ----------------------------------------------- var baseprice = eval('SIZE_'+siz+'.price'); var baseweight = eval('SIZE_'+siz+'.weight'); // alert('base price = '+baseprice); // alert('base weight = '+baseweight); // alert(SIZE_B.OSR8.ACT); // alert(SIZE_B.OSR8.MOUNT); var actmod = eval('SIZE_'+siz+'.'+actn+'.ACT'); var actprice = eval('ACT_'+actmod+'.price'); var actweight = eval('ACT_'+actmod+'.weight'); var actdescrip = eval('ACT_'+actmod+'.descrip')+failpos+actvoltage; var mount = eval('SIZE_'+siz+'.'+actn+'.MOUNT'); var mountprice = eval('MOUNT_'+mount+'.price'); var mountweight = eval('MOUNT_'+mount+'.weight'); // alert('mounting kit is '+mount+' , '+mountprice+' , '+mountweight); // alert('actuator is '+actmod+' , '+actprice+' , '+actweight+' , '+actdescrip); // solenoid pricing, weight, & description if (sol !=''){ var solbeg2 = sol.substring(0, 2); var solprice = eval('sol_'+solbeg2+'_price'); var solweight = eval('sol_'+solbeg2+'_weight'); var soldescrip = (eval('sol_'+solbeg2+'_descrip'))+" "+solvoltage; } // limit switch pricing, weight, & description if (lim !=''){ var limprice = eval(lim+'_price'); var limweight = eval(lim+'_weight'); var limdescrip = eval(lim+'_descrip'); } // TOTAL PRICE var price = Math.round(baseprice+actprice+mountprice+solprice+limprice); // TOTAL WEIGHT var weight = baseweight+actweight+mountweight+solweight+limweight; // DESCRIPTIONS var infotext = " Body Material: "+bodymat+"
"+ " Size & Connection: "+sizedescrip+" "+condescrip+"
"+ " Seats: "+seatmat+" | Stem Seals: "+sealmat+"
"+ " Actuator: "+actdescrip; if (psi != "") { var infotext = infotext +"
(sized for using "+psi+"psi supply air in applications up to 300psi DP)";} var infotext = infotext + "
"; // " Flow Plan: "+infoflo+"
"+ if (soldescrip != "") { var infotext = infotext +"Actuator Solenoid: "+soldescrip+"
";} if (limdescrip != "") { var infotext = infotext +"Limit Switch: "+limdescrip+"
";} if (siz == ""){var pic = "08S"; var price = ""; var mc = "Select Size"} document.codeform.price.value = price; document.codeform.modelcode.value = mc; document.codeform.imgsrc.value = "/26/models/"+pic+".jpg"; document.codeform.id.value = mc; document.codeform.cadcode.value = cadmc; document.codeform.info.value = infotext; document.codeform.weight.value = weight; document.codeform.prodname.value = '26 Series'; document.codeform.prodseries.value = 'Stainless Steel Full Port 2-way Ball Valve'; var psummary = 'price = base:'+baseprice+'
act:'+actprice+'
mount:'+mountprice+'
sol:'+solprice+'
lim:'+limprice+'
pos:'+posprice; var wsummary = 'weight = base:'+baseweight+'
act:'+actweight+'
mount:'+mountweight+'
sol:'+solweight+'
lim:'+limweight+'
pos:'+posweight; // ------------------------------------------------------------------------ // alert(summary); // document.getElementById('infospan').innerHTML = "
"+infotext+"
"; // document.getElementById('calcspan').innerHTML = "
"+psummary+""+wsummary+"
"; var img26 = new Image(); img26.src = "models/"+pic+".jpg"; document.images[ "mainimg" ].src = eval( "img26.src" ) }