// please keep these lines on when you copy the source
// made by: Nicolas - http://www.javascript-page.com

//Random Image Selection script

//Also requires the following added in the body of the page
//<!-- Set default image in case user has javascript turned off -->
//<img id='rotatingimage' src="default.gif" />
//<script>
//image = new StringArray(1)
//image[0] = 'http://www.yesessentials.com/SiteCollectionImages/businessman.jpg'
//var ran = 60/image.length
//document.getElementById('rotatingimage').src=ranimage();
//</script>

//Functions
var currentdate = 0
var core = 0

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '

  }
}

function ranimage() {
  currentdate = new Date()
  core = currentdate.getSeconds()
  core = Math.floor(core/ran)
    return(image[core])
}