//-- Generate a random number between 0 and max.
function randomNum(max) {
  var rNum=NaN
  while (isNaN(rNum)) {
    rNum=Math.floor(Math.random()*(max))
  }
  return rNum
}
//-- Set up array of images to choose from.
var pic = new Array()
pic[0]="images/rotate/0.jpg"
pic[1]="images/rotate/1.jpg"
pic[2]="images/rotate/2.jpg"
pic[3]="images/rotate/3.jpg"
pic[4]="images/rotate/4.jpg"
pic[5]="images/rotate/5.jpg"


