% common_start_up_tasks (cruiseid)

% Retrieve the necessary preferences for this cruise
group = group_name(cruiseid);

% btl_dir is the calibration data directory 
if ispref(group,'cal_btl_dir')
	btl_dir=getpref(group,'cal_btl_dir');
else
   	error(['The cal_btl_dir preference was not set for cruise: ' cruiseid '.  Run register_cruise.m']);
end

% cruise_dir is the calibration data directory 
if ispref(group,'cal_data_dir')
	cruise_dir=getpref(group,'cal_data_dir');
else
  	error(['The cal_data_dir preference was not set for cruise: ' cruiseid '.  Run register_cruise.m']);
end

% Load data from the cruise database
db_file = fullfile(cruise_dir,[cruiseid '_db.mat']);
if exist(db_file)==2
	load(db_file);
else
	error(['The cruise data base file was not found on the path.  ' db_file]);
end

return