
window.onload = function prepIndexLis() {
	var lis = document.getElementById('toc').getElementsByTagName('li');
	for (i=0; i<lis.length; i++) {
		var a = lis[i].getElementsByTagName('a')[0];
		var url = a.href;
		lis[i].href = url;
		lis[i].onmouseover = function () {
			if (!this.className.match('active')) this.className += ' active';
		};
		lis[i].onmouseout = function () {
			if (this.className.match('active')) this.className = this.className.replace('active','');
		};
		lis[i].onclick = function () {
			window.location.href = this.href;
		};
	}
};