var contentVersion = 8;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var PluginVersion = words[i]; 
	    }
	var FlashCanPlay = PluginVersion >= contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & contentVersion)))\n');
	document.write('<\/SCR' + 'IPT\> \n');
}

var flash = {
	getFlashCheck : function () { // fScriptableError :: gecko nincs szkriptelhetĹ� plugin telepĂ­tve
		var sDesc, strCommand;
		this.shockMode = false;  // telepítve van-e
		this.flashVer = 0;       // nagyverzió
		this.rv = 0;             // alverzió
		this.ver = 0;            // együtt
		this.fScriptableError = ( typeof fScriptableError == 'function' ) ? fScriptableError : false;
		if ( browser.isGecko || browser.isMozilla || browser.isOpera || browser.isNS || browser.isSafari ) {
			if ( navigator.mimeTypes && 
				 navigator.mimeTypes["application/x-shockwave-flash"] && 
				 navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin && 
				 navigator.plugins && 
				 navigator.plugins["Shockwave Flash"] ) {
				sDesc = navigator.plugins["Shockwave Flash"].description + '';
				this.shockMode = true;
				this.flashVer = parseInt( sDesc.charAt( sDesc.indexOf(".") -1 ) );
				this.rv = sDesc.substr( sDesc.lastIndexOf("r") + 1, sDesc.length );
			};
		}
		else if ( browser.isIE ) { //  && is.win
			strCommand =    'function checkIE( obj ) { ' +
							'	aFlashPlugins = [];' +
							'	for ( i = 2; i < 11; i++ ) {' +
							'		try {' +
							'			aFlashPlugins[i] = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i );' +
							'		}' +
							'		catch ( ex ) {};' +
							'	}' +
							'	for ( i = 0; i < aFlashPlugins.length; i++ ) {' +
							'		if ( typeof aFlashPlugins[i] == "object" ) {' +
							'		obj.shockMode = true;' +
							'		obj.flashVer = i;' +
							'		}' +
							'	}' +
							'}';
			eval( strCommand );
			checkIE( this );
		};
		this.ver = parseFloat( this.flashVer + '.' + this.rv );
	}
};
