﻿
function FlashReplacementManager(path, name, width, height, version, bgColor, parentName)
{    
    // Private
    this._path      = path;
    this._name      = name;
    this._width     = width;
    this._height    = height; 
    this._version   = version;
    this._bgColor   = bgColor;
    
    // public
    this.parentName= parentName;    
    this.swfObject  = new SWFObject(path, name, width, height, version, bgColor);
}

FlashReplacementManager.prototype.doReplacement = function()
{    
    // Only if the parent element and flash path exists.
    if (document.getElementById(this.parentName) && this._path)    
        this.swfObject.write(this.parentName);    
}

if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();