var ms;
var menu;

function menuinit() {
    if (TransMenu.isSupported()) {
        TransMenu.initialize();
		document.getElementById("navhome").onmouseover = function() { ms.hideCurrent(); this.className = "hover"; }
		document.getElementById("navhome").onmouseout = function() { this.className = ""; }
		document.getElementById("navbio").onmouseover = function() { ms.hideCurrent(); this.className = "hover"; }
		document.getElementById("navbio").onmouseout = function() { this.className = ""; }
		document.getElementById("navspeaking").onmouseover = function() { ms.hideCurrent(); this.className = "hover"; }
		document.getElementById("navspeaking").onmouseout = function() { this.className = ""; }
		document.getElementById("navforreaders").onmouseover = function() { ms.hideCurrent(); this.className = "hover"; }
		document.getElementById("navforreaders").onmouseout = function() { this.className = ""; }
		document.getElementById("navforwriters").onmouseover = function() { ms.hideCurrent(); this.className = "hover"; }
		document.getElementById("navforwriters").onmouseout = function() { this.className = ""; }
		document.getElementById("navnews").onmouseover = function() { ms.hideCurrent(); this.className = "hover"; }
		document.getElementById("navnews").onmouseout = function() { this.className = ""; }
		document.getElementById("navphotos").onmouseover = function() { ms.hideCurrent(); this.className = "hover"; }
		document.getElementById("navphotos").onmouseout = function() { this.className = ""; }
		document.getElementById("navcontact").onmouseover = function() { ms.hideCurrent(); this.className = "hover"; }
		document.getElementById("navcontact").onmouseout = function() { this.className = ""; }
		menu.onactivate = function() { document.getElementById("navbooks").className = "hover"; };
		menu.ondeactivate = function() { document.getElementById("navbooks").className = ""; };
	}
}

function menusetup() {
    if (TransMenu.isSupported()) {
        ms = new TransMenuSet(TransMenu.direction.down, 1, 0, TransMenu.reference.bottomLeft);
        menu = ms.addMenu(document.getElementById("navbooks"));
	menu.addItem("Fiction", "fiction.html");
	menu.addItem("Non Fiction", "nonfiction.html");
        TransMenu.renderAll();
    }
}

