function showPic (whichpic) {
	var myinfos = new Array();
	myinfos[1] = "This is a bird. It can fly. OR. 07/03";
	myinfos[2] = "I first thought this was called Cold Creek. Turns out it is Coal Creek. CO. 03/04";
	myinfos[3] = "Fishing in the ocean is pretty cool I guess. OR. 07/03";
	myinfos[4] = "I wanted to be careful showing pictures of fall flavored leaves, seeing as fall is coming up and I don't want to spoil the fun two months early. Wausau, WI. 10/04";
	myinfos[5] = "Everyone always shows the red berries. They pop off the screen. Here are the orange ones. Wausau, WI. 07/05";
	myinfos[6] = "This is an interesting little place. Wausau, WI. 07/05";
	myinfos[7] = "Look Mom! I made it to the ocean! And there's a big rock in it! Tillamook, OR. 07/03";
	myinfos[8] = "I liked this one before I made it nearly square to fit that stupid box over there. Wausau, WI. 08/05";
	myinfos[9] = "Shorebreak! OR. 07/03";
	myinfos[10] = "Spiders can be alright, I guess. Wausau, WI. 06/05";
	myinfos[11] = "Moments after the digishutter clicked, this seemingly friendly little creature leapt out of the tree and clawed my eyes out, scarring me for life. Wausau, WI. 08/05";
	myinfos[12] = "Flowers can be alright too, I guess. Medford, WI. 07/05";
	myinfos[13] = "Devil lens. CO. 03/04";
	myinfos[14] = "Shoes in a tree with the bonus of being 3D. Not real 3D though, it's faked in Photoshop. OR. 03/04";
	
	if (document.getElementById) {
		document.getElementById('gallery').style.backgroundImage = 'url(' + whichpic.href + ')';
		if (whichpic.title) {
			document.getElementById('info').childNodes[0].nodeValue = myinfos[whichpic.title];
			} else {
			document.getElementById('info').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
			}
		return false;
	} else {
		return true;
	}
}

function showBonus (whichbonus) {
	if (document.getElementById) {
		document.getElementById('gallery').style.backgroundImage = 'url(' + whichbonus.href + ')';
		if (whichbonus.title) {
			document.getElementById('info').childNodes[0].nodeValue = whichbonus.title;
			} else {
			document.getElementById('info').childNodes[0].nodeValue = whichbonus.childNodes[0].nodeValue;
			}
		return false;
	} else {
		return true;
	}	
}

function gogallery() {
	var as = document.getElementById('waytoo').getElementsByTagName('a');
	for (var i = 0, asLen = as.length; i < asLen; i++) {
		if (as[i].className == "gofar") {return;};
		as[i].onclick = function() {return showPic(this);};
	}
}

function gobonus() {
	var a2s = document.getElementById('content').getElementsByTagName('a');
	for (var i = 0, a2sLen = a2s.length; i < a2sLen; i++) {
		if (a2s[i].className == "bonus") {
			a2s[i].onclick = function() {return showBonus(this);};
		}
	}	
}

window.onload =	function(e) {
	gobonus();
	gogallery();
}
