function highlightTopic(id){
if (document.getElementById)
   {
   var nodeObj = document.getElementById(id)
   nodeObj.style.fontWeight = 'bold';
   nodeObj.style.background = '#FFFFCC'; 
   nodeObj.style.color = '#000000';
   }
}

function showMenu(id) {
	var menuDisplay = document.getElementById(id)
	menuDisplay.style.display = "block"
}

function hideMenu() {
        var x = document.getElementsByTagName('ul');
        for (var i=0;i<x.length;i++)
        {		
			if (x[i].className == 'menu')
			x[i].style.display = "none";
        }
		menuStyle();
}  

function menuStyle() {
	
	if (document.title == "Mycology - Taxonomy - Ascomycota") {
	showMenu("ascomycotaMenu");												
	highlightTopic("ascomycota");	
	}	
	
	if (document.title == "Mycology - Taxonomy - Basidiomycota") {
	showMenu("basidioMenu");						
	highlightTopic("basidio");			
	}	

	if (document.title == "Mycology - Taxonomy - Chytridiomycota") {
	showMenu("chytridMenu");						
	highlightTopic("chytrid");			
	}

	if (document.title == "Mycology - Taxonomy - Glomeromycota") {
	showMenu("glomeroMenu");						
	highlightTopic("glomero");			
	}
	
	if (document.title == "Mycology - Taxonomy - Zygomycota") {
	showMenu("zygoMenu");						
	highlightTopic("zygo");			
	}
		
	}	

/*
 * menuExpandable3.js - implements an expandable menu based on a HTML list
 * Author: Dave Lindquist (http://www.gazingus.org)
 */

if (!document.getElementById)
    document.getElementById = function() { return null; }

function initializeMenu(menuId, actuatorId) {
    var menu = document.getElementById(menuId);
    var actuator = document.getElementById(actuatorId);

    if (menu == null || actuator == null) return;

    //if (window.opera) return; // I'm too tired

    actuator.onclick = function() {
        var display = menu.style.display;
        menu.style.display = (display == "block") ? "none" : "block";

        return false;
    }
}

