% GUIfigurenum
% Function for the MODIS GUI
% Copyright by Jasmine S Nahorniak, Oregon State University. 
% March 10 2000

function GUIfigurenum(button,figtag);

figs=[];
if iscell(figtag),
   for i=1:length(figtag),
       figs=[figs; findobj('Tag',figtag{i})];
   end
else
   figs=findobj('Tag',figtag);
end
figs=sort(figs);

butt=findobj('Tag',button);

if ~isempty(figs),
  set(butt,'Value',1);
  set(butt,'String',{'new'; num2str(figs)}); 
else
  set(butt,'Value',1);
  set(butt,'String',{'new'});
end
