/**
 * This function pre-loads images
 * @name 	preload
 * @param	list - comma-separated string of named images on the page, set by and passed in from the calling page
 * @param	path - string containing the relative path to the directory (ex: "../images/home/")
 */
function preload(list, path) {
	if (document.images) {
		var preloadImages = list.split(",");
		var images = new Array();
		for (i=0; i < preloadImages.length; i++) {
			if (preloadImages[i] != "") {
				images[i] = new Image();
				images[i].src = path + preloadImages[i] + "_on.jpg";
			}
		}
	}
}
/*
 * This function highlights an image
 * @name	over
 * @param	image - the toolbar image to be flipped
 * @param	path - string containing the relative path to the directory (ex: "../images/home/")
 * @param	imgName - optional, the name of the image object on the page (otherwise assumed to be image)
 */
function over(image, path, imgName) {  
	if (document.images) {
		var img = (imgName) ? document.images[imgName] : document.images[image];
		// store reference to old image for the out function
		img.rsrc = img.src;
		img.src = path + image + "_on.jpg";
	}
}


/**
 * This function restores an image
 * @name	out
 * @param	image - the toolbar image to be flopped
 * @param	imgName - optional, the name of the image object on the page (otherwise assumed to be image)
 */
function out(image, imgName) {
	if (document.images) {
		var img = (imgName) ? document.images[imgName] : document.images[image];
		// set source to stored reference to the old image
		img.src = img.rsrc;
	}
}

function popUp(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=505,height=225,left = 50,top = 50');");

}


function popUpequip(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=475,height=600,left = 10,top = 10');");

}