function createFlashPlayer(player, w, h, id, file, wmode, altContent, autoPlay, bgImage){

// Check to see if the version meets the requirements for playback -- 
    //hasReqestedVersion = true;
    if (hasReqestedVersion) {
        // if we've detected an acceptable version
        // embed the Flash Content SWF when all tests are passed    
        var canvasBG;
        if (bgImage!='' && bgImage != undefined) { canvasBG = "'canvas': {'backgroundImage': 'url("+bgImage+")'},";}
        else {canvasBG="";}
config = "{'clip': { 'autoPlay': "+autoPlay+", 'url': '"+file+"', 'provider': 'rtmp'}, "+canvasBG+" 'plugins': {'rtmp': {'url': 'flowplayer.rtmp-3.2.0.swf', 'netConnectionUrl': 'rtmp://216.54.215.98/Bassett', 'objectEncoding': '0'}}}"

        AC_FL_RunContent(
                "src", player,
                "width", w,
                "height", h,
                "align", "center",
                "id", "locator",
                "quality", "high",
                "bgcolor", "ffffff",
                "name", "locator",
                "allowScriptAccess","sameDomain",
                "type", "application/x-shockwave-flash",
                'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
                "pluginspage", "http://www.adobe.com/go/getflashplayer",
                "base", ".",
                "wmode", wmode,
                "FlashVars", 'config='+config,
                "allowFullScreen", "true",
 "class", "video-embed"
    );

    
    } else {  // flash is too old or we can't detect the plugin
        var alternateContent = 'You must enable flash to view the '+altContent+' video.'
        document.write(alternateContent);  // insert non-flash content
    }
}

//Passes in flash variables
function createFvarFlashPlayer(player, w, h, id, wmode, fvars){
// Check to see if the version meets the requirements for playback -- 
    //hasReqestedVersion = true;
    if (hasReqestedVersion) {
        // if we've detected an acceptable version
        // embed the Flash Content SWF when all tests are passed        
        AC_FL_RunContent(
                "src", player,
                "width", w,
                "height", h,
                "align", "center",
                "id", id,
                "quality", "high",
                "bgcolor", "444444",
                "name", "slideshow",
                "allowScriptAccess","sameDomain",
                "allowFullScreen", "true",
                "type", "application/x-shockwave-flash",
                'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
                "pluginspage", "http://www.adobe.com/go/getflashplayer",
                "base", ".",
                "scale", "default",
                "wmode", wmode,
                "FlashVars", fvars,
                "class", "video-embed"
    );
    
    } else {  // flash is too old or we can't detect the plugin
        var alternateContent = 'You need flash in order to view this presentation.'
        document.write(alternateContent);  // insert non-flash content
    }
}
