function Progress()
{
	this.Init = function(id)
	{
	    this._clientId = id;
	    
	    // Add handlers so we can call functions associated with this object.
        
        // Setup a method to cleanup
//        var delDispose = Function.createDelegate(this, this.Dispose);
//        Sys.Application.add_unload(delDispose);

        var delClose = Function.createDelegate(this, this.Dispose);

	}
	
    // Clean up after ourself
	this.Dispose = function()
	{
	}
	
    this.Open = function()
    {
        // Make sure the processing image is visible
        var el = $get('profileProgressImage');
        el.style.display = 'inline';
        // Make sure the message is correct.
        el = $get('progressText');
        el.innerHTML = 'Please wait ...';
        el.style.color = '#20558A';
    
        hideDropDownVarList();
        
        showDIV('alertBackground');
        showDIV('profileProgress');

        // Position the popup in case the browser is scrolled.
        setPopupDivPosition('profileProgress');
        
        return false;
    }

    this.Close = function()
    {
        showDropDownVarList();
        
        hideDIV('alertBackground');
        hideDIV('profileProgress');

        return false;
    }
	
	this.SuccessfulComplete = function (mess, timeout)
    {
        // Hide the processing message.
        var el = $get('profileProgressImage');
        el.style.display = 'none';
        // Display the successful message text.
        el = $get('progressText');
        el.innerHTML = mess;
        el.style.color = '#20558A';
        
        setTimeout(this.Close, timeout);
    }

	this.FailureComplete = function (mess, timeout)
    {
        this.SuccessfulComplete(mess, timeout)
    }
}
