/*var summaryarray = new Array();
summaryarray[1] = "Each Raptors Basketball Academy session begins with key instructions and the Word of the Day.";
summaryarray[2] = "Learning proper shot mechanics during station work.";
summaryarray[3] = "The RBA is designed for both boys and girls with various skill levels.";
summaryarray[4] = "A camper applies his new and improved jump shot to his game.";
summaryarray[5] = "Each on-ice session has a unique and specialized plan with a focus on player development.";
summaryarray[6] = "All instructors are professional, qualified and live the visions and values of the academy.";
//summaryarray[7] = "Guest Instructors, such as Raptors Head Coach Sam Mitchell,  make apearances at the RBA.";
summaryarray[8] = "Reviewing the strategy before taking to the court.";
summaryarray[9] = "Jay Triano talks to the campers about teamwork.";
summaryarray[10] = "Jerome 'JYD' Williams takes some time to have a little fun during a drill.";
summaryarray[11] = "Campers listen to one of the special guest instructors during the Raptors Basketball Academy.";
summaryarray[12] = "Chuck Swirsky, the voice of the Raptors, speaks to the campers with his good friend, The Raptor.";
//summaryarray[13] = "Raptors Point Guard TJ Ford listens in as one of the teams prepares a play.";
summaryarray[14] = "Station work includes a wide variety of drills and activities designed to inprove each campers play.";
summaryarray[15] = "Jerome 'JYD' Williams leads a group in a team cheer.";
//summaryarray[16] = "Every camper has an opportunity to ask guest instructors questions in Question Period.";
summaryarray[17] = "Jerome 'JYD' Williams spends some time rebounding with a camper.";
summaryarray[18] = "Raptors Basketball Development staff are on-site each day working with all campers.";
summaryarray[19] = "Jay Triano demonstrates the finer points of shooting the basketball.";
//summaryarray[20] = "Raptors Head Coach Sam Mitchell goes over a teaching point with a young camper.";

var num = 1;
function changeImage(direction) {
	//alert(num);
	if (direction == "prev") {
		num = num - 1;
		if (!summaryarray[num]){
			changeImage("prev");
		}
	} else {
		num = num + 1;
		if (!summaryarray[num]){
			changeImage("next");
		}
	}
	if (num == 0) {
		num = 20;
	}
	if (num == 21) {
		num = 1;
	}
	var pic = document.getElementById( 'myimage' );
	pic.src = "images/slide"+num+".jpg";
	document.getElementById('mycaption').innerHTML = summaryarray[num];
	document.getElementById('myimagenum').innerHTML = "Image "+num+" of "+(summaryarray.length-1);
}*/


var num = 0;
function changeImage(direction) {
	//alert(num);
	if (direction == "prev") {
		num--;
	} else {
		num++;
	}
	
	if (num < 0) {
		num = ($$('.slide img').length-1);
	}
	else if (num >= ($$('.slide img').length)) {
		num = 0;
	}
	
	$$('.slide img').invoke('hide');
	$$('.slide img')[num].show();
	$$('#mycaption span').invoke('hide');
	$$('#mycaption span')[num].show();
	
	$('myimagenum').innerHTML = "Image "+(num+1)+" of "+$$('.slide img').length
	
	return false;
}
