/*
 * -File        $Id: BaseLib.js,v 1.1.1.1 2002/11/01 22:10:14 turing Exp $
 * -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 = "/resources/images/";
img_preload('home',basepath);
img_preload('about',basepath);
img_preload('practice_areas',basepath);
img_preload('contact',basepath);
img_preload('clients',basepath);

/**
 * img_switch('reply_via_email','images/','Moo.gif');
 * 
 * @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, basepath, src) {
	path=basepath+src;
    if(document.images[name]){
        document.images[name].src = path;
    }
}

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