function mark_menu_item(){
  //* mark items in main menu
  // find directory in pages or filename (if no directory)
  var indexpages = document.location.href.indexOf('pages');
  var breadcrumbs = document.getElementById('breadcrumbs');
  if(indexpages && breadcrumbs){
    my_path = document.location.href.substring(indexpages+6);
    if(my_path.indexOf('/')>1)
      my_dir = '/'+my_path.substring(0,my_path.indexOf('/'))+'/';
    else
      my_dir = my_path;
    submenu = document.getElementById('column3');
    if (submenu){
      atags = submenu.getElementsByTagName("a");
      for(var i=0;i<atags.length;i++){
        if(atags[i].href.indexOf(my_dir)!=-1){
           atags[i].className="active";
           submenulink = true;
        }
      }
    }
  }

  //* mark items in submenu
  submenu = document.getElementById('column1');
  if (submenu){
    atags = submenu.getElementsByTagName("a");
    for(var i=0;i<atags.length;i++){
      if(document.location.href.indexOf(atags[i].href)!=-1){
         atags[i].className="active";
         //alert(atags[i].href);
         //submenulink = true;
      }
    }
  }
}

function ucfirst(mystr){
   return mystr.substr(0,1).toUpperCase() + mystr.substr(1,mystr.length);
}

function create_breadcrumbs(){
  return;
  var my_path='';
  var indexpages = document.location.href.indexOf('pages');
  var breadcrumbs = document.getElementById('breadcrumbs');
  if(indexpages && breadcrumbs){
    breadcrumbs.innerHTML = 'Home / ';
    my_path = document.location.href.substring(indexpages+6);
    //* separate by /
    while(my_path.indexOf('/')>-1){
      my_dir = my_path.substring(0,my_path.indexOf('/'));
      my_path = my_path.substring(1+my_path.indexOf('/'));
      breadcrumbs.innerHTML += ucfirst(my_dir.replace('_',' '))+' / ';
    }
    breadcrumbs.innerHTML += ucfirst(my_path.replace('.html','').replace('_',' '));
  }
  if(indexpages){
    mystr = document.location.href;
    mystr = 1;
  }
}
