// JavaScript Document
// please keep these lines on when you copy the source
// made by: Nicolas - http://www.javascript-page.com

var currentdate = 0
var core = 0

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '

  }
}

image = new StringArray(6)
image[0] = 'images/rewards-books-19377166.jpg'
image[1] = 'images/rewards-food-31192321.jpg'
image[2] = 'images/rewards-food-63293713.jpg'
image[3] = 'images/rewards-books-63307076.jpg'
image[4] = 'images/rewards-food-31197343.jpg'
image[5] = 'images/rewards-movies-24709823.jpg'

var ran = 60/image.length

function ranimage() {
  currentdate = new Date()
  core = currentdate.getSeconds()
  core = Math.floor(core/ran)
  if (core >5 ) {core=5;}
  if (core <0 ) {core =0;}
    return(image[core])
}
function showImage(){
document.write('<img src="' +ranimage() + '"' + 'width="150" alt="rewards"' + '">')
}

//-->


