/***********************************************
* AnyLink Vertical Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1  Products
var menu1=new Array()
menu1[0]='<a href="../../lit/catalogs.html">Product Catalogs</a>'
menu1[1]='<a href="../../prod/res-elec.html">Residential Electric</a>'
menu1[2]='<a href="../../prod/res-gas.html">Residential Gas</a>'
menu1[3]='<a href="../../prod/com-Elec.html">Commercial Electric</a>'
menu1[4]='<a href="../../prod/com-Gas.html">Commercial Gas</a>'
menu1[5]='<a href="../../prod/com-oil.html">Commercial Oil</a>'
menu1[6]='<a href="../../prod/commercial/com_st.html">Storage Tanks</a>'
menu1[7]='<a href="../../prod/pump_tank.html">Pump Tanks</a>'
menu1[8]='<a href="../../prod/expansion_tank.html">Expansion Tanks</a>'
menu1[9]='<a href="http://www.stateconnect.html" target="_blank">iCOMM</a>'
menu1[10]='<a href="../../prod/tankless.html">Tankless Water Heater</a>'
menu1[11]='<a href="../../cust/xref.aspx">Products Cross Reference</a>'
menu1[12]='<a href="../../payback.aspx">Payback Calculator</a>'


//Contents for menu 2  Sales
var menu2=new Array()
menu2[0]='<a href="../../distributors.aspx">Find a Service Provider</a>'
menu2[1]='<a href="../../spc.aspx">Find a Plumber</a>'
menu2[2]='<a href="../../distributors.aspx">Wholesale Distributors</a>'
menu2[3]='<a href="../../reps.aspx">Find a Sales Rep</a>'
menu2[4]='<a href="../../sales/nataccounts.html">National Accounts</a>'
menu2[5]='<a href="../../sales/international.html">Product for Export</a>'
menu2[6]='<a href="http://www.promoville.com/New/M01_Home.asp?MallNo=1&MallCode=MallCode&StoreNo=126&StoreCode=S6RSDrcW" target="_blank">Shop for State Merchandise</a>'

//Contents for menu 3   Literature
var menu3=new Array()
menu3[0]='<a href="../../lit/brochures.html">Brochures</a>'
menu3[1]='<a href="../../lit/spec.html">Spec Sheets</a>'
menu3[2]='<a href="../../lit/handbooks.html">Service Handbooks</a>'
menu3[3]='<a href="../../lit/iManuals.html">Instructional Manuals</a>'
menu3[4]='<a href="../../lit/partslist.html">Parts Lists</a>'
menu3[5]='<a href="../../lit/warranty.html">Warranty Sheets</a>'
menu3[6]='<a href="../../lit/casestudies.html">Case Studies</a>'
menu3[7]='<a href="../../bulletin/bulletin.html">Technical Bulletins</a>'
menu3[8]='<a href="../../mediabank/index.html">Media Library</a>'
menu3[9]='<a href="../../lit/catalogs.html">Product Catalogs</a>'

//Contents for menu 4  Instruction Manuals
var menu4=new Array()
menu4[0]='<a href="../../lit/im/res-elec.html">Residential Electric</a>'
menu4[1]='<a href="../../lit/im/res-gas.html">Residential Gas</a>'
menu4[2]='<a href="../../lit/im/com-elec.html">Commercial Electric</a>'
menu4[3]='<a href="../../lit/im/com-gas.html">Commercial Gas</a>'
menu4[4]='<a href="../../lit/im/expansion.html">Expansion Tanks</a>'
menu4[5]='<a href="../../lit/im/pumptanks.html">Pump Tanks</a>'

//Contents for menu 5  Parts&Accessories
var menu5=new Array()
menu5[0]='<a href="../../parts/order.html">How to Order</a>'
menu5[1]='<a href="../../lit/partslist.html">Complete Parts Listings</a>'
menu5[2]='<a href="../../parts/elec-wh.html">Electric Replacement</a>'
menu5[3]='<a href="../../parts/gasparts.html">Gas Replacement</a>'
menu5[4]='<a href="../../parts/miscparts.html">Miscellaneous</a>'
menu5[5]='<a href="../../parts/installparts.html">Installation Kits</a>'
menu5[6]='<a href="../../parts/whstands.html">Water Heater stands</a>'
menu5[7]='<a href="../../parts/tpvalves.html">Temp/Pressure valves</a>'
menu5[8]='<a href="../../parts/drainpans.html">Water Heater drain pans</a>'
menu5[9]='<a href="../../partsxref.aspx">Parts Cross Reference</a>'
menu5[10]='<a href="http://eplu.waterheaterparts.com/" target="_blank">Parts Look-Up</a>'


//Contents for menu 6  CustomerCare
var menu6=new Array()
menu6[0]='<a href="../../distributors.aspx">Service Providers</a>'
menu6[2]='<a href="http://www.statewaterheaters.com/customer_support">Customer Support</a>'
menu6[3]='<a href="../../cust/sizing.html">Sizing Guides</a>'
menu6[4]='<a href="../../cust/glossary.html">Glossary of Terms</a>'
menu6[5]='<a href="../../cust/xref.aspx">Products Cross Reference</a>'
menu6[6]='<a href="../../recall.html">Safety Recall Notices</a>'
menu6[7]='<a href="../../taxincentive.html">Tax Incentive Info</a>'

//Contents for menu 7  Training
//var menu7=new Array()
//menu7[0]='<a href="../../training.html">Curriculum and Schedules</a>'
//menu7[1]='<a href="../../training_off.html" target="_blank">Online Training Login</a>'

//Contents for menu 8  Warranty
var menu8=new Array()
menu8[0]='<a href="https://warranty.hotwater.com/WebAccessRequestAdd.aspx" target="_blank">Register</a>'
menu8[1]='<a href="https://warranty.hotwater.com/UserLogin.aspx" target="_blank">Login</a>'
menu8[2]='<a href="https://warranty.hotwater.com/HeaterInfo/HeaterSearch.aspx?" target="_blank">Verify Heater Warranty</a>'

		
var disappeardelay=350  //menu disappear speed onMouseout (in miliseconds)
var horizontaloffset=2 //horizontal offset of menu from default location. (0-5 is a good value)

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width: 165px" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x-obj.offsetWidth < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move menu up?
edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? (position at top of viewable window then)
edgeoffset=dropmenuobj.y
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+obj.offsetWidth+horizontaloffset+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}