function eit_catrds, time0, time1, $
   long=long, raw=raw, filename=filename, records=records
;+
;   Name: eit_catrd
;
;   Purpose: front end to catrd_daily (read time range)
;
;   Input Paramters:
;      time0 - start time
;      time1 - stop time
;   
;   Keyword Parameters:
;      raw -  if set, return catalog structures (default=string)
;      logn - switch (see catrd_daily documentation)
;      filename (output) - eit filenames
;      records  (output) - (see catrd_daily doc)
;
;   Calling Sequence:
;      cats=eit_catrds(time0 [,time1, /raw, /long, records=records, filename=filename]
;
;   History:
;    24-may-1996 S.L.Freeland
;-  

if not data_chk(time0,/string) then time0=ut_time()	; default today
raw=keyword_set(raw)

; read first entry
filex=''
cats=catrd_daily(time0, raw=raw, long=long, records=records, filename=filex)
filename=filex

if n_params() eq 2 then begin
   grid=timegrid(time0, time1, /day,/string)	; 1 day grid 
   for i=1,n_elements(grid)-1 do begin
       new=catrd_daily(grid(i), raw=raw, long=long, records=recordsx, filename=filex)
       records=[temporary(records),recordsx]
       filename=[temporary(filename),filex]
       if raw then cats=str_concat(cats,new) else cats=[cats,new]
   endfor
endif 

return, cats
end
