function _PlayerVersion(arrVersion){
    major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
    minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
    rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
    return [major, minor, rev];
}
function getPlayerVersion(){
    var PlayerVersion = _PlayerVersion([0,0,0]);
    if(navigator.plugins && navigator.mimeTypes.length){
        var x = navigator.plugins["Shockwave Flash"];
        if(x && x.description) {
            PlayerVersion = _PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
        }
    }else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){ // if Windows CE
        var axo = 1;
        var counter = 3;
        while(axo) {
            try {
                counter++;
                axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
                document.write("player v: "+ counter);
                PlayerVersion = _PlayerVersion([counter,0,0]);
            } catch (e) {
                axo = null;
            }
        }
    } else { // Win IE (non mobile)
        // do minor version lookup in IE, but avoid fp6 crashing issues
        // see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
        try{
            var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
        }catch(e){
            try {
                var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
                PlayerVersion = _PlayerVersion([6,0,21]);
                axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
            } catch(e) {
                if (PlayerVersion[0] == 6) {
                    return PlayerVersion;
                }
            }
            try {
                axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
            } catch(e) {}
        }
        if (axo != null) {
            PlayerVersion = _PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
        }
    }
    return PlayerVersion;
}
function versionIsValid(fv, PlayerVersion){
    if(PlayerVersion[0] < fv[0]) return false;
    if(PlayerVersion[0] > fv[0]) return true;
    if(PlayerVersion[1] < fv[1]) return false;
    if(PlayerVersion[1] > fv[1]) return true;
    if(PlayerVersion[2] < fv[2]) return false;
    return true;
}

var trueFlashVersion=versionIsValid([7,0,0], getPlayerVersion());
