var num_stats = 3;

var stat_imgs = new Array;
for (x = 1; x <= num_stats; x++)
{
  stat_imgs[x] = new Array;
  stat_imgs[x][1] = new Image;
  stat_imgs[x][1].src = root+'images/stats_'+x+'.png';
  stat_imgs[x][2] = new Image;
  stat_imgs[x][2].src = root+'images/stats_'+x+'b.png';
}

function show_players_stats(which)
{
  for (x = 1; x <= num_stats; x++)
  {
    document.getElementById('player_stats_'+x).className = (which == x) ? 'shown' : 'hidden';
    document.getElementById('stat_img_'+x).src = (which == x) ? stat_imgs[x][2].src : stat_imgs[x][1].src;
  }
}
