function menucros() % autogenerated function wrapper
    %  menucros allows the user to establish parameters for zmaps
    %
    % turned into function by Celso G Reyes 2017
    error('replaced (enveloped) by magrcro');
    ZG=ZmapGlobal.Data; % used by get_zmap_globals
    report_this_filefun(mfilename('fullpath'));
    
    %issue a warning if no grid exist
    if ~exist('cumuall', 'var')
        ZmapMessageCenter.set_message('Warning', ' You have to create a grid first!')
        return
    end
    
    % This is the info window text
    %
    ttlStr='The various z-value maps             ';
    hlpStr1= ...
        ['                                                          '
        ' This window allows you to calculate various z-value maps:'
        ' Once you have created a grid you can apply               '
        ' several different statistics to it. See the              '
        ' User Guide for additional information                    '
        '                                                          '
        ' Maxz-LTA: Uses the LTA statistic and calculates a LTA    '
        ' z-value map for each time-step. Only the maximum value   '
        ' for all time at each grid point is finally plotted in the'
        ' map. Thsi allows to find the most outstanding decreases  '
        ' in the entire catalog.                                   '
        ' ANIMATION: Will produca a movie of several z-value maps  '
        ' at differnt times. Either the LTA or AS statistic will be'
        ' used. ! Uses large amounts of memory!                    '
        ' TIMECUT: Will display one z-value map for a specified    '
        ' time, using LTA, AS, Rubberband or Percent.              '
        '                                                          '
        ' ALARM: Will calculate an Alarm cube using LTA or         '
        ' Rubberband. If any z-value (all time and space) exceeds a'
        ' threshold an alarm is declared and plotted as a "o" in   '
        ' cube representing time and space. Will first calculate   '
        ' Histogram of all z-value                                 '
        '                                                          '];
    
    hlpStr2= ...
        ['                                                '
        '                                                '];
    
    
    % make the interface
    %
    
    figure(mess);
    report_this_filefun(mfilename('fullpath'));
    clf
    in2 ='input';
    set(gcf,'Name','ZMAP Parameters');
    set(gca,'visible','off');
    set(gcf,'Units','points','pos',[200 200 220 350 ])
    
    te = text(0.1,0.90,'You can choose from the \newlinefollowing options:');
    set(te,'FontSize',ZmapGlobal.Data.fontsz.m,'FontWeight','bold')
    
    te3 = text(0.15,0.38,'Timecuts') ;
    set(te3,'FontSize',ZmapGlobal.Data.fontsz.m,'Color','r','FontWeight','bold')
    
    LTA2_button=uicontrol('BackGroundColor',[0.8 0.8 0.8]','Style','Pushbutton',...
        'Position',[.10 .35 .45 .04 ],...
        'Units','normalized',...
        'callback',@(~,~)show_cro('lta',in2),...
        'String','LTA ');
    
    AS2_button=uicontrol('BackGroundColor',[0.8 0.8 0.8]','Style','Pushbutton',...
        'Position',[.10 .28 .45 .04 ],...
        'Units','normalized',...
        'callback',@(~,~)show_cro('ast',in2),...
        'String','AS ');
    
    per_button=uicontrol('BackGroundColor',[0.8 0.8 0.8]','Style','Pushbutton',...
        'Position',[.10 .20 .45 .04 ],...
        'Units','normalized',...
        'callback',@(~,~)show_cro('per',in2),...
        'String','Percent ');
    
    rub_button=uicontrol('BackGroundColor',[0.8 0.8 0.8]','Style','Pushbutton',...
        'Position',[.10 .12 .45 .04 ],...
        'Units','normalized',...
        'callback',@(~,~)show_cro('rub',in2),...
        'String','Rubberband');
    
    uicontrol('Style','Pushbutton',...
        'Position',[.70 .01 .25 .08 ],...
        'Units','normalized','Callback',@(~,~)ZmapMessageCenter(),'String','Cancel');
    
    uicontrol('Units','normal',...
        'Position',[.1 .01 .25 .08],'String','Info ',...
        'callback',@callbackfun_009)
    
    watchoff
    
    function callbackfun_009(mysrc,myevt)

        callback_tracker(mysrc,myevt,mfilename('fullpath'));
        zmaphelp(ttlStr,hlpStr1,hlpStr2);
    end
    
    function callbackfun_010(mysrc,myevt)

        callback_tracker(mysrc,myevt,mfilename('fullpath'));
        ZmapMessageCenter();
        drawnow;
        incube;
    end
    
end
