function selectModel(pn) { var type = pn.substr(0, 1); var conn = pn.substr(1, 1); var volt = pn.substr(2, 1); if (type == "E") { document.codeform.sol_type[0].checked = 1; } if (type == "C") { document.codeform.sol_type[1].checked = 1; } if (conn == "1") { document.codeform.sol_wp[4].checked = 1; } if (conn == "2") { document.codeform.sol_wp[5].checked = 1; } if (conn == "3") { document.codeform.sol_wp[0].checked = 1; } if (conn == "4") { document.codeform.sol_wp[1].checked = 1; } if (conn == "5") { document.codeform.sol_wp[2].checked = 1; } if (conn == "6") { document.codeform.sol_wp[3].checked = 1; } if (volt == "A") { document.codeform.sol_volt[1].checked = 1; } if (volt == "B") { document.codeform.sol_volt[4].checked = 1; } if (volt == "E") { document.codeform.sol_volt[0].checked = 1; } if (volt == "F") { document.codeform.sol_volt[3].checked = 1; } if (volt == "C") { document.codeform.sol_volt[2].checked = 1; } changeCode(); } function changeCode() { // set vars that don't change and initialize others var sol = ""; var seal = ""; var lim = ""; var pic = "VA"; var solVolt = ""; var solType = ""; var solCon = ""; var bodyMatDescrip = "Body Material: Nickel Plated Brass"; var sizeDescrip = ""; var sealDescrip = ""; var limDescrip = ""; var solConDescrip = ""; var solVoltDescrip = ""; var solTypeDescrip = ""; var solRatingDescrip = ""; var accessDescrip = ""; // ----------- actuator accesories on assembly var accessoryDescrip = ""; // ------- accesories that ship loose var actpic = ""; var solpic = ""; var limpic = ""; var failPos = ""; var accPrice = 0; var priceSum = "Pricing:"; var weightSum = "Weight:"; var limPrice = 0; var limWeight = 0; var solPrice = 0; var solWeight = 0; var price = 0; var accessPrice = 0; var accessoryPrice = 0; var assemblyWeight = 0; var accessWeight = 0; var accessoryWeight = 0; var actcad = ""; var S4mod = ""; var S4bat = ""; var S4din = ""; var s4kitName = ""; var step1summary = ""; var step1summary = ""; var step3summary = ""; var alertNote = ""; // ====================== reset classes of all selection divs and table cells to UN-selected state resetSolDivs(); document.codeform.sol_type[0].disabled=0; document.getElementById('sol_type1').style.color="#000000"; // ================= reset summary boxes ========================== document.getElementById('priceSummary').innerHTML = "Error!"; document.getElementById('weightSummary').innerHTML = "Error!"; // =================== Step 1 Summary ================= var sizeDescrip = "Size and Connection: "+sizeDescrip; var sealDescrip = "Seats and Seal Material: "+ sealDescrip; var step1summary = bodyMatDescrip + "
"+sizeDescrip+"
"+sealDescrip; document.getElementById('step1summary').innerHTML = step1summary; // ===================================================== Solenoids ============================================================= // ===================================================== WeatherProof Solenoid =============================================== // var solRatingDescrip = "Weatherproof (NEMA 4/4x)"; if (document.codeform.sol_type[0].checked) { document.getElementById('sol_type1').className="selectionChecked"; var solType = "E"; var solTypeDescrip = "3-way/2-position valve with "; document.getElementById('wireDiagram').value = "E"; } if (document.codeform.sol_type[1].checked) { document.getElementById('sol_type2').className="selectionChecked"; var solType = "C"; var solTypeDescrip = "4-way/2-position valve with "; document.getElementById('wireDiagram').value = "C"; } if (document.codeform.sol_wp[0].checked) { document.getElementById('sol_wp1').className="selectionChecked"; var solCon = "3"; var solpic = "3"; var solConDescrip = "Weatherproof coil (NEMA 4/4x) with DIN cord grip cable gland (PG9) connector"; } if (document.codeform.sol_wp[1].checked) { document.getElementById('sol_wp2').className="selectionChecked"; var solCon = "4"; var solpic = "3"; var solConDescrip = "Weatherproof coil (NEMA 4/4x) with plastic DIN 1/2 inch conduit connector"; } if (document.codeform.sol_wp[2].checked) { document.getElementById('sol_wp3').className="selectionChecked"; var solCon = "5"; var solpic = "3"; var solConDescrip = "Weatherproof coil (NEMA 4/4x) with DIN cord set connector with 6 foot cable"; } if (document.codeform.sol_wp[3].checked) { document.getElementById('sol_wp4').className="selectionChecked"; var solCon = "6"; var solpic = "3"; var solConDescrip = "Weatherproof coil (NEMA 4/4x) with DIN cord set connector with 15 foot cable"; } if (document.codeform.sol_wp[4].checked) { document.getElementById('sol_wp5').className="selectionChecked"; var solCon = "1"; var solpic = "2"; var solConDescrip = "Weatherproof coil (NEMA 4/4x) with potted DIN 1/2 inch conduit connector"; } if (document.codeform.sol_wp[5].checked) { document.getElementById('sol_wp6').className="selectionChecked"; var solCon = "2"; var solpic = "2"; var solConDescrip = "Explosion Proof coil (UL and CSA listed), with potted 1/2 inch conduit connector"; } // ===================================================== Solenoid Voltage =============================================== if (document.codeform.sol_volt[0].checked) { document.getElementById('sol_volt1').className="selectionChecked"; var solVolt = "E"; var solVoltDescrip = "24VAC"; } if (document.codeform.sol_volt[1].checked) { document.getElementById('sol_volt2').className="selectionChecked"; var solVolt = "A"; var solVoltDescrip = "120VAC"; } if (document.codeform.sol_volt[2].checked) { document.getElementById('sol_volt3').className="selectionChecked"; var solVolt = "C"; var solVoltDescrip = "220VAC"; } if (document.codeform.sol_volt[3].checked) { document.getElementById('sol_volt4').className="selectionChecked"; var solVolt = "F"; var solVoltDescrip = "12VDC"; } if (document.codeform.sol_volt[4].checked) { document.getElementById('sol_volt5').className="selectionChecked"; var solVolt = "B"; var solVoltDescrip = "24VDC"; } var sol = solType + solCon + solVolt; // var solDescrip = solRatingDescrip + " " + solTypeDescrip +" "+ solConDescrip+", "+ solVoltDescrip; var solDescrip = solTypeDescrip +" "+ solConDescrip+", "+ solVoltDescrip; // ======== end of ACTUATORS // ======================================================== SET step 2 summary ================================================== var solDescrip = "NAMUR Solenoid: "+solDescrip; var step1summary = solDescrip; document.getElementById('step1summary').innerHTML = step1summary; // =========================================================== SET MODEL CODE ============================================= var mc=sol; var pic = solType + solpic; // var CADmc="VA"; document.getElementById('PN').innerHTML =mc; document.codeform.id.value=mc; document.getElementById('MClinks').innerHTML =mc; document.getElementById('mainIMG').src = "/NAMUR-solenoid-valves/models/"+pic+".jpg"; document.codeform.imgsrc.value="/NAMUR-solenoid-valves/models/"+pic+".jpg"; // document.codeform.CADmc.value=CADmc; // =========================================================== SET PRICING ============================================= var qty = document.codeform.qty.value; // SOLENOID =--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- if (sol != "") { if (solCon == "1" || solCon == "2") { solPrice = eval(sol+".price")+LABUNIT.price; solWeight = eval(sol+".weight"); var priceSum = priceSum + "
Solenoid Price: "+solPrice+" ("+sol+")
Labor: "+LABUNIT.price+" (1 LABUNIT)"; var weightSum = weightSum + "
Solenoid: "+solWeight+" ("+sol+")"; } else { solBase = solType + solVolt; if (solCon == "3") { var solConID = "VEP_1005_70_HC"; } if (solCon == "4") { var solConID = "VEP_1005_70_HCC"; } if (solCon == "5") { var solConID = "CA5J560_000_US0G"; } if (solCon == "6") { var solConID = "CA5J5F0_000_US0G"; } solPrice = eval(solBase+".price") + eval(solConID+".price"); solWeight = eval(solBase+".weight") + eval(solConID+".weight"); var priceSum = priceSum + "
Solenoid Price: "+solPrice+" ("+solBase+", "+solConID+")
"; var weightSum = weightSum + "
Solenoid: "+solWeight+" ("+solBase+", "+solConID+")"; } } // LIMIT SWITCH =--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- // (taken care of above when determining Limit Switch) // LABOR =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= var mountLab = 0; //alert(priceSum); var mountPrice= mountLab * LABUNIT.price; var fullPrice = Math.ceil(solPrice); var fullWeight = Math.ceil(solWeight); document.getElementById('price').innerHTML = fullPrice; document.codeform.price.value=fullPrice; document.codeform.weight.value=fullWeight; document.getElementById('priceSummary').innerHTML = priceSum; document.getElementById('weightSummary').innerHTML = weightSum+"
TOTAL: "+fullWeight+" lbs."; var totalPrice = (fullPrice + accessPrice) * qty; document.getElementById('totalPrice').innerHTML = totalPrice; // =========================================================== SET DESCRIPTION ============================================= var fullSummary = step1summary; if (alertNote != "") { // alert(alertNote+ 'oooooops'); var fullSummary = fullSummary + "
" + alertNote; } document.getElementById('fullSummary').innerHTML = fullSummary; document.codeform.info.value=fullSummary; } // ========================================================== END OF MAIN FUNCTION ============================================================ // ============================================================= OTHER FUNCTIONS ========================================================= function addToCart() { document.codeform.submit(); } function showHideAccess(item) { if (document.getElementById(item+"BOX").style.display == "none") { document.getElementById(item+"BOX").style.display = "block"; document.getElementById(item+"HEAD").className = "accessHeadOpen"; document.getElementById(item).checked = 1; } else { document.getElementById(item+"BOX").style.display = "none"; document.getElementById(item+"HEAD").className = "accessHead"; document.getElementById(item).checked = 0; } } function resetSolDivs() { document.getElementById('sol_wp1').className="selection"; document.getElementById('sol_wp2').className="selection"; document.getElementById('sol_wp3').className="selection"; document.getElementById('sol_wp4').className="selection"; document.getElementById('sol_wp5').className="selection"; document.getElementById('sol_wp6').className="selection"; document.getElementById('sol_type1').className="selection"; document.getElementById('sol_type2').className="selection"; document.getElementById('sol_volt1').className="selection"; document.getElementById('sol_volt2').className="selection"; document.getElementById('sol_volt3').className="selection"; document.getElementById('sol_volt4').className="selection"; document.getElementById('sol_volt5').className="selection"; } function closeStep(step) { document.getElementById('step'+step+'close').style.display="none"; document.getElementById('step'+step+'edit').style.display="block"; document.getElementById('step'+step+'section').style.display="none"; document.getElementById('step'+step+'summary').style.display="block"; } function editStep(step) { document.getElementById('step'+step+'close').style.display="block"; document.getElementById('step'+step+'edit').style.display="none"; document.getElementById('step'+step+'section').style.display="block"; document.getElementById('step'+step+'summary').style.display="none"; } function showInfo(what) { if (document.getElementById(what).style.display != "none") { document.getElementById(what).style.display = "none"; document.getElementById("specsBut").className = "infoTab"; document.getElementById("descripBut").className = "infoTab"; } else { if (what == "description") { document.getElementById("specs").style.display = "none"; document.getElementById("description").style.display = "block"; document.getElementById("descripBut").className = "infoTabSelected"; document.getElementById("specsBut").className = "infoTab"; } else { document.getElementById("specs").style.display = "block"; document.getElementById("description").style.display = "none"; document.getElementById("specsBut").className = "infoTabSelected"; document.getElementById("descripBut").className = "infoTab"; } } }