<!--
//=============================================================================
// Main - The script can be customised by inserting code after DetectBrowser().

DetectBrowser();	// Calls DetectBrowser functo find out the client's browser type


//=============================================================================
// Web Browser Detection Function

// Detects the client's browser type and sets the appropriate type
function DetectBrowser()
{
	// Opus Flex supports three browser types.
	// One of the following variables will contain TRUE if the
	// detected browser type is Internet Explorer, Netscape 4, or Netscape 6.
	IE = false;				// Internet Explorer
	NS4 = false;			// Netscape 4 or below
	NS6 = false;			// Netscape 6 or above
	UNKNOWN = false;		// Unrecognised browser type

	// Detect the client's browser type and set the appropriate variable.
	if (document.all) {
		IE = true;			// Set the browser type to Internet Explorer
	} else if (document.layers) {
		NS4 = true;			// Set the browser type to Netscape 4
	} else if (document.getElementById) {
		NS6 = true;			// Set the browser type to Netscape 6
	} else {
		UNKNOWN = true;		// Set the browser type to unknown type
	}

	// Platform type used for ActiveX events.
	// Contains TRUE if the client is running any 32 bit Windows operating system.
	WIN = false;			// Windows operating system

	// Detect the client's platform type.
	if (navigator.userAgent.indexOf("Windows") != -1 &&	navigator.userAgent.indexOf("Windows 3.1") == -1) {
		WIN = true;
	}
}

//=============================================================================
//  Focus Flash Movie

// Sets focus to the flash movie object.
function FocusFlashMovie()
{
	if (IE) {
		window.Banner_rsm.focus();
	} else if (NS4 || NS6) {
		window.document.Banner_rsm.focus();
	}
}

//=============================================================================
// FSCommand Handling Functions

// FSCommand allows the Flash movie to interact
// with its host environment (a web browser). Opus Flex requires these functions
// to complement Illuminatus's suite of functionality.

// Handle all the the FSCommand messages in a Flash movie. Called from the VBScript.
function Banner_rsm_DoFSCommand(command, args)
{
	// IE and Navgiator have slightly different document object models
	// IE treats objects as members of "window" while in Navigator,
	// embedded objects are members of "window.document"
	// The following _obj variable can be used to call Flash's internal methods.
	var Banner_rsm_obj = IE ? Banner_rsm : window.document.Banner_rsm;

	if (command == "ExitPublication") {
		window.close();
	}
}

// When the Flash plugin is used under IE and Win32, a VBEvent is fired.
// To trap the VBEvent, the following VBScript code is used. The VBScript then
// explicitly calls _DoFSCommand JavaScript function to handle FSCommand.
// Note: FSCommand is handled under Netscape's LiveConnect technology. Netscape 6
// does not implement LiveConnect, therefore does not support Flash's FSCommand.
if (IE && WIN) {
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('Sub Banner_rsm_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call Banner_rsm_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}
//-->
