runScripts = function() {
  if (document.getElementById) {
    fnSelectMenu();
  }
}
window.onload = runScripts

fnSelectMenu = function(){
  root = document.getElementById("left_col").getElementsByTagName("ul")[0];
	
  rootAry = root.getElementsByTagName("a");
    for(i=0;i<rootAry.length;i++){
    str1 = parseURL(rootAry[i].href);
    str2 = parseURL(document.URL)	;

    if (str2.indexOf(str1) != -1){
      rootAry[i].className = " selected";
    }
  }
}

parseURL = function(url) {
  var str = url
  if (str.indexOf(".html") != -1) str = str.substring(0,str.lastIndexOf(".html"));
  if (str.charAt(str.length - 1) == "/") str = str.substring(0,str.length - 1);
  pos = str.lastIndexOf("/")
  str = (pos == 6) ? "index" : str.substring(pos+1,str.length);
  return str;
}