// <SCRIPT LANGUAGE="Javascript" RUNAT="Client">
// -()---------------------------------------------------------------------------------------------
//
// Document: framesetHandler.js
//
//  Purpose: Ensures that page is being loaded in the context of its frameset
//
//  History: 2002-05-27 GAS - Created
//
// -)(---------------------------------------------------------------------------------------------

// -<>- Globals -----------------------------------------------------------------------------------

// -[]- Public Functions --------------------------------------------------------------------------

// -<>---------------------------------------------------------------------------------------------
//     Name: onLoadHandler
//  Purpose: generic onloadhandler - ensures a frameset is loaded in the context of its frameset
//  History: 2002/07/31 GAS (created)
// -><---------------------------------------------------------------------------------------------

function onLoadHandler(pstrMenu)
{
	// Ensure that page is being loaded in the context of its frameset (e.g. if the page is being 
	// loaded via a bookmark or loaded directly) - check whether parent frame is the expected
	// fraContent frame
	if (!window.parent)
		displayFramesetContainer();

	if (window.name != 'fraContent')
		displayFramesetContainer();
	
	// set focus to the content frame for the purposes of printing
	parent.frames['fraContent'].focus();
}

function displayFramesetContainer()
{
	var strContent = window.location.pathname;
	window.location = '/content/default.asp?Content=' + strContent;
}

function getTodaysDate()
{
	var
		datNow = new Date(),
		intDay = datNow.getDate(),
		intMonth = datNow.getMonth() + 1,
		strDay = new String(intDay),
		strMonth = new String(intMonth),
		strYear = datNow.getFullYear(),
		strDate;

	if(strMonth.length == 1)
		strMonth = '0' + strMonth;
		
	if(strDay.length == 1)
		strDay = '0' + strDay;

	strDate = strDay + '/' + strMonth + '/' + strYear;

	return strDate
}



// -------------------------------------------------------------------------------------------
// </SCRIPT>