/** * File name : TABMENU.js * Require : TABMENU-IE6FIX.js */ function Tabs() { } Tabs.init = function( tabListId ) { Tabs.tabLinks = document.getElementById(tabListId).getElementsByTagName("LI"); var tabLink, tabId, tab; for (var i = 0; i < Tabs.tabLinks.length; i++) { tabLink = Tabs.tabLinks[i]; tabId = tabLink.getAttribute("tabId"); if (!tabId) { // tabId ����� alert("Expand link does not have a tabId element: " + tabLink.innerHTML); } tab = document.getElementById(tabId); if (!tab) { // ����� tabContent alert("tabId does not exist: " + tabId); } if (i == 0) { tab.style.display = "block"; // for tab content tabLink.className = "current" ; // for tab bar }else { tab.style.display = "none"; // for tab content tabLink.className = "" ; // for tab bar } tabLink.onclick = function() { var tabId = this.getAttribute("tabId"); for (var i = 0; i < Tabs.tabLinks.length; i++) { var tabLink = Tabs.tabLinks[i]; var loopId = tabLink.getAttribute("tabId"); if (loopId == tabId) { document.getElementById(loopId).style.display = "block"; tabLink.className = "current" ; }else { document.getElementById(loopId).style.display = "none"; tabLink.className = "" ; } } if (this.blur) { this.blur(); } //fix Bug for IE6 if( typeof fixFooter !="undefined"){ fixFooter(); } return false; } } }