/*
 * -License     LGPL (http://www.gnu.org/copyleft/lesser.html)
 * -Copyright   2001, The Turing Studio, Inc.
 * -Author      alex black, enigma@turingstudio.com
 */

/**
 * preload all fixed rollovers
 *
 */

var basepath = "/images/nav/";

img_preload('AboutSRO',basepath);
img_preload('Students',basepath);
img_preload('Volunteers',basepath);
img_preload('Calendar',basepath);
img_preload('Donate',basepath);

/**
 * img_switch('reply_via_email','Moo.png');
 * 
 * @author	Alex Black
 * @param	name        the name of the image (see above)
 * @param	basepath    the location in htdocs of the image
 * @param	src         the file to switch to.
 */
function img_switch(name, src) {
	path=basepath+src;
    if(document.images[name]){
        document.images[name].src = path;
    }
}

function img_preload(name) {
    if(document.images){
        if(!document.imgPreload) {
            document.imgPreload = new Array();
        }
        document.imgPreload[name] = new Image;
        document.imgPreload[name].src = basepath+name+"On.png";
    }
}
