/////////////////////////////////////////////////
//Detection du plug-in Macromedia Flash
/////////////////////////////////////////////////
IsFlash  = 0;
IsFlash3 = 0;
IsFlash4 = 0;
IsFlash5 = 0;
IsFlash6 = 0;
IsFlash7 = 0;
IsFlash8 = 0;

if (!IsMac)
  {
  document.writeln( '<' + 'SCRIPT LANGUAGE="VBScript">');
  document.writeln( 'Sub Test()');
  document.writeln( 'on error resume next');
  document.writeln( 'IsFlash3 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")))');
  document.writeln( 'IsFlash4 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))');
  document.writeln( 'IsFlash5 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))');
  document.writeln( 'IsFlash6 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))');
  document.writeln( 'IsFlash7 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7")))');
  document.writeln( 'IsFlash8 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8")))');
  document.writeln( 'IsFlash  = (IsFlash3 or IsFlash4 or IsFlash5 or IsFlash6 or IsFlash7 or IsFlash8)');
  document.writeln( 'End Sub');
  document.writeln( '<' + '/SCRIPT>');
  }

if (IsIEW&&!IsOpera) {Test();}

if ((IsNS||IsOpera||IsIE5M||IsSafM) && navigator.plugins)
  {  
  numPlugins = navigator.plugins.length;
  if (numPlugins > 0)
    {
    for (i = 0; i < numPlugins; i++)
       {
       plugin = navigator.plugins[i];
       IsFlashPlug=plugin.description.indexOf("Flash")==-1?0:1;
       if (IsFlashPlug)
         {
         IsFlash3=plugin.description.indexOf("Flash 3")==-1?0:1;
         IsFlash4=plugin.description.indexOf("Flash 4")==-1?0:1;
         IsFlash5=plugin.description.indexOf("Flash 5")==-1?0:1;
         IsFlash6=plugin.description.indexOf("Flash 6")==-1?0:1;
	 	 IsFlash7=plugin.description.indexOf("Flash 7")==-1?0:1;
	 	 IsFlash8=plugin.description.indexOf("Flash 8")==-1?0:1;
         numTypes = plugin.length;
         for (j = 0; j < numTypes; j++)
            {
            mimetype = plugin[j];
            if (mimetype)
              {
              if (mimetype.enabledPlugin && (mimetype.suffixes.indexOf("swf") != -1)) {IsFlash = 1;}
              if (navigator.mimeTypes["application/x-shockwave-flash"] == null) {IsFlash = 0;}
              }
            }
         }
       }
    }
  }

// alert de test

alertFlash  = "Resultat de la detection :\n\n"
alertFlash += "IsFlash : "+IsFlash+"\n";
alertFlash += "IsFlash3 : "+IsFlash3+"\n";
alertFlash += "IsFlash4 : "+IsFlash4+"\n";
alertFlash += "IsFlash5 : "+IsFlash5+"\n";
alertFlash += "IsFlash6 : "+IsFlash6+"\n";
alertFlash += "IsFlash7 : "+IsFlash7;
//alert (alertFlash);
