function initialShowcase() {
	var divs = document.getElementsByTagName("div");
    for (var i=0; i<divs.length; i++ ) {
        if (divs[i].className.indexOf("initial") == -1) {
			continue;
		} else {
			divs[i].style.display = "block";
		}
    }
}

function showSection(id) {
    var divs = document.getElementsByTagName("div");
    for (var i=0; i<divs.length; i++ ) {
        if (divs[i].className.indexOf("section") == -1) continue;
        if (divs[i].getAttribute("id") != id) {
            divs[i].style.display = "none";
        } else {
            divs[i].style.display = "block";
        }
    }
}

function prepareShowcaseNav() {
    if (!document.getElementsByTagName) return false;
    if (!document.getElementById) return false;
	
	var main_top = document.getElementById("main_top");
    var links = main_top.getElementsByTagName("a");
    
    for (var i=0; i<links.length; i++ ) {
		var sectionId= links[i].getAttribute("href").split("=")[1];
		
        if (!document.getElementById(sectionId)) continue;
		
        document.getElementById(sectionId).style.display = "none";
        
        links[i].destination = sectionId;
		
        links[i].onmouseover = function() {
            showSection(this.destination);
            return false;
        }
		
		links[i].onfocus = function() {
            showSection(this.destination);
        }
    }
	
	initialShowcase();
}

addLoadEvent(prepareShowcaseNav);