// JavaScript Document
<!--
 
//make flashdetect and flashversion 0 
//because we don't yet know if Flash is installed and which version it is.
//make MSDetect false. If we need the VBScript, it will be set to true.
var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";

//Detect if navigator.plugins exists and, if it exists:
//if its length is larger than zero. 
if (navigator.plugins && navigator.plugins.length){
	//find the plugin Shockwave Flash
	x = navigator.plugins["Shockwave Flash"];
	//If it exists
	if (x){
		//set flashinstalled to 2
		flashinstalled = 2;
		//see if the plugin object has a property description
        if (x.description){
			//If it's supported, we extract the Flash version from it. 
			//The description is always something like Flash 4.0 r47. 
			//Therefore we take the number before the dot and put it in flashversion.
			y = x.description;
			flashversion = y.charAt(y.indexOf('.')-1);
        }
    }

	//If navigator.plugins["Shockwave Flash"] does not exist, 
	//Flash is probably not installed. set flashinstalled to 1.
	else
		flashinstalled = 1;
		//a special case: 
		//Flash 2 has a special plugin name Shockwave Flash 2.0. 
		//If this plugin is present, set the variables to Flash 2 detected:
		if (navigator.plugins["Shockwave Flash 2.0"]){
			flashinstalled = 2;
			flashversion = 2;
		}
}


//If the plugins array is not supported, 
//see if the browser supports navigator.mimeTypes. 
//Again check the length for Explorer's sake.              
else if (navigator.mimeTypes && navigator.mimeTypes.length){

//see if navigator.mimeTypes['application/x-shockwave-flash'] exists, 
//that is if this MIME type can be handled by the browser. 
//If it can, we check its property .enabledPlugin, 
//which is true if the plugin is actually installed
//If it is, set flashinstalled to 2, if it isn't we set it to 1. 
//Unfortunately, navigator.mimeTypes doesn't tell which version is installed.
	x = navigator.mimeTypes['application/x-shockwave-flash'];
	if (x && x.enabledPlugin)
		flashinstalled = 2;
	else
		flashinstalled = 1;
}


//If neither array is supported,
//make MSDetect true so that the VBScript will be executed. 
//of course this doesn't help Netscape 2, Konqueror and Explorer 3 and 4 on Mac a bit, 
//since they don't support VBScript. Too Bad.
else
	MSDetect = "true";
 
// -->