// JavaScript Document
if ((navigator.userAgent.indexOf('MSIE') != -1) && (navigator.userAgent.indexOf('Win') != -1)) {
  document.writeln('<script language="VBscript">');
  document.writeln('Function detectActiveXControl(activeXControlName)');
  document.writeln('  on error resume next');
  document.writeln('  detectActiveXControl = False');
  document.writeln('  detectActiveXControl = IsObject(CreateObject(activeXControlName))');
  document.writeln('End Function');
  document.writeln('</scr' + 'ipt>');
}
function getFlashVersion(){
  var installedVersion = 0;
  if ((navigator.userAgent.indexOf('MSIE') != -1) && (navigator.userAgent.indexOf('Win') != -1)) {
    for (var i=3; i<10; i++){
      if(detectActiveXControl("ShockwaveFlash.ShockwaveFlash."+i) == true) installedVersion = i;
    }
  } else {
    if (navigator.plugins["Shockwave Flash"]) {
      var pluginDesc = navigator.plugins["Shockwave Flash"].description;
      installedVersion = parseInt( pluginDesc.charAt( pluginDesc.indexOf(".")-1 ) );
    }
    if(navigator.userAgent.indexOf("WebTV") != -1) installedVersion = 3;  
  }
  return installedVersion;
}
