var	flashMinVersion = 5;
var flashExist = false;
var flashVersionMaj = 0;

flashExist = (navigator.mimeTypes
	&& navigator.mimeTypes["application/x-shockwave-flash"]) ?
	navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

if (flashExist) {
	flashVersionMaj = parseInt(
		flashExist.description.substring(flashExist.description.indexOf(".") - 1)
	);
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0 ) {
	document.write('<script language="vbscript">\n'
		+	'	on error resume next\n'
		+	'	var present\n'
		+	'	for i = 10 to 1 step -1\n'
		+	'		present = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash."&i))\n'
		+	'		if present = true then\n'
		+	'			flashVersionMaj = i\n'
		+	'			i = 0\n'
		+	'		end if\n'
		+	'	next\n'
		+	'</script>\n');
}

flashExist = flashVersionMaj >= flashMinVersion;

