/**
 * preload all fixed rollovers
 *
 */

var basepath = "http://www.thirdway.org/images/nav/";

img_preload('Home',basepath);
img_preload('Projects',basepath);
img_preload('Press',basepath);
img_preload('Dispatch',basepath);
img_preload('Leadership',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";
    }
}
