// Initialise the effects var currOpen = null; function init(initial){ initSubmenu(); // Display step (tabbed content) var stepClicks = document.getElementsByClassName('display-step'); var stepContents = document.getElementsByClassName('step'); stepContents.each(function(div, i) { if(i == (initial - 1)) { currOpen = div; div.style.display = "block"; } else { div.style.display = "none"; } }); stepClicks.each(function(a, i){ a.onclick = function() { set_visibility((i + 1)); return true; } if (i == (initial - 1 )) { currClick = a; a.className = "display-active"; } else { a.className = "display-step"; } }); } /** toggles show/hide of a layer **/ function toggleLayer(whichLayer) { if (document.getElementById) { var style2 = document.getElementById(whichLayer).style; style2.display = style2.display? "":"block"; } else if (document.all) { var style2 = document.all[whichLayer].style; style2.display = style2.display? "":"block"; } else if (document.layers) { var style2 = document.layers[whichLayer].style; style2.display = style2.display? "":"block"; } } /** Show/hide javascript for submenu / steps / filter **/ function set_visibility(id) { var e = document.getElementById('tabcontent' + id); var a = document.getElementById('step' + id); if (e) { if (e.style.display == 'none') { if (currOpen) currOpen.style.display='none'; if (currClick) currClick.className = 'display-step'; e.style.display = 'block'; a.className = 'display-active'; currOpen = e; currClick = a; } } } function toggle_visibility(id) { var e = document.getElementById(id); if (e) { if (e.style.display == 'none') { if (currOpen) currOpen.style.display='none'; e.style.display = 'block'; currOpen = e; } else { e.style.display = 'none'; currOpen = null; } } } function initSubmenu() { // Check if li is selected var e = document.getElementById('selected'); if (e) { e = e.getElementsByTagName('ul'); if (e.length > 0) e[0].style.display = 'block'; } } function initFilterForm() { var e = document.getElementById('filter-box'); } function printPage() { var printWindow = window.open('/printPage.html', 'printWindow'); }