function highlightCurrentLink() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	var thisPage = location.pathname;
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if(anchor.parentNode.tagName == 'LI') {
			var anchorHref = anchor.getAttribute('href');
			if(
				(thisPage.match(anchorHref + '$') == anchorHref) ||
				(
					((anchorHref.match('index.php$') == 'index.php') && 
						((thisPage.match('/$') == '/')))
				)
			) {
				anchor.id = "current";
				return;
			}
		}
	}
}
