﻿

function EmbedFlashObject(requiredFlashVersion, 
    noFlashImageId, 
    noFlashImageUrl, 
    flashContainerId,
    flashMovieUrl,
    flashWidth,
    flashHeight,
    flashVars,
    flashParams,
    flashAttributes)
{
    var hasRequestedVersion = swfobject.hasFlashPlayerVersion(requiredFlashVersion);
    var NoFlashImage = document.getElementById(noFlashImageId);
    var FlashContainer = document.getElementById(flashContainerId);

    if(!hasRequestedVersion)
    {        
        if(NoFlashImage.tagName.toUpperCase() == "TABLE")
        {
            var browser = GetBrowser();
            if(browser != "IE")
            {
                 NoFlashImage.style.display = "Table"; 
            }
            else
            {
                 NoFlashImage.style.display = "Block"; 
            }    
        }
        else
        {
            NoFlashImage.src = noFlashImageUrl;
            NoFlashImage.style.display = "Block";     
        }
        FlashContainer.style.display = "None";
    }
    else
    {
            
        NoFlashImage.style.display = "None";     
        FlashContainer.style.display = "Block";
        
        swfobject.embedSWF(flashMovieUrl,
            flashContainerId,
            flashWidth,
            flashHeight,
            requiredFlashVersion,
            false,
            flashVars,
            flashParams,
            flashAttributes,
            EmbedCallBack);

    }    
}

function EmbedCallBack(e)
{
    if(e.success)
    {
        
    }
}

function SetFlashCookie(frameId, frameLocation)
{
     var frame = document.getElementById(frameId);
     frame.src = frameLocation;
}