function stat = nnload(html_file)
%NNLOAD Netscape Navigator Load
%   This function loads an URL into Netscape Navigator.
%   If  Navigator is not running, we start it up.

%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 1.4 $  $Date: 1997/11/21 23:32:25 $

ch = ddeinit('netscape','WWW_OpenURL');
if ch
   d=ddereq(ch,[html_file ',,0xFFFFFFFF']);
   ddeterm(ch);
    
   % Make sure netscape is active
   ch = ddeinit('netscape', 'WWW_Activate');
   if ch
       d = ddereq(ch, '0xFFFFFFFF, 0x0');
       ddeterm(ch);
   end;
   stat = 0;
else
   doccmd = find_netscape;
   clear find_netscape
   if ~isempty(doccmd)
      comm = ['"' doccmd '" ' ' "' html_file '"&' ];
      dos (comm);
      stat = 0;
   else
      stat = 1;         
   end
end
