function img_preload() { // arguments[0] = relative path to load images from (required) // arguments[1-n] are file names of images // Check that browser supports image objects if (document.images) { // Create array of file names of images to be preloaded arImageSrc = new Array (); for (i = 1; i < arguments.length; i++) { var less_i = i - 1; arImageSrc[less_i] = arguments[i]; } // Loop through array of image file names arImageList = new Array (); for (counter in arImageSrc) { // Preload by creating image objects and setting their src arImageList[counter] = new Image(); arImageList[counter].src = arguments[0] + arImageSrc[counter]; } } return true; } function img_rollover(id, src) { // id = id of image to change, src = path + filename to change image to // Filter out browsers without image scripting support if (document.images) { document.images[id].src = src; } return true; }