/** Copyright (c) 2007 - 2009, James Auldridge * http://code.google.com/p/flashsniffer/ * All rights reserved. * Licensed under the BSD License:  http://www.opensource.org/licenses/bsd-license.php */
var jaaulde=window.jaaulde||{};jaaulde.utils=jaaulde.utils||{};jaaulde.utils.flashsniffer=(function(){var lastMajorRelease=9;var installed=false;var version=null;(function(){var fp,fpd,fAX;if(navigator.plugins&&navigator.plugins.length){fp=navigator.plugins['Shockwave Flash'];if(fp){installed=true;if(fp.description){fpd=fp.description;version=fpd.charAt(fpd.indexOf('.')-1);}}else if(navigator.plugins['Shockwave Flash 2.0']){installed=true;version=2;}}else if(navigator.mimeTypes&&navigator.mimeTypes.length){fp=navigator.mimeTypes['application/x-shockwave-flash'];if(fp&&fp.enabledPlugin){installed=true;}}else{for(var i=lastMajorRelease;i>=2;i--){try{fAX=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.'+i);installed=true;version=i;break;}catch(e){}}if(!installed){try{fAX=new ActiveXObject('ShockwaveFlash.ShockwaveFlash');installed=true;version=2;}catch(e){}}fp=null;fpd=null;fAX=null;delete fp;delete fpd;delete fAX;}})();return{installed:function(){return!!installed;},version:function(){return version;},isLatestVersion:function(){return(!!installed&&version==lastMajorRelease);},isVersion:function(exactVersion){return(!!installed&&version==exactVersion);},meetsMinVersion:function(minVersion){return(!!installed&&version!=null&&version>=minVersion);}};})();

