window.onload = function() {
  var path = window.location.pathname;
  var active = null;
  var link = null;
  var navi = document.getElementById('local_navi');
  var list = navi != null ? navi.getElementsByTagName('li') : 0;
  for (i = 0; i < list.length; i++) {
    if (list[i].firstChild.getAttribute('href') != null) {
      link = list[i].firstChild.getAttribute('href').replace('http://' + window.location.host, '');
      if (link == path) {
        active = i;
        break;
      }
    }
  }
  if (active != null) {
    list[active].className = 'on';
  }
}

