function CEL_OnAccountChanged(Source, EventID, Change, Account, Position, varargin)

global m_CEL;
global m_AccountID;

try
    % Informing about accounts reload and taking GWAccountID of the first
    % account in Accounts collection.
    if (Change == 0 && m_AccountID == 0)  
        m_AccountID = m_CEL.Accounts.ItemByIndex(0).GWAccountID;
        disp(['All accounts were reloaded. The account with ''', num2str(m_AccountID), ''' GWAccountID was selected.']);
    end   
catch
    CEL_ShutDown;
    disp('An error occurred in CEL_OnAccountChanged.m file.');
end