function di_warn(txt1,txt2,label)

% function di_warn(txt1,txt2,label)
%
% This function is used in conjunction with FD3.  The two strings 'txt1' and
% 'txt2' each contain one line of the warning message.  'Label' is the string
% used to label the dismissal button.
% 
% ACP

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

global FD3DITEMP FD3PXPERCM

FD3DITEMP=0;

%%%%%%%%%%%%%%%%%%%%%
% set up dialog box %
%%%%%%%%%%%%%%%%%%%%%

c=[2.75 2.125];
cv=2.54*[FD3PXPERCM FD3PXPERCM];

fh=uicontrol('Sty','frame','Pos',[c(1)-1.5 c(2)-1 3 2].*cv);
th1=uicontrol('Sty','text','Pos',[c(1)-1.4 c(2)+.5 2.8 .3].*cv,'Str',txt1);
th2=uicontrol('Sty','text','Pos',[c(1)-1.4 c(2)+.1 2.8 .3].*cv,'Str',txt2);
bh=uicontrol('Sty','push','Pos',[c(1)-.5 c(2)-.7 1 .4].*cv,'Str',label,...
   'Call','FD3DITEMP=1;');

h=[fh th1 th2 bh];

set(h,'Units','Pixels')

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% adjust for B&W if necessary %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%if get(0,'ScreenDepth')==1
%   for i=1:4
%      set(h(i),'ForegroundColor',[1 1 1],'BackgroundColor',[0 0 0])
%   end
%end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% wait for user to dismiss %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

while FD3DITEMP==0
   pause(0.1)
end

FD3DITEMP=[];
close(h)
