function fd_new

% function fd_new
%
% This function is used in conjunction with FD3.  It starts a new, blank flow
% diagram.  If necessary, the program asks the user is he wishes to save his
% old flow diagram before the new diagram is begun.
%
% ACP

% Last update:  July 11, 1993
% Author:       Adrian C. Penisson

global FD3STATUS FD3FIGURE

if FD3STATUS(4)

   % If diagram is unsaved, ask user if he wishes to save it first.

   set_menu(1:6,'off')
   choice=di_choic('','Save Current Diagram First?','YES','NO');

   if choice==1

      % Save the file if the user asks to.

      fd_save(0);

   end

end

% Erase old diagram.

fd_clear

% Set status to indicate the diagram does not have a name and set diagram
% name to 'untitled'.  Reset.

FD3STATUS(3)=1;
set(FD3FIGURE,'Name','FROG Draw 3: untitled')
fd_reset(0)
