var position = 0;
var directory = "images/slideshow/";
var gallery = new Array(
	new Array("333.jpg", "Classroom 333 seats 50 and with lecture style seating. To increase versatility tables and seating can be arranged in a variety of ways. Equipped with a networked instructor workstation or can easily connect personal laptop, amplified sound system, DVD/VCR combo and a ceiling mounted projector with a 60 X 80 projection screen."),
	new Array("309.jpg", "Classroom 309 seats 40 with lecture style seating. Equipped with a 4 monitor origination video conferencing system. Touch screen control pad. Cameraman tracking camera for lecturer, Cameraman tracking camera for students, 15 push-to-talk tracking microphones. Elmo document camera. Instructor station equipped with DVD/VCR, ceiling mounted projector with a 60 X 80 projection screen, and instructor pc or easily connect personal laptop."),
	new Array("305032009.jpg", "Classroom 305 seats 20 with lecture style seating. Equipped with a 2 monitor origination video conferencing system. Touch screen control pad. Cameraman camera for lecturer and students, 6 push-to-talk microphones. Elmo document camera. Instructor station equipped with DVD/VCR, ceiling mounted projector with a 60 X 80 projection screen, and instructor pc or easily connect personal laptop."),
	new Array("310032009.jpg", "Classroom 310 seats 16 with lecture style seating. Equipped with a 1 monitor receive only video conferencing system. 30 inch LCD flat panel television. Camera with remote control, 2 push-to-open or mute microphones "),
	new Array("lab032009.jpg", "Our computer lab is equipped with 16 workstations using wireless technology for internet connectivity. Instructor station equipped with instructor pc, LCD projector with a 60 X 80 projection screen. "),
	new Array("lounge.png", "Our student lounge is equipped with 5 workstaions and a printer. "),    
	new Array("kitchen.jpg", "Our kitchen offers a comfortable seating area. ") );

var isInit = false;

function initSlideshow() {
	img = document.getElementById('currentImage');
	img.src = directory + gallery[position][0];

	document.getElementById('caption').innerHTML = gallery[position][1];
}

function prevImage() {
	if (!isInit) {
		initSlideshow();
		isInit = true;
	}
	
	(position > 0) ? position-- : position = gallery.length - 1;
	
	img = document.getElementById('currentImage');
	img.src = directory + gallery[position][0];
	
	document.getElementById('caption').innerHTML = gallery[position][1];
}

function nextImage() {
	if (!isInit) {
		initSlideshow();
		isInit = true;
	}
	
	(position < gallery.length - 1) ? position++ : position = 0;

	img = document.getElementById('currentImage');
	img.src = directory + gallery[position][0];
	
	document.getElementById('caption').innerHTML = gallery[position][1];
}

