function setClassName(clss, node)
{
  node.setAttribute("className", clss);
  node.setAttribute("class", clss);
}

function compileTbls()
{
  tbls = getElementsByClassName("my_table");
  if(tbls && tbls.length)
  {
    for(var i=0; i<tbls.length; i++)
    {
      tabl = tbls[i].getElementsByTagName("table")[0];
      if(tabl)
      {
        rows = tabl.getElementsByTagName("tr");
        if(rows && rows.length) 
        {
          scnd = 0;
          for(var j=0; j<rows.length; j++)
          {
            if(rows[j].getElementsByTagName("th").length) {continue;} // hlavicky tabulek vynechat
            scnd = !scnd;
            if(scnd) {setClassName("scnd", rows[j]);}
          }
        }
      }
    }
  }
}
