function addTask(function1, function2) { // instead of using window.onload = init() on your own JS pages, please // use the following line: // // window.onload = addTask(myNewFunction, window.onload); // that way we can specify 'multiple' onload tasks without clobbering // each other's code. // Robert Hahn return function() { if (function1) function1(); if (function2) function2(); } } var viz_menu = []; function showMenu(m, level) { if (viz_menu == m) return; hideMenu(level); viz_menu[viz_menu.length] = m; menutitle = "top_" + m; dropshadow = m + "_shadow"; dropshadow_side = dropshadow + "_s"; Element.show(m); h=Element.getHeight(m); $(dropshadow_side).style.height = h + "px"; l = Element.getStyle(m,'left'); t = Element.getStyle(m,'top'); if(l != null || t != null) { $(dropshadow).style.left = (parseInt(l)+3) + "px"; $(dropshadow).style.top = t; } Element.show(dropshadow); if($(menutitle)) { $(menutitle).style.backgroundColor = '#ffc728'; } Element.show('invisibleLyr'); } function hideMenu() { level = (arguments.length == 1)? arguments[0]:1; if (viz_menu.length == 0) return; vm_length = viz_menu.length; while (level <= vm_length){ m = viz_menu[viz_menu.length-1]; viz_menu.length--; menutitle = "top_" + m; dropshadow = m + "_shadow"; dropshadow_side = dropshadow + "_s"; Element.hide(m); h=Element.getHeight(m); $(dropshadow_side).style.height = h + "px"; l = Element.getStyle(m,'left'); t = Element.getStyle(m,'top'); if(l != null || t != null) { $(dropshadow).style.left = (parseInt(l)+3) + "px"; $(dropshadow).style.top = t; } Element.hide(dropshadow); if($(menutitle)) { $(menutitle).style.backgroundColor = ''; } vm_length = viz_menu.length; } if (viz_menu.length == 0) { Element.hide('invisibleLyr'); } } function toggleBar(menutitle) { if($(menutitle)) { $(menutitle).style.backgroundColor = ($(menutitle).style.backgroundColor == '')? '#ffc728':''; } } function toggle_trigger(e) { node = e.parentNode; // toggle image imgnode = e.nextSibling; while (imgnode) { if(imgnode.nodeName == "IMG") { if(imgnode.src.indexOf("opened") > -1) { imgnode.src = imgnode.src.replace(/opened/, "closed"); } else { imgnode.src = imgnode.src.replace(/closed/, "opened"); } } imgnode = imgnode.nextSibling; } // toggle content while (node.nextSibling) { node = node.nextSibling; if(node.hasChildNodes() && Element.classNames(node) == "elementcollapsed") { Element.toggle(node); node = false; } } } function setActiveStyleSheet(title) { var i, a, main; for (i=0; (a = document.getElementsByTagName("link")[i]); i++) { if (a.getAttribute("rel") && a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) { a.disabled = true; if(a.getAttribute("title") == title) a.disabled = false; } } } // frameproofing the homepage. if(window.top.frames.length > 0) window.top.location.href=location.href; /* code needed for the events homepage */ function toggleform(img, frm, box) { $(img).src = (/arrow-bottom-right/.test($(img).src))? '/media/img/arrow-top-left.png':'/media/img/arrow-bottom-right.png'; Element.toggle(frm); if ($(box).hasClassName('expandablebox_open')) { $(box).removeClassName('expandablebox_open'); $(box).addClassName('expandablebox_close'); } else { $(box).removeClassName('expandablebox_close'); $(box).addClassName('expandablebox_open'); } }