parentid = 'sidemenu';
styleidname = 'current';

window.onload = function() {

	oneself = location.href;

	var ar = document.getElementById(parentid).getElementsByTagName("li");

	for (var i = 0; i < ar.length; i ++) {

		anchor = ar[i].getElementsByTagName("a");

		if (anchor[0].getAttribute("href") == oneself) {
			anchor[0].setAttribute("id", styleidname);
		}
	}
}

