 lngContentWidth					= 656;
 lngHeaderHeight				= 245;
 lngMiddleHeight					= 380;
 lngFooterHeight					= 85;
 lngPaddingTopHeight		= 7;
 lngPaddingBottomHeight	= 25;
 lngCellPadding					= 5;

function BodyLoaded()
{
} 

function LoadMenuItem(in_strMenuItemId)
{
	switch (in_strMenuItemId)
	{
		case 'mnuList_HOM':				LoadPage('Home',				'Home.asp'); break;
		case 'mnuList_RES':				LoadPage('TrainingResources',	'res_Overview.asp'); break;
		case 'mnuList_RKS':				LoadPage('RecordKeeping',		'rks_Overview.asp'); break;
//		case 'mnuList_OLS':				LoadPage('OnlineLearning',		'http://cbt.eclipsetrainingsolutions.com/olc/ro_MainPage.asp'); break;
		case 'mnuList_DEM':				LoadPage('Demos',				'dem_Overview.asp'); break;
		case 'mnuList_AUS':				LoadPage('AboutUs',				'aus_AboutUs.asp'); break;
		case 'mnuList_SUP':				LoadPage('Support',				'sup_TechnicalSupport.asp'); break;
		case 'mnuList_DOW':				LoadPage('Downloads',			'Downloads.asp'); break;
		case 'mnuList_CON':				LoadPage('ContactUs',			'con_ContactUs.asp'); break;
	}
}

function LoadMenuSubItem(in_strMenuItemId)
{
	switch (in_strMenuItemId)
	{

		case 'subListTR_OV': 			LoadPage('TrainingResources', 'tr_Overview.asp'); break;
		case 'subListTR_ST': 			LoadPage('TrainingResources', 'SafetyCompliance.asp'); break;
		case 'subListTR_JS': 			LoadPage('TrainingResources', 'JobSpecific.asp'); break;
		case 'subListTR_VO': 			LoadPage('TrainingResources', 'VisitorOrientation.asp'); break;
		case 'subListTR_GK': 			LoadPage('TrainingResources', 'GeneralKnowledge.asp'); break;
		case 'subListTR_DM': 			LoadPage('TrainingResources', 'DeliveryMethods.asp'); break;
		case 'subListTR_OL': 			LoadPage('TrainingResources', 'OnlineLearning.asp'); break;

		case 'subListSU_KB': 			LoadPage('Support', 'FAQ.asp'); break;
		case 'subListSU_TA': 			LoadPage('Support', 'sup_TechnicalAssistance.asp'); break;

		case 'subListTS_DL': 			LoadPage('Downloads', 'Downloads.asp'); break;

	}
}

/******************************************************************************
	Generic Display toggle functions:
		ContentToggleDisplayObject
		HideDisplayObject
		ShowDisplayObject
		*********************************************/

function ContentToggleDisplayObject(in_strObjectId)
{
	objBody = document.getElementById(in_strObjectId);
	if(objBody)
	{
		if(objBody.style.visibility=='visible')
			HideDisplayObject(objBody);
		else
			ShowDisplayObject(objBody);
	}
}

function ContentHideDisplayObject(in_strObjectId)
{
	objBody = document.getElementById(in_strObjectId);
	if(objBody) HideDisplayObject(objBody);
}

function ContentShowDisplayObject(in_strObjectId)
{
	objBody = document.getElementById(in_strObjectId);
	if(objBody) ShowDisplayObject(objBody);
}

function HideDisplayObject(in_objObject)
{
	in_objObject.style.visibility='hidden';
	in_objObject.style.display='none';
}

function ShowDisplayObject(in_objObject)
{
	in_objObject.style.visibility='visible';
	in_objObject.style.display='block';
}


/****************************************************************************************
	Menu Top Level:

		ShowMenuSubList (strID) triggers on the Click event - opens or closes the current
			item; makes sure all other list items are closed if the current item is opened

		HideMenuSubList (strID) assists ShowMenuSubList

		SelectMenuItem (strID) triggers on MouseOver event. Hilites the item, and changes
			the cursor to hand.

		UnselectMenuItem (strID) triggers on MouseOut event. Un-hilites and restores cursor

		LoadMenuItem (strID) handles all top level Menu items which go somewhere (ie Home)

***************************************************************************************/

function ShowMenuSubList(in_strSubListId)
{
	objMenuSubList = document.getElementById(in_strSubListId);
	if (objMenuSubList)
	{
		if (objMenuSubList.style.visibility=='visible')
		{
			HideMenuSubList(in_strSubListId);
		} else {
//			if (in_strSubListId!='subListTR') HideMenuSubList('subListTR');
//			if (in_strSubListId!='subListSU') HideMenuSubList('subListSU');
//			if (in_strSubListId!='subListCU') HideMenuSubList('subListCU');
//			objMenuSubList.style.visibility='visible';
//			objMenuSubList.style.display='block';
		}
	} else ;
}

function HideMenuSubList(in_strSubListId)
{
	objMenuSubList = document.getElementById(in_strSubListId);
	if (objMenuSubList)
	{
		objMenuSubList.style.visibility='hidden';
		objMenuSubList.style.display='none';
	} else ;
}

function SelectMenuItem(in_strMenuItemId)
{
//	HiliteItem(in_strMenuItemId);
}

function UnselectMenuItem(in_strMenuItemId)
{
//	RestoreItem(in_strMenuItemId);
}	


/******************************************************************************
	Menu Sub Lists:

		SelectMenuSubItem (strID) triggers on MouseOver event. Hilites the item
			and changes the cursor to hand	
		UnselectMenuSubItem (strID) triggers on MouseOut event. 
			Un-hilites the item, and restores the cursor.
		LoadMenuSubItem (strID) handles all go events for the Menu Sub
			Lists - case statement that loads new pages

*******************************************************************************/

function SelectMenuSubItem(in_strSubItemId)
{
	HiliteItem(in_strSubItemId);
}

function UnselectMenuSubItem(in_strSubItemId)
{
	RestoreItem(in_strSubItemId);
}

function LoadPage(in_strSubDirectory, in_strPageName)
{
	if (in_strSubDirectory=='')
		var strURL = '../' + in_strPageName;
	else
		var strURL = '../' + in_strSubDirectory + '/' + in_strPageName;

//	strURL+='#a';
//	strURL+='#top';
	window.location.href = strURL;
//	alert(strURL);

}

function LoadContent(in_strSubDirectory, in_strPageName)
{
	strURL = '../content/' + in_strSubDirectory + '/' + in_strPageName; 
	fraContent.location.href  = strURL;
}

/******************************************************************************
	Helper Functions: HiliteItem, RestoreItem

******************************************************************************/

function HiliteItem(in_strItemId)
{
//	window.document.documentElement.style.cursor = "hand"
	objItem = document.getElementById(in_strItemId);
	if (objItem)
		objItem.style.fontWeight='bold';
}

function RestoreItem(in_strItemId)
{
//	window.document.documentElement.style.cursor = "auto"
	objItem = document.getElementById(in_strItemId);
	if (objItem)
		objItem.style.fontWeight='normal';
}

/*function OpenCBTPopup(in_strPopupHRef)
{
	window.open(in_strPopupHRef, '', 'directories=no,width=640,height=462');
}
*/

function OpenNewWindow(in_strPageType, in_strHRef)
{
	switch (in_strPageType)	{

		case 'infopopup' :
			strWindowProperties = 'directories=no,width=640,height=250,top=100';
			break;

		case 'cbtpopup' :
			strWindowProperties = 'directories=no,width=640,height=462';
			break;

		case 'whitepaper' :
			strWindowProperties = 'directories=no,width=640,height=680,scrollbars=yes';
			break;

		case 'intrac' :
			strWindowProperties = 'directories=no,width=800,height=500,scrollbars=no';
			break;
	
		case 'contactpopup' :
			strWindowProperties = 'directories=no,width=468,height=500,scrollbars=no,resize=no';
			break;

		default :
			strWindowProperties = '';
	}

	window.open(in_strHRef, '', strWindowProperties);
}

function OpenContactPopup(in_varID)
{
	OpenNewWindow('contactpopup', '../ContactUs/ContactPopup.asp?ID=' + in_varID);
}

function ShowCourse(in_strCourseCode)
{
	window.location.href = '../OLC/ResourcePage.asp?RKC=' + in_strCourseCode;
}