window.onload = highlightCurrentLink;

// This function sets the class value to "current" for the anchor which has
// its link corresponding to the current window location.
function highlightCurrentLink(){
    var nav = document.getElementById("nav2");
    var a = nav.getElementsByTagName("A");
    var location = window.location.href.split("#")[0];
    // Quick-fix in order to correctly highlighting current link the first time.
    if (location == "http://www.missioncriticalit.com/") {
       location = location + "index.html";
    }
    for(var i=0;i<a.length;i++) {
      if (a[i].href == location) {
         // In order to make it work under IE, need to explicitely use the 'className' property.
         // Using a[i].setAttribute("class", "current"); does not work under IE.
         a[i].className = "current";
         a[i].removeAttribute("href");
      }
    }
}

