// detected flash version
var flashVersion = 0;

// Select menu item
function menuSel(obj)
{
	obj.style.backgroundColor = "#ffebce";
}

// Deselect menu item
function menuDesel(obj)
{
//	obj.style.backgroundColor = "#ffffff";
	obj.style.backgroundColor = "transparent";
}

// Close any open windows
function closeWindows()
{
//	if(msgwnd != 0) msgwnd.close();
//	msgwnd = 0;
}

// detectFlashVersion();
//		Try to determine if flash is installed, and what version.
function detectFlashVersion()
{
	var a, agent = navigator.userAgent.toLowerCase();
	
	// NS3+ and Opera3+: Check plugin array
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		var flashPlugin = navigator.plugins['Shockwave Flash'];
		if (typeof flashPlugin == 'object') {
			if (flashPlugin.description.indexOf('7.') != -1) flashVersion = 7;
			else if (flashPlugin.description.indexOf('6.') != -1) flashVersion = 6;
			else if (flashPlugin.description.indexOf('5.') != -1) flashVersion = 5;
			else if (flashPlugin.description.indexOf('4.') != -1) flashVersion = 4;
			else if (flashPlugin.description.indexOf('3.') != -1) flashVersion = 3;
		}
	}

	// IE4+ on Win32:  Try and create ActiveX object using VBScript
	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win") != -1 && agent.indexOf("16bit") == -1) {
		a =  '<scr' + 'ipt language="VBScript"\> \n';
		a += 'on error resume next \n';
		a += 'dim obFlash \n';
		a += 'set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.7") \n';
		a += 'if IsObject(obFlash) then \n';
		a += 'flashVersion = 7 \n';
		a += 'else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.6") end if \n';
		a += 'if IsObject(obFlash) then \n';
		a += 'flashVersion = 6 \n';
		a += 'else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.5") end if \n';
		a += 'if flashVersion < 6 and IsObject(obFlash) then \n';
		a += 'flashVersion = 5 \n';
		a += 'else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.4") end if \n';
		a += 'if flashVersion < 5 and IsObject(obFlash) then \n';
		a += 'flashVersion = 4 \n';
		a += 'else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.3") end if \n';
		a += 'if flashVersion < 4 and IsObject(obFlash) then \n';
		a += 'flashVersion = 3 \n';
		a += 'end if';
		a += '</scr' + 'ipt\> \n';
		document.write(a);
	}

	// WebTV 2.5 supports flash 3
	else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3;

	// older WebTV supports flash 2
	else if (agent.indexOf("webtv") != -1) flashVersion = 2;
}
