var FlashActiveX;
var FlashActiveXVersion;

function FlashOK( version )
{
  if (navigator.plugins && navigator.plugins.length > 0)
  {
 	  if (navigator.plugins["Shockwave Flash"])
    {
      var words = navigator.plugins["Shockwave Flash"].description.split(" ");

    	for (var i = 0; i < words.length; ++i)
  	  {
        if (isNaN(parseInt(words[i])))
       		continue;
  
     		if ( parseInt(words[i]) >= version )
     		{
     		  return true;
     		}
      }
    }
  }
  else if ( FlashActiveX != null)
  {
    if ( FlashActiveX )
    {
      return FlashActiveXVersion >= version;
    }
  }

  return false;
}


if ( navigator.userAgent.indexOf("MSIE") != -1 )
{
  if ( ! ( ( navigator.appVersion.indexOf("Mac") != -1 ) && ( parseInt(navigator.appVersion) == 3) ) )
  {
    document.writeln('<script language="VBScript">');
    document.writeln('Private i, x');

    document.writeln('On Error Resume Next');

    document.writeln('FlashActiveX = False');
    document.writeln('FlashActiveXVersion = 0');

    document.writeln('For i = 10 To 2 Step -1');
       
    document.writeln('  Set x = CreateObject("ShockwaveFlash.ShockwaveFlash." & i)');
  
    document.writeln('  If IsObject(x) Then');
    document.writeln('    FlashActiveX = True');
    document.writeln('    FlashActiveXVersion = i');
    document.writeln('    Exit For');
    document.writeln('  End If');

    document.writeln('Next');

    document.write('</scr');
    document.writeln('ipt>');

  }
}

function FlashEmbed()
{
  document.write( '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="970" height="800" id="main" align="middle">' );
  document.write( '<param name="allowScriptAccess" value="sameDomain" />' );
  document.write( '<param name="allowFullScreen" value="false" />' );
  document.write( '<param name="movie" value="main.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />	<embed src="main.swf" quality="high" bgcolor="#ffffff" width="970" height="800" name="main" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' );
  document.write( '</object>' );
}
