/***************************************************
**                                                **
** Title: Icon Rollover JavaScript Library        **
** Date: October 25, 2001                         **
** Authors: Kofi Garbrah and D Meatheringham      **
** Purpose: Causes an icon to change into a       **
**          different icon when the user touches  **
**          it and change back when the user is   **
**          not touching it. This can be used to  **
**          produce various animated effects.     **
**                                                **
****************************************************/

// Global Variable
var preloadFlag = false;

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function preloadImages() {
	if (document.images) {
		var home = newImage("images/medal_front.jpg");
		var home_2 = newImage("images/medal_back.jpg");

		preloadFlag = true;
	}
}
