var id = 50;
function updateHash(){
    if(id > 0){
        id--;
        return;
    }
    alert(window.location.hash);
}

function loaded(){
    var links = document.getElementsByTagName("a");
    for(var id in links){
        var clean = links[id].href;
        try{
        if(clean.indexOf("http") == 0){
            clean = clean.substring(clean.indexOf("/", 10)+1);
        }
        }catch(e){}
        links[id].href = "#"+clean;
    }
    if ("onhashchange" in window)
        window.addEventListener("hashchange", updateHash, false);
    else
        return; // Other Implementation
}

function navac(id){
    var ob = document.getElementById("nav"+id);
    if(ob.shadow == null) ob.shadow = 60;
    try{clearTimeout(ob.timer);}catch(e){}
    ob.shadow -= 5;
    ob.style.textShadow = "#a1c7e7 0px 0px "+ob.shadow+"px, #a1c7e7 0px 0px "+ob.shadow+"px";
    if(ob.shadow > 20){
        ob.timer = setTimeout("navac("+id+")", 25);
    }
}

function navde(id){
    var ob = document.getElementById("nav"+id);
    try{clearTimeout(ob.timer);}catch(e){}
    ob.shadow += 5;
    
    if(ob.shadow < 60){
        ob.style.textShadow = "#a1c7e7 0px 0px "+ob.shadow+"px, #a1c7e7 0px 0px "+ob.shadow+"px";
        ob.timer = setTimeout("navde("+id+")", 25);
    } else {
        ob.style.textShadow = "none";
    }
}

