function roi_toolbox_help

% Simple wrapper around a case statement to 
% enable functionality of the 'Help' pop-up
% menu in the ROI Toolbox.  See 'Examples'
% section in the 'uicontrol' help in Matlab
% help for details on how pop-up menus
% work in Matlab.  Essentially we just
% need to test the Value property of
% pop-up menu and execute the appropriate
% text callback.
%---------------------------------------------
% Jeff Cooper, 12/17/02


h = findobj(get(gcf, 'Children'), 'Tag', 'helpmenu');

val = get(h, 'Value');

tooldir = which('roimod1');
tooldir = fileparts(tooldir);

if val==2
    open(fullfile(tooldir, 'help', 'global_variate_readme.txt'));
elseif val == 3
    open(fullfile(tooldir, 'help', 'movement_parameters_readme.txt'));
elseif val == 4
    open(fullfile(tooldir, 'help', 'movie_of_images_readme.txt'));
elseif val == 5
    open(fullfile(tooldir, 'help', 'roi_stats_readme.txt'));
elseif val == 6
    open(fullfile(tooldir, 'help', 'roi_extract_readme.txt'));
elseif val == 7
    open(fullfile(tooldir, 'help', 'percent_signal_change_readme.txt'));
elseif val == 8
    open(fullfile(tooldir, 'help', 'roi_deconvolve_readme.txt'));
elseif val == 9
    open(fullfile(tooldir, 'help', 'display_rois_readme.txt'));
elseif val == 10
    open(fullfile(tooldir, 'help', 'display_slices_readme.txt'));
elseif val == 11
    open(fullfile(tooldir, 'help', 'render_readme.txt'));
elseif val == 12
    open(fullfile(tooldir, 'help', 'img2txt_readme.txt'));
elseif val == 13
    open(fullfile(tooldir, 'help', 'txt2img_readme.txt'));
elseif val == 14
    open(fullfile(tooldir, 'help', 'mni2tal_readme.txt'));
elseif val == 15
    open(fullfile(tooldir, 'help', 'tal2mni_readme.txt'));
elseif val == 16
    open(fullfile(tooldir, 'help', 'generate_tal_rois_readme.txt'));
elseif val == 17
    open(fullfile(tooldir, 'help', 'xyz_rois_readme.txt'));
elseif val == 18
    open(fullfile(tooldir, 'help', 'roi_process_readme.txt'));
elseif val == 19
    open(fullfile(tooldir, 'help', 'smooth_readme.txt'));
elseif val == 20
    open(fullfile(tooldir, 'help', 'truncate_readme.txt'));
elseif val == 21
    open(fullfile(tooldir, 'help', 'reverse_norm_readme.txt'));
elseif val == 22
    open(fullfile(tooldir, 'help', 'roi_time_series_analyses_readme.txt'));
elseif val == 23
    open(fullfile(tooldir, 'help', 'na_readme.txt'));
elseif val == 24
    open(fullfile(tooldir, 'help', 'generate_func_rois_readme.txt'));
elseif val == 25
    open(fullfile(tooldir, 'help', 'spm_tal_stats_readme.txt'));
elseif val == 26
    open(fullfile(tooldir, 'help', 'na_readme.txt'));
elseif val == 27
    open(fullfile(tooldir, 'help', 'display_talspace_readme.txt'));
elseif val == 28
    open(fullfile(tooldir, 'help', 'na_readme.txt'));

end

