//Pictures to switch inbetween

var Rollpic1 = "img/photo21.jpg";
var Rollpic2 = "img/photo7.jpg";
var Rollpic3 = "img/photo19.jpg";
var Rollpic4 = "img/photo16.jpg";
var Rollpic5 = "img/photo9.jpg";
var Rollpic6 = "img/photo20.jpg";
var Rollpic7 = "img/photo5.jpg";
var Rollpic8 = "img/photo14.jpg";
var Rollpic9 = "img/photo22.jpg";



//Start at the what pic:
var PicNumber=1;
//Number of pics:
var NumberOfPictures=9;
//Time between pics switching in secs
var HowLongBetweenPic=2;

//Start at the what pic:
var TxtNumber=1;
//Number of pics:
var NumberOfTxt=15;
//Time between pics switching in secs
var HowLongBetweenTxt=1;


//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);
		
		//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);
				}
	
		}

}
	
function SwitchTxt(counter){

	if(counter < HowLongBetweenTxt){
	
		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.getElementById("rollTxt").innerHTML = eval("Rolltxt" + TxtNumber);
		
		//function calls itself
		CallSwitchTxt=window.setTimeout("SwitchTxt("+counter+")",1500); 
		
		}
		
		else{
			//if its not the last picture goto the next picture
			if(TxtNumber < NumberOfTxt){
				TxtNumber++;
				SwitchTxt(0);
			}
			//its the last picture go to the first one
			else{
				TxtNumber=1;
				SwitchTxt(0);
				}
	
		}

}