// JavaScript Document

/* Highlights the link with the corresponding index */
function highlightLink(name) {
	document.getElementsByName(name)[0].style.color = '#009999';
}

/* When the user refreshes the page this function checks the URL for the correct anchor to highlight */
function changeAnchor() {
	/* Debug code
	var bufferDiv = document.getElementById('buffer');
	*/
	var docURL = document.URL;
	var anchorString = docURL.substring(docURL.lastIndexOf('/', docURL.length-2)+1, docURL.length-1);
	
	highlightLink(anchorString)
	
	/* Debug code
	bufferDiv.innerHTML = anchorString;
	*/
}