/**
 * The new, improved person rotator script
 */

var imagePaths = new Array();
imagePaths[0] = 'images/2011/LeftTopHichborns.png';
imagePaths[1] = 'images/2011/LeftTopRachel.png';
imagePaths[2] = 'images/2011/LeftTopTom.png';
imagePaths[3] = 'images/2011/LeftTopLisa.png';
imagePaths[4] = 'images/2011/LeftTopMarie.png';
imagePaths[5] = 'images/2011/LeftTopJess.png';
imagePaths[6] = 'images/2011/LeftTopAngie.png';
imagePaths[7] = 'images/2011/LeftTopShannon.png';
imagePaths[8] = 'images/2011/LeftTopMeg.png';
imagePaths[9] = 'images/2011/LeftTopKatie.png';
imagePaths[10] = 'images/2011/LeftTopAlyssa.png';

var images = new Array();
for ( var i = 0; i < imagePaths.length; i++ ) {
  images[i] = new Image();
  images[i].src = imagePaths[i];
}

function swapImage() {
  var lsh = document.getElementById( 'wrapMain' );
  var idx = Math.floor( Math.random() * imagePaths.length );

  lsh.style.background = 'url( ' + imagePaths[ idx ] + ' ) no-repeat';
  setTimeout( 'swapImage()', 6000 );
}
