var ActiveItem;
var ActiveSubMenuItem;
var ActiveSubMenu;
var EmptyArrow = new Image(9,9);
EmptyArrow.src = "images/arrow_empty.gif";

// Highlight
//
// Used on the index page.  Changes the text color of the item passed
// to it to red, changing the previous active item back to the normal
// blue if necessary, and makes visible the div with class menuId.

function Highlight(item, menuId) {
	document.getElementById("start").style.visibility = "hidden";
	if(ActiveItem != null)
		ActiveItem.style.color = 'blue';
	item.style.color = '#FF6600';
	ActiveItem = item;

	if(ActiveSubMenu != null)
		ActiveSubMenu.style.visibility = "hidden";
	var menu = document.getElementById(menuId);
	menu.style.visibility = "visible";
	ActiveSubMenu = menu;
	}

// HighlightSubMenu
//
// Called on mouseover.  To use:  onmouseover="HighlightSubMenu(this, 'id')"
// where 'id' is the id of the nearby img that will change.  If there is no
// image, use '' instead.

function HighlightSubMenu(item, imgId) {

	if(ActiveSubMenuItem != null)
		ActiveSubMenuItem.style.color = 'blue';
	item.style.color = '#FF6600';
	if(imgId != "") {
		var arrow = document.getElementById(imgId);
		arrow.src = "images/arrow_empty.gif";
	}
	ActiveSubMenuItem = item;
	}

// UnHighlightSubMenu
//
// Called on mouseout.  To use:  onmouseover="UnHighlightSubMenu(this, 'id')"
// where 'id' is the id of the nearby img that will change.  If there is no
// image, use '' instead.

function UnHighlightSubMenu(item, imgId) {
	item.style.color = 'blue';
	if(imgId != "") {
		var arrow = document.getElementById(imgId);
		arrow.src = "images/arrow_full.gif";
		}
	}