// JavaScript changes to current page
// CSU Libraries: Garst Wildlife Photos
// Greg Vogl 12/09/2005
function currpage() {
	// check all links in the page
    var a = document.getElementsByTagName("A");
    for (var i=0; i<a.length; i++)
		// highlight any links to current page in navigation bars to orient the user
		if (a[i].href == window.location.href.split("#")[0]) {
			a[i].style.cursor = "default";
			// do not highlight the home page logo link
			if (!a[i].href.match("index.html")) { 
                a[i].style.color = "white";
				a[i].style.backgroundColor = "black";
			}
			a[i].style.textDecoration = "none";
	        a[i].title = "(You are at this page" 
	   		+ (a[i].title ? ": " + a[i].title : 
			   (a[i].innerText ? ": " + a[i].innerText : "")) + ")";
		// alert users to external links using tool tip (title tag)
		} else if (a[i].className.indexOf("external") > -1) {
			a[i].title += " (external link)";
		}
	return true;
}
