/*Blanton top menu dynamic menus code*/

var which_submenu;//name of the current submenu being displayed
var which_subpointer;//name of the current pointer (little orange bit below text) being displayed along with submenu
var which_active;//name of 'active' (current) directory (i.e.: about, experience, visit, etc.)
var which_active_pointer;//name of 'active' directory's pointer 
var timerId;//value of time left on the clock
var expireTime = 800;//value to wait after mouse out of other menu/submenu


function set_submenu(which, which_pointer)// set submenu and submenu_ponter IDs into var space for bma_show_hide_menu function
{
	which_submenu = which;
	which_subpointer = which_pointer;
}

function set_active(who, who_pointer)// set 'active' (current) directory and active_pointer into var space for bma_show_hide_menu function
{
	which_active = who;
	which_active_pointer = who_pointer;
}

function over_menu(what)//used onMouseOver menus
{
	if(what == "over")// if sent 'over' it prevents the timeout
		clearTimeout(timerId);
	if(what == "out")// if sent 'out' it starts timer and, when expired, calls bma_show_hide_menu function
		timerId = setTimeout("bma_show_hide_menu()",expireTime);
}

function bma_show_hide_menu()
{
	if (!(which_active == 'index')) {
		document.getElementById(which_submenu).style.visibility = "hidden";// hide submenu
		document.getElementById(which_subpointer).style.visibility = "hidden";// hide pointer
		document.getElementById(which_active).style.visibility = "visible";// show active menu
		document.getElementById(which_active_pointer).style.visibility = "visible";// show active menu
	}
}