function getrnd(minr,maxr) { return Math.floor(Math.random()*(maxr+1-minr))+minr; } 

function transitionReveal(n) 
{
  var cur_shot = 'shot'+n;
  show_shot = free_shot;
  free_shot = document.all[cur_shot].src;
  var tmp = getrnd(1,4);
  if (tmp == 1) t = 3; 
  if (tmp == 2) t = 8; 
  if (tmp == 3) t = 12; 
  if (tmp == 4) t = 22; 
  document.all[cur_shot].filters.revealTrans.duration = 2;
  document.all[cur_shot].filters.revealTrans.transition = t;//getrnd(1,22);
  document.all[cur_shot].filters.revealTrans.Apply();
  document.all[cur_shot].src = show_shot;
  document.all[cur_shot].filters.revealTrans.Play();

//duration=2,transition=22
}

function timer() 
{  
  var tmp = getrnd(1,256);
  if (tmp < 96) t = 4000; 
  else
    if (tmp < 192) t = 6000; 
    else
      if (tmp < 224) t = 10000; 
      else t = 18000; 

  setTimeout("transitionReveal(getrnd(1,5)); timer();", t); 
}