// =========================================================================
// RUN ALL SCRIPTS - CHANGE LOG (most recent first)
// =========================================================================
//
// -------------------------------------------------------------------------
//
// 29 Sep 2009.	 Undo below - call now made inline in HTML.
// 23 Sep 2009.	 Modified entry for Hierarchy Viewer, so will maximise on
//		 page load if viewer already in maximised mode.
// 02 Sep 2009.	 Added entry for Hierarchy Viewer.
// 19 Jan 2009.	 Cross tab line now makes single call to CT_init() only. 
// 05 Jan 2009.	 Changed function calls for cross tabs, to support new
//		 scrolly cross tabs with fixed headers.
// 18 Jun 2008.  Added hide/show script (export page).
// 23 Oct 2007.  Added email replace.
// 27 Sep 2007.  Added 'please wait'.
// 19 Sep 2007.  First versioned version.
//
// -------------------------------------------------------------------------

// NOTE: this should be called with defer="defer"
// This ensures in IE it will run AFTER dom is loaded, but BEFORE images

if ( BD_script_loaded ) {

	if ( BrowserDetect.OS == 'Windows' && BrowserDetect.browser == 'Explorer' ) {

		// If Win IE, run the scripts immediately		
		if ( GM_script_loaded && GM_run_this ) { GM_initialise() };
		if ( TM_script_loaded && TM_run_this ) { TM_init_tabs() };
		if ( PW_script_loaded && PW_run_this ) { PW_hide() };
		if ( CT_script_loaded && CT_run_this ) { CT_init() };
		if ( EM_script_loaded && EM_run_this ) { EM_replace() };
		if ( HS_script_loaded && HS_run_this ) { }; // do nothing
		if ( HV_script_loaded && HV_run_this ) { HV_focus_node() }
	}
	else {

		// For other browsers, trigger on window.onload		

		window.onload = function() {
			if ( GM_script_loaded && GM_run_this ) { GM_initialise() };
			if ( TM_script_loaded && TM_run_this ) { TM_init_tabs() };
			if ( PW_script_loaded && PW_run_this ) { PW_hide() };
			if ( CT_script_loaded && CT_run_this ) { CT_init() };
			if ( EM_script_loaded && EM_run_this ) { EM_replace() };
			if ( HS_script_loaded && HS_run_this ) { }; // do nothing
			if ( HV_script_loaded && HV_run_this ) { HV_focus_node() }
		}
	}
}