//RANDOM IMAGE

// made by: Nicolas - http://www.javascript-page.com

var currentdate = 0;
var core = 0;

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' ';

  }
}

image = new StringArray(10);

image[0] = 'images/template/home_0.png';
image[1] = 'images/template/home_2.png';
image[2] = 'images/template/home_1.gif';
image[3] = 'images/template/home_2.png';
image[4] = 'images/template/home_1.gif';
image[5] = 'images/template/home_0.png';

pocoimage = new StringArray(10);

pocoimage[0] = 'images/template/poco_1.gif';
pocoimage[1] = 'images/template/poco_1.gif';
pocoimage[2] = 'images/template/poco_1.gif';
pocoimage[3] = 'images/template/poco_1.gif';
pocoimage[4] = 'images/template/poco_1.gif';
pocoimage[5] = 'images/template/poco_1.gif';



var ran = 60/image.length;

function ranimage() {
  currentdate = new Date();
  core = currentdate.getSeconds();
  core = Math.floor(Math.random() * 4 + 1);
  //alert(mystyle);
  document.getElementById('bg').style.backgroundImage="url('" + image[core] + "')";
 // document.write(image[core]);
  }

function pocoranimage() {
 
  currentdate = new Date();
  core = currentdate.getSeconds();
  core = Math.floor(Math.random() * 4 + 1);
  document.getElementById('bg').style.backgroundImage="url('" + pocoimage[core] + "')";
  }

