function f_clearMenu(){ if(1==1){ document.getElementById("fileButton").style.background='' document.getElementById("insertButton").style.background='' document.getElementById("modifyButton").style.background='' document.getElementById("viewButton").style.background='' document.getElementById("settingsButton").style.background='' document.getElementById("cadButton").style.background='' document.getElementById("wiringButton").style.background='' document.getElementById("infoButton").style.background='' } } function f_fileMenu(){ f_showSubmenu(); f_clearMenu(); document.getElementById("fileButton").style.background='#aaa'; insertionPoints=0; document.getElementById("subMenu").innerHTML = ""; } function f_fileOpenMenu(){ insertionPoints=0; document.getElementById("subMenu").innerHTML = "


"; } function f_fileSaveAsMenu(){ insertionPoints=0; document.getElementById("subMenu").innerHTML="
"; } function f_insertMenu(){ f_showSubmenu(); f_clearMenu(); document.getElementById("insertButton").style.background='#aaa' insertionPoints=0 document.getElementById("subMenu").innerHTML = "
"; var l=document.getElementById("loginID").innerHTML; //if(l=="Not logged in"){alert("You should be logged in to insert an object.!")} } function f_pipingMenu(){ document.getElementById("subMenu").innerHTML=""; } function f_newTankMenu(){ insertionPoints=1; document.getElementById("subMenu").innerHTML="
Insert X
Insert Y
Tag Part1 (Unit)
Tag Part2 (Let.)
Tag Part3 (Suf.)
Typical
Rotation
Back Color
Width
Height
Description



"; } function f_newTieInPointMenu(){ insertionPoints=1; document.getElementById("subMenu").innerHTML="
Insert X
Insert Y
Typical
Rotation
Size



" } function f_newPipeMenu(){ insertionPoints=2; document.getElementById("subMenu").innerHTML="
Start X   
Start Y
End X     
End Y
Typical
Arrow End
Tracing
Letter Along
Show Line Number

Line Number

Facility Unit
Fluid Service
Line Size
Material & Rating
Sequential Number
Insulation
Type & Thickness



" } function f_newLinkMenu(){ insertionPoints=1; document.getElementById("subMenu").innerHTML="
Insert X
Insert Y
Direction
Link Tag
Typical
Rotation
Process Fluid
Equipment Tag



" } function f_newReducerMenu(){ insertionPoints=1; document.getElementById("subMenu").innerHTML="
Insert X
Insert Y
Typical
Rotation
Back Color
Size



" } function f_newOrificeMenu(){ insertionPoints=1; document.getElementById("subMenu").innerHTML="
Insert X
Insert Y
Typical
Rotation
Back Color
Size



" } function f_newStrainerMenu(){ insertionPoints=1; document.getElementById("subMenu").innerHTML="
Insert X
Insert Y
Tag Part1 (Unit)
Tag Part2 (Let)
Tag Part3 (Suf.)
Typical
Rotation
End Connection
Size



" } function f_newHandValveMenu(){ insertionPoints=1; document.getElementById("subMenu").innerHTML="
Insert X
Insert Y
Tag Part1 (Unit)
Tag Part2 (Let)
Tag Part3 (Suf.)
Typical
Rotation
End Connection
Normal Status
Back Color
Size



" } function f_newCheckValveMenu(){ insertionPoints=1; document.getElementById("subMenu").innerHTML="
Insert X
Insert Y
Tag Part1 (Unit)
Tag Part2 (Let.)
Tag Part3 (Suf.)
Typical
Rotation
End Connection
Back Color
Size



" } function f_newSafetyValveMenu(){ insertionPoints=1; document.getElementById("subMenu").innerHTML="
Insert X
Insert Y
Tag Part1 (Unit)
Tag Part2 (Let.)
Tag Part3 (Suf.)
Typical
End Connection
Back Color
Size
Setpoint
Eng. Unit



" } function f_newFunnelMenu(){ insertionPoints=1; document.getElementById("subMenu").innerHTML="
Insert X
Insert Y
Typical



" } function f_newGaugeMenu(){ insertionPoints=1; document.getElementById("subMenu").innerHTML="
Insert X
Insert Y
Tag Part1 (Unit)
Tag Part2 (Let.)
Tag Part3 (Suf.)
Typical
Rotation
Range Min
Range Max
Unit
Description
Attach File



" } function f_newAgitatorMenu(){ insertionPoints=1; document.getElementById("subMenu").innerHTML="
Insert X
Insert Y
Tag Part1 (Unit)
Tag Part2 (Let.)
Tag Part3 (Suf.)
Typical
Description



" } function f_newPumpMenu(){ insertionPoints=1; document.getElementById("subMenu").innerHTML="
Insert X
Insert Y
Tag Part1 (Unit)
Tag Part2 (Let.)
Tag Part3 (Suf.)
Typical
Rotation
End Connection
Flow Direction
Description
Flow
Flow Unit
Head
Head Unit
Attach File



" } function f_instrumentMenu(){ document.getElementById("subMenu").innerHTML=""; } function f_newSwitchMenu(){ insertionPoints=1; document.getElementById("subMenu").innerHTML="
Insert X
Insert Y
Tag Part1 (Unit)
Tag Part2 (Let.)
Tag Part3 (Suf.)
Typical
Rotation
Eng. Unit
Category
Description
Attach File
Alarm H/L
Setpoint
Tag1
Tag2
Tag3
Tag4
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier




"; f_newSwitchMenuAutoFill(); } function f_newSwitchMenuAutoFill(){ //adding cable types to 'cable type' select box; var x = document.getElementById("cableType"); var length=object.length; for (i=1; i
' msg=msg+'Create a Valve Typical first !...' msg=msg+'
' document.getElementById("subMenu1").innerHTML=msg } // end of } var failStatus; var actuationType; var actuatorType; var openCmd; var closeCmd; var ols; var cls; var trip; var analogControl; var analogPositioner; function f_newValveMenuSelectTypical(){ insertionPoints=1; //search typical parameters if exists var tag=document.getElementById("valveTypical").value; //fulltag=tag; var objectFound=0 var len=object.length for (i=0; i" m=m+"
"; if(objectFound==1){m=m+"
Insert X
Insert Y
Tag Part1 (Unit)
Tag Part2 (Let.)
Tag Part3 (Suf.)
Typical
Body
End Connection
Size
Rotation
Fail Status
Back Color
Description
Attach File
";} if(openCmd==1){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

Wiring Type
";} if(closeCmd==1){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

Wiring Type
";} if(ols>=1){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

";} if(ols>=2){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

";} if(ols>=3){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

";} if(cls>=1){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

";} if(cls>=2){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

";} if(cls>=3){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

";} if(analogControl==1){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

";} if(analogPositioner>=1){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

";} if(analogPositioner>=2){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

";} if(analogPositioner>=3){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

";} if(trip==1){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

";} if(motorPower=='Motorized'){m=m+"
Power Consump.
Power Unit
Voltage
Voltage Unit
Tag
Type
From   (Valve)
To   (PS Panel)
Length (m)
Branch Protect.
";} m=m+"
" //insert btn if(objectFound==1){m=m+"


";} //result document.getElementById("subMenu2").innerHTML=m f_newValveMenuAutoFill(); } function f_newValveMenuAutoFill(){ if(actuationType!="Proportional" && actuatorType=="Solenoid"){ document.getElementById("letters").value="XV"} if(actuationType!="Proportional" && actuatorType=="Motorized"){ document.getElementById("letters").value="MOV"} if(actuationType=="Proportional" && actuatorType=="Pneumatic"){ document.getElementById("letters").value="PCV"} //power cable //adding power cable types to 'cable type' select box if(motorPower=='Motorized'){ var x = document.getElementById("powerCableType"); var length=object.length; for (i=1; i
' msg=msg+'Create a Motor Typical first !...' msg=msg+'
' document.getElementById("subMenu1").innerHTML=msg } // end of } function f_newMotorMenuSelectTypical(){ insertionPoints=1; // search typical parameters if exists var tag=document.getElementById("motorTypical").value; //fulltag=tag; var objectFound=0 var len=object.length for (i=0; i" m=m+"
"; if(objectFound==1){m=m+"
Insert X
Insert Y
Tag Part1 (Unit)
Tag Part2 (Let.)
Tag Part3 (Suf.)
Typical Symbol
Rotation
Description
Attach File
Power Consump.
Power Unit
Voltage
Voltage Unit
Tag
Type
From   (Motor)
To   (PS Panel)
Length (m)
Branch Protect.
";} if(startFwdCmd==1){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

Wiring Type
";} if(startRevCmd==1){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

Wiring Type
";} if(stopCmd==1){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

Wiring Type
";} if(speedControl==1){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

";} if(remoteFdbk==1){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

";} if(runningFdbk==1){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

";} if(speedFdbk==1){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

";} if(tripFdbk==1){m=m+"
Tag
Type
From
To
Length (m)
Order in JB

IO Type

Rack
Slot
Channel

Barrier

";} if(localControls==1){m=m+"
Tag
Type
From
To
Length (m)
";} m=m+"
" if(objectFound==1){m=m+"


";} //result document.getElementById("subMenu2").innerHTML=m; //autofill f_newMotorMenuAutoFill(); } function f_newMotorMenuAutoFill(){ //adding power cable types var x = document.getElementById("powerCableType"); var length=object.length; for (i=1; i
' msg=msg+'Create a Rack first !...' msg=msg+'
' if(x.length==1){ document.getElementById("subMenu").innerHTML=msg } } // add total slot number to installed slot selection function f_addSlotSelection(){ // clear select box document.getElementById("cardSlot").length=0 //adding slot number 'card slot' select box var x = document.getElementById("cardRack"); var y = document.getElementById("cardSlot"); var length=object.length; for (i=1; i
' msg=msg+'No cable found !...
Create an object with a cable first...' msg=msg+'
' document.getElementById("subMenu").innerHTML=msg //document.getElementById("subMenu").innerHTML="No cable" } else{ document.getElementById("subMenu").innerHTML="
Cable Tag
Cable Type
Length (m)
Panel Side
Sec1 Tag
Sec2 Tag
Sec3 Tag
Sec4 Tag
Sec5 Tag
Sec6 Tag
Sec7 Tag
Sec8 Tag
Sec9 Tag
Sec10 Tag
Sec11 Tag
Field Side



"; f_newCableRouteMenuFill(); } } function f_newCableRouteMenuFill(){ //cable tags var x = document.getElementById("cableTag"); var length=object.length; for (i=1; i0){ var option = document.createElement("option"); option.text = cableTag; option.value = cableTag; x.add(option); } } } //end of f_newCableRouteMenuFill2(); } function f_newCableRouteMenuFill2(){ //cable tags var x = document.getElementById("cableTag").value; var length=object.length; for (i=1; i