// JavaScript Document
var currentdate = 0
var core = 0

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '

  }
}

image = new StringArray(9)
image[0] = 'http://www.tpac.org/education/images/photobar/photobar1.jpg'
image[1] = 'http://www.tpac.org/education/images/photobar/photobar2.jpg'
image[2] = 'http://www.tpac.org/education/images/photobar/photobar3.jpg'
image[3] = 'http://www.tpac.org/education/images/photobar/photobar4.jpg'
image[4] = 'http://www.tpac.org/education/images/photobar/photobar5.jpg'
image[5] = 'http://www.tpac.org/education/images/photobar/photobar6.jpg'
image[6] = 'http://www.tpac.org/education/images/photobar/photobar7.jpg'
image[7] = 'http://www.tpac.org/education/images/photobar/photobar8.jpg'
image[8] = 'http://www.tpac.org/education/images/photobar/photobar9.jpg'

var ran = 60/image.length

function ranimage() {
  currentdate = new Date()
  core = currentdate.getSeconds()
  core = Math.floor(core/ran)
    return(image[core])
}