// tabs
var tabbutton   = new Array();
  var contentbox  = new Array();

  tabbutton[0]    = "tab0";
  tabbutton[1]    = "tab1";
  tabbutton[2]    = "tab2";
  tabbutton[3]    = "tab3";
  tabbutton[4]    = "tab4";
  tabbutton[5]    = "tab5";
  tabbutton[6]    = "tab6";

  contentbox[0]   = "content0";
  contentbox[1]   = "content1";
  contentbox[2]   = "content2";
  contentbox[3]   = "content3";
  contentbox[4]   = "content4";
  contentbox[5]   = "content5";
  contentbox[6]   = "content6";

  function tab_content(j) {



    for (i=0; i<contentbox.length; i++) {

      if ((j == 0) && (i == j)) {
        document.getElementById(contentbox[i]).style.display  = "block";
        document.getElementById(tabbutton[i]).className       = "tab_on_left2";
        document.getElementById('tableft').className          = "tab_on_left1";
      }
      else if ((i == 0) && (j != 0))  {
        document.getElementById(contentbox[i]).style.display  = "none";
        document.getElementById(tabbutton[i]).className       = "tab_off_left2";
        document.getElementById('tableft').className          = "tab_off_left1";
      }
      else if (i == j)  {
        document.getElementById(contentbox[i]).style.display  = "block";
        document.getElementById(tabbutton[i]).className       = "tab_on";
      }
      else {
        document.getElementById(contentbox[i]).style.display  = "none";
        document.getElementById(tabbutton[i]).className       = "tab_off";
      }

    }

  }