var currentdate = 0
var core = 0

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '

  }
}

image = new StringArray(6)
image[0] = 'index_files/rnd/front01.jpg'
image[1] = 'index_files/rnd/front02.jpg'
image[2] = 'index_files/rnd/front03.jpg'
image[3] = 'index_files/rnd/front04.jpg'
image[4] = 'index_files/rnd/front05.jpg'
image[5] = 'index_files/rnd/front06.jpg'
var ran = 108000

function ranimage() {
  currentdate = new Date()
  core = currentdate.getSeconds()
  core = Math.floor(core/ran)
    return(image[core])
}

document.write("<img src='" +ranimage()+ "' width=780 height =399 alt='Welcome to Aluminium of Greece'>")