//Random Image Generator for the Main Portion of the Main Five pages
var ic = 4;     // Number of alternative images
var xoxo = new Array(ic);  // Array to hold filenames
        
xoxo[0] = "images/mainimage1.jpg";
xoxo[1] = "images/mainimage2.jpg";
xoxo[2] = "images/mainimage3.jpg";
xoxo[3] = "images/mainimage4.jpg";

function pickRandom(range) {
  if (Math.random)
    return Math.round(Math.random() * (range-1));
  else {
    var now = new Date();
    return (now.getTime() / 1000) % range;
  }
}

var choice = pickRandom(ic);


//Random Image Generator for the Right Column in Sub Pages
var numImages = 11;     // Number of alternative images
var rightcol = new Array(numImages);  // Array to hold filenames
        
//If adding new images, make sure that they are the exact same size as the exhisting ones.
rightcol[0] = "images/rightimg1.jpg";
rightcol[1] = "images/rightimg2.jpg";
rightcol[2] = "images/rightimg3.jpg";
rightcol[3] = "images/rightimg4.jpg";
rightcol[4] = "images/rightimg5.jpg";
rightcol[5] = "images/rightimg6.jpg";
rightcol[6] = "images/rightimg7.jpg";
rightcol[7] = "images/rightimg8.jpg";
rightcol[8] = "images/rightimg9.jpg";
rightcol[9] = "images/rightimg10.jpg";
rightcol[10] = "images/rightimg11.jpg";

function pickRightRandom(range) {
  if (Math.random)
    return Math.round(Math.random() * (range-1));
  else {
    var now = new Date();
    return (now.getTime() / 1000) % range;
  }
}

var rightChoice = pickRightRandom(numImages);