function detect_item_to_display() {
	// first hide everything
	// to do this we will getElementsByName the <a> tags inside the "content" div
	var showall = 0;
	var hidden_count = 0;
	var found_it = 0;
	if (window.location.hash) {
		the_one_to_show = window.location.hash;
		the_one_to_show = the_one_to_show.replace("#","");
	} else {
		the_one_to_show = "all";
	}
	// alert(the_one_to_show);
	el = document.getElementById("content");
	a_tags = el.getElementsByTagName("a");
	for (i = 0; i < a_tags.length; i++) {
		if (the_one_to_show != "all") {
			if (the_one_to_show != a_tags[i].name) {
				if (a_tags[i].name != "") {
					if ( document.getElementById(a_tags[i].name) ) {
						document.getElementById(a_tags[i].name).style.display = "none";
						hidden_count++;
					}
				}
			} else {
				found_it = 1;
			}
		} else {
			if (a_tags[i].name != "") {
				if ( document.getElementById(a_tags[i].name) ) {
					document.getElementById(a_tags[i].name).style.display = "block";
				}
			}
		}
	}
	if (hidden_count > 0) {
		document.getElementById('showall_link').style.display = "block";
	} 
	if (found_it == 0) {
		// the actual item was not found! show everything
		display_all_items();
	}
}

function display_all_items() {
	el = document.getElementById("content");
	a_tags = el.getElementsByTagName("a");
	for (i = 0; i < a_tags.length; i++) {
		if (a_tags[i].name != "") {
			if ( document.getElementById(a_tags[i].name) ) {
				document.getElementById(a_tags[i].name).style.display = "block";
			}
		}
	}
	document.getElementById('showall_link').style.display = "none";
}