/** Llibreria per detectar el plugin de flash en el navegador, cal incloure detectflash.vbs per a IE **/

//IE variables
var MM_FlashControlInstalled;	// is the Flash ActiveX control installed?
var MM_FlashControlVersion;	// ActiveX control version if installed

function detectFlash(){
	this.installed = 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;
   	}
}
