/*******************************************************************************
*
*	Project		:	DBS Web Site Library
*
*	File		:	Site_Lib.js
*
*	Copyright	:	Data Broadcast Services Pty Ltd (DBS)
*					All rights reserved.
*
*	Purpose		:	Provide a library of functions specific to site.
*
*					Each function may require a different version of JavaScript
*					in order to function correctly.  As a rule, these are
*					minimum versions.  These functions should be checked against 
*					any major release for deprecated / changed behaviour.
*
*					Highest version required:	JavaScript	1.1
*
*	Functions	:	
*					LoadGraphics(xi_RootPath)
*
*	Version		:	A.0.1	12-Jul-2006
*
*	History		:	A.0.1	12-Jul-2006
*							JAF
*							Created from scratch.
*
*******************************************************************************/


/*******************************************************************************
Globals
*******************************************************************************/
// This should be empty.  If not, find another way & make it empty


/*******************************************************************************
Functions
*******************************************************************************/
function Site_Lib_included()
{
	alert("Site_Lib Included");
}


/*******************************************************************************
*
*	Function	:	LoadGraphics()
*
*	Purpose		:	For inline call prior to page display to load all page
*					structure graphics (as opposed to images)to ensure complete
*					display of page outline.
*
*	Parameters	:	xi_RootPath	Path from given page to site root directory
*
*	Returns		:	N/A
*
*	JavaScript	:	1.1
*
*	Assumptions	:	
*
*	To Do List	:	
*
*******************************************************************************/
function LoadGraphics(xi_RootPath)
{
	PreloadImages(	xi_RootPath+'graphics/BarMiddle.gif',
					xi_RootPath+'graphics/bgndfade20050907.jpg',
					xi_RootPath+'graphics/blackBar.gif',
					xi_RootPath+'graphics/btm_bck.gif',
					xi_RootPath+'graphics/btm_lft.gif',
					xi_RootPath+'graphics/btm_ln_lft.gif',
					xi_RootPath+'graphics/btm_ln_mid.gif',
					xi_RootPath+'graphics/btm_ln_rght.gif',
					xi_RootPath+'graphics/btm_rght.gif',
					xi_RootPath+'graphics/LeftTop.gif',
					xi_RootPath+'graphics/LeftTopLower.gif',
					xi_RootPath+'graphics/nav_spacer.gif',
					xi_RootPath+'graphics/top_rght.gif',
					xi_RootPath+'graphics/top_shdw_left.gif',
					xi_RootPath+'graphics/top_shdw_mid.gif',
					xi_RootPath+'graphics/top_shdw_rght.gif',
					xi_RootPath+'images/WebLogoModified2.jpg'
					);
	PreloadImages(	xi_RootPath+'images/menus/Menu1.gif',
					xi_RootPath+'images/menus/Menu2.gif',
					xi_RootPath+'images/menus/Menu3.gif',
					xi_RootPath+'images/menus/Menu4.gif',
					xi_RootPath+'images/menus/Menu5.gif'
					);
	return;
}

function Site_OnLoad(xi_RootPath)
{

	PreloadImages(	xi_RootPath+'images/menus/Menu1Over.gif',
					xi_RootPath+'images/menus/Menu2Over.gif',
					xi_RootPath+'images/menus/Menu2Sub1.gif',
					xi_RootPath+'images/menus/Menu2Sub1Over.gif',
					xi_RootPath+'images/menus/Menu2Sub2.gif',
					xi_RootPath+'images/menus/Menu2Sub2Over.gif',
					xi_RootPath+'images/menus/Menu2Sub3.gif',
					xi_RootPath+'images/menus/Menu2Sub3Over.gif',
					xi_RootPath+'images/menus/Menu2Sub4.gif',
					xi_RootPath+'images/menus/Menu2Sub4Over.gif',
					xi_RootPath+'images/menus/Menu3Over.gif',
					xi_RootPath+'images/menus/Menu4Over.gif',
					xi_RootPath+'images/menus/Menu5Over.gif',
					xi_RootPath+'images/menus/Menu5Sub1.gif',
					xi_RootPath+'images/menus/Menu5Sub1Over.gif',
					xi_RootPath+'images/menus/Menu5Sub2.gif',
					xi_RootPath+'images/menus/Menu5Sub2Over.gif',
					xi_RootPath+'images/menus/Menu5Sub3.gif',
					xi_RootPath+'images/menus/Menu5Sub3Over.gif'
					);

	return false;

}

function ClickTop(xiTBody)
{
	var L_tbody;

	L_tbody=MenuTable.tBodies;

	// Hide the current tbodies
	for ( i =0; i < L_tbody.length; i++ )
	{
		if (L_tbody.item(i).id)
			L_tbody.item(i).style.display='none';		
	}
		
	// Get the current TBody and make it visible
	if (xiTBody)
		L_tbody=document.getElementById(xiTBody).style.display="";
}


