/* YADM - Yet another dynamic menu written by Chris Heilmann (http://icant.co.uk) Please refer to the yadm homepage for updates: http://www.onlinetools.org/tools/yadm/ Free for non-commercial use. Changes welcome, but no distribution without the consent of the author. */ function yadm() { // Variables, change these in case you need to set other class names (mmhide_ for // contribute users for example) var parentClass='isParent'; //gets applied when the LI has a nested UL var activeParentClass='isActive'; //gets applied when the nested UL is visible var preventHoverClass='nohover'; //denotes a navigation that should not get any hover effects var indicateJSClass='dhtml'; //gets applied to the main navigation when Javascript is available var toHideClass='hiddenChild'; //gets applied to hide the nested UL var toShowClass='shownChild'; //gets applied to show the nested UL var currentClass='current'; //denotes the current active sub element and prevents collapsing var d=document.getElementById('nav'); //denotes the navigation element // if DOM is not available stop right here. if(!document.getElementById && !document.createTextNode){return;} // if the navigation element is available, apply the class denoting DHTML capabilities if(d) { d.className+=d.className==''?indicateJSClass:' '+indicateJSClass; var lis,i,firstUL,j,apply; // loop through all LIs and check which ones have a nested UL lis=d.getElementsByTagName('li'); for(i=0;i