/*
        File: imgSwap.js
     Version: 1.1

     Created: 07/08/05
    Modified: 07/05/07
   Copyright: Matthew Cassidy 2005
       Email: matt@afterglowmedia.com.au

     Purpose: Implements image swappng and preloading functions.
        Note: None

     License: For use solely by Afterglow Media. 
*/


/*--------------------------------------------*/
/* Function: sysPreload(args)                 */
/* Preloads the the files supplied in args    */
/*--------------------------------------------*/
function sysPreload() {
	arguments = sysPreload.arguments;
    document.imageArray = new Array(arguments.length)
	for (i=0; i < arguments.length; i++) {
    	document.imageArray[i] = new Image;
	    document.imageArray[i].src = arguments[i];
	}
}


/*--------------------------------------*/
/* Function: swap(imageName, swapFile)  */
/* Swaps the image to the provided file */
/*--------------------------------------*/
function swap(imageName, swapFile) {
	if (document.images) {
		if (swapFile != "") { 
			document.images[imageName].src = swapFile; 
		} 
	} 
}

