function changeColor(thisElement,thisColor,thisBackgroundColor) {
	thisElement.style.color = thisColor;
	if(thisBackgroundColor != null) {
		thisElement.style.background = thisBackgroundColor;
	}
}

function setPointer(pointerID) {	
	// clear all pointers and cancel out display of all sub-menus
	for (var i = 1; i <= 4; i++) {
		frames["menu-frame"].document.getElementById("pointer" + i).innerHTML = "";
		frames["menu-frame"].document.getElementById("sub-menu" + i).style.display = "none"
	}
	if (pointerID != 0) {
		// write left-pointing arrow into correct pointer span and display correct sub-menu
		frames["menu-frame"].document.getElementById("pointer" + pointerID).innerHTML = "&larr;";
		frames["menu-frame"].document.getElementById("sub-menu" + pointerID).style.display = "block";
	}
}