var currentdate = 0
var core = 0

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '

  }
}

image = new StringArray(17)
image[1] = "http://www.gkservices.com/images/sub-img/back-truck1.jpg"
image[2] = "http://www.gkservices.com/images/sub-img/management1.jpg"
image[3] = "http://www.gkservices.com/images/sub-img/truck2.jpg"
image[4] = "http://www.gkservices.com/images/sub-img/a1.jpg"
image[5] = "http://www.gkservices.com/images/sub-img/industral1.jpg"
image[6] = "http://www.gkservices.com/images/sub-img/food1.jpg"
image[7] = "http://www.gkservices.com/images/sub-img/chef1.jpg"
image[8] = "http://www.gkservices.com/images/sub-img/industral2.jpg"
image[9] = "http://www.gkservices.com/images/sub-img/auto1.jpg"
image[10] = "http://www.gkservices.com/images/sub-img/prosura1.jpg"
image[11] = "http://www.gkservices.com/images/sub-img/prosura2.jpg"
image[12] = "http://www.gkservices.com/images/sub-img/protect1.jpg"
image[13] = "http://www.gkservices.com/images/sub-img/protect2.jpg"
image[14] = "http://www.gkservices.com/images/sub-img/protect3.jpg"
image[15] = "http://www.gkservices.com/images/sub-img/history.jpg"
image[16] = "http://www.gkservices.com/images/sub-img/location.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()+ "'>")
