var timeBeforeAutoHideb=700;var slideSpeed_outb=10;var slideSpeed_inb=1;var slideTimeout_outb=25;var slideTimeout_inb=10;var showSubOnMouseOverb=true;var fixedSubMenuHeightb=false;var xOffsetSubMenub=-1;var slideDirectionb='bottom';var activeSubMenuIdb=false;var activeMainMenuItemb=false;var currentZIndexb=1000;var autoHideTimerb=0;var submenuObjArrayb=new Array();var okToSlideInSubb=new Array();var subPositionedb=new Array();function stopAutoHideb(){autoHideTimerb=-1;}function initAutoHideb(){autoHideTimerb=0;if(autoHideTimerb>=0)autoHideb();}function autoHideb(){if(autoHideTimerb>timeBeforeAutoHideb){if(activeMainMenuItemb){activeMainMenuItemb.className='';activeMainMenuItemb=false;}if(activeSubMenuIdb){var obj=document.getElementById('subMenuDiv'+activeSubMenuIdb);showSubb();}}else{if(autoHideTimerb>=0){autoHideTimerb+=50;setTimeout('autoHideb()',50);}}}function getTopPosb(inputObj){var returnValue=inputObj.offsetTop;while((inputObj=inputObj.offsetParent)!=null)returnValue+=inputObj.offsetTop;return returnValue;}function getLeftPosb(inputObj){var returnValue=inputObj.offsetLeft;while((inputObj=inputObj.offsetParent)!=null)returnValue+=inputObj.offsetLeft;return returnValue;}function showSubb(){var subObj=false;if(this&&this.tagName){var numericId=this.parentNode.id.replace(/[^0-9]/g,'');okToSlideInSubb[numericId]=false;var subObj=document.getElementById('subMenuDivb'+numericId);if(activeMainMenuItemb)activeMainMenuItemb.className='';if(subObj){if(subObj.style.visibility!='visible'){if(slideDirectionb=='bottom'){subObj.style.top=getTopPosb(submenuObjArrayb[numericId]['parentDiv'])+submenuObjArrayb[numericId]['parentDiv'].offsetHeight+xOffsetSubMenub+'px';}else{subObj.style.top=getTopPosb(submenuObjArrayb[numericId]['parentDiv'])+xOffsetSubMenub+'px';}submenuObjArrayb[numericId]['top']=subObj.style.top.replace(/[^0-9]/g,'');subObj.style.left=getLeftPosb(submenuObjArrayb[numericId]['parentDiv'])+this.parentNode.offsetWidth-subObj.offsetWidth-2+'px';}subObj.style.visibility='visible';subObj.style.zIndex=currentZIndexb;currentZIndexb++;this.className='activeMainMenuItemb';activeMainMenuItemb=this;}}else{var numericId=activeSubMenuIdb;}if(activeSubMenuIdb&&(numericId!=activeSubMenuIdb||!subObj))slideMenub(activeSubMenuIdb,(slideSpeed_inb*-1));if(numericId!=activeSubMenuIdb&&this&&subObj){subObj.style.height='0px';slideMenub(numericId,slideSpeed_outb);activeSubMenuIdb=numericId;}else{if(numericId!=activeSubMenuIdb)activeSubMenuIdb=false;}if(showSubOnMouseOverb)stopAutoHideb();}function slideMenub(menuIndex,speed){var obj=submenuObjArrayb[menuIndex]['divObj'];var obj2=submenuObjArrayb[menuIndex]['ulObj'];var height=obj.offsetHeight+speed+add;if(speed<0){if(height<0)height=0;obj.style.height=height+'px';if(slideDirectionb=='top'){obj.style.top=submenuObjArrayb[menuIndex]['top']-height+'px';obj2.style.top='0px';}else{obj2.style.top=height-submenuObjArrayb[menuIndex]['height']+'px'}if(height>0&&okToSlideInSubb[menuIndex])setTimeout('slideMenub('+menuIndex+','+speed+')',slideTimeout_inb);else{obj.style.visibility='hidden';obj.style.height='0px';if(activeSubMenuIdb==menuIndex)activeSubMenuIdb=false;}}else{if(height>submenuObjArrayb[menuIndex]['height'])height=submenuObjArrayb[menuIndex]['height'];if(slideDirectionb=='top'){obj.style.top=submenuObjArrayb[menuIndex]['top']-height+'px';obj2.style.top='0px';}else{obj2.style.top=height-submenuObjArrayb[menuIndex]['height']+'px'}obj.style.height=height+'px';if(height<submenuObjArrayb[menuIndex]['height']){setTimeout('slideMenub('+menuIndex+','+speed+')',slideTimeout_outb);}else{okToSlideInSubb[menuIndex]=true;}}}function resetPositionb(){subPositionedb.length=0;}function initMenub(){initLeftMenub();}function initLeftMenub(){var menuObj=document.getElementById('dhtmlgoodies_bmenu');var mainMenuItemArray=new Array();var mainMenuItem=menuObj.getElementsByTagName('TD')[0];while(mainMenuItem){if(mainMenuItem.tagName&&mainMenuItem.tagName.toLowerCase()=='td'&&mainMenuItem.width!=2){mainMenuItemArray[mainMenuItemArray.length]=mainMenuItem;var aTag=mainMenuItem.getElementsByTagName('A')[0];if(showSubOnMouseOverb)aTag.onmouseover=showSubb;else aTag.onclick=showSubb;}mainMenuItem=mainMenuItem.nextSibling;}var lis=menuObj.getElementsByTagName('A');for(var no=0;no<lis.length;no++){if(!showSubOnMouseOverb)lis[no].onmouseover=stopAutoHideb;lis[no].onmouseout=initAutoHideb;lis[no].onmousemove=stopAutoHideb;}for(var no=0;no<mainMenuItemArray.length;no++){var sub=mainMenuItemArray[no].getElementsByTagName('UL')[0];if(sub){mainMenuItemArray[no].id='mainMenuItem'+(no+1);var div=document.createElement('DIV');div.className='dhtmlgoodies_subMenub';document.body.appendChild(div);div.appendChild(sub);if(slideDirectionb=='bottom'){div.style.bottom=getTopPosb(mainMenuItemArray[no])+mainMenuItemArray[no].offsetHeight+xOffsetSubMenub+'px';}else{div.style.bottom=getTopPosb(mainMenuItemArray[no])+xOffsetSubMenub+'px';}div.style.left=getLeftPosb(mainMenuItemArray[no])+'px';div.style.width='168px';div.id='subMenuDivb'+(no+1);sub.id='submenuUlb'+(no+1);sub.style.position='relative';if(navigator.userAgent.indexOf('Opera')>=0){submenuObjArrayb[no+1]=new Array();submenuObjArrayb[no+1]['parentDiv']=mainMenuItemArray[no];submenuObjArrayb[no+1]['divObj']=div;submenuObjArrayb[no+1]['ulObj']=sub;submenuObjArrayb[no+1]['height']=sub.offsetHeight+7;submenuObjArrayb[no+1]['top']=div.style.top.replace(/[^0-9]/g,'');}sub.style.top=1-sub.offsetHeight+'px';if(navigator.userAgent.indexOf('Opera')<0){submenuObjArrayb[no+1]=new Array();submenuObjArrayb[no+1]['parentDiv']=mainMenuItemArray[no];submenuObjArrayb[no+1]['divObj']=div;submenuObjArrayb[no+1]['ulObj']=sub;submenuObjArrayb[no+1]['height']=sub.offsetHeight+7;submenuObjArrayb[no+1]['top']=div.style.top.replace(/[^0-9]/g,'');if(fixedSubMenuHeightb)submenuObjArrayb[no+1]['height']=fixedSubMenuHeightb;}if(!document.all)div.style.height='1px';}}if(navigator.appName.indexOf('Internet Explorer')>=0){add=-4;}else{add=-4;}menuObj.style.visibility='visible';menuObj.style.display='block';window.onresize=resetPositionb;}window.onload=initMenub;
