Array.prototype.inArray = function (value)
// Returns true if the passed value is found in the
// array.  Returns false if it is not.
{
	var i;
	for (i=0; i < this.length; i++) {
		// Matches identical (===), not just similar (==).
		if (this[i] === value) {
			return true;
		}
	}
	return false;
}

over = new Array();
out = new Array();

over["menuLifeasaweapon"] = new Image()
over["menuLifeasaweapon"].src = "images/menuLifeasaweaponOn.gif" 
over["menuPhotography"] = new Image()
over["menuPhotography"].src = "images/menuPhotographyOn.gif" 
over["menuDesign"] = new Image()
over["menuDesign"].src = "images/menuDesignOn.gif" 
over["menuOutput"] = new Image()
over["menuOutput"].src = "images/menuOutputOn.gif" 
over["menuInput"] = new Image()
over["menuInput"].src = "images/menuInputOn.gif" 

out["menuLifeasaweapon"] = new Image()
out["menuLifeasaweapon"].src = "images/menuLifeasaweapon.gif" 
out["menuPhotography"] = new Image()
out["menuPhotography"].src = "images/menuPhotography.gif" 
out["menuDesign"] = new Image()
out["menuDesign"].src = "images/menuDesign.gif" 
out["menuOutput"] = new Image()
out["menuOutput"].src = "images/menuOutput.gif" 
out["menuInput"] = new Image()
out["menuInput"].src = "images/menuInput.gif" 

function imageHover(id) { 
	document.getElementById(id).src = over[id].src; 
} 
 
function imageReset(id) {
	if (typeof(activePages) != "undefined") {
		if (!activePages.inArray(id)) {
			document.getElementById(id).src = out[id].src;
		}
	} else {
		document.getElementById(id).src = out[id].src;
	}
} 

function highlightActivePages(ap) {
	if (ap.length > 0) {
		for (i = 0; i < ap.length; i++) {
			if (document.getElementById(ap[i]) != null) {
				document.getElementById(ap[i]).src = over[ap[i]].src;
			}
		}
	}
}