/***********************************************
* 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="http://www.hotwater.com/lit/catalogs.html">Product Catalogs</a>'
menu1[1]='<a href="http://www.hotwater.com/products/residential/electric.html">Residential Electric</a>'
menu1[2]='<a href="http://www.hotwater.com/products/residential/gas.html">Residential Gas</a>'
menu1[3]='<a href="http://www.hotwater.com/products/commercial/electric.html">Commercial Electric</a>'
menu1[4]='<a href="http://www.hotwater.com/products/commercial/gas.html">Commercial Gas</a>'
menu1[5]='<a href="http://www.hotwater.com/products/commercial/oil.html">Commercial Oil Fired</a>'
menu1[6]='<a href="http://www.hotwater.com/products/boilers.html">Commercial Boilers</a>'
menu1[7]='<a href="http://www.hotwater.com/products/specialty.html">Specialty Commercial Systems</a>'
menu1[8]='<a href="http://www.hotwater.com/products/storage.html">Commercial Storage Tanks & Accessories</a>'
menu1[9]='<a href="http://www.hotwater.com/products/tanks.html">Pump & Expansion Tanks</a>'
menu1[10]='<a href="http://www.hotwater.com/products/xref.aspx">Products Cross Reference</a>'
menu1[11]='<a href="http://www.hotwater.com/products/payback.aspx">Payback Calculator</a>'

//Contents for menu 2 Literature
var menu2=new Array()
menu2[0]='<a href="http://www.hotwater.com/lit/brochures.html">Brochures</a>'
menu2[1]='<a href="http://www.hotwater.com/lit/catalogs.html">Catalogs</a>'
menu2[2]='<a href="http://www.hotwater.com/lit/spec.html">Spec Sheets</a>'
menu2[3]='<a href="http://www.hotwater.com/lit/im.html">Instruction Manuals</a>'
menu2[4]='<a href="http://www.hotwater.com/lit/service.html">Service Handbooks</a>'
menu2[5]='<a href="http://www.hotwater.com/lit/partslists.html">Parts Lists</a>'
menu2[6]='<a href="http://www.hotwater.com/lit/ws.html">Warranty Sheets</a>'
menu2[7]='<a href="http://www.hotwater.com/lit/piping.html">Piping Diagrams</a>'
menu2[8]='<a href="http://www.hotwater.com/lit/wiring.html">Wiring Diagrams</a>'
menu2[9]='<a href="http://www.hotwater.com/lit/sizing.html">Sizing Diagrams</a>'
menu2[10]='<a href="http://www.hotwater.com/bulletin/bulletin.html">Technical Bulletins</a>'
menu2[11]='<a href="http://www.hotwater.com/lit/misc.html">Miscellaneous</a>'
menu2[12]='<a href="http://www.hotwater.com/mediabank/index.html">Digital Media Library</a>'

//Contents for menu 3 News
var menu3=new Array()
menu3[0]='<a href="http://www.hotwater.com/news/pr.html">Press Releases</a>'
menu3[1]='<a href="http://www.hotwater.com/news/case.html">Case Studies</a>'
menu3[2]='<a href="http://www.hotwater.com/news/awards.html">Awards &amp; Recognition</a>'
menu3[3]='<a href="http://www.hotwater.com/news/sponsorships.html">Sponsorships</a>'

//Contents for menu 4 Customer Support
var menu4=new Array()
menu4[0]='<a href="http://hotwater.custhelp.com/cgi-bin/hotwater.cfg/php/enduser/ask.php?p_sid=qg8E8OOg&p_lva=&p_sp=&p_li=" target="_blank">Online Technical Support</a>'
menu4[1]='<a href="http://hotwater.custhelp.com/cgi-bin/hotwater.cfg/php/enduser/std_alp.php" target="_blank">FAQ\'s/ Info Central</a>'
menu4[2]='<a href="http://www.hotwater.com/sizing.html">Sizing Guides</a>'
menu4[3]='<a href="http://www.hotwater.com/lit/im.html">Instruction Manuals</a>'
menu4[4]='<a href="javascript:open_window(\'https://warranty.hotwater.com/HeaterInfo/HeaterSearch.aspx\',\'location=1,menubar=1,resizable=1,scrollbars=1,status=1,directories=1,toolbar=1,width=640,height=480\')">Warranty Verification</a>'
menu4[5]='<a href="http://www.hotwater.com/training.html">Training Department</a>'
menu4[6]='<a href="http://www.hotwater.com/products/xref.aspx">Product Cross Reference</a>'
menu4[7]='<a href="http://www.hotwater.com/products/payback.aspx">Payback Calculator</a>'
menu4[8]='<a href="http://www.hotwater.com/recall.html">Safety Recall Notices</a>'

//Contents for menu 5 Contact Us
var menu5=new Array()
menu5[0]='<a href="http://www.hotwater.com/contact.html">Service Inquiries</a>'
menu5[1]='<a href="http://www.hotwater.com/contact.html">Warranty Claims</a>'
menu5[2]='<a href="http://www.hotwater.com/contact.html">National Accounts</a>'
menu5[3]='<a href="http://www.hotwater.com/sales/international.html">International Accounts</a>'
menu5[4]='<a href="http://www.hotwater.com/contact.html">Parts Inquiries</a>'
menu5[5]='<a href="http://www.hotwater.com/contact.html">Wholesale Ordering Desk</a>'
menu5[6]='<a href="http://www.hotwater.com/contact.html">Training Inquiries</a>'
menu5[7]='<a href="http://www.hotwater.com/company/ashland.html">World Headquarters</a>'

//Contents for menu 6 Global Sales
var menu6=new Array()
menu6[0]='<a href="http://www.hotwater.com/sales/service.aspx">Find a Service Agent</a>'
menu6[1]='<a href="http://www.hotwater.com/sales/pca.aspx">Find a Plumber</a>'
menu6[2]='<a href="http://www.hotwater.com/sales/usa.aspx">Find a U.S. Sales Rep</a>'
menu6[3]='<a href="http://www.hotwater.com/sales/nataccounts.html">National Accounts</a>'
menu6[4]='<a href="http://www.hotwater.com/sales/international.html">International Accounts</a>'

//Contents for menu 7 Parts
var menu7=new Array()
menu7[0]='<a href="http://www.hotwater.com/parts/order.html">How to Order Parts</a>'
menu7[1]='<a href="http://www.hotwater.com/lit/partslists.html">Complete Parts Listings</a>'
menu7[2]='<a href="http://www.hotwater.com/parts/partsxref.aspx">Parts Cross Reference</a>'
menu7[3]='<a href="http://www.hotwater.com/partscatalog/parts.htm">Online Parts Catalog</a>'


//Contents for menu 8 Warranty
var menu8=new Array()
menu8[0]='<a href="javascript:open_window(\'https://warranty.hotwater.com/WebAccessRequestAdd.aspx\',\'location=1,menubar=1,resizable=1,scrollbars=1,status=1,directories=1,toolbar=1,width=640,height=480\')">Register</a>'
menu8[1]='<a href="javascript:open_window(\'https://warranty.hotwater.com/UserLogin.aspx\',\'location=1,menubar=1,resizable=1,scrollbars=1,status=1,directories=1,toolbar=1,width=640,height=480\')">User Login</a>'
menu8[2]='<a href="javascript:open_window(\'https://warranty.hotwater.com/HeaterInfo/HeaterSearch.aspx\',\'location=1,menubar=1,resizable=1,scrollbars=1,status=1,directories=1,toolbar=1,width=640,height=480\')">Verify Warranty</a>'
menu8[3]='<a href="http://www.hotwater.com/contact.html">Warranty Claims</a>'

//Contents for menu 9 Training
//var menu9=new Array()
//menu9[0]='<a href="http://www.hotwater.com/training.html">Curriculum and Schedules</a>'
//menu9[1]='<a href="http://www.hotwater.com/training_off.html">Online Training Login</a>'
//menu9[2]='<a href="http://www.hotwater.com/contact.html">Training Inquiries</a>'

//http://aosmithlearning.niit.com/aosmith/clikslogin">Online Training Login</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: 175px" 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)
}

function open_window(url,specs) 
{
	mywin = window.open(url,"win",specs);
	mywin.focus();
}
