/*
	  Copyright (c) 2001 Moonstone Interactive, Inc.
      All Rights Reserved. No portion of this file, including but
      not limited to any associated code, documents or images, may be
      copied, retransmitted, reposted, duplicated or otherwise
      used without the express written permission of Moonstone Interactive, Inc.

*/		

// Requires browsersniff.js!!!


function which_version_flash() {
       
      fversion  = 0;
      swversion = 0;  
      result = false;
      
      if (is_ie && is_win) {
              
              // it's IE
              if      ( TestActiveX("ShockwaveFlash.ShockwaveFlash.5"))  { fversion = 5 }
  			  else if ( TestActiveX("ShockwaveFlash.ShockwaveFlash.4"))  { fversion = 4 }
              else if ( TestActiveX("ShockwaveFlash.ShockwaveFlash.3"))  { fversion = 3 }
              else if ( TestActiveX("ShockwaveFlash.ShockwaveFlash.1"))  { fversion = 2 }
                      
			  return(fversion);
			  		  
      } else if (is_nav) {
      
              // it's NN
                  
              thearray = navigator.plugins
              arraylen = thearray.length
			  
              for (i=0;i<arraylen;i++)
              {
               theplugin = thearray[i]
               thename   = theplugin.name
               thedesc   = theplugin.description
			
   			   if (thedesc.indexOf("Shockwave Flash 5.") != -1) { fversion = 5 }	
               if (thedesc.indexOf("Shockwave Flash 4.") != -1) { fversion = 4 }
               if (thedesc.indexOf("Shockwave Flash 3.") != -1) { fversion = 3 }
               if (thename.indexOf("Shockwave Flash 2.") != -1) { fversion = 2 }  		  			   
              }
			  
			  return(fversion);
			   
      } else {
            // It's not necessarily sniffable
			return(-1);
      }
}