function DDMenu(id){this.ul=document.getElementById(id);this.currentspan=undefined;this.collapsetimer=undefined;this.CollapseAll=function(){var span=this.currentspan;while(span){if(span.SubUL){span.SubUL.style.display="none";}
span=span.PreviousSpan;};this.currentspan="undefined";}
this.OuterMouseOver=function(span){if(this.collapsetimer){window.clearTimeout(this.collapsetimer);this.CollapseAll();}
this.currentspan=span;while(span){if(span.SubUL){span.SubUL.style.display="block";}
span=span.PreviousSpan;};}
this.OuterMouseOut=function(span){var _self=this;this.collapsetimer=setTimeout(function(){_self.CollapseAll();},500);}
this.CodeUpLevels=function(el,previousSpan){for(var i=0;i<el.childNodes.length;i++){var sel=el.childNodes[i];if(sel.tagName){if(sel.tagName=="LI"){var span=sel.getElementsByTagName("span")[0];if(!span){span=sel.getElementsByTagName("a")[0];}
if(span){span.DDMenu=this;span.onmouseover=function(){this.DDMenu.OuterMouseOver(this);}
span.onmouseout=function(){this.DDMenu.OuterMouseOut(this);}
span.PreviousSpan=previousSpan;span.SubUL=sel.getElementsByTagName("ul")[0];}
for(var j=0;j<sel.childNodes.length;j++){var sel2=sel.childNodes[j];if(sel2.tagName){if(sel2.tagName=="UL"){this.CodeUpLevels(sel2,span);}}}}}}}
this.CodeUpLevels(this.ul,undefined);}

