// config 
menus = new Array("howitworks", "whyweneedit", "helpout", "contactus");  
var hiliteColor = '#B79F1C';
var deliteColor = '#D7BB21';

// global that keeps track of mouse position
var overMap = 0;

function showMenu(menu_id){
	hideAllOtherMenus(menu_id);
	// show this menu
	window.document.getElementById(menu_id).style.display="block";
}

function hideMenu(menu_id){
	// if we're not over a map hide
	if (!overMap) { 
		window.document.getElementById(menu_id).style.display="none";
	}
}

function hideMenuNow(menu_id){
	window.document.getElementById(menu_id).style.display="none";
}

function startTimeout(menu_id){
	setTimeout('hideMenu("'+menu_id+'")',400);
}

function hideAllOtherMenus(skip_menu){
	for(this_menu in menus){
		if(menus[this_menu] == skip_menu) {continue;}
		else{hideMenuNow(menus[this_menu]);}
	}
}

function hilight(row){
	// we are over map
	overMap=1;
	//set background color of row
	row.bgColor = hiliteColor;
}

function delight(row){
	// we are nolonger over map
	overMap=0;	
	// set row background
	row.bgColor = deliteColor;
}


