function [s1,s2,c]=di_inp_2(txt1,def1,txt2,def2)

% function [s1,s2,c]=di_inp_2(txt1,def1,txt2,def2)
%
% This function is used in conjunction with FD3.  It creates a dialog box with
% two inputs labled 'txt1' and 'txt2'.  The default values for these inputs
% are 'def1' and 'def2'.  The strings which the user finally entered for
% the two inputs are returned in 's1' and 's2'.  The flag 'c' is set to 1 if
% the user hit cancel and 0 if the user hit done.
%
% ACP

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

global FD3DITEMP FD3PXPERCM

FD3DITEMP=0;

%%%%%%%%%%%%%%%%%%%
% Make 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.2 c(2)+.4 1.8 .3].*cv,'Str',txt1);
eh1=uicontrol('Sty','edit','Pos',[c(1)-1.2 c(2)+.1 1.4 .2].*cv,'Str',def1);
th2=uicontrol('Sty','text','Pos',[c(1)-1.2 c(2)-.4 1.8 .3].*cv,'Str',txt2);
eh2=uicontrol('Sty','edit','Pos',[c(1)-1.2 c(2)-.7 1.4 .2].*cv,'Str',def2);
bh=uicontrol('Sty','push','Pos',[c(1)+.5 c(2)-.7 .8 .4].*cv,'Str','DONE',...
   'Call','FD3DITEMP=1;');
ch=uicontrol('Sty','push','Pos',[c(1)+.5 c(2)+.1 .8 .4].*cv,'Str','CANCEL',...
   'Call','FD3DITEMP=2;');

h=[fh th1 eh1 th2 eh2 bh ch];

set(h,'Units','Pixels')
set(h(1:5),'Horiz','Left')

%%%%%%%%%%%%%%%%%%%%%%%%%
% If B&W, adjust colors %
%%%%%%%%%%%%%%%%%%%%%%%%%

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

%%%%%%%%%%%%%%%%%%
% Wait till done %
%%%%%%%%%%%%%%%%%%

while FD3DITEMP==0
   pause(.01)
   s1=get(eh1,'String');
   s2=get(eh2,'String');
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Knock off initial and trailing blanks %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

s1=deblank(fliplr(deblank(fliplr(s1))));
s2=deblank(fliplr(deblank(fliplr(s2))));

c=FD3DITEMP-1;

close(h)
FD3DITEMP=[];
