// *******************************************
// *                                         *
// * Buttons JavaScript                      *
// *                                         *
// *******************************************

if (!ourPeople) {
	// Not defined on every page...
	var ourPeople	=	null;
}

if (!currentPage) {
	// Should never happen... but who knows?
	var currentPage	=	null;
}

function loadImages(button, mouseOut, mouseOver) {
	if(document.images) {
		if(!document.outPictures) {
			// On first entry, create the array of pictures
			document.outPictures  = new Array();
		}
		// Normal and onMouseOut image
		document.outPictures[button]	=	new Image();
		if ((button == currentPage) || (button == ourPeople)) {
			//alert ('HighLighted Button: '+button);
			// Keep onMouseOver for the current Page aand the people sub-menu
			document.outPictures[button].src	=	mouseOver;
		} else {
			document.outPictures[button].src	=	mouseOut;
		}		
		if(!document.overPictures) {
			// On first entry, create the array of pictures
			document.overPictures  = new Array();
		}
		// onMouseOver image
		document.overPictures[button]		=	new Image();
		document.overPictures[button].src	=	mouseOver;
	}	
}

function onMouseOut (button) {
	if(document.images) {
		if (button) {
			// Switch back to Normal & onMouseOut image
			document.images[button].src = document.outPictures[button].src;
		}
	}
	return true;
}

function onMouseOver (button) {
	if(document.images) {
		if (button) {
			// Switch to onMouseOver image
			document.images[button].src = document.overPictures[button].src;
		}
	}
	return true;
}
