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 = "";
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 = "";
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"};
if (document.codeform.flowplan[1].checked) {var flo = "D"};
if (document.codeform.flowplan[2].checked) {var flo = "E"};
if (document.codeform.flowplan[3].checked) {var flo = "F"};
if (document.codeform.flowplan[4].checked) {var flo = "G"};
// Actuators ---------------------------
// Pneumatic actuators
if (document.codeform.actuator[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.actuator[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.actuator[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.actuator[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.actuator[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.actuator[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.actuator[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.actuator[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.actuator[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.actuator[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.actuator[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.actuator[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 (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 != "") && (sol == "E2A" || sol == "C2A")){
// 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"
// }
// Remove Limit switches for Manual Actuators
// if ((act == "M") && (lim != "")){
// alert('Limit switches are only for use with Pneumatic Actuators.\rThe limit switch will be reset to NONE.');
// document.codeform.limit[0].checked = 1;
// var lim = ""
// }
// 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 -----------------------------------------------
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;
// 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)";}
var infotext = infotext + "
"+
" Flow Plan: "+flo+"
";
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.cadcode.value = cadmc;
document.codeform.price.value = price;
document.codeform.modelcode.value = mc;
document.codeform.imgsrc.value = "/31D/models/"+pic+".jpg";
document.codeform.id.value = mc;
document.codeform.info.value = infotext;
document.codeform.weight.value = weight;
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 = "
";
document.getElementById('calcspan').innerHTML = "";
var img33D = new Image();
img33D.src = "models/"+pic+".jpg";
document.images[ "mainimg" ].src = eval( "img33D.src" )
}