// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.
 
theImages[0] = 'images/1.jpg'
theImages[1] = 'images/2.jpg'
theImages[2] = 'images/3.jpg'
theImages[3] = 'images/4.jpg'
theImages[4] = 'images/5.jpg'
theImages[5] = 'images/6.jpg'
theImages[6] = 'images/7.jpg'
theImages[7] = 'images/8.jpg'
theImages[8] = 'images/9.jpg'
theImages[9] = 'images/10.jpg'
theImages[10] = 'images/11.jpg'
theImages[11] = 'images/12.jpg'
theImages[12] = 'images/13.jpg'
theImages[13] = 'images/14.jpg'
theImages[14] = 'images/15.jpg'
theImages[15] = 'images/16.jpg'
theImages[16] = 'images/17.jpg'
theImages[17] = 'images/18.jpg'
theImages[18] = 'images/19.jpg'
theImages[19] = 'images/20.jpg'
theImages[20] = 'images/21.jpg'
theImages[21] = 'images/22.jpg'
theImages[22] = 'images/23.jpg'
theImages[23] = 'images/24.jpg'
theImages[24] = 'images/25.jpg'
theImages[25] = 'images/26.jpg'
theImages[26] = 'images/27.jpg'
theImages[27] = 'images/28.jpg'
theImages[28] = 'images/29.jpg'
theImages[29] = 'images/30.jpg'
theImages[30] = 'images/31.jpg'
theImages[31] = 'images/32.jpg'
theImages[32] = 'images/33.jpg'
theImages[33] = 'images/34.jpg'
theImages[34] = 'images/35.jpg'
theImages[35] = 'images/36.jpg'
theImages[36] = 'images/37.jpg'
theImages[37] = 'images/38.jpg'
theImages[38] = 'images/39.jpg'
theImages[39] = 'images/40.jpg'
theImages[40] = 'images/41.jpg'
theImages[41] = 'images/42.jpg'
theImages[42] = 'images/43.jpg'
// do not edit anything below this line

function PreLoadImages() {
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
}

function NextRandomNumber()
{ var hi   = this.seed / this.Q;
  var lo   = this.seed % this.Q;
  var test = this.A * lo - this.R * hi;
  if (test > 0) this.seed = test;
  else          this.seed = test + this.M;
  return (this.seed * this.oneOverM);
}

function RandomNumberGenerator()
{ var d = new Date();
  this.seed = 2345678901
            + (d.getSeconds() * 0xFFFFFF)
            + (d.getMinutes() * 0xFFFF);
  this.A = 48271;
  this.M = 2147483647;
  this.Q = this.M / this.A;
  this.R = this.M % this.A;
  this.oneOverM = 1.0 / this.M;
  this.next = NextRandomNumber;
  return this;
}

function CreateRandomNumber(Min, Max)
{ var rand = new RandomNumberGenerator();
  return Math.round( (Max-Min) * rand.next() + Min );
}

 function changeBackground() {
	var whichImage = CreateRandomNumber(1, 43);
        //Math.round(Math.random()*(p-1));
	var changeMe = document.getElementById('Table_01');
	changeMe.style.backgroundColor = 'white'
	changeMe.style.backgroundImage = 'url('+theImages[whichImage]+')';
	changeMe.style.backgroundRepeat = 'no-repeat';
	changeMe.style.backgroundPosition = 'center';
	
	setTimeout('PreLoadImages()', 1000);
}
//  End -->