//-----------------------------------------------------------------------------
/*
	Use:  Pre-loads an image into an image object.
	Arguments:  
			sImageObject: name of the image object to create
			sImageSource: path to the image
*/
//-----------------------------------------------------------------------------
function preload(sImageObject,sImageSource) 
{
	/*  Make sure the document.images object exists on the client's browser  */
	if (document.images) 
	{
		eval(sImageObject+' = new Image()');
		eval(sImageObject+'.src = "'+sImageSource+'"');
	}
}


//-----------------------------------------------------------------------------
/*
	Use:  switches out an image with a pre-loaded image
	Arguments:  
			sImageName:		name of the image
			sImageObject:	name of the pre-loaded image object to use
*/
//-----------------------------------------------------------------------------
function changeImage(imgName, imgObject) 
{
	/*  Make sure the document.images object exists on the client's browser  */
	if (document.images) 
	{
			/*  Change the image's source  */
			document.images[imgName].src = eval(imgObject+".src");
	}
}
