function over(theImageName, theImage) {
	if(!isInArray(openedMenu, theImageName)) {
		var strImagePath=theImage.src;
		var strNewImagePath=strImagePath.substring(0, strImagePath.length-7);
		strNewImagePath += "on.gif";
		theImage.src=strNewImagePath;
	}
}

function out(theImageName, theImage) {
	if(!isInArray(openedMenu, theImageName)) {
		var strImagePath=theImage.src;
		var strNewImagePath=strImagePath.substring(0, strImagePath.length-6);
		strNewImagePath += "off.gif";
		theImage.src=strNewImagePath;
	}
}

function makeSelected(theElement) {
	openedMenu[openedMenu.length] = theElement;
	var strImagePath=document.getElementById(theElement).src;
	var strNewImagePath=strImagePath.substring(0, strImagePath.length-7);
	strNewImagePath += "on.gif";
	document.getElementById(theElement).src=strNewImagePath;
}

function isInArray(theArray, theString) {
	var isIn = false;
	for(var x=0;x<theArray.length; x++) {
		if(theArray[x] == theString) isIn = true;
	}
	
	return isIn;
}