Timed function

I’ve been playing with some script I found on the net and Its pretty cool what it does. It looks through records from a csv file (basiclly excel) and displays them. It works fine moving from record to record but how would I tweak this with set interval so it would change on it own?


showPerTime = 1;
// declare variables and constants 
var loader = new LoadVars();
// load the file 
loader.load("list.csv");
loader.onData = function(dat) {
 
 //trace(dat);// split on 
 for files on windows server
 var input_arr = dat.split('
');
 // split on 
 for files on linux servers
 if (input_arr.length == 1) {
  input_arr = dat.split('
');
 }
 var fields = input_arr[0].split(',');
 function showDataFrom(a, b) {
  //trace(showDataFrom);
  cEnd = b;
  
  for (var c = 0; c<fields.length; c++) {
   _root.mcText[fields[c]].text = '';
  }
  for (var x = a; x<=b; x++) {
   var citem = input_arr[x].split(',');
   if (b>=input_arr.length) {
    fwd.enabled = false;
    fwd._alpha = 50;
   } else if (a<=1) {
    bk.enabled = false;
    bk._alpha = 50;
   }
   for (var y = 0; y<citem.length; y++) {
    _root.mcText[fields[y]].text += citem[y]+'
';
   }
  }
 }
 showDataFrom(1, showPerTime);
 fwd.onRelease = function() {
  bk.enabled = true;
  bk._alpha = 100;
  showDataFrom(cEnd+1, cEnd+showPerTime);
 };
 bk.onRelease = function() {
  fwd.enabled = true;
  fwd._alpha = 100;
  showDataFrom(cEnd-showPerTime*2+1, cEnd-showPerTime+0);
 };
};

Thanks for any and all help!!!