function whatsnew(arg)
%WHATSNEW Access Release Notes via the Help browser.
%   WHATSNEW <toolboxpath> displays the Readme.m file for the toolbox
%   with the specified toolbox path in the Help browser.  For example,
%
%   whatsnew wavelet    - Display Wavelet Toolbox Readme.m file.
%
%   A Readme.m file, if it exists for a given product, contains the most
%   recent information regarding the product that might not be available
%   in the installable online documentation.
%
%   If a Readme.m file does not exist for a given product, or if
%   WHATSNEW is called without any arguments, then the Release Notes
%   are displayed in the Help browser.
%
%   See also VER, INFO, HELP, WHICH, PATH, LOOKFOR.

%   Copyright 1984-2000 The MathWorks, Inc.
%   $Revision: 5.14 $  $Date: 2000/08/24 20:59:12 $

msg = nargchk(0,1,1);
if (nargin == 0)
    if (isempty(docroot))
        disp(' ')
        disp('     Documentation location is not set.')
        disp('     Set your documentation location to access Release Notes')
        disp('     or use WHATSNEW with an argument to access appropriate')
        disp('     README files.')
        
        if (usejava('mwt') == 1)
            hBrowser = javaMethod('getHelpBrowser','com.mathworks.ide.help.HelpBrowser');
            setCurrentLocation(hBrowser, fullfile(matlabroot, 'toolbox', ...
                'local','helperr.html'));
        else
            html_file = fullfile(matlabroot,'toolbox','local','helperr.html');
            
            % Load the correct HTML file into the browser.
            stat = web(html_file);
            if (stat==2)
                error(['Could not launch Web browser. Please make sure that'  sprintf('\n') ...
                        'you have enough free memory to launch the browser.']);
            elseif (stat)
                error(['Could not load HTML file into Web browser. Please make sure that'  sprintf('\n') ...
                        'you have a Web browser properly installed on your system.']);
            end
        end 
        return;
    end
    
    if (usejava('mwt') == 1)
        hBrowser = javaMethod('getHelpBrowser','com.mathworks.ide.help.HelpBrowser');
        setCurrentLocation(hBrowser, fullfile(docroot,'techdoc','relnotes', ...
            'contents.html'));
    else
        html_file = fullfile(docroot,'techdoc','relnotes', 'contents.html');
    
        % Load the correct HTML file into the browser.
        stat = web(html_file);
        if (stat==2)
            error(['Could not launch Web browser. Please make sure that'  sprintf('\n') ...
                    'you have enough free memory to launch the browser.']);
        elseif (stat)
            error(['Could not load HTML file into Web browser. Please make sure that'  sprintf('\n') ...
                    'you have a Web browser properly installed on your system.']);
        end
    end
    
else
    info(arg)
end    
