var ImageLoad = 
[
['http://www.wakegov.com/libraries/locations/holidays.htm', 
'http://www.wakegov.com/NR/rdonlyres/61E814D1-9A84-442E-94EA-55CC3E2B65A0/0/feature3.png', 	''	],		//  ['URL to linked page', 'URL to image', '']


['http://www.wakegov.com/libraries/locations/duraleigh/duraleighrenovationpage.htm', 	
 'http://www.wakegov.com/NR/rdonlyres/FF54AA22-FBF6-4866-9893-16612F8CF55A/0/feature1.png', 	''	],		//  ['URL to linked page', 'URL to image', '']							


['http://wakebookaday.wordpress.com/', 	
 'http://www.wakegov.com/NR/rdonlyres/B088C514-0037-4566-B33A-6F63A4AB9EDC/0/feature2.png', 	''	],		//  ['URL to linked page', 'URL to image', '']	


['http://www.wakegov.com/libraries/events/astronomyprogram.htm', 	
'http://www.wakegov.com/NR/rdonlyres/B405771B-97AF-4412-82BA-7D4CF46A814D/0/feature5.png', 	''	],		//  ['URL to linked page', 'URL to image', '']							
	

['http://www.wakegov.com/libraries/reading/default.htm', 	
 'http://www.wakegov.com/NR/rdonlyres/5F58C49C-D2AE-4D73-8DA6-048FF8D40332/0/feature4.png', 	''	]	//  The caption is not required and may be left blank like this:	//

];

var ImageCount		= 5;			//  *****  Change this to the total number of images loaded above  ***** 		//	
var ImageDelay		= 6000;			//  *****  Set this to the delay interval desired.  5000 = 5 seconds.			// 
var LinkTarget		= "_parent"		//  *****  Defines where you want linked page to open. _self, _blank, _top, etc	//
var ImageIndex		= 0;			//  DO NOT ALTER	//
var FirstLoad 		= 0;			//  DO NOT ALTER	//
var QuickStartID 	= 0;  			//  DO NOT ALTER	//
var htmlString 		= ""			//  DO NOT ALTER 	//

//  This function rotates the banner  //
function ImageChange()

{		

htmlString = '<center>';
htmlString = htmlString + '<font face = "Verdana" size="2">';		//  Font and Font Size for caption may be changed here	//
htmlString = htmlString +'<a target="';
htmlString = htmlString + LinkTarget;
htmlString = htmlString + '" href="';
htmlString = htmlString + ImageLoad[ImageIndex][0];
htmlString = htmlString + '"><img border="0" src="';				//  Image border size may be changed here				//	
htmlString = htmlString + ImageLoad[ImageIndex][1];
htmlString = htmlString + '"></a><br>';
htmlString = htmlString + ImageLoad[ImageIndex][2];
htmlString = htmlString + '</font>';
htmlString = htmlString + '</center>';		

document.getElementById('MagicImage').innerHTML = htmlString; 				

if(ImageIndex == ImageCount - 1)		//  This statement increments image displayed and resets if displaying last image  //
{										
ImageIndex= 0;																				
}																								
else																							
{																								
ImageIndex++;																					
}																										

if(FirstLoad == 0)						//  Determins if this is the first time function has run.   // 
{
SlowFinish();
}

}
//  End Funtion  //

//  This function ensures first banner is displayed without a delay  //
function  QuickStart()
{
QuickStartID=setInterval("ImageChange()", 1000);
}
//  End Funtion  //																		

//  This function sets display rate to user defined speed  //
function SlowFinish()
{
clearInterval(QuickStartID);
FirstLoad = 1;
setInterval("ImageChange()", ImageDelay);	 
}
//  End Funtion  //

QuickStart()