var foundImages = false;
var imageArray = new Array();

function findImages() {
	if(document.getElementsByTagName("ol")[0]) {
		imageArray = document.getElementsByTagName("ol")[0].getElementsByTagName("div");
		foundImages = true;
	}
}

var t;
var hashString = "";

function checkImage() {
	if(foundImages) {
		if(location.hash.slice(1) != hashString) {
			hashString = location.hash.slice(1);
			for(i=0; i<imageArray.length; i=i+1) {
				imageArray[i].style.display = "none";
			}
			if(hashString.length > 0) {
				document.getElementById(hashString).style.display = "block";
			}
		}
	}
	else {
		findImages();
	}
	t = setTimeout("checkImage()", 100);
}

document.onload = checkImage();
