// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 124;

var playType='';
var playTypeID='';


function Flash_Detection(swfname,swfid,divid,flashwidth,flashheight,continentname)
{
    var hasProductInstall = DetectFlashVer(6, 0, 65);

    // Version check based upon the values defined in globals
    var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

    if ( hasProductInstall && !hasRequestedVersion )
    {
        // DO NOT MODIFY THE FOLLOWING FOUR LINES
        // Location visited after installation is complete if installation is required
        var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
        var MMredirectURL = window.location;
        document.title = document.title.slice(0, 47) + " - Flash Player Installation";
        var MMdoctitle = document.title;
        generateSWFObject(swfname,swfid,divid,flashwidth,flashheight,continentname);
    }
    else if (hasRequestedVersion)
    {
        // if we've detected an acceptable version
        // embed the Flash Content SWF when all tests are passed
        generateSWFObject(swfname,swfid,divid,flashwidth,flashheight,continentname);
    }
    else
    {
        // flash is too old or we can't detect the plugin
        var alternateContent = '<div class=\"float_left\" style=\"width:271px;height:300px;\">';
        alternateContent += '<span class=\"float_left\"><a href="http://www.adobe.com/go/getflash/" title=\"Get Flash\" style=\"cursor:pointer\"><img src=\"/images/buttons/flash-player.gif\" alt=\"Get Flash\" title=\"Get Flash\"/></a></span>';
        alternateContent += '</div>';
        document.write(alternateContent);  // insert non-flash content
    }
}

function generateSWFObject(swfname,swfid,divid,flashwidth,flashheight,continentname)
{
    var so = new SWFObject(swfname, swfid, flashwidth,flashheight, "9");
    so.addParam("name",swfid);
    so.addParam("id",swfid);
    so.addParam("width" , flashwidth);
    so.addParam("height" ,flashheight);
    so.addParam("wmode","transparent");
    so.addParam("quality", "high");
    so.addParam("allowScriptAccess", "sameDomain");
    so.addParam("movie", swfname);
    so.addParam("quality", "high");
    so.addParam("scale", "noscale");
    so.addParam("salign", "lt");
    so.addParam("FlashVars", continentname);
    so.write(divid);
}


