var l_activeClass = "tabOn"; var l_inactiveClass = "tabOff"; var l_navItemClass; var l_pageIsCurrentNavItem = false; var l_lastActiveNavItem; /*var l_navIndex; //index of current page/tab - dynamic*/ var l_tid; var l_lastNavItem; var l_currentNavIndex; function pnavbar_onMouseOver(sender, index){ clearTimeout(l_tid); pnavbar_deactivateAll(); pnavbar_activateCurrent(); sender.className = l_activeClass; snavbar_hideAll(); snavbar_showCurrent(index); } function pnavbar_onMouseOut(sender, index){ pnavbar_deactivateAll(); l_tid = setTimeout("navbar_setBaseState()", 5); } function pnavbar_deactivateAll(){ var curIdx = 0; var pnavItem = document.getElementById("prinav" + curIdx); while(pnavItem != undefined){ if(curIdx != l_navIndex){ pnavItem.className = "tabOff"; } pnavItem = document.getElementById("prinav" + (++curIdx).toString()); } } function pnavbar_activateCurrent(){ document.getElementById("prinav" + l_navIndex).className = l_activeClass; } function snavbar_hideAll(){ var curIdx = 0; var snavItem = document.getElementById("subnav" + curIdx); while(snavItem != undefined){ snavItem.style.display = "none"; snavItem = document.getElementById("subnav" + (++curIdx).toString()); } } function snavbar_showCurrent(index){ document.getElementById("subnav" + index).style.display = "block"; } function snavbar_onMouseOver(sender, index){ clearTimeout(l_tid); pnavbar_activateCurrent(); document.getElementById("prinav" + index).className = l_activeClass; } function snavbar_onMouseOut(sender, index){ document.getElementById("prinav" + index).className = "tabOff"; l_tid = setTimeout("navbar_setBaseState()", 5); } function navbar_setBaseState(){ pnavbar_activateCurrent(); snavbar_hideAll(); snavbar_showCurrent(l_navIndex); }