var pageSource = '';
var SrcLink = new Array();
var SrcText = new Array();
// Set speed in milliseconds
var speed = 10000; //Set at 10s
// Specify the image files
var Pic = new Array();

var curImgText='';
var displayText='';


/* ** The image names of the feature for rotating ** */
Pic[0] = '/decouverte/images/home_balloons.jpg';
Pic[1] = '/decouverte/images/home_city.jpg'; 
Pic[2] = '/decouverte/images/home_meerkat.jpg';
Pic[3] = '/decouverte/images/home_mountains.jpg'; 
Pic[4] = '/decouverte/images/home_ocean.jpg';
Pic[5] = '/decouverte/images/home_penguins.jpg';
Pic[6] = '/decouverte/images/home_planets.jpg';


/****************************************************
CODE BELOW IS APPLICATION LOGIC. DON't TOUCH
****************************************************/


var t;
var j = 0;
var p = Pic.length;

var preLoad = new Array();
for (i = 0; i < p; i++)
{
   preLoad[i] = new Image();
   preLoad[i].src = Pic[i];
}

//Rotate Image
//function runIMGSlideShow()
//{
//	p = Pic.length; //Override with the actual size of the array
//	j = j + 1;
//	if (j > (p-1)) j=0;
//	document.myPicture.src=Pic[j];
//	t = setTimeout('runIMGSlideShow()', speed);
//	
//}
function runIMGSlideShow()
{
	p = Pic.length; //Override with the actual size of the array
	j = j + 1;
	if (j > (p-1)) j=0;
	var imgItem = document.getElementById('homeImages').style.backgroundImage = "url("+Pic[j]+")";
	t = setTimeout('runIMGSlideShow()', speed);
	
}


