window.onload = initAll;

var currImg = 0;
var captionText = new Array(
	"Where it all began - and continues: A seismic shot crew at work on a Covenant Field in Utah, where 100 miles of 3-D seismic data have been acquired over the original producing field. Officials now have \"a pretty good idea\" of the general structural framework. <em>Photos courtesy of Wolverine Oil and Gas</em>",
	"The 104 sq. mi. Wolverine Federal Unit boundary is shown in red on the satellite photo. The white rock running SW-NE along the Federal Unit is the Arapien Shale which marks the position of the Sevier Leading Edge Thrust. All wells shown on this map have penetrated the Navajo Sandstone in the subsurface. <a href=\"utah2.cfm\" target=\"_blank\">(Full size)</a>",
	"Utah continues to be among the industry's most intriguing exploration stories, and the challenging landscape is just part of the reason why. Helicopters and buggy drills are helping to get the data to make the region's potential a reality.",
	"Utah continues to be among the industry's most intriguing exploration stories, and the challenging landscape is just part of the reason why. Helicopters and buggy drills are helping to get the data to make the region's potential a reality.",
	"Look out below: Some jug hustlers have to stomp through a swamp, and some get to test their rappelling skills. This juggy got an up close and personal experience with Utah's spectacular geology while scaling a cliff - all part of the industry's effort to better understand the state's complex geology.",
	"",
	"",
	"",
	"",
	"",
	"",
	"",
	"",
	"")

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 = "utah" + (currImg + 1) + ".jpg";
	document.getElementById("imgText").innerHTML = captionText[currImg];
}

