function reformatCurrentLinks(){
    var a = document.getElementsByTagName("A");    for(var i=0;i<a.length;i++){        if(a[i].href.split("#")[0] == window.location.href.split("#")[0]){
            a[i].className="current";        }    }}

window.onload = reformatCurrentLinks; 
