function MenuManager(){var a=this;this.notIE=navigator.appName.indexOf("Microsoft")==-1;this.frames=6;this.isVisible=false;this.revealElement=this.hideAllTimer=this.hoverTimer=this.revealTimer=null;this.menuLevel=0;this.initialDelay=400;this.secondaryDelay=200;this.popups=[];this.animateReveal=this.notIE?function(){a.revealScroll()}:function(){a.revealBasic()};this.cancelAnimate=this.cancelRevealScroll}
MenuManager.prototype.handleMouseOver=function(a){var b=this;if(this.hideAllTimer!=null){clearTimeout(this.hideAllTimer);this.hideAllTimer=null}var c=this.secondaryDelay;if(!this.isVisible)c=this.initialDelay;this.menuLevel=a.parentNode.parentNode.getAttribute("menulevel");if(this.menuLevel==0&&this.isVisible)this.reveal(a);else this.hoverTimer=setTimeout(function(){b.reveal(a)},c)};
MenuManager.prototype.handleMouseOut=function(){var a=this;this.revealTimer!=null&&this.cancelAnimate();if(this.hoverTimer!=null){clearTimeout(this.hoverTimer);this.hoverTimer=null}this.hideAllTimer=setTimeout(function(){a.hideAll()},this.initialDelay)};MenuManager.prototype.hideAll=function(){for(var a;this.popups.length>0;){a=this.popups.shift();a.style.visibility="hidden";a.style.zIndex="0"}this.isVisible=false;this.hideAllTimer=null};
MenuManager.prototype.hideOtherPopups=function(){for(var a=this.popups.length-1;a>=0;a--)if(this.popups[a].getAttribute("menulevel")>this.menuLevel){this.popups[a].style.visibility="hidden";this.popups[a].style.zIndex="-1";this.popups.splice(a,1)}};
MenuManager.prototype.reveal=function(a){a=a.parentNode;this.hoverTimer=null;this.hideOtherPopups();for(i=0;i<a.childNodes.length;i++)if(a.childNodes[i].nodeName.toUpperCase()=="UL"){this.revealElement=a.childNodes[i];this.currFrame=0;this.popups.push(this.revealElement);this.revealBasic()}};MenuManager.prototype.revealBasic=function(){this.revealElement.style.zIndex="500";this.revealElement.style.visibility="visible";this.isVisible=true};
MenuManager.prototype.revealScroll=function(){if(this.currFrame==0){this.revealSize=0;this.revealElement.style.clip="rect(auto auto 0px auto)";this.revealElement.style.visibility="visible"}this.revealSize+=this.revealElement.offsetHeight/this.frames;this.revealElement.style.clip="rect(auto auto "+this.revealSize+"px auto)";this.currFrame++;if(this.currFrame==this.frames){this.revealElement.style.clip=this.notIE?"auto":"rect(auto auto auto auto)";this.isVisible=true;this.revealTimer=null}else this.revealTimer=
setTimeout(this.animateReveal,10)};MenuManager.prototype.cancelRevealScroll=function(){this.revealTimer!=null&&clearTimeout(this.revealTimer);this.revealTimer=null;this.revealElement.style.visibility="hidden";this.revealElement.style.clip=this.notIE?"auto":"rect(auto auto auto auto)"};var menuManager=new MenuManager;
function parseMenu(a,b){for(var c,d=0;d<a.childNodes.length;d++){c=a.childNodes[d];if(c.nodeName=="A"){c.onmouseover=function(){menuManager.handleMouseOver(this)};c.onmouseout=function(){menuManager.handleMouseOut()}}else if(c.nodeName=="UL"){c.setAttribute("menulevel",b);parseMenu(c,b+1)}else c.nodeName=="LI"&&parseMenu(c,b)}}function initMenu(a){if(document.getElementById(a)){parseMenu(document.getElementById(a),1);document.getElementById(a).setAttribute("menulevel",0)}}
if(!Array.prototype.push)Array.prototype.push=function(a){this[this.length]=a};if(!Array.prototype.shift)Array.prototype.shift=function(){var a=this[0];if(this.length>0){for(var b=0;b<this.length-1;b++)this[b]=this[b+1];this.length--}return a};if(!Array.prototype.splice)Array.prototype.splice=function(a){for(var b=this[a];a<this.length-1;a++)this[a]=this[a+1];this.length--;return b};

