/************************************************************************************************************ (C) www.dhtmlgoodies.com, October 2005 This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website. Terms of use: You are free to use this script as long as the copyright message is kept intact. However, you may not redistribute, sell or repost it without our permission. Thank you! www.dhtmlgoodies.com Alf Magne Kalleland ************************************************************************************************************/ var activeMenuItem = new Array(); function isUlInArray(inputObj,ulObj){ while(inputObj && inputObj.id!='dhtmlgoodies_listMenu'){ if(inputObj==ulObj)return true; inputObj = inputObj.parentNode; } return false; } function showHideSub(e,inputObj) { if(!inputObj)inputObj=this; var parentObj = inputObj.parentNode; var ul = parentObj.getElementsByTagName('UL')[0]; if(activeMenuItem.length>0){ for(var no=0;no0)fileNameThis = fileNameThis.substr(0,fileNameThis.indexOf('?')); if(fileNameThis.indexOf('#')>0)fileNameThis = fileNameThis.substr(0,fileNameThis.indexOf('#')); for(var no=0;no0){ aTags[no].onclick = showHideSub; linkCounter++; aTags[no].id = 'aLink' + linkCounter; } if(aTags[no].href.indexOf(fileNameThis)>=0 && aTags[no].href.charAt(aTags[no].href.length-1)!='#'){ if(aTags[no].parentNode.parentNode){ var parentObj = aTags[no].parentNode.parentNode.parentNode; var a = parentObj.getElementsByTagName('A')[0]; if(a.id && !activeMenuLink){ activeMenuLink = aTags[no]; activeMenuItem = a.id; } } } } if(activeMenuLink){ activeMenuLink.className='activeMenuLink'; } if(activeMenuItem){ if(document.getElementById(activeMenuItem))showHidePath(document.getElementById(activeMenuItem)); } } window.onload = initMenu;