var menu = document.getElementById("sidebarnav").getElementsByTagName("a");
var curr = "http://"+window.location.hostname+window.location.pathname;
for(var i=0; i<menu.length; i++) {
    if(menu[i].href == curr) {
        menu[i].className="active";
    }
}
