function Flash(Src, ID)
{
    //Private Members
    var _Src = Src;
    var _ID = ID;
    var _Align = "middle";
    var _Width = 100;
    var _Height = 100;
	var _Unit = "%";
    var _Play = "true";
    var _Quality = "high";
    var _AllowScriptAccess = "sameDomain";
    var _Type = "application/x-shockwave-flash";
    var _PluginsPage = "http://www.macromedia.com/go/getflashplayer";
    var _BGColor = "#FFFFFF";
    var _Alt = "This content requires the Macromedia Flash Player. <a href=\"http://www.macromedia.com/go/getflash/\">Get Flash</a>";
    
    var _Loop;
    var _SAlign;
    var _Scale;
    var _FlashVars;
    var _WMode;
    var _DeviceFont;
	var _Menu;
    
    var _Major = 8;
    var _Minor = 0;
    var _Revision = 0;
    
    var IsIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
    var IsWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
    var IsOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
    
    var VersionMajor;
    var VersionMinor;
    var VersionRevision;
    //Private Members
    
    //Public Properties
    this.GetSrc = function()
    {
        return _Src;
    }
    
    this.SetSrc = function(value)
    {
        _Src = value;
    }
    
    this.GetID = function()
    {
        return _ID;
    }
    
    this.SetID = function(value)
    {
        _ID = value;
    }
    
    this.GetAlign = function()
    {
        return _Align;
    }
    
    this.SetAlign = function(value)
    {
        _Align = value;
    }
    
    this.GetWidth = function()
    {
        return _Width;
    }
    
    this.SetWidth = function(value)
    {
        _Width = value;
    }
    
    this.GetHeight = function()
    {
        return _Height;
    }
    
    this.SetHeight = function(value)
    {
        _Height = value;
    }
	
	this.SetUnit = function(value)
	{
		_Unit = value;
	}
	
	this.GetUnit = function()
	{
		return _Unit;
	}
    
    this.GetPlay = function()
    {
        return _Play;
    }
    
    this.SetPlay = function(value)
    {
        _Play = value;
    }
    
    this.GetQuality = function()
    {
        return _Quality;
    }
    
    this.SetQuality = function(value)
    {
        _Quality = value;
    }
    
    this.GetAllowScriptAccess = function()
    {
        return _AllowScriptAccess;
    }
    
    this.SetAllowScriptAccess = function(value)
    {
        _AllowScriptAccess = value;
    }
    
    this.GetType = function()
    {
        return  _Type;
    }
    
    this.SetType = function(value)
    {
        _Type = value;
    }
    
    this.GetPluginsPage = function()
    {
        return _PluginsPage;
    }
    
    this.SetPluginsPage = function(value)
    {
        _PluginsPage = value;
    }
    
    this.GetBGColor = function()
    {
        return _BGColor;
    }
    
    this.SetBGColor = function(value)
    {
        _BGColor = value;
    }
    
    this.GetAlt = function()
    {
        return _Alt;
    }
    
    this.SetAlt = function(value)
    {
        _Alt = value;
    }
    
    this.GetLoop = function()
    {
        return _Loop;
    }
    
    this.SetLoop = function(value)
    {
        _Loop = value;
    }
    
    this.GetSAlign = function()
    {
        return _SAlign;
    }
    
    this.SetSAlign = function(value)
    {
        _SAlign = value;
    }
    
    this.GetScale = function()
    {
        return _Scale;
    }
    
    this.SetScale = function(value)
    {
        _Scale = value;
    }
    
    this.GetFlashVars = function()
    {
        return _FlashVars;
    }
    
    this.SetFlashVars = function(value)
    {
        _FlashVars = value;
    }
    
    this.GetWMode = function()
    {
        return _WMode;
    }
    
    this.SetWMode = function(value)
    {
        _WMode = value;
    }
    
    this.GetDeviceFont = function()
    {
        return _DevideFont;
    }
    
    this.SetDeviceFont = function(value)
    {
        _DeviceFont = value;
    }
	
	this.SetMenu = function(value)
	{
		_Menu = value;
	}
	
	this.GetMenu = function()
	{
		return _Menu;
	}
    
    this.GetMajor = function()
    {
        return _Major;
    }
    
    this.SetMajor = function(value)
    {
        _Major = value;
    }
    
    this.GetMinor = function()
    {
        return _Minor;
    }
    
    this.SetMinor = function(value)
    {
        _Minor = vlaue;
    }
    
    this.GetRevision = function()
    {
        return _Revision;
    }
    
    this.SetRevision = function(value)
    {
        _Revision = value;
    }
    //Public Properties
    
    //Private Method
    function jsGet()
    {
        var FlashVersion;
	    if (navigator.plugins != null && navigator.plugins.length > 0) 
	    {
		    if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) 
		    {
			    var strVer = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
      		    var strDescription = navigator.plugins["Shockwave Flash" + strVer].description;
			    var strDes = strDescription.split(" ");
			    var tmpArrayMajor = strDes[2].split(".");
			    var tmpArrayMinor;
			    VersionMajor = tmpArrayMajor[0];
			    VersionMinor = tmpArrayMajor[1];
			    if ( strDes[3] != "" ) 
			    {
				    tmpArrayMinor = strDes[3].split("r");
			    } 
			    else 
			    {
				    tmpArrayMinor = strDes[4].split("r");
			    }
      		    VersionRevision = (tmpArrayMinor[1] > 0) ? tmpArrayMinor[1] : 0;
                FlashVersion = VersionMajor + "." + VersionMinor + "." + VersionRevision;
      	    } 
      	    else 
      	    {
			    FlashVersion = -1;
		    }
	    }
	    else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) 
	    {
	        FlashVersion = 4;
	    }
	    else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) 
	    {
	        FlashVersion = 3;
	    }
	    else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) 
	    {
	        FlashVersion = 2;
	    }
	    else 
	    {
		    FlashVersion = -1;
	    }
	    return FlashVersion;
    }
    //Private Method
    
    //Public Method
    this.IsCapable = function Detect() 
    {
        var RequiredVersion = parseFloat(_Major + "." + _Revision);
        for (var x = 25; x > 0; x--) 
        {	 
            var strVersion = (IsIE && IsWin && !IsOpera) ? vbGet(x) : jsGet();
	        if (strVersion == -1 ) 
	        { 
		        return false;
	        } 
	        else if (strVersion != 0) 
	        {
	            var VersionArray;
		        if(IsIE && IsWin && !IsOpera) 
		        {
			        var tmpArray = strVersion.split(" ");
			        VersionArray = tmpArray[1].split(",");				
		        } 
		        else 
		        {
			        VersionArray = strVersion.split(".");
		        }
		        
		        VersionMajor = VersionArray[0];
		        VersionMinor = VersionArray[1];
		        VersionRevision = VersionArray[2];
		        var VersionNumber = parseFloat(VersionMajor + "." + VersionRevision);
		        
		        if ( (VersionMajor > _Major) && (VersionNumber >= RequiredVersion) ) 
		        {
			        return true;
		        } 
		        else 
		        {
			        return ((VersionNumber >= RequiredVersion && VersionMinor >= _Minor) ? true : false );	
		        }
	        }
        }	
        return (RequiredVersion ? false : 0.0);
    }

    this.Load = function()
    {
        var str = "";
        if(this.IsCapable())
        {
			str += "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"" + _Width + _Unit + "\" height=\"" + _Height + _Unit + "\" id=\"" + _ID + "\" align=\"" + _Align + "\">";
			str += "<param name=\"menu\" value=\"" + _Menu + "\" />";
			str += "<param name=\"movie\" value=\"" + _Src + "\" />";
			str += "<param name=\"quality\" value=\"" + _Quality + "\" />";
			str += "<param name=\"bgcolor\" value=\"" + _BGColor + "\" />";
			str += "<param nam=\"allowScriptAccess\" value=\"" + _AllowScriptAccess + "\" />";
            str += "<embed";
            str += " src=\"" + _Src + "\"";
            str += " quality=\"" + _Quality + "\"";
            str += " bgcolor=\"" + _BGColor + "\"";
            str += " width=\"" + _Width + _Unit + "\"";
            str += " height=\"" + _Height + _Unit + "\"";
            str += " name=\"" + _ID + "\"";
            str += " align=\"" + _Align + "\"";
            str += " play=\"" + _Play + "\"";
            str += " allowScriptAccess=\"" + _AllowScriptAccess + "\"";
            str += " type=\"" + _Type + "\"";
            str += " pluginspage=\"" + _PluginsPage + "\"";
            str += (_Loop == null) ? "" : " loop=\"" + _Loop + "\"";
            str += (_Scale == null) ? "" : " scale=\"" + _Scale + "\"";
            str += (_SAlign == null) ? "" : " salign=\"" + _SAlign + "\"";
            str += (_WMode == null) ? "" : " wmode=\"" + _WMode + "\"";
            str += (_DeviceFont == null) ? "" : " devicefont=\"" + _DeviceFont + "\"";
			str += (_Menu == null) ? "" : " Menu=\"" + _Menu + "\"";
            str += (_FlashVars == null) ? "" : " FlashVars=\"" + _FlashVars + "\"";
            str += " />";
			str += "</object>";
        }
        else
        {
             str += _Alt;
        }
        document.write(str);
		
    }
    //Public Method
}
