function changeImage()
{
	var list = document.getElementById('optionlist');
	document.mainimage.src = list.options[list.selectedIndex].value;
	changeText();
}

function prevImage()
{
	var list = document.getElementById('optionlist');
	if(list.selectedIndex == 0)
	{
		list.selectedIndex = list.options.length-1;
	}
	else
	{
		list.selectedIndex--;
	}
	changeImage();
}

function nextImage()
{
	var list = document.getElementById('optionlist');
	if(list.selectedIndex == list.options.length-1)
	{
		list.selectedIndex = 0;
	}
	else
	{
		list.selectedIndex++;
	}
	changeImage();
}

function select_image()
{
	changeImage();
}

function changeText()
{
var list = document.getElementById('optionlist');
var the_text;

	the_text = get_text(list.selectedIndex);
	document.getElementById('text_cell').innerHTML = the_text;
}

function get_text(nar_num)
{
	var the_text;
	var all_text = new Array(
"Blue Wildebeest - Photo taken in the Lion and Rhino Park",
"Buffalo - Also taken in the Lion and Rhino Park",
"Elephant herd in Pilanesberg National Park",
"Warthog - Pilanesburg Centre - Pilanesburg National Park",
"",
"Lion walking the roads of Pilanesburg",
"",
"",
"Male Impala",
"Hippo",
"",
"Female Kudu",
"",
"Zebra",
"Grey Lourie or Go-away Bird",
"Sue feeding the Red-winged Starlings",
"Glossy Starling",
"Male Impala",
"Hartebeest",
"Roan Antelope - Lion & Rhino Park",
"Roan Antelope",
"Roan Antelope",
"Roan Antelope",
"Gemsbok (Oryx) - Lion & Rhino Park",
"Lion and Lioness - Lion & Rhino Park",
"African Buffalo Herd - Kruger National Park",
"Elephant - Kruger National Park",
"Giraffe - Kruger National Park",
"Giraffe - Kruger National Park",
"Zebra - Kruger National Park",
"Jilly at Nossob Camp, in Kgalagadi Transfronteir Park, feeding glossy starling and ground squirrel",
"Kalahari lion pride"
);
the_text = all_text[nar_num];
return the_text;
}

