<!--
// ========================================= Setup global constants and variables ========================================
var bWINDOWOPEN = false;				// Global flag to alert if image viewing popup is open
var oWindow = new Object();				// Create a globally accessible window object reference
// =======================================================================================================================


// ================================================== HEADER =============================================================

// Cache header highlighting images
var aBarOff = [];
var aBarOn = [];
for (var cnt=0;cnt<6;++cnt)
{
	aBarOff[cnt] = new Image();
	aBarOff[cnt].src = "/images/pixel.gif";

	aBarOn[cnt] = new Image();
	aBarOn[cnt].src = "/images/header/barOn_0" + (cnt+1) + ".gif";
}

// Function to highlight current section in header
function highlightHeaderAt()
{
	if (SECTIONNUMBER == null) return;
	aBarOff[SECTIONNUMBER].src = "/images/header/barAt_0" + (SECTIONNUMBER+1) + ".gif";
	setHighlight(SECTIONNUMBER,false);
}

function setHighlight(iSection,bTurnOn)
{
	var oImage = document.getElementById("headerHighlight"+iSection);
	if (oImage) oImage.src = bTurnOn ? aBarOn[iSection].src : aBarOff[iSection].src;
}


// =================================== New Function for popup windows - for images =======================================
// This function opens a new window to display images
// iWidth				is the width of the window
// iHeight				is the height of the window
// strWindowTitle		is the title of the Window to be appended to school name
// strImageURL			is the URL of the image to load.
function createWindow(iWidth, iHeight, strImageURL)
{
	// First check if popup is previously open...
	if (bWINDOWOPEN)
	{
		// Popup window is already open
		if (oWindow)
		{
			// Close window
			oWindow.close();
		}

		// Reset flag
		bWINDOWOPEN = false;
	}

	oWindow = window.open("","image","channelmode=no,directories=no,fullscreen=no,toolbar=no,scrollbars=no,location=no,status=no,menubar=no,top=0,left=0,width=" + iWidth + ",height=" + iHeight);

	// Begin building window content
	var strDocument = "<html>";
	strDocument += "<head><link rel='stylesheet' href='/css/style.css' type='text/css'></head>";
	strDocument += "<body>";
	strDocument += "<div align='center' style='margin:10px;'>";
	strDocument += "<img src='" + strImageURL + "' alt='' border='0'><br><a href='javascript: window.close();'><b>Close</b></a>";
	strDocument += "</div>";
	strDocument += "</body></html>";

	// Write content in window
	oWindow.document.write(strDocument);

	// Activate window flag
	bWINDOWOPEN = true;
}
// =======================================================================================================================

//-->