function ctmenu(mode, figNumber)

if mode == 1,
h=uimenu(figNumber,'Label','Action');
        uimenu(h,'Label','Load', ...
                 'Callback','ct_i_frd(''load'');');
     h2=uimenu(h,'Label','Solve', ...
                 'Callback','ct_i_frd(''solve'');');               
        uimenu(h,'Label','Close All Windows', ...
                 'Callback','close all', ...
                 'Separator','on');                 
        uimenu(h,'Label','Quit', ...
                 'Callback','close', ...
                 'Separator','on');                                  

h=uimenu(figNumber,'Label','Analysis');
     h1=uimenu(h,'Label','Phantom', ...
                 'Callback','ct_i_frd(''phantom'');');
     h2=uimenu(h,'Label','2D Deviation', ...
                 'Callback','ct_i_frd(''2ddeviation'');');
     h2=uimenu(h,'Label','3D Deviation', ...
                 'Callback','ct_i_frd(''3ddeviation'');');                 
     h3=uimenu(h,'Label','Coefficient', ...
                 'Callback','ct_i_frd(''coeff'');');
     h4=uimenu(h,'Label','Error', ...
                 'Callback','ct_i_frd(''error'');', ...
                 'Separator','on');                 
                 
elseif mode == 2,

h=uimenu(figNumber,'Label','Action');
     h1=uimenu(h,'Label','Start', ...
                 'Callback','ct_d_frd(''start'');');               
     h2=uimenu(h,'Label','Save', ...
                 'Callback','ct_d_frd(''export'');');
        uimenu(h,'Label','Close All Windows', ...
                 'Callback','close all', ...
                 'Separator','on');
        uimenu(h,'Label','Quit', ...
                 'Callback','close', ...
                 'Separator','on');

h=uimenu(figNumber,'Label','Analysis');
     h1=uimenu(h,'Label','Course', ...
                 'Enable', 'off', ...
                 'Callback','ct_d_frd(''course'');');
     h2=uimenu(h,'Label','Weakness', ...
                 'Callback','ct_d_frd(''weak'');');
end;
