// JavaScript Document
function changeLinks() {
   //--------------------------------------------
   // This function is used to change the navigation link on the left
   // that corresponds to the page being currently viewed.  This function
   // changes the link to just plain text.
   //
   // REQUIREMENTS: This script requires that each hyperlink be enclosed in
   // a container tag (like span or div) that has an "id" attribute set to the
   // filename (minus the file extension) of the page being linked to.
   //--------------------------------------------   
   
   // get file name, minus the file extension
   var fileName = window.location.href;
   fileName = fileName.substr(fileName.lastIndexOf("/") + 1);
   fileName = fileName.substring(0,fileName.lastIndexOf(".htm"));

   // strip off the hyperlink on the link corresponding to the currently viewed page
   var container = document.getElementById(fileName);
   var lnk = container.firstChild;
   var lnkVal = lnk.firstChild.nodeValue;
   var newVal = document.createTextNode(lnkVal);
   container.replaceChild(newVal, lnk);
   
   // change class attribute that defines button appearance
   var buttontype = container.getAttribute("class").indexOf("big");
   if (buttontype >= 0) { // big button
     container.setAttribute("class","leftdownbig");   
   } else { // small button
     container.setAttribute("class","leftdown");
   }
   
   
}
