
// Don't Know What I'm Doing - which is what it seemed like for a long time.
function PRELOAD(closeup, norm, page)
{
	// Three parameters
	// closeup-set up nodes and events for close-ups
	// norm-set up normal nodes and events for navigation
	// page-also set up nodes and events for page navigation
	//alert("CLOSEUP IS: "+closeup);
	
	
	if (closeup == "yes")
	{
		// ON LOAD - FOR THE CLOSE-UP ROLL-OVERS
		// On load, set these global variables.
		// Divs with close-up images and names.
		soloDiv    = document.getElementById("soloLayer");
		jenDiv     = document.getElementById("jenLayer");
		cindyDiv   = document.getElementById("cindyLayer");
		dianeDiv   = document.getElementById("dianeLayer");
		mauriceDiv = document.getElementById("mauriceLayer");
		lindaDiv   = document.getElementById("lindaLayer");
		jamesDiv   = document.getElementById("jamesLayer");
		rodneyDiv  = document.getElementById("rodneyLayer");
		// Areas with polygon coordinates.
		jenArea     = document.getElementById("jen");
		cindyArea   = document.getElementById("cindy");
		dianeArea   = document.getElementById("diane");
		mauriceArea = document.getElementById("maurice");
		lindaArea   = document.getElementById("linda");
		jamesArea   = document.getElementById("james");
		rodneyArea  = document.getElementById("rodney");

		// Since the browsers aren't allowing thsee events to 
		// be set inside the Area tags, we'll set them here.
		jenArea.onmouseover=function(){jenFunc();};
		jenArea.onmouseout=function(){outFunc(jenDiv);};
		cindyArea.onmouseover=function(){cindyFunc();};
		cindyArea.onmouseout=function(){outFunc(cindyDiv);};
		dianeArea.onmouseover=function(){dianeFunc();};
		dianeArea.onmouseout=function(){outFunc(dianeDiv);};
		mauriceArea.onmouseover=function(){mauriceFunc();};
		mauriceArea.onmouseout=function(){outFunc(mauriceDiv);};
		lindaArea.onmouseover=function(){lindaFunc();};
		lindaArea.onmouseout=function(){outFunc(lindaDiv);};
		jamesArea.onmouseover=function(){jamesFunc();};
		jamesArea.onmouseout=function(){outFunc(jamesDiv);};
		rodneyArea.onmouseover=function(){rodneyFunc();};
		rodneyArea.onmouseout=function(){outFunc(rodneyDiv);};
	}
	
	if (norm == "yes")
	{
		// ON LOAD - FOR THE NAVIGATION
		// On load, set these global variables.
		// Divs with navigational icons and menus.
		// All pages should have the Festival and Outside menuts.
		festivalNButton = document.getElementById("festivalButton");
		festivalNMenu   = document.getElementById("festivalMenu");
		outsideNButton  = document.getElementById("outsideButton");
		outsideNMenu    = document.getElementById("outsideMenu");
	
		// Set the mouseover functions for the menus
		festivalNButton.onmouseover=function(){menuShow(festivalNButton, festivalNMenu);};
		festivalNMenu.onmouseover=function(){menuShow(festivalNButton, festivalNMenu);};
		festivalNButton.onmouseout=function(){menuHide(festivalNMenu);};
		festivalNMenu.onmouseout=function(){menuHide(festivalNMenu);};
		outsideNButton.onmouseover=function(){menuShow(outsideNButton, outsideNMenu);};
		outsideNMenu.onmouseover=function(){menuShow(outsideNButton, outsideNMenu);};
		outsideNButton.onmouseout=function(){menuHide(outsideNMenu);};
		outsideNMenu.onmouseout=function(){menuHide(outsideNMenu);};
	}
	
	if (page == "yes")
	{
		// ON LOAD - FOR NAVIGATION ON THE SAME PAGE
		// On load, set these global variables.
		// Divs with navigational icons and menus.
		// Not every page will have "This Page" menu.
		pageNButton     = document.getElementById("pageButton");
		pageNMenu       = document.getElementById("pageMenu");

		pageNButton.onmouseover=function(){menuShow(pageNButton, pageNMenu);};
		pageNMenu.onmouseover=function(){menuShow(pageNButton, pageNMenu);};
		pageNButton.onmouseout=function(){menuHide(pageNMenu);};
		pageNMenu.onmouseout=function(){menuHide(pageNMenu);};
	}
	
	
	}

// MOUSEOVERS AND MOUSEOUTS FOR THE CLOSE-UPS

// Handle mouseouts.
function outFunc(refDiv)
{
	refDiv.style.visibility = "hidden";
	soloDiv.style.visibility = "visible";
}

// Handle various mouseovers.  The base div needs to 
// be hidden because of the text.
function jenFunc()
{
	soloDiv.style.visibility = "hidden";
	jenDiv.style.visibility = "visible";
}
function cindyFunc()
{
	soloDiv.style.visibility = "hidden";
	cindyDiv.style.visibility = "visible";
}
function dianeFunc()
{
	soloDiv.style.visibility = "hidden";
	dianeDiv.style.visibility = "visible";
}
function mauriceFunc()
{
	soloDiv.style.visibility = "hidden";
	mauriceDiv.style.visibility = "visible";
}
function lindaFunc()
{
	soloDiv.style.visibility = "hidden";
	lindaDiv.style.visibility = "visible";
}
function jamesFunc()
{
	soloDiv.style.visibility = "hidden";
	jamesDiv.style.visibility = "visible";
}
function rodneyFunc()
{
	soloDiv.style.visibility = "hidden";
	rodneyDiv.style.visibility = "visible";
}

// MOUSEOVERS AND MOUSEOUTS FOR THE NAVIGATIONAL MENU
function menuShow(buttonRef, divRef)
{
	divRef.style.left = buttonRef.offsetLeft+"px";
	divRef.style.visibility = "visible";
}
function menuHide(divRef)
{
	divRef.style.visibility = "hidden";
}




