﻿var currentdate = 0
var core = 0

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '

  }
}

image = new StringArray(8)
image[0] = '<style> body { background: #fff url(images/bigBgrnd_07.jpg) repeat-x; }</style>'
image[1] = '<style> body { background: #fff url(images/bigBgrndPatrnHalf.jpg) repeat-x; }</style>'
image[2] = '<style> body { background: #fff url(images/bigBgrnd_01.jpg) repeat-x; }</style>'
image[3] = '<style> body { background: #fff url(images/bigBgrnd_02.jpg) repeat-x; }</style>'
image[4] = '<style> body { background: #fff url(images/bigBgrnd_03.jpg) repeat-x; }</style>'
image[5] = '<style> body { background: #fff url(images/bigBgrnd_04.jpg) repeat-x; }</style>'
image[6] = '<style> body { background: #fff url(images/bigBgrnd_05.jpg) repeat-x; }</style>'
image[7] = '<style> body { background: #fff url(images/bigBgrnd_06.jpg) repeat-x; }</style>'

var ran = 60/image.length

function ranimage() {
  currentdate = new Date()
  core = currentdate.getSeconds()
  core = Math.floor(core/ran)
    return(image[core])
}

document.write("" +ranimage()+ "")