// JavaScript Document
window.onload = initAll;

var currImg = 0;
var captionText = new Array(
	"Valley of the Angels is a small village about 20 miles from Tegucigalpa.  It is where the artists congregate to make and sell crafts.  16 years ago I visited, and got a hand carved Navivity Set. Patty just had to visit this place.  We shopped, read, people watched and had lunch.  (1 of 21)",
	"Once again, we see a square, and a church.  This area was very well kept, and was very relaxing.  Many beautiful plants and trees were flowering.  (2 of 21)",
	"John, Kristel and Sara sat in the park while Mom shopped every store in town.  They loved her!  (3 of 21)",
	"The park was surounded by shops, and resturants.  There was a bar which John found.  (4 of 21)",
	"Did I mention beautiful flowers?  (5 of 21)",
	"Good book, John?  (6 of 21)",
	"Sara, who is studying Criminal Justice in college, was checking out the locals. Being guys didn't hurt either! These guys searched us before allowing us in the bank to exchange Dollars for Lempiras.  (7 of 21)",
	"With Real money now, we decieded to eat.  Found a little place with an upstairs overlooking the town. The food and beer were great.  (8 of 21)",
	"Can't remember what we ate, but everything was good. Had a great view too.  (9 of 21)",
	"This was where I got the Nativity Set 16 years ago.  Was a group of artists, each had a display area with crafts. In fact, in this cluster, there were 5 buildings full of things. Patty was in Heaven!  (10 of 21)",
	"Here is the back end of our SUV, and the front end of the craft complex.  (11 of 21)",
	"Mom and the girls looking for somewhere to shop. So many shops - so little time!  (12 of 21)",
	"John just reads then moves then reads then moves --- etc.  (13 of 21)",
	"Have we been in here yet?  (14 of 21)",
	"Horses, three-wheeled vehicles, and crazy tourists.  (15 of 21)",
	"Hey, think we missed this one!  (16 of 21)",
	"This place is going to the dogs.  (17 of 21)",
	"Really!  (18 of 21)",
	"This young man was people watching. Earlier, he was in the park with a toy truck.  He was enjoying himself.  (19 of 21)",
	"This is where Santa spends the winter. And you thought he was at the North Pole.  (20 of 21)",
	"Patty loved this place, so did I. The owner was a pilot in the Honduran Air Force, and showed me several pictures of himself in the Corsair, and in a C-130. Told me alot about The Honduras Air Force and the museum in Tegucigalpa.  (21 of 21 LAST PHOTO, CLICK ON HOME BELOW)"
	
)

function initAll() {
	document.getElementById("imgText").innerHTML = captionText[0];
	document.getElementById("prevLink").onclick = processPrevious;
	document.getElementById("nextLink").onclick = processNext;
}

function processPrevious() {
	newSlide(-1);
}

function processNext() {
	newSlide(1);
}

function newSlide(direction) {
	var imgCt = captionText.length;

	currImg = currImg + direction;
	if (currImg < 0) {
		currImg = imgCt-1;
	}
	if (currImg == imgCt) {
		currImg = 0;
	}
	document.getElementById("slideshow").src = "images/valley" + currImg + ".jpg"
	document.getElementById("imgText").innerHTML = captionText[currImg]
}
