window.onload = clearCurrentPage;

function clearCurrentPage(){
    var a = document.getElementsByTagName("A");
    for(var i=0;i<a.length;i++){
        if(a[i].href.split("#")[0] == window.location.href.split("#")[0]){
            removeNode(a[i]);
        }
    }
}

function removeNode(n){
    if(n.hasChildNodes()){
        for(var i=0;i<n.childNodes.length;i++){
            n.parentNode.insertBefore(n.childNodes[i].cloneNode(true),n);
        }
    }
    n.parentNode.removeChild(n);
}







function display(action, id)
{
if (action == 'show')
{
document.getElementById("hider"+id).style.display = "block";
document.getElementById("hlink"+id).href= "javascript:display('hide', "+id+")";
document.getElementById("hlink"+id).innerHTML = "Click here";
}

if (action == 'hide')
{
document.getElementById("hider"+id).style.display = "none";
document.getElementById("hlink"+id).href= "javascript:display('show', "+id+")";
document.getElementById("hlink"+id).innerHTML = "Click here";
}
}
