

function slideShowInit(e) {
	
	document.slideIndex = 0;
	document.slides = new Array();
	var slideRoot = "images/2010/"+e+"/image";
	var title = "";
	var description = "";
	switch (e) {
		case "community-service":
		document.captions = new Array("","","","","","");
		title = "Friends of the Urban Forest";
		description = "Community Service  - February 20, 2010   Beaux partnered with Friends of the Urban Forest to enrich the beautification of San Francisco by planting trees in designated places.";
		break;
		case "rehearsal":
		document.captions = new Array("","","");
		title = "Dance Rehearsals";
		description = "Beaux , Belles, and Jr. Beaux begin dance rehearsals for the Beautillion event.";
		break;
		case "self-discipline":
		document.captions = new Array("","","","");
		title = "Self-Discipline Workshop";
		description = "Beau Chair used the acronym A WHIP to mark the 5 pillars of Self-discipline: Acceptance, Willpower, Hard work, Industry, and Persistence.   This is a convenient way to remember them, since most people associate discipline with being whipped into shape.";
		break;
		case "princess-project":
		document.captions = new Array("");
		title = "The Princess Project";
		description = "Once again, the Belles collected dresses for donation to the Princess Project (princessproject.org), enabling other girls to enjoy the upcoming prom season in fabulous fashion. The group donated $2,310 in dresses!";
		break;
		case "freedom-train":
		document.captions = new Array("","","","","","");
		title = "Freedom Train Ride";
		description = "Beaux, Jr. Beaux.";
		break;
		case "manamongmen":
		document.captions = new Array("","","");
		title = "Man Among Men Pres.";
		description = "Beaux, Jr. Beaux.";
		break;
		case "orientation":
		document.captions = new Array("","","");
		title = "Orientation";
		description = "Beaux, Jr. Beaux.";
		break;
		case "superbowl":
		document.captions = new Array("","","","","","","");
		title = "Superbowl Social";
		description = "Beaux, Jr. Beaux, Belles and Parents.";
		break;
		case "conflict-resolution":
		document.captions = new Array("","","","","");
		title = "Conflict Resolution Workshop";
		description = "The San Francisco Chief of Police, Captain George Gascon made an appearance to speak to the Beaux about how to resolve conflicts peaceably. Also, San Francisco’s finest, Julian Hill further explain non-violent solutions.";
		break;
		case "parentmeeting":
		document.captions = new Array("","","","");
		title = "Parent Meeting";
		description = "";
		break;	
		
		case "belletea":
		document.captions = new Array("","","","");
		title = "Belle Tea";
		description = "";
		break;	
		
		case "thebreach":
		document.captions = new Array("","","","");
		title = "Cultural Odyssey - The Breach";
		description = "";
		break;	
		case "jrbeauxdrumming":
		document.captions = new Array("","","","","","","");
		title = "Jr. Beaux Drumming Workshop";
		description = "";
		break;
	}
	document.getElementById("eventTitle").innerHTML = title;
	document.getElementById("eventDescription").innerHTML = description;
	document.of = document.captions.length;
	document.at = 1;
	for (i=0;i<document.of;i++) {
		document.slides[i] = new Image;
		document.slides[i].src = slideRoot+(i+1)+".jpg";
		document.slides[i].height = 289;
		document.slides[i].width = 435;
		document.images.img.src = document.slides[0].src;
	}	
	if (document.captions[document.slideIndex] != "") {
		document.getElementById("caption").innerHTML = document.captions[document.slideIndex];
	}
	document.getElementById("gray").style.visibility = "visible";
	document.getElementById("at").innerHTML = document.at;
	document.getElementById("of").innerHTML = document.of;

}



function next() {
	document.slideIndex++;
	if (document.slideIndex == (document.slides.length)) {
		document.slideIndex = 0;	
	}
	document.images.img.src = document.slides[document.slideIndex].src;
	if (document.captions[document.slideIndex] != "") {
		document.getElementById("caption").innerHTML = document.captions[document.slideIndex];
	}
	document.at = document.slideIndex + 1;
	document.getElementById("at").innerHTML = document.at;
}

function prev() {
	document.slideIndex--;
	if (document.slideIndex < 0) {
		document.slideIndex = (document.slides.length - 1);	
	}
	document.images.img.src = document.slides[document.slideIndex].src;
	if (document.captions[document.slideIndex] != "") {
		document.getElementById("caption").innerHTML = document.captions[document.slideIndex];
	}
	document.at = document.slideIndex + 1;
	document.getElementById("at").innerHTML = document.at;
	
}

function closeGray() {
	document.getElementById("eventTitle").innerHTML = "";
	document.getElementById("caption").innerHTML = "";
	document.getElementById("eventDescription").innerHTML = "";
	document.getElementById("at").innerHTML = 1;
	document.getElementById("gray").style.visibility = "hidden";
	document.images.img.src = "images/empty.jpg";
	document.at = 1;
}
