function menuHover(graphic, direction) {
	var arrowObj;
	arrowObj = document.getElementById(graphic + "_arrow");
	if (direction) {
		arrowObj.src = "/graphics/common/mainMenu/menu-rightArrow.gif";
	} else {
		arrowObj.src = "/graphics/common/mainMenu/menu-noArrow.gif";
	}
}


function submenuHover(graphic, direction) {
	var dotObj;
	dotObj = document.getElementById(graphic + "_dot");
	
	if (direction) {
		dotObj.src = "/graphics/common/subMenus/dot.gif";
	} else {
		dotObj.src = "/graphics/common/subMenus/noDot.gif";
	}
}

function respaceGraphic(className, graphicSize, side) {
	var pageWidth, columnWidth, columnObj;
	columnObj = document.getElementById("contentContainer");
	pageWidth = document.documentElement.clientWidth;
	columnWidth = (pageWidth - 720) / 2;
	
	if (side == "left") {
		if (columnWidth >= graphicSize) {
			columnObj.style.backgroundPosition = "top left";
			columnObj.className = className;
		} else {
			columnObj.style.backgroundPosition = (columnWidth - graphicSize) + "px 0px";
			columnObj.className = className;
		}
	} else {
		if (columnWidth >= graphicSize) {
			columnObj.style.backgroundPosition = (pageWidth - graphicSize) + "px 0px";
			columnObj.className = className;
		} else {
			columnObj.style.backgroundPosition = (pageWidth - columnWidth) + "px 0px";
			columnObj.className = className;
		}
	}
}


function equationFlip(graphicID, flipSwitch) {
	var graphicObj;
	var defObj;
	var containerObj;

	graphicObj = document.getElementById(graphicID);
	containerObj = document.getElementById(graphicID + "Container");
	defObj = document.getElementById(graphicID + "Def");

	if (flipSwitch == "on") {
		graphicObj.src = "/graphics/hr/" + graphicID + "-on.jpg";
		containerObj.style.backgroundColor = "#E3EECE";
		defObj.style.backgroundColor = "#E3EECE";
	} else {
		graphicObj.src = "/graphics/hr/" + graphicID + "-off.jpg";
		containerObj.style.backgroundColor = "#FFFFFF";
		defObj.style.backgroundColor = "#FFFFFF";
	}
}


function buttonFlip(graphicID, flipSwitch) {
	var graphicObj;
	graphicObj = document.getElementById(graphicID);

	if (flipSwitch == "on") {
		graphicObj.src = "/graphics/hr/button-" + graphicID + "-on.gif";
	} else {
		graphicObj.src = "/graphics/hr/button-" + graphicID + "-off.gif";
	}
}
