var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the FSCommand messages in a Flash movie.
function officelocator_DoFSCommand(command, args) {
	var officelocatorObj = isInternetExplorer ? document.all.officelocator : document.officelocator;
	document.getElementById("message").innerHTML = "Clicked on xml node with id "+args+".";
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub officelocator_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call officelocator_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

function checkFlash() {
	var flashinstalled = 0;
	var flashversion = 0;
	var MSDetect = "false";
	if (navigator.plugins && navigator.plugins.length)
	{
		x = navigator.plugins["Shockwave Flash"];
		if (x)
		{
			flashinstalled = 2;
			if (x.description)
			{
				y = x.description;
				flashversion = y.charAt(y.indexOf('.')-1);
			}
		}
		else
			flashinstalled = 1;
		if (navigator.plugins["Shockwave Flash 2.0"])
		{
			flashinstalled = 2;
			flashversion = 2;
		}
	}
	else if (navigator.mimeTypes && navigator.mimeTypes.length)
	{
		x = navigator.mimeTypes['application/x-shockwave-flash'];
		if (x && x.enabledPlugin)
			flashinstalled = 2;
		else
			flashinstalled = 1;
	}
	else //if(navigator.appName == "Microsoft Internet Explorer")
	{
		for(var i=7; i>0; i--){
			try{
				var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
				flashversion = i;
				flashinstalled = i;
				return;
			}
			catch(e){
			}
		}
	}
	
	if (flashinstalled>1) MSDetect="true";
	
	return MSDetect;
}
