/*
creates the variable "intFlashCanPlay" which determines if flash is installed.
also creates the "intFlashVersion" variables which determines which version of flash we are requiring
*/

// declare variables
var intFlashVersion = 6;

// check browser mimetypes array for the flash plugin
var intPlugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

// if so
if ( intPlugin )
{
  // declare variables
  var varWords = navigator.plugins["Shockwave Flash"].description.split(" ");

  // loop through description
  for (var i = 0; i < varWords.length; ++i)
  {
    // if that didn't return a number, loop again
    if ( isNaN( parseInt(varWords[i]) ) )
      continue;

    // declare installed flash version number
    var intPluginVersion = varWords[i];
  }

  // determine if the correct version of flash is installed
  var intFlashCanPlay = intPluginVersion >= intFlashVersion;
}
else if (navigator.userAgent && intMSIE == 1 && (navigator.appVersion.indexOf("Win") != -1))
{
  // determine if flash is installed using vb script
  document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
  document.write('on error resume next \n');
  document.write('intFlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & intFlashVersion)))\n');
  document.write('</SCR' + 'IPT\> \n');
}