<!-- // detection script lib

	var FlashVer = 0;
	var ShockWaveVer = 0;
	
function FlashShockwaveDetection() {  
//***************************
// A few variables to help figure out what platform we're on

var ie  = (navigator.appName.toLowerCase().indexOf("microsoft") != -1);
var ns  = (navigator.appName.toLowerCase().indexOf("netscape") != -1);
var win = (navigator.platform.toLowerCase().indexOf("win") != -1);
var mac = (navigator.platform.toLowerCase().indexOf("mac") != -1);
var browserVer = parseFloat(ie ? navigator.appVersion.substring(navigator.appVersion.toLowerCase().indexOf("msie") + 4) : navigator.appVersion);

	//alert (" ie ?: " + ie);
	//alert (" win ? :  " + win);
	
  if (ie && win) { // Use the active control parts
 		FlashVer = FlashDetectAxVer(); 	// Flash part detection 
		ShockWaveVer = shockwaveDetectAxVer(); 	// Shockwave detection.
  } else { //Netscape version  
		FlashVer = detectFlash(); 	// Flash part detection  
		ShockWaveVer = shockwaveDetectNsVer(); 	// Shockwave detection.  
  }
}

function detectFlash(){	
var flash2Installed = false;		// boolean. true if flash 2 is installed
var flash3Installed = false;		// boolean. true if flash 3 is installed
var flash4Installed = false;		// boolean. true if flash 4 is installed
var flash5Installed = false;		// boolean. true if flash 5 is installed
var flash6Installed = false;		// boolean. true if flash 6 is installed
var flash7Installed = false;		// boolean. true if flash 7 is installed
var flash8Installed = false;		// boolean. true if flash 8 is installed
var flash9Installed = false;		// boolean. true if flash 9 is installed
var flash10Installed = false;		// boolean. true if flash 10 is installed
var maxVersion = 10;			// highest version we can actually detect
var actualVersion = 0;			// version the user really has
var hasRightVersion = false;		// boolean. true if it's safe to embed the flash movie in the page
var jsVersion = 1.0;				// the version of javascript supported

	if (navigator.plugins){						// does navigator.plugins exist?
		if (navigator.plugins["Shockwave Flash 2.0"] 	// yes>> then is Flash 2 
		|| navigator.plugins["Shockwave Flash"]){		// or flash 3+ installed?
			var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
			// var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
			var flashVersion = parseInt(flashDescription.substring(flashDescription.indexOf("Flash")+6, flashDescription.indexOf(".")));

			// we know the version, now set appropriate version flags
			flash2Installed = flashVersion == 2;		
			flash3Installed = flashVersion == 3;
			flash4Installed = flashVersion == 4;
			flash5Installed = flashVersion == 5;
			flash6Installed = flashVersion == 6;
			flash7Installed = flashVersion == 7;
			flash8Installed = flashVersion == 8;
			flash9Installed = flashVersion == 9;
			flash10Installed = flashVersion == 10;
		}
	}
	
	// loop through all versions we're checking, and set actualVersion to highest detected version
	for (var i = 2; i <= maxVersion; i++) {	
		if (eval("flash" + i + "Installed") == true) actualVersion = i;
	}

	if(navigator.userAgent.indexOf("WebTV") != -1) actualVersion = 2;	
	return (actualVersion);
}

function shockwaveDetectAxVer(reqVer) {
  // this function should only be called from Internet Explorer for Windows
    for (i=10;i>0;i--) {
      versionString = VBGetShockwaveVer(i);
      if (versionString != "0.0") {
        // if we get 1.0 we assume it is actually 6.0
        versionNum = (versionString == "1.0" ? 6.0 : parseFloat(versionString))
        return (reqVer ? versionNum >= reqVer : versionNum);
      }
    }
  return (reqVer ? false : 0.0);
}

function FlashDetectAxVer() {
  // this function should only be called from Internet Explorer for Windows
	var versionString = 0.0;
    for (i=10;i>0;i--) {
      versionString = VBGetFlashVer(i);
      if (versionString != "0.0") {
        return versionString;
      }
    }
  return versionString;
}

function shockwaveDetectNsVer()
{
   // Set local variables to avoid crashing bug
   var thearray = navigator.plugins;
   var arraylength = thearray.length;

   for (i=0; i < arraylength; i++)
   {
      theplugin = thearray[i];            // Retrieve the plugin
      thename   = theplugin.name;         // Get the plugin name
      thedesc   = theplugin.description;  // Get the plugin description
      if (thedesc.indexOf("Shockwave") != -1 && thedesc.indexOf("Director") != -1)
      { 
         versionString = thedesc.substring(thedesc.indexOf("version ") + 10); 
         majorVersion = parseInt(versionString);
         return majorVersion;
      } 
   } 
   return 0;
}

function canDetectShockwave()
{
  // Determine the browser (IE or Netscape) using navigator.appName
  var ie = (navigator.appName.toLowerCase().indexOf("microsoft") != -1);
  var ns = (navigator.appName.toLowerCase().indexOf("netscape") != -1);

  // Determine the platform using navigator.platform
  var win = (navigator.platform.toLowerCase().indexOf("win") != -1);
  var mac = (navigator.platform.toLowerCase().indexOf("mac") != -1);

  // Determine the browser version
  var browserVer = parseFloat(ie ?
                     navigator.appVersion.substring(navigator.appVersion.toLowerCase().indexOf("msie") + 4) :
                     navigator.appVersion);

  // Return the appropriate value based on the browser, version and platform
  if (ie && win) return (browserVer >= 4.0) // Works in Windows IE 4.0 and better
  if (ie && mac) return (browserVer >= 5.0) // Works in Mac IE 5.0 and better 
  if (ns)        return (browserVer >= 3.0) // Works in Netscape 3.0 and better

  // If none of the above conditions matched, the browser is
  // unknown and likely doesn't support detection
  return false;
}
//-->

