loadImages();
//function to preload images on side nav
function loadImages(){
	homeOn = new Image();
	homeOn.src="images/NAVIGATION/homeOn.gif";
	homeOff = new Image();
	homeOff.src="images/NAVIGATION/home.gif";

	contactOn = new Image();
	contactOn.src="images/NAVIGATION/contactOn.gif";
	contactOff = new Image();
	contactOff.src="images/NAVIGATION/contact.gif";
	
	historyOn = new Image();
	historyOn.src="images/NAVIGATION/historyOn.gif";
	historyOff = new Image();
	historyOff.src="images/NAVIGATION/history.gif";

	picturesOn = new Image();
	picturesOn.src="images/NAVIGATION/picturesOn.gif";
	picturesOff = new Image();
	picturesOff.src="images/NAVIGATION/pictures.gif";

	familiaOn = new Image();
	familiaOn.src="images/NAVIGATION/familiaOn.gif";
	familiaOff = new Image();
	familiaOff.src="images/NAVIGATION/familia.gif";
}


//rollover for the image in the left nav, excluding the one its in

function swap( imgName ){
	var imgSrc = eval("document.images['" + imgName + "'].src");	
	var imgOffSrc = "images/NAVIGATION/" + imgName + ".gif";

	var beginIndex = imgSrc.indexOf("images/NAVIGATION/");
	var imgSrcLength = imgSrc.length;
	imgSrc = imgSrc.substring(beginIndex, imgSrcLength);

	//rollover
	if( imgSrc == imgOffSrc ){
		document.images[imgName].src = eval(imgName + "On").src;
	}
	//rollout
	else{
		document.images[imgName].src = eval(imgName + "Off").src;
	}
}