function changeFlow(plan){
if (plan=='A'){ document.codeform.flowplan[0].checked = 1; changeCode()}
if (plan=='D'){ document.codeform.flowplan[1].checked = 1; changeCode()}
if (plan=='E'){ document.codeform.flowplan[2].checked = 1; changeCode()}
if (plan=='F'){ document.codeform.flowplan[3].checked = 1; changeCode()}
if (plan=='G'){ document.codeform.flowplan[4].checked = 1; changeCode()}
}
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 siz = "";
var sizedescrip = "";
var actweight = 0;
var actprice = 0;
var actdescrip = "";
var actvoltage = "";
var failpos = "";
var actt = "";
var actn = "";
var actpic = "";
var actcad = "";
var mountprice = 0;
var mountweight = 0;
var sol = "";
var solprice = 0;
var solweight = 0;
var soldescrip = "";
var solvoltage = "";
var solt = "";
var solc = "";
var solv = "";
var solpic = "";
var lim = "";
var limprice = 0;
var limweight = 0;
var limdescrip = "";
var limpic = "";
var con = "N";
var condescrip = "NPT (female)";
var conpic = "N";
var infotext = "";
var bodymat = "Brass";
var seatmat = "RPTFE";
var sealmat = "RPTFE";
var infoflo = "";
var posdescrip = "";
var posprice = 0;
var posweight = 0;
var pos = "";
document.codeform.price.value = "";
// get all user selections
var actt = document.codeform.act_type.value;
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 = "I"; var sizedescrip = "2-1/2 inch";};
if (document.codeform.size[9].checked) {var siz = "J"; var sizedescrip = "3 inch";};
if (document.codeform.flowplan[0].checked) {var flo = "A"; var flopos1 = "L1"; var flopos2 = "L2"};
if (document.codeform.flowplan[1].checked) {var flo = "D"; var flopos1 = "T1"; var flopos2 = "T2"};
if (document.codeform.flowplan[2].checked) {var flo = "E"; var flopos1 = "T2"; var flopos2 = "T3"};
if (document.codeform.flowplan[3].checked) {var flo = "F"; var flopos1 = "T3"; var flopos2 = "T4"};
if (document.codeform.flowplan[4].checked) {var flo = "G"; var flopos1 = "T4"; var flopos2 = "T1"};
// Actuators ---------------------------
if (document.codeform.act_type.value == "") {
document.getElementById("pre_act").style.display="block";
} else {
document.getElementById("pre_act").style.display="none";
// document.getElementById("acc").className="vis_tr";
}
// Pneumatic actuators
if (actt == "P"){
if (document.codeform.act_p[0].checked)
{var act = "08S1"; var actn = "OSR8"; var actpic = "08S"; var failpos = " (Fail to POSITION 1)"; var psi = "80"; var solt = "E"; var actt="P";var actcad="08S2"};
if (document.codeform.act_p[1].checked)
{var act = "06S1"; var actn = "OSR6"; var actpic = "08S"; var failpos = " (Fail to POSITION 1)"; var psi = "60"; var solt = "E"; var actt="P";var actcad="06S2"};
if (document.codeform.act_p[2].checked)
{var act = "08S2"; var actn = "OSR8"; var actpic = "08S"; var failpos = " (Fail to POSITION 2)"; var psi = "80"; var solt = "E"; var actt="P";var actcad="08S2"};
if (document.codeform.act_p[3].checked)
{var act = "06S2"; var actn = "OSR6"; var actpic = "08S"; var failpos = " (Fail to POSITION 2)"; var psi = "60"; var solt = "E"; var actt="P";var actcad="06S2"};
if (document.codeform.act_p[4].checked) {var act = "08D"; var actn = "ODA8"; var actpic = "08D"; var psi = "80"; var solt = "C"; var actt="P";var actcad="08D2"};
if (document.codeform.act_p[5].checked) {var act = "06D"; var actn = "ODA6"; var actpic = "08D"; var psi = "60"; var solt = "C"; var actt="P";var actcad="06D2"};
if (document.codeform.act_p[6].checked)
{var act = "E8S1"; var actn = "ESR8"; var actpic = "E8S"; var failpos = " (Fail to POSITION 1)"; var psi = "80"; var solt = "E"; var actt="P";var actcad=""};
if (document.codeform.act_p[7].checked)
{var act = "E6S1"; var actn = "ESR6"; var actpic = "E8S"; var failpos = " (Fail to POSITION 1)"; var psi = "60"; var solt = "E"; var actt="P";var actcad=""};
if (document.codeform.act_p[8].checked)
{var act = "E8S2"; var actn = "ESR8"; var actpic = "E8S"; var failpos = " (Fail to POSITION 2)"; var psi = "80"; var solt = "E"; var actt="P";var actcad=""};
if (document.codeform.act_p[9].checked)
{var act = "E6S2"; var actn = "ESR6"; var actpic = "E8S"; var failpos = " (Fail to POSITION 2)"; var psi = "60"; var solt = "E"; var actt="P";var actcad=""};
if (document.codeform.act_p[10].checked) {var act = "E8D"; var actn = "EDA8"; var actpic = "E8D"; var psi = "80"; var solt = "C"; var actt="P";var actcad=""};
if (document.codeform.act_p[11].checked) {var act = "E6D"; var actn = "EDA6"; var actpic = "E8D"; var psi = "60"; var solt = "C"; var actt="P";var actcad=""};
}
// Electric actuators
if (actt == "E"){
if (document.codeform.act_e[0].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.act_e[1].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.act_e[2].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.act_e[3].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.act_e[4].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.act_e[5].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.act_e[6].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 (actt == "M"){
if (document.codeform.act_m.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"};
}
// Set model code & pic variables ---------------------------
// var conpic = con.substring(0, 1);
var pmc = ""+act+sol+lim;
var pic = ""+actpic+solpic+limpic;
var mc = siz+"31D"+flo+"X"+act+sol+lim;
var cadmc = siz+"31D1X"+actcad;
// mark cads that are not available ----------------------------------------------------------------
if (actcad == ""){ var cadmc = ""}
if (siz == "I" || siz == "J" || siz == "K"){ var cadmc = ""}
if (cadmc == ""){var cadmc = "NA";
document.getElementById('cadlink').innerHTML =
'
CAD File not available at this time';
} else {
document.getElementById('cadlink').innerHTML =
'
View/Download CAD File';
}
// Set Prices -----------------------------------------------
if (actt != "") { // ******************************** BEGIN SET PRICING
var sizedescrip = eval('V31'+conpic+'_'+siz+'.SIZ_DESCRIP');
var baseprice = eval('V31'+conpic+'_'+siz+'.price');
var baseweight = eval('V31'+conpic+'_'+siz+'.weight');
var actmod = eval('V31'+conpic+'_'+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('V31'+conpic+'_'+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;
} // END PRICING
if (actt == "") { // ******************************** BEGIN NO ACTUATOR SELECTED
var actdescrip = "Not Selected Yet";
var mc = "Incomplete";
var pic = "invalid"+conpic;
}
// DESCRIPTIONS -------------------------------------------------------------------------------
var infotext = " Body Material: "+bodymat+"
"+
" Size & Connection: "+sizedescrip+" (female)
"+
" Seats: RPTFE Seals: RPTFE
"+
" Actuator: "+actdescrip;
if (psi != "") {
var infotext = infotext +"
(sized for using "+psi+"psi supply air in applications up to 300psi DP)";}
if (soldescrip != "") {
var infotext = infotext +"
Actuator Solenoid: "+soldescrip;}
if (limdescrip != "") {
var infotext = infotext +"
Limit Switch: "+limdescrip;}
var infotext = infotext + "
"+
"
| Flow Plan: "+flo+" | "+ ""+ " | Pos. 1 | "+
""+ " | Pos. 2 | "+
"
| "+infotext+" |
| 31D Series 3-way Ball Valve "+infotext+" |
| "+psummary+" | "+wsummary+" |