// JavaScript Document

function tabbed_content_click(tabid) {
  //  hide all inactive, show active
  for(i=1;i<=10;i++) {
        if (document.getElementById('tab_' + i)) {
            tabel = document.getElementById('tab_' + i);
            tabcontel = document.getElementById('home_tab_area_' + i);
            tabela = document.getElementById('tabh_' + i);
            if (i == tabid) {
                tabel.className += " current";
                if (tabela) tabela.blur();
                tabcontel.style.display = 'block';
                tabcontel.style.visibility = 'visible';
            } else {
                removeName(tabel, "current");
                tabcontel.style.display = 'none';
                tabcontel.style.visibility = 'hidden';
            }
        }
  }
}


function removeName(el, name) {
  var i, curList, newList;
  if (el.className == null)
    return;
  // Remove the given class name from the element's className property.
  newList = new Array();
  curList = el.className.split(" ");
  for (i = 0; i < curList.length; i++)
    if (curList[i] != name)
      newList.push(curList[i]);
  el.className = newList.join(" ");
  return true;
}
