function checkFlash(iVersion){
	var flashDetected = false;
	var checkVersion = new playerVersion(iVersion.toString().split("."));
	var detectedVersion = getPlayerVersion();
	
	if(detectedVersion.versionIsValid(checkVersion)){
		flashDetected = true;
	}		
	return flashDetected;
}

function getPlayerVersion(){
	var returnVersion = new playerVersion([0,0,0]);

	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] 	
			&& navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin 
			&& navigator.plugins && navigator.plugins["Shockwave Flash"] ){
		// PLUGIN =========================================
		var oFlash = navigator.plugins["Shockwave Flash"];		
		if(oFlash && oFlash.description){
			returnVersion = new playerVersion(oFlash.description.replace(/([a-z]|[A-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else{
		// ACTIVEX ========================================
		try{
			var oFlash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			returnVersion = new playerVersion(oFlash.GetVariable("$version").split(" ")[1].split(","));
		}catch(e){
			//alert(e.message);
		}
	}

	// destroy our flash object
	oFlash = null;
	
	return returnVersion
}

// player version object
function playerVersion(arrVersion){
	this.major = parseInt(arrVersion[0]) || 0;
	this.minor = parseInt(arrVersion[1]) || 0;
	this.rev = parseInt(arrVersion[2]) || 0;
	//alert(this.major + " - " + this.minor + " - " + this.rev);
}

playerVersion.prototype.versionIsValid = function(checkVersion){
	if(this.major < checkVersion.major) return false;
	if(this.major > checkVersion.major) return true;
	if(this.minor < checkVersion.minor) return false;
	if(this.minor > checkVersion.minor) return true;
	if(this.rev < checkVersion.rev) return false;
	return true;
}