%
%  Name:  opensession
% 
%  Usage: opensession
% 
%   Description:
%      Opens a dialog box 
%
%      'cdir' is the directory to start in
%
%  Version PJC960402
%
%  Author(s): Phillip Cornwell, cornwell@lanl.gov
%
%  Institution: Los Alamos National Laboratory,
%               ESA-EA
%
%  Copyright (c) 1996, The Regents of the University
%       of California. (See top level of code for
%       full copyright statement.)
%
%
%
%  Set file suffix filter
%

csuf = '*_sess.mat';

%
%  Append directory to filter
%

if cdir(length(cdir)) ~= '/',
    cdir = [cdir,'/'];
end

cfilt = [cdir,csuf];

%
%  Call the gui file save function
%

[filename,pathname] = uigetfile(cfilt,'DIAMOND: OpenSession',150,150);

if filename == 0 | filename == '',
   error = 1;
else
   error = 0;
end

if error==0,
   filetoget=[pathname,filename];
   eval(['load ' filetoget,';']);
end
return
