;+
;NAME:
;	go_tr_seq_sum_img
;PURPOSE:
;	Make the sequence summary listings and gif files
;HISTORY:
;	Written 7-Apr-98 by M.Morrison
;	 4-Jun-98 (MDM) - Added a call to tr_mk_seq_alph
;	10-Jun-98 (MDM) - Modified logic so that month rollover works
;        3-Sep-98 (FZ)  - Generate GIF files only a number of days back
;-
;
if (n_elements(entim) eq 0) then entim = ut_time()
if (n_elements(nday) eq 0) then nday = 4	;number of days back to do
sttim = anytim2ints(entim, off=-24.*60.*60*nday)
;
bdir = getenv('TR_WEB_SEQ_SUM')
bdir2 = getenv('TR_WEB_DAY_SUM')
;
;----- The by day stuff
;
tr_seq_sum_img_by_day, gt_day(sttim,/str), gt_day(entim,/str), /collage, /zfile
mk_tr_seq_sum_by_day_html, concat_dir(bdir2, 'gif'), bdir2
;
;----- The by sequence stuff
;
tr_seq_sum_img_by_seqrun, sttim, entim, /collage, /zfile
fid1 = strmid(time2file(entim), 2, 4)
fid2 = strmid(time2file(sttim), 2, 4)
fid = fid1
again:
efid = strmid(time2file(anytim2ints(file2time(fid+'01.0000',out='INT'), off=32*86400d)), 2, 4)
sttim2 = file2time(fid + '01', out='INT')
entim2 = file2time(efid + '01', out='INT')
seq_run_sum, sttim2, entim2, outfil='$TR_WEB_SEQ_SUM/temp'
mk_tr_seq_sum_by_seqrun_html, fid, concat_dir(bdir, 'gif'), bdir, bdir
if (fid2 ne fid) then begin
    fid = fid2
    goto, again		;month roll over - do previous month over
end
tr_mk_seq_alph
;
end
    
