window.onload = rolloverInit;



var linkNum = 0;



function rolloverInit() {
	
	for (var i = 0; i < document.links.length; i++) {

		var linkObj = document.links[i];

		linkNum = i;

		if (linkObj.id) {

			var imgObj = document.getElementById(linkObj.id + "Img");

			if (imgObj) {

				setupRollover(linkObj, imgObj);

			}

		}

	}

}



function setupRollover(thisLink, thisImage) {

	thisLink.imgToChange = thisImage;

	thisLink.onmouseover = rollOver;

	

	thisLink.overImage = new Image();

	thisLink.overImage.src = "../Graphics/" + thisLink.id + (linkNum) + ".jpg";

}



function rollOver() {

	this.imgToChange.src = this.overImage.src;	

}
