var currentdate = 0
var core = 0

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '
  }
}

image = new StringArray(7)
image[0] = '/templates/inline/images/random/rnd001.png';
image[1] = '/templates/inline/images/random/rnd002.png';
image[2] = '/templates/inline/images/random/rnd003.png';
image[3] = '/templates/inline/images/random/rnd004.png';
image[4] = '/templates/inline/images/random/rnd005.png';
image[5] = '/templates/inline/images/random/rnd006.png';
image[6] = '/templates/inline/images/random/rnd007.png';


var ran = 60/image.length;

function ranimage() {
  currentdate = new Date()
  core = currentdate.getSeconds()
  core = Math.floor(core/ran)
  core = Math.floor(Math.random() * image.length)
  document.getElementById("rndpic").innerHTML = "<img src='" +image[core]+ "' width='155' height=155' />";
//  setTimeout("ranimage()",4500);
}

ranimage();

