var itemIndex = 0;	
var items;

function showNext()
{
	itemIndex++;
	if (itemIndex >= items.length)
		itemIndex = 0;

	theObject = document.getElementById("theCaption");
	theObject.innerHTML = items[itemIndex][1];
	theObject = document.getElementById("theImage");
	theObject.src=items[itemIndex][0];
}
					
function showPrevious()
{
	itemIndex--;
	if (itemIndex < 0)
		itemIndex = items.length - 1;
	theObject = document.getElementById("theCaption");
	theObject.innerHTML = items[itemIndex][1];
	theObject = document.getElementById("theImage");
	theObject.src=items[itemIndex][0];
}

function firstPage()
{
	theObject = document.getElementById("theCaption");
	theObject.innerHTML = items[0][1];
	theObject = document.getElementById("theImage");
	theObject.src=items[0][0];
}
	