// is the Flash ActiveX control installed?
var MM_FlashControlInstalled; 
// ActiveX control version if installed
var MM_FlashControlVersion;	

function getFlashInfo() {

    var implementation = false;
    var autoInstallable = false;   
    var installed = false;
    var version = false;
    var revision = false;
    
    if (navigator.plugins && navigator.plugins.length > 0) {   
        this.implementation = "Plug-in";
	    this.autoInstallable = false;	// until Netscape SmartUpdate supported

        // Check whether the plug-in is installed:
	    if (navigator.plugins["Shockwave Flash"]) {
	        this.installed = true;
            
  	        // Get the plug-in version and revision:
	        var words =
		    navigator.plugins["Shockwave Flash"].description.split(" ");

	        for (var i = 0; i < words.length; ++i) {
		        if (isNaN(parseInt(words[i])))
		        continue;
		        this.version = words[i];
        	    this.revision = parseInt(words[i + 1].substring(1));
	        }
	    }
    } else if (MM_FlashControlInstalled != null) {
	    this.implementation = "ActiveX control";
	    this.installed = MM_FlashControlInstalled;
	    this.version = MM_FlashControlVersion;
	    this.autoInstallable = true;
    } else if (MM_FlashDetectedSelf()) {
	    this.installed = true;
	    this.implementation = "Plug-in";
	    this.autoInstallable = false;
    }

    this.p1 = "flash";
    this.p2 = this.implementation;
    this.p3 = this.autoInstallable;   
    this.p4 = this.installed;
    this.p5 = this.version;
    this.p6 = this.revision;
	
}

/*
 MM_FlashDetectedSelf() -- recall whether Flash Player has detected itself
 Synopsis:    MM_FlashDetectedSelf()
 Returns:     true if a cookie signifying that Flash Player has detected itself
              is set; false otherwise.
 Description: This function is only meant to be called internally.
 */

function MM_FlashDetectedSelf() {
    return (document.cookie.indexOf("MM_FlashDetectedSelf") != -1);
}

