/* Image Carousel - based on code from somewhere
 * modified by Brian Rowland - October 2009 
 * 
 *
 */
	var Rollpic = [ "images/eldon.png", 
					"images/eldonss3.png",
					"images/eldonss4.png",
					"images/eldonss5.png",
					"images/eldonss1.png",
					"images/eldonss2.png",
					"images/eldonss6.png" ];

	//Start at the what pic:
	var PicNumber=1;
	//Number of pics:
	var NumberOfPictures=7;
	//Time between pics switching in secs
	var HowLongBetweenPic=5;


	//SwitchPic Function
	function SwitchPic(counter){
	



	if(counter < HowLongBetweenPic){
	
		counter++;
		
		//DEBUG in the status bar at the bottom of the screen
		//window.status="Switch picture at 5 : "+counter+" PicNumber: "+PicNumber+" ";
		
		//Display pic in what <IMG> tag roll is what I called the image
		/*document.roll.src = eval("Rollpic" + PicNumber);*/
		document.getElementById('roll').src = Rollpic[ PicNumber-1 ];
		
		//function calls itself
		CallSwitchPic=window.setTimeout("SwitchPic("+counter+")",1500); 
		
		}
		
		else{
			//if its not the last picture goto the next picture
			if(PicNumber < NumberOfPictures){
				PicNumber++;
				SwitchPic(0);
			}
			//its the last picture go to the first one
			else{
				PicNumber=1;
				SwitchPic(0);
				}
	
		}

}
