// JavaScript Document menu functions written by Shane Todhunter
var the_timeout = null;

var last_menu;

function showMenu(id) {
	
	if ( last_menu !== undefined && last_menu != id )
		document.getElementById(last_menu).style.visibility = "hidden";
		
	last_menu = id;
	
	if (the_timeout)	clearTimeout(the_timeout);

	var menu = document.getElementById(id);
	menu.style.visibility = "visible";
}
function closeMenu(id) {
	the_timeout = setTimeout("hideIt('"+id+"')",1000);
}
function hideIt(id) {
	var menu = document.getElementById(id);
	menu.style.visibility = "hidden";
}