function FlashWrapper(){}
 
FlashWrapper.prototype.initFlashWrapper = function(inMovie, inWidth, inHeight, inWmode, inStaticImg, inStaticImgLink, inStaticImgAlt, inStaticImgMap, inBoolStaticImgSizeDiff, inWidth2, inHeight2, inCSSClassFlash, inCSSClassNoFlash, inFlashVars)
{
      //DEBUG
      //alert("initFlashWrapper() called");
 
      this.thisMovie = unescape(inMovie);
      this.thisWidth = inWidth;
      this.thisHeight = inHeight;
      this.thisWmode = inWmode;
      this.thisStaticImg = unescape(inStaticImg);
      this.thisStaticImgLink = unescape(inStaticImgLink);
      this.thisStaticImgAlt = unescape(inStaticImgAlt);
      this.thisStaticImgMap = inStaticImgMap;
      this.thisBoolStaticImgSizeDiff = inBoolStaticImgSizeDiff;
      this.thisWidth2 = inWidth2;
      this.thisHeight2 = inHeight2;
      this.thisCSSClassFlash = inCSSClassFlash;
      this.thisCSSClassNoFlash = inCSSClassNoFlash;
      this.thisFlashVars = inFlashVars;
      
      // Check to see that Flash is installed and that it is the correct version
      // If not, show default image
 
      this.flashinstalled = 0;
      this.flashversion = 0;
      this.MSDetect = "false";
      this.finalObjString = "";     
      
      
      if ( navigator.plugins && navigator.plugins.length )
      {
            this.x = navigator.plugins["Shockwave Flash"];
            
            if ( this.x )
            {
                  this.flashinstalled = 2;
                  
                  if ( this.x.description )
                  {
                        this.y = this.x.description;
                        
                        if ( isNaN(this.y.charAt(this.y.indexOf('.')-2)) == true ){                      
                            this.flashversion = this.y.charAt(this.y.indexOf('.')-1);                          
                        }else{                           
                            this.startPoint = this.y.indexOf('.')-2;                         
                            this.flashversion = this.y.substring(this.startPoint,this.startPoint +2);                      
                        }
                  }
            }
            else {
                  this.flashinstalled = 1;
            }
            
            if ( navigator.plugins["Shockwave Flash 2.0"] )
            {
                  this.flashinstalled = 2;
                  this.flashversion = 2;
            }
            
            if( parseInt(this.flashinstalled) == 2 && parseInt(this.flashversion) >= 7 )
            {
                  finalObjString = this.getFlashObj();
            }
            else {                        
                  finalObjString = this.getStaticImg();
            }
      }
      else if ( navigator.mimeTypes && navigator.mimeTypes.length )
      {           
            this.x = navigator.mimeTypes['application/x-shockwave-flash'];
            
            if ( this.x && this.x.enabledPlugin )
            {
                  this.flashinstalled = 2;
            }
            else {
                  this.flashinstalled = 1;
            }
            
            if ( parseInt(this.flashinstalled) == 2 && parseInt(this.flashversion) >= 7 )
            {
                  finalObjString = this.getFlashObj();
            }
            else {
                  finalObjString = this.getStaticImg();
            }
      }
      else
      {
            MSDetect = "true";
            //---------------------------------------------------------------------------------------------------------------------
            //    Check the browser...we're looking for ie/win
            
            var isIE  = ( navigator.appVersion.indexOf("MSIE") != -1 ) ? true : false;    // true if we're on ie
            var isWin = ( navigator.appVersion.toLowerCase().indexOf("win") != -1 ) ? true : false; // true if we're on windows
            
            if( isIE && isWin )
            {
                  // these variables are defined in FlashWrapperIEDetectVarsInit.js and set for IE
                  // in FlashWrapperIEDetectVarsInit.vbs
                  
                  if ((flash6Installed == true) || (flash7Installed == true) || (flash8Installed == true) || (flash9Installed == true) || (flash10Installed == true)) 
                  {
                        finalObjString = this.getFlashObj();
                  }
                  else {
                        finalObjString = this.getStaticImg();
                  }
            }
      }
      
      // write the resulting object tag to the web page
      
      //DEBUG
      //alert("finalObjString: " + finalObjString);
      document.write(finalObjString);
}     
 
 
FlashWrapper.prototype.getFlashObj = function()
{
      var objTag = "";
 
      if ( this.thisWmode == "" )
      {
            this.thisWmode = "false";
      }
      
      if ( this.thisCSSClassFlash != "" )
      {
            objTag += '<div class="' + this.thisCSSClassFlash + '">';
      }
      
      objTag += '<object type="application/x-shockwave-flash" data="' + this.thisMovie + '" '
                  + 'width="' + this.thisWidth + '" height="' + this.thisHeight + '">'
                  + '<param name="movie" VALUE="' + this.thisMovie + '">'
                  + '<param name="play" VALUE="true">'
                  + '<param name="quality" VALUE="high">'
                  + '<param name="menu" VALUE="false">'
                  + '<param name="wmode" VALUE="' + this.thisWmode + '">'     
                  + '<param name="FlashVars" VALUE="' + this.thisFlashVars + '">'                                       
                  + '<\/object>';
                  
      if ( this.thisCSSClassFlash != "" )
      {
            objTag += '<\/div>';
      }
 
      return(objTag);
}     
            
                  
FlashWrapper.prototype.getStaticImg = function()
{
      var objTag = "";
 
      var p_width, p_height;
      var p_isStaticImgDiff = this.thisBoolStaticImgSizeDiff;
      
      // find size of static image
      if( p_isStaticImgDiff == "true" )
      {
            p_width = this.thisWidth2;
            p_height = this.thisHeight2;
      }
      else {
            p_width = this.thisWidth;
            p_height = this.thisHeight;
      }
 
      if ( this.thisStaticImg != "" ) 
      {
            if ( this.thisCSSClassNoFlash != "" )
            {
                  objTag += ('<div class="' + this.thisCSSClassNoFlash + '">');
            }
                  if( this.thisStaticImgMap == "" )
                  {
                        if ( this.thisStaticImgLink != "" )
                        {
                              objTag += '<a target="_blank" href="' + this.thisStaticImgLink + '">';
                        }
                        
                        objTag += '<img src="' + this.thisStaticImg + '" width="' + p_width + '" height="' + p_height + '" border="0" alt="' + this.thisStaticImgAlt + '" />';
                        
                        if ( this.thisStaticImgLink != "" )
                        {
                              objTag += '<\/a>';
                        }
                  }
                  
                  else
                  {
                        objTag += '<img src="' + this.thisStaticImg + '" width="' + p_width + '" height="' + p_height + '" border="0" alt="' + this.thisStaticImgAlt + '" usemap="#' + this.thisStaticImgMap + '">';
                  }
            if ( this.thisCSSClassNoFlash != "" )
            {
                  objTag += '</div>';
            }
 
      }
      
      return(objTag);
}