function HoveringMenus(A){var C=this;if(typeof A=="string"){A=document.getElementById(A)}if(typeof A=="undefined"||A==null||typeof A.firstChild=="undefined"||A.firstChild==null){return }for(var B=A.firstChild;B;B=B.nextSibling){if(typeof B.tagName=="undefined"||B.tagName.toLowerCase()!="li"||!B.className.match(/haschildren/)){continue}if(B.addEventListener){B.addEventListener("focus",function(D){C.FocusHandler(D)},false);B.addEventListener("blur",function(D){C.BlurHandler(D)},false);B.addEventListener("mouseover",function(D){C.MouseOverHandler(D)},false);B.addEventListener("mouseout",function(D){C.MouseOutHandler(D)},false)}else{(function(D){D.attachEvent("onfocus",function(){evt=window.event;evt.target=evt.srcElement;evt.currentTarget=D;C.FocusHandler(evt)});D.attachEvent("onblur",function(){evt=window.event;evt.target=evt.srcElement;evt.currentTarget=D;C.BlurHandler(evt)});D.attachEvent("onmouseover",function(){evt=window.event;evt.target=evt.srcElement;evt.currentTarget=D;C.MouseOverHandler(evt)});D.attachEvent("onmouseout",function(){evt=window.event;evt.target=evt.srcElement;evt.currentTarget=D;C.MouseOutHandler(evt)})})(B)}}}HoveringMenus.prototype={OPEN_TIMEOUT:100,CLOSE_TIMEOUT:200,timeoutOpen:null,timeoutClosed:null,elCurrentlyOpen:null,elToOpen:null,elToClose:null,FocusHandler:function(A){this.MouseOverHandler(A)},BlurHandler:function(A){this.MouseOutHandler(A)},MouseOverHandler:function(A){var C=A.currentTarget;if(this.timeoutOpen&&this.elToOpen!=C){window.clearTimeout(this.timeoutOpen)}if(this.timeoutClosed&&this.elToClose==C){window.clearTimeout(this.timeoutClosed)}this.elToOpen=C;var B=this;this.timeoutOpen=window.setTimeout(function(){B.timeoutOpen=null;if(B.elCurrentlyOpen!=B.elToOpen&&B.elCurrentlyOpen!=null){B.Close(B.elCurrentlyOpen)}B.Open(C);B.elToOpen=null;B.elCurrentlyOpen=C},this.OPEN_TIMEOUT)},MouseOutHandler:function(A){var C=A.currentTarget;this.elToClose=C;var B=this;this.timeoutClosed=window.setTimeout(function(){B.timeoutClosed=null;B.elToClose=null;if(C==B.elToOpen){return }B.Close(C);B.elCurrentlyOpen=null},this.CLOSE_TIMEOUT)},Open:function(A){if(!A.className.match(/hover/)){A.className+=" hover"}},Close:function(A){A.className=A.className.replace(/( hover)+/,"")}};
