var currentdate = 0
var core = 0

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '

  }
}

image = new StringArray(10)
image[0] = 'random/0.jpg'
image[1] = 'random/1.jpg'
image[2] = 'random/2.jpg'
image[3] = 'random/3.jpg'
image[4] = 'random/4.jpg'
image[5] = 'random/5.jpg'
image[6] = 'random/6.jpg'
image[7] = 'random/7.jpg'
image[8] = 'random/8.jpg'
image[9] = 'random/9.jpg'

var ran = 60/image.length

function ranimage() {
  currentdate = new Date()
  core = currentdate.getSeconds()
  core = Math.floor(core/ran)
    return(image[core])
}

document.write("<img src='" +ranimage()+ "'>")

