// USAGE:
// foo  =  installedVersion.major;      => 8
// bar  =  installedVersion.minor;      => 0
// rev  =  installedVersion.rev;        => 24
// bool =  versionIsValid( testVersionNumber );
var installedVersion = deconcept.SWFObjectUtil.getPlayerVersion();
var requiredVersion = 8;       // default; requires Flash 8



// If the user has the required version of Flash, then print the flashText.
// Otherwise, print the htmlText.
//
// I suggest only calling this function outside of a tag:
//     WRONG:   <a href="  <SCRIPT> docWriteIfFlash('___','___'); </SCRIPT>  ">
//     RIGHT:   <SCRIPT> docWriteIfFlash( '<a href="___">', '<a href="___">' ); </SCRIPT>
//
// majorVersionNum is optional; defaults to requiredVersion.
//
function docWriteIfFlash( htmlText, flashText, necessaryMajorVersion ) {
    necessaryMajorVersion = necessaryMajorVersion || requiredVersion;     // default
    document.write( installedVersion.major >= necessaryMajorVersion ? flashText : htmlText );
}

