%PDF- %PDF-
Direktori : /www/varak.net/www.varak.net/sig/static/ |
Current File : //www/varak.net/www.varak.net/sig/static/tabpages.js |
function tabClicked(e) { var el = Event.element(e); var links = el.parentNode.parentNode.getElementsByTagName("a"); for(var j=0; j<links.length; j++) { links[j].removeClassName("active"); } el.addClassName("active"); var id = el.readAttribute("control"); tdiv = $(id); if(!tdiv) return; children = tdiv.parentNode.getElementsByClassName("fold"); for(var i=0; i<children.length; i++) { children[i].hide(); if(children[i].id == id) children[i].show(); } tdiv.show(); el.blur(); return false; } function initTabs() { var tabs = document.getElementsByClassName("fold"); for(var i=0; i<tabs.length; i++) { tabs[i].hide(); } tabs[0].show(); tabControl = document.getElementsByClassName("tabControl"); for(var i=0; i<tabControl.length; i++) { var links = tabControl[i].getElementsByTagName("a"); for(var j=0; j<links.length; j++) { Event.observe(links[j], "click", function(e) { tabClicked(e); return false; } ); } links[0].addClassName("active"); } } Event.observe(window, "load", function() { initTabs(); });