  
	var latestFlashVersion = 8; 
	var oPlugin = new Object();
	oPlugin.ActiveXDetected      = false;
	oPlugin.FlashDetected        = false;
	oPlugin.FlashVersion         = 0;
	oPlugin.AuthorwareDetected   = false;
	oPlugin.RealDetected         = false;
	oPlugin.MediaPlayerDetected  = false;
	oPlugin.MediaPlayerVersion   = 0;
	oPlugin.QuickTimeDetected    = false;
	oPlugin.QuickTimeVersion     = 0;
	oPlugin.AcrobatDetected      = false;
	oPlugin.AcrobatVersion       = 0;
	oPlugin.CookiesDetected      = false;
	oPlugin.JavaDetected         = false;
	oPlugin.VBScriptDetected     = false;
	

	
  //-------------------------------------------------------------------------
	// DETECT ALL PLUGINS
	function fncDetectPlugins() {
	  if (oBrowser.isNav7 || oBrowser.isGecko || oBrowser.isIE5Up || oBrowser.isOpera || oBrowser.isSafari) {
		fncDetectPluginActiveX();
      fncDetectPluginFlash();
      fncDetectPluginAuthorware();
      fncDetectPluginReal(); 		
      fncDetectPluginMediaPlayer();
      fncDetectPluginQuickTime();
      fncDetectPluginAcrobat(); 
      fncDetectCookies();
      fncDetectJava();	  
      fncDetectVBScript();
    }
	}
	
	
	
  //-------------------------------------------------------------------------
	// DETECT ACTIVEX
	function fncDetectPluginActiveX() {
    if (window.ActiveXObject) {
      oPlugin.ActiveXDetected = true;
    }
    else if (navigator.plugins && navigator.plugins.length) {
      // Gecko provides an ActiveX plugin
      for (var x=0; x < navigator.plugins.length; x++) {
        if (navigator.plugins[x].name.indexOf('ActiveX') != -1 && window.GeckoActiveXObject) {
          oPlugin.ActiveXDetected = true;
          break;
        }
      }
    } 
	}
	
	function fncBuildActiveXControl(strProgID) {
		var oActiveXControl = null;
		if (oPlugin.ActiveXDetected) { 
      if (oBrowser.isGecko) {
        try {
          oActiveXControl = new GeckoActiveXObject(strProgID); 
        }
        catch (e) {}
      }
      else if(oBrowser.isIE) {
        try {
          oActiveXControl = new ActiveXObject(strProgID); 
        }
        catch (e) {}
      }
		}
		return oActiveXControl;
	}
	
	
	//-------------------------------------------------------------------------
	// DETECT VBSCRIPT
	function fncDetectVBScript() {		
	  // Requires detectVBScript.vbs script loaded in <HEAD> of parent document    
	  if (typeof(blnVBScriptLoaded) != "undefined") {
	    if (blnVBScriptLoaded) {
	      oPlugin.VBScriptDetected = true;
	    }
	  }
	}
	
	
  //-------------------------------------------------------------------------
	// DETECT REAL
	function fncDetectPluginReal() {
	  if (oPlugin.ActiveXDetected) { 
      var astrRealProgIDs = new Array("RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)", "rmocx.RealPlayer G2 Control", "RealVideo.RealVideo(tm) ActiveX Control (32-bit)");
      for (var i=0; i<=astrRealProgIDs.length-1; i++) {
        for (var x=10; x>=1; x-=1) { 
          x = parseFloat(x); 
  		    var oTmpPlugin = fncBuildActiveXControl(astrRealProgIDs[i] + '.'+x);
          if (oTmpPlugin) { 
            oPlugin.RealDetected = true; 
            break;
          } 
        }       
      }
	  }
	  if (navigator.plugins && navigator.plugins.length && !oPlugin.RealDetected) { 
      for (x=0; x<navigator.plugins.length; x++) { 
        if (navigator.plugins[x].name.indexOf('RealPlayer') != -1) { 
          oPlugin.RealDetected = true; 
          break; 
        } 
      } 
    } 
		if (!oPlugin.RealDetected) {
		  oPlugin.RealDetected = fncLookupInMimeTypes('realplayer');
		}  
	}
	
	
  //-------------------------------------------------------------------------
	// DETECT MEDIAPLAYER
	// It is not possible to detect the presence of the Windows Media Player
	//   from within Internet Explorer for the Macintosh.
	
	// MacOSX NS7 - no version - finds "Video for Windows" in plugins list
	
	function fncDetectPluginMediaPlayer() {
		if (oPlugin.ActiveXDetected) { 
      for (var x=10; x>=1; x-=1) { 
  		  var oTmpPlugin = null;
  		  oTmpPlugin = fncBuildActiveXControl('WMPlayer.OCX.'+x);
        if (oTmpPlugin) { 
          oPlugin.MediaPlayerDetected = true;       
          // Gecko bug requires double "get versionInfo"
          parseFloat(oTmpPlugin.versionInfo);       
          oPlugin.MediaPlayerVersion = parseFloat(oTmpPlugin.versionInfo); 
          break;
        } 
      }
      if (!oPlugin.MediaPlayerDetected) {
  		  var oTmpPlugin = null;
  		  oTmpPlugin = fncBuildActiveXControl('MediaPlayer.MediaPlayer.1');
        if (oTmpPlugin) { 
          oPlugin.MediaPlayerDetected = true;          
          oPlugin.MediaPlayerVersion = 5.2; 
        } 
      }
		}
		else {
      if (navigator.mimeTypes && navigator.mimeTypes["application/x-mplayer2"] && navigator.mimeTypes["application/x-mplayer2"].enabledPlugin) {
           oPlugin.MediaPlayerDetected = true;          
           oPlugin.MediaPlayerVersion = 5.2; 
      }
      if (navigator.mimeTypes && navigator.mimeTypes["video/x-ms-asf"]) {
           oPlugin.MediaPlayerDetected = true;          
           oPlugin.MediaPlayerVersion = 6.3; 
      }
      if (navigator.mimeTypes && navigator.mimeTypes["video/x-ms-wm"] && navigator.mimeTypes["video/x-ms-wmv"]) {
           oPlugin.MediaPlayerDetected = true;          
           oPlugin.MediaPlayerVersion = 6.4; 
      }
      if (navigator.mimeTypes && navigator.mimeTypes["application/x-drm-v2"] && navigator.mimeTypes["application/x-drm-v2"].enabledPlugin) {
           oPlugin.MediaPlayerDetected = true;          
           oPlugin.MediaPlayerVersion = 7; 
      }
      if (navigator.mimeTypes && navigator.mimeTypes["application/x-ms-wmd"] && navigator.mimeTypes["application/x-ms-wmd"].enabledPlugin) {
           oPlugin.MediaPlayerDetected = true;          
           oPlugin.MediaPlayerVersion = 7; 
      }
		}
		
		if (navigator.plugins && navigator.plugins.length && !oPlugin.MediaPlayerDetected) { 
      for (var x=0; x<navigator.plugins.length; x++) { 
        var strPluginName = navigator.plugins[x].name.toLowerCase();
        var strPluginDescription = navigator.plugins[x].description.toLowerCase();
        if (strPluginName.indexOf('windows media') >= 0 || strPluginDescription.indexOf('windows media') >= 0) { 
          oPlugin.MediaPlayerDetected=true; 
          break; 
        } 
      } 
    }
    if (navigator.mimeTypes && navigator.mimeTypes.length && !oPlugin.MediaPlayerDetected) { 
      for (var x=0; x<navigator.mimeTypes.length; x++) { 
        var strMimeDescription = navigator.mimeTypes[x].description.toLowerCase();
        if (strMimeDescription.indexOf('windows media') >= 0 || strMimeDescription.indexOf('microsoft video') >= 0 || strMimeDescription.indexOf('video for windows') >= 0) { 
          oPlugin.MediaPlayerDetected=true; 
          break; 
        } 
      } 
    } 
	}
	
	
	//-------------------------------------------------------------------------
	// DETECT AUTHORWARE
	function fncDetectPluginAuthorware() {
    if (oPlugin.ActiveXDetected) { 
      for (var x=10; x>=1; x-=1) { 
  		  var oTmpPlugin = null;
  		  oTmpPlugin = fncBuildActiveXControl('Macromedia.AuthorwareShockwaveControl.'+x);
        if (oTmpPlugin) { 
          oPlugin.AuthorwareDetected=true; 
          break;
        } 
      }
    } 
    if (navigator.plugins && navigator.plugins.length && !oPlugin.AuthorwareDetected) { 
      for (var x=0; x<navigator.plugins.length; x++) { 
        var strPluginName = navigator.plugins[x].name.toLowerCase();
        var strPluginDescription = navigator.plugins[x].description.toLowerCase();
        if (strPluginName.indexOf('authorware') != -1) { 
          oPlugin.AuthorwareDetected=true; 
          break; 
        } 
        else if (strPluginDescription.indexOf('authorware') != -1) {
          oPlugin.AuthorwareDetected=true; 
          break; 
        }
      } 
    } 
	}
	  
	  
	
	
  //-------------------------------------------------------------------------
	// DETECT QUICKTIME
	function fncDetectPluginQuickTime() {
    if (oPlugin.ActiveXDetected) { 
      for (var x=10; x>=1; x-=1) { 
  		  var oTmpPlugin = null;
  		  oTmpPlugin = fncBuildActiveXControl('QuickTimeCheckObject.QuickTimeCheck.'+x);
        if (oTmpPlugin) { 
          oPlugin.QuickTimeDetected = oTmpPlugin.IsQuickTimeAvailable(0); 
          // Gecko bug requires double "get versionInfo"
          parseFloat(oTmpPlugin.QuickTimeVersion);       
          oPlugin.QuickTimeVersion=parseInt(oTmpPlugin.QuickTimeVersion.toString(16).substring(0,3))/100; 
          break;
        } 
      }
    } 
    if (navigator.plugins && navigator.plugins.length && !oPlugin.QuickTimeDetected) { 
      for (var x=0; x<navigator.plugins.length; x++) { 
        var strPluginName = navigator.plugins[x].name.toLowerCase();
        var strPluginDescription = navigator.plugins[x].description.toLowerCase();
        if (strPluginName.indexOf('quicktime') != -1) { 
          oPlugin.QuickTimeDetected=true; 
          if (strPluginName.indexOf(' ') >= 0) {
            var astrPluginName = strPluginName.split(' ');
            for (var i=0;i<astrPluginName.length;i++) {
              if (!isNaN(parseInt(astrPluginName[i]))) {
                oPlugin.QuickTimeVersion = astrPluginName[i];
                break;
              }
            }
          }
          break; 
        } 
        else if (strPluginDescription.indexOf('quicktime') != -1) {
          oPlugin.QuickTimeDetected=true; 
          if (strPluginDescription.indexOf(' ') >= 0) {
            var astrPluginName = strPluginDescription.split(' ');
            for (var i=0;i<astrPluginName.length;i++) {
              if (!isNaN(parseInt(astrPluginName[i]))) {
                oPlugin.QuickTimeVersion = astrPluginName[i];
                break;
              }
            }
          }
          break; 
        }
      } 
    } 
	}
	
	
  //-------------------------------------------------------------------------
	// DETECT ACROBAT
	function fncDetectPluginAcrobat() {
    if (oPlugin.ActiveXDetected) { 
      for (var x=10; x>=1; x-=1) { 
  		  var oTmpPlugin = null;
  		  oTmpPlugin = fncBuildActiveXControl('PDF.PdfCtrl.'+x);
        if (oTmpPlugin) { 
          oPlugin.AcrobatDetected = true; 
          oPlugin.AcrobatVersion = x; 
          break;
        } 
      }
    }
	 
    if (navigator.plugins && navigator.plugins.length && !oPlugin.AcrobatDetected) { 
      for (var x=0; x<navigator.plugins.length; x++) { 
        var strPluginName = navigator.plugins[x].name.toLowerCase();
        var strPluginDescription = navigator.plugins[x].description.toLowerCase();
        if (strPluginName.indexOf('acrobat') != -1) { 
          oPlugin.AcrobatDetected=true; 
          break; 
        } 
        else if (strPluginDescription.indexOf('acrobat') != -1) {
          oPlugin.AcrobatDetected=true; 
          if (strPluginDescription.indexOf(' ') >= 0) {
            var astrPluginName = strPluginDescription.split(' ');
            for (var i=0;i<astrPluginName.length;i++) {
              if (!isNaN(parseInt(astrPluginName[i]))) {
                oPlugin.AcrobatVersion = astrPluginName[i];
                break;
              }
            }
          }
          break; 
        }
      } 
    } 
		if (!oPlugin.AcrobatDetected) {
		  oPlugin.AcrobatDetected = fncLookupInMimeTypes('pdf');
		}  
	}
	
	
  //-------------------------------------------------------------------------
	// DETECT FLASH
	function fncDetectPluginFlash() {    
    // added by mike
	 if (oPlatform.isWin && oBrowser.isIE) {
		oPlugin.FlashVersion = vbFlashVersion;
		oPlugin.FlashDetected = vbFlashDetected;
    } // end added by mike
	 else if (navigator.plugins && navigator.plugins.length) { 
      for (x=navigator.plugins.length-1; x>=0; x--) { 
        if ((navigator.plugins[x].name.indexOf('Shockwave') != -1) && (navigator.plugins[x].name.indexOf('Director') == -1)) { 
          oPlugin.FlashDetected = true; 
          var astrPlugin = navigator.plugins[x].description.split(' ');
          for (var i=0;i<=astrPlugin.length-1;i++) {
            if (!isNaN(astrPlugin[i])) {
              oPlugin.FlashVersion = astrPlugin[i];
              if (isNaN(oPlugin.FlashVersion)) {
                oPlugin.FlashVersion = 0;
              }
              break; 
            }
          }
          break;
        } 
      } 
    } 
    else if (oPlugin.ActiveXDetected) { 
      for (var x=10; x>=5; x-=1) { 
        x = parseFloat(x); 
  		  var oTmpPlugin = fncBuildActiveXControl('SWCtl.SWCtl.'+x);
        if (oTmpPlugin) { 
          oPlugin.FlashDetected = true; 
          oPlugin.FlashVersion = x; 
          break;
        } 
        
        if (!oPlugin.FlashDetected) {
  		    var oTmpPlugin = fncBuildActiveXControl('ShockwaveFlash.ShockwaveFlash.'+x);
          if (oTmpPlugin) { 
            oPlugin.FlashDetected = true; 
            oPlugin.FlashVersion = x; 
            break;
          } 
        }
      }       
      
      if (!oPlugin.FlashDetected) {
        try {  // Necessary for Win2K IE 5.5 
          var oTmpPlugin = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash');"); 
          if (oTmpPlugin) { 
            oPlugin.FlashDetected = true; 
          } 
          
          if (!oPlugin.FlashDetected) {
            var oTmpPlugin = eval("new ActiveXObject('SWCtl.SWCtl');"); 
            if (oTmpPlugin) { 
              oPlugin.FlashDetected = true; 
            } 
          }      
        }
        catch(e) {}
      }
    } 
	}
	
	
	// --------------------------
  // Flash Embed Test Functions
  function fncFlashEmbedDetect(strAdequateFlashVersion, blnOutputNiceFlashVersionMessage) {
    if (document.createElement && document.body) {
      if (!fncGetElementById("idFlashDetectContainer")) {
        var oNewDiv = document.createElement('div');
        oNewDiv.id = 'idFlashDetectContainer';
        document.body.appendChild(oNewDiv);
      }
    }
    
    if (fncGetElementById("idFlashDetectContainer")) {
      fncGetElementById("idFlashDetectContainer").innerHTML += "<div id='idFlashContainer'></div><div id='idFlashOutput'></div>";
      
      if (blnOutputNiceFlashVersionMessage) {
        document.getElementById("idFlashOutput").innerHTML = "Checking Flash player version...";
      }
      
      var strFlashFileName = "flashRead.swf";
      var strFlashObjectHTML = '<object id="idFlashReadMovie" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="1" height="1" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="' + strFlashFileName + '" /><param name="quality" value="low" /><param name="bgcolor" value="#ffffff" /><embed src="' + strFlashFileName + '" name="idFlashReadMovie" swLiveConnect="true" quality="high" bgcolor="#ffffff" width="1" height="1" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
      
      fncGetElementById("idFlashContainer").innerHTML = strFlashObjectHTML;
      
      
      /*
      if (fncGetElementById("idFlashReadMovie")) {
        // Wait for 2000 milliseconds for video to load etc...
        var oWaitTimer = setTimeout('fncFlashCompare("' + strAdequateFlashVersion + '",' +  blnOutputNiceFlashVersionMessage + ')',2000);
      }
      */
    }
  }
  
  function fncFlashCompare(strAdequateFlashVersion,blnOutputNiceFlashVersionMessage) {  
    var strPageOutput = "";
    var strNumericAdequateVersion = ""
    var strNumericClientVersion = ""
    
    if (typeof(strAdequateFlashVersion) != "undefined") {
      var astrAdequateFlashVersion = new Array();
      if (strAdequateFlashVersion.indexOf(".") > 0) {
        astrAdequateFlashVersion = strAdequateFlashVersion.split(".");
      }
      strAdequateFlashVersion = "";    
      for (var index=0;index<=3;index++) {
        // fill array cell with "0" if cell left blank
        if (!astrAdequateFlashVersion[index]) {
          astrAdequateFlashVersion[index] = 0;
        }
        strAdequateFlashVersion = strAdequateFlashVersion + astrAdequateFlashVersion[index];
        if (index < 3) {
          strAdequateFlashVersion = strAdequateFlashVersion + ".";
        }      
        strNumericAdequateVersion = strNumericAdequateVersion + fncPadNum(astrAdequateFlashVersion[index]);
      }    
      
      if(oPlugin.FlashDetected) {   
        if (oPlugin.FlashVersion) {
          var astrClientFlashVersion = new Array();
          if (oPlugin.FlashVersion.indexOf(",") > 0) {
            astrClientFlashVersion = oPlugin.FlashVersion.split(",");
            oPlugin.FlashVersion = "";
            for (var index=0;index<=3;index++) {
              // fill array cell with "0" if cell left blank
              if (!astrClientFlashVersion[index]) {
                astrClientFlashVersion[index] = 0;
              }
              oPlugin.FlashVersion += astrClientFlashVersion[index];
              if (index < 3) {
                oPlugin.FlashVersion += ".";
              }      
              strNumericClientVersion = strNumericClientVersion + fncPadNum(astrClientFlashVersion[index]);
            }    
          }
          
          if (strNumericClientVersion >= strNumericAdequateVersion) {
            strPageOutput = "&nbsp;&nbsp;&nbsp;<i>Version "+oPlugin.FlashVersion+"</i>";
            oPlugin.FlashAdequate = true;
          }
          else {
            strPageOutput = "This browser's Flash player is inadequate.  Player's version is: "+oPlugin.FlashVersion+" and must be " + strAdequateFlashVersion + " or higher.";
          }
        }
        else {
          strPageOutput = "Flash player not detected properly.";
        }
      }
      else {
        strPageOutput = "You do not have the Flash player.";
      }
    }
    else {
      // no adequate version of flash specified (using variable strAdequateFlashVersion)
    }
    
    if (blnOutputNiceFlashVersionMessage) {
      fncGetElementById("idFlashOutput").innerHTML = strPageOutput;
    }
    
    if (typeof(fncFlashDetectComplete) == "function") { fncFlashDetectComplete(); }
  }   
  
  
  //-------------------------------------------------------------------------
  // JAVA FUNCTIONS

  function fncDetectJava() {
		if (navigator.javaEnabled()) 
			oPlugin.JavaDetected = true;
		else 
			oPlugin.JavaDetected = false;
  }
  
  
  //-------------------------------------------------------------------------
  // COOKIE FUNCTIONS
  
  function fncDetectCookies() {
    document.cookie = "test=test";  
		if (fncGetCookie("test")) {
		  oPlugin.CookiesDetected = true;
		  document.cookie = "test=null;expires=Fri, 13-Apr-1970 00:00:00 GMT";
		}
		else {
		  oPlugin.CookiesDetected = false;
		}
  }
  
  function fncGetCookie(name) {
	  var arg = name + "=";
	  var intArgLength = arg.length;
	  var intCookieLength = document.cookie.length;
	  var i = 0;
	  while (i < intCookieLength) {
			var j = i + intArgLength;
			if (document.cookie.substring(i, j) == arg)
  		  var endstr = document.cookie.indexOf (";", j);
  		  if (endstr == -1)
  			endstr = document.cookie.length;
  		  return unescape(document.cookie.substring(j, endstr));
			i = document.cookie.indexOf(" ", i) + 1;
			if (i == 0)
			  break; 
	  }
	  return null;
	}
	
	
	
  //-------------------------------------------------------------------------
	// PLUGIN UTILITY FUNCTIONS
	
	function fncLookupInMimeTypes(strMimeType) {
	  // works for mac ie & nav
	  var intNumMatches = 0;
	  var strMimeTypes1 = "";
	  var strMimeTypes2 = "";
	  var strMimeTypes3 = "";
	  var strMimeTypes4 = "";
	  if (navigator.mimeTypes.length) {
	  for (var x=0; x<navigator.mimeTypes.length; x++) { 
	  	  
		  var strMimeDescription = navigator.mimeTypes[x].description;
        if (strMimeDescription.toLowerCase().indexOf(strMimeType.toLowerCase()) >= 0) {
          intNumMatches ++;
        }
		  }
	  }
	  if (intNumMatches > 0) 
	    return true;
	  else
	    return false;
	}
	
	function fncLookupInPlugins(strPlugin) {
	  // works for mac ie & nav
	  var intNumMatches = 0;
	  if (navigator.plugins.length) {
      for (var x=0; x<navigator.plugins.length; x++) { 
        var strMimeDescription = navigator.plugins[x].description;
        if (strMimeDescription.toLowerCase().indexOf(strPlugin.toLowerCase()) >= 0) {
          intNumMatches ++;
        }
		  }
	  }
	  if (intNumMatches > 0) 
	    return true;
	  else
	    return false;
	}
  
  function fncPadNum(number) {
    var strPaddedNumber = number + "";  // force passed value to string
    while (strPaddedNumber.length < 3) {
      strPaddedNumber = "0" + strPaddedNumber;
    }
    return strPaddedNumber;
  }
  