    function change () { 
       // get location into array
       arr = document.location.href.split('/');
       for(j=1;j<arr.length;j++){
          arr[j] = arr[j-1]+'/'+arr[j];
       }

       // go through each link in document
       for(i=0;i<document.links.length;i++){
          // get class name of link
          clss = document.links[i].className;
// alert( "document.links[" + i + "].className = " + clss + "\nclss = " + clss);

          // get link into array
          arr1 = document.links[i].href.split('/');
          for(j=1;j<arr1.length;j++){
              arr1[j] = arr1[j-1]+'/'+arr1[j];
          }

          // menu0 - highlight index.htm (if parent directory of location)          
          if(clss == "menu0"){
              for(k=1;k<arr.length;k++){
                 if( document.links[i].href == arr[k]+"/index.htm" ){
                     document.links[i].style.color = "#0066FF";
                 } 
              }
          }

          // menu - highlight index.htm (if in same directory as location)  
          if(clss == "menu1"){
              if( document.links[i].href == arr[arr.length-2]+"/index.htm" ){
                  // store link if we need to change it back (see bottom)
                  tmp = i;
                  document.links[i].style.color = "#0066FF";
              } 
          }
 
          // always highlight link == location
          if( document.location.href == document.links[i].href ){
              // if link found in menu1 ensure index.htm in that directory is not highlighted
              if(clss == "menu1"){
                 document.links[tmp].style.color = "#6666AA";
              }
              document.links[i].style.color = "#0066FF";
          } 
       }   
    }