var CurrentImage;
function init (CurrentPage) {
	CurrentImage = CurrentPage;
	SetImage(CurrentImage);
}

//home
homeon = new Image();
homeon.src = "images/homeon.gif";
homeoff = new Image();
homeoff.src = "images/homeoff.gif";

//location
locationon = new Image();
locationon.src = "images/locationon.gif";
locationoff = new Image();
locationoff.src = "images/locationoff.gif";

//agenda
agendaon = new Image();
agendaon.src = "images/agendaon.gif";
agendaoff = new Image();
agendaoff.src = "images/agendaoff.gif";

//resources
resourceson = new Image();
resourceson.src = "images/resourceson.gif";
resourcesoff = new Image();
resourcesoff.src = "images/resourcesoff.gif";

//people
peopleon = new Image();
peopleon.src = "images/peopleon.gif";
peopleoff = new Image();
peopleoff.src = "images/peopleoff.gif";


//contact
contacton = new Image();
contacton.src = "images/contacton.gif";
contactoff = new Image();
contactoff.src = "images/contactoff.gif";

function SwapImage(imgID, statevar) {
	var ThisImage;
	if (imgID != CurrentImage) {
		ThisImage = document.getElementById(imgID);
		if (statevar == "on") {
			ThisImage.src = eval(imgID + "on.src");
			}
		else {
			ThisImage.src = eval(imgID + "off.src");
		}
	}

}

function SetImage(imgID) {
	var OldImage;
	var NewImage;
	OldImage = document.getElementById(CurrentImage);
	OldImage.src = eval(CurrentImage + "off.src");
	NewImage = document.getElementById(imgID);
	NewImage.src = eval(imgID + "on.src");
	CurrentImage = imgID;
}

