//
// You have to add images to the array in the specified bit.	
//

// EDIT:
// Change the number in this line to one less than the total number of images
var image = new StringArray(17);

// EDIT:
// To add a new image, follow the syntax below
image[0] = 'image1.jpg';
image[1] = 'image2.jpg';
image[2] = 'image3.jpg';
image[3] = 'image4.jpg';
image[4] = 'image5.jpg';
image[5] = 'image6.jpg';
image[6] = 'image1.jpg';
image[7] = 'image2.jpg';
image[8] = 'image3.jpg';
image[9] = 'image4.jpg';
image[10] = 'image5.jpg';
image[11] = 'image6.jpg';
image[12] = 'image1.jpg';
image[13] = 'image2.jpg';
image[14] = 'image3.jpg';
image[15] = 'image4.jpg';
image[16] = 'image5.jpg';
image[17] = 'image6.jpg';

// Stop editing here ---------------------------------

// Path to images folder
var path_to_images = 'images/';

// Create some variables for the date and random seed
var date = 0;
var seed = 0;

// Function to create an associative array
function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' ';
  }
}

// Get a random number from the length of the array
var ran = 60 / image.length;

// Function to get a random image from the array
function ranimage() {
  currentdate = new Date();
  core = currentdate.getSeconds();
  core = Math.floor ( core / ran );
  return ( image [ core ] );
}

// Write out the <img> tag

document.write('<img src="' + path_to_images + ranimage() + '" alt="Welcome to Press Signature @ PressAudit.com">');
