/*
CLCP v2.1 Clear Links to Current Page
Jonathan Snook
This code is offered unto the public domain
http://www.snook.ca/jonathan/
*/

window.onload = clearCurrentLink;

function clearCurrentLink() {
   
    var nav = document.getElementById("navigation");
    var a = nav.getElementsByTagName("A");
    var currentURL = window.location.href.split("#")[0]; 
      
       for (var i = 0; i < a.length; i++)


           if (a[i].href.toLowerCase() == currentURL.toLowerCase())
      
            a[i].className = 'menuOn';
       // removeNode(a[i]);
}

function removeNode(n) {
    if (n.hasChildNodes())
    // gets the text from the link and moves it to the previous node.
        for (var i = 0; i < n.childNodes.length; i++) {
        var strong = document.createElement('li');
        var label = n.childNodes[i].cloneNode(true);
       strong.appendChild(label);
    //   strong.className = 'menuOn';
    //   label.className = 'menuOn';
       n.parentNode.appendChild(strong);
       n.className = 'menuOn';
    }

   // n.parentNode.removeChild(n);

}