%runs from inside webmaster.

% plot it on figure(1) with topography
if (~exist([cruise_name,'.ps'])&~exist([cruise_name,'.eps']))
   clev=[-6000:500:0];
   figure(1);clf
   [cc,hh]=contourf6(top_lon,top_lat,topog, clev); 
   hold on;
   set(hh, 'EdgeColor', 'none');
   caxis([clev(1) clev(end-1)]);
   plot(x,y,'k')

   title(cruise_name);
   dcolbar(clev,'horiz','depth(km)');
   axis('equal');
   axis([lonrange latrange]);
   orient(orientation);

   % added ".eps" to the filename because of a matlab 5.3 bug
   eval(sprintf('print -depsc  %s.eps',cruise_name));
   
   if (strcmp(translator,'i'))
      iconvert(cruise_name, 'eps', new_extension, CONVERT_SWITCHES)
   else    %if (strcmp(translator,'g'))
      gsconvert(cruise_name, 'eps', new_extension, GS_SWITCHES)
%    else
%       error('chose incorrect translator: see webglobs')
   end
   
   lltick(gca,'x','lon','y','lat');
   close
else
   disp(sprintf('%s.eps already exists. Not making overview topography figure.',upper(cruise_name)));
end 

figure(2);clf  
[c,h]=contour6(top_lon,top_lat,topog,[-4000 -2000 -1000]);
hold on
[bs,es,levs]=clines(c);
for linei=1:length(levs)  
   h=plot(c(1,bs(linei):es(linei)),c(2,bs(linei):es(linei)),'k');
   set(h,'color',[1 1 1]*abs(levs(linei))/5000)
end

plot(x,y,'k');grid on
axis('equal')
axis([lonrange latrange])

if (exist('sectinfo.mat'))
   load sectinfo
end
if (exist('sect_info'))
   for sectjj=1:length(sect_info)
      sect_color=sect_colors(~(sect_colors==sect_color)); %i.e. switch colors
      sect_dday=sect_info(sectjj).dates;
      ii=find((sect_dday(1)<=dday)&(dday<=sect_dday(2)));
      sect_info(sectjj).ii=[min(ii) max(ii)];
      iii=sect_info(sectjj).ii;
      h=plot(x(iii(1):iii(2)),y(iii(1):iii(2)),sect_color);lw(h,2)
      xytext=sect_info(sectjj).xytext;
      h=text(xytext(1),xytext(2),sect_info(sectjj).name);
      set(h,'color',sect_color);fs(h,fontsize)
   end
end
lltick(gca,'x','lon','y','lat');
grid on

f1;
h=plot(x,y,'k.');ms(h,1);hold on
if (exist('sect_info'))
   for sectjj=1:length(sect_info)
      sect_color=sect_colors(~(sect_colors==sect_color)); %i.e. switch colors
      iii=sect_info(sectjj).ii;
      h=plot(x(iii(1):iii(2)),y(iii(1):iii(2)),sect_color);lw(h,2)
      xytext=sect_info(sectjj).xytext;
      h=text(xytext(1),xytext(2),sect_info(sectjj).name);
      set(h,'color',sect_color);fs(h,fontsize)
   end
   lltick(gca,'x','lon','y','lat');
end
