subr xrtlistnext_cb, direction
 ;finds the next or previous available hourly file
 pos = $xrtobsfilepos + direction
 if pos lt 1 or pos gt (num_elem($xrtobsdir)) then {
   errormess,'you are at an\nedge of the list\n'
   return }
 ;fake a click on the list
 xmlistselect, $xrtobsfilelist, pos, 2
 endsubr
 ;======================================================= 
