

// INSTRUCTIONS

// To add new images, make sure you've added a new image to the images/homeSlideShow folder that is named 'x.jpg' where x is the next number in the folder. Also make sure you've uploaded it to the remote site.
// in the first line of code below, there is a list of image urls seperated by commas. Add your new image to the end of that list. If the last one in the list says '/images/homeSlideShow/08.jpg' you would add a comma followed by '/images/homeSlideShow/09.jpg'
// You will see a list where each item starts with 'randomiamges', copy the bottom line of that list (the last line above where it says "index = Math.floor(Math.random() * images.length);"  .
// Paste in a new line under the line you just copied and change the information so that the first number (randomimages[x]) is the next number in the sequence.
// Change the 'src' to the path of the image and change the 'alt' and the 'title' to the name you want the viewer to see upon hovering over the image (both the 'alt' and the 'title' should match.)
// Change the number in the line at the top of that list (where is says "var randomimages = new Array(x);") to be 1 more than the number you changed in the 3rd step. (e.g if randomimages[7] is the last image in the list, you'll need the top number to be an 8.
// Note: It's important to have both the 'alt' and the 'title' for each image so that web accessibility is followed and so that it works in browsers other than Internet Explorer.

var preload = new Array('/images/homeSlideShow/01.jpg', '/images/homeSlideShow/02.jpg', '/images/homeSlideShow/03.jpg', '/images/homeSlideShow/04.jpg', '/images/homeSlideShow/05.jpg', '/images/homeSlideShow/06.jpg', '/images/homeSlideShow/07.jpg', '/images/homeSlideShow/08.jpg');

var loader = new Array();
for(var i = 0; i < preload.length; i++){
   loader[i] = new Image();
   loader[i].src = preload[i];
}

function randomImages() {
	
var randomimages = new Array(8);
randomimages[0] = "<img src='/images/homeSlideShow/01.jpg' title='Cintrafor Slidshow' alt='Cintrafor Slidshow' />";
randomimages[1] = "<img src='/images/homeSlideShow/02.jpg' title='Cintrafor Slidshow' alt='Cintrafor Slidshow' />";
randomimages[2] = "<img src='/images/homeSlideShow/03.jpg' title='Cintrafor Slidshow' alt='Cintrafor Slidshow' />";
randomimages[3] = "<img src='/images/homeSlideShow/04.jpg' title='Cintrafor Slidshow' alt='Cintrafor Slidshow' />";
randomimages[4] = "<img src='/images/homeSlideShow/05.jpg' title='Cintrafor Slidshow' alt='Cintrafor Slidshow' />";
randomimages[5] = "<img src='/images/homeSlideShow/06.jpg' title='Cintrafor Slidshow' alt='Cintrafor Slidshow' />";
randomimages[6] = "<img src='/images/homeSlideShow/07.jpg' title='Cintrafor Slidshow' alt='Cintrafor Slidshow' />";
randomimages[7] = "<img src='/images/homeSlideShow/08.jpg' title='Cintrafor Slidshow' alt='Cintrafor Slidshow' />";

//var preload=new Array()

//for (n=0;n<randomimages.length;n++)
//{
//	preload[n]=new Image()
//	preload[n].src=randomimages[n]
//}

index = Math.floor(Math.random() * randomimages.length);
var div = document.getElementById('homeSlideshow');
div.innerHTML = (randomimages[index]);

}