<!-- Begin
// *** GLOBAL VARIABLES *** (gasp!)
baseRef = "..";

// *** FUNCTIONS USED TO LOAD AND DISPLAY NAVBAR ***

// used to do the actual loading of a spec'd set of files
function preloadImages(endNum, path, type) {
	for (var i=0; i<=endNum; i++) {
		this[i] = new Image();
		this[i].src = path + i + type;
	} // end for
	return this;
} // end function preloadImages


// used to preload the neccessary images for the rollover navbar
// 	enter a parameter of "l" for a left-justified navbar
//	enter a parameter of "r" for a right-justified navbar
function preload_navImages (justify) {
	off = new preloadImages(7, 'navbar/' + justify + '/off_', '.gif');
	on = new preloadImages(7, 'navbar/' + justify + '/on_', '.gif');
  
    // menu header preload
	off_mmenu = new Image();
	off_mmenu.src = "navbar/" + justify + "/off_mmenu.gif";
    on_mmenu = new Image();
	on_mmenu.src = "navbar/" + justify + "/on_mmenu.gif";
	on2_mmenu = new Image();
	on2_mmenu.src = "navbar/" + justify + "/on2_mmenu.gif";

} // end function preload_navImages

// Image Popup Window
//	imageid = numeric database ID of image
function ImagePopup(imageid) {
	window.open('image.php?imageid='+imageid,'ImagePopup','scrollbars=yes,menubar=no,height=600,width=800,resizable=yes,toolbar=no,location=no,status=no');
}

// Automatically resizes the browser window to the desired width and height.
// If desired dimensions are too large for the user's resolution, then use
// default values of screen width - 100 and screen height - 200, as necessary.
function ResizeWindowForImage(desiredWidth,desiredHeight)
{
	finalWidth = desiredWidth;
	finalHeight = desiredHeight;

	if (finalWidth>(screen.width-100))
	{
		finalWidth = screen.width-100;
	}
	if (finalHeight>(screen.height-200))
	{
		finalHeight = screen.height-200;
	}
	return window.resizeTo(finalWidth,finalHeight);
}

// modifies image to "on" (selected) mode and turns menu head off
function rollOn(num){
if(document.images)
    eval('document.images["menu'+num+'"].src=on[num].src');
    eval('document.images["mmenu"].src=off_mmenu.src');
} // end function rollOn


// modifies image to "off" (not selected) mode and turns menu head to 'pseudo on'
function rollOff(num){
if(document.images)
    eval('document.images["menu'+num+'"].src=off[num].src');
    eval('document.images["mmenu"].src=on2_mmenu.src');
} // end function rollOff

// End