/*
	This is a variable to help make sure the page is loaded before any object
	manipulation is performed. This helps to reduce the number of accidental
	javascript errors that occur.
*/
var pageLoaded = false;

// loadProc - the default function called when every page loads.
function loadProc() {
	pageLoaded = true;
}


// swapImg - swaps an image for another that has already been preloaded.
function swapImg(imgName, preloadedImgName) {
	if (pageLoaded) {
		document[imgName].src = eval(preloadedImgName).src;
	}
}


// preload - does an image preload so that most browsers don't request the image
//           every time a mouseover action is called.
function preload(imgSrc) {
	img = new Image();
	img.src = imgSrc;
	return img;
}


