function paintZebra()
{ if (document.getElementsByTagName) 
  { tables = document.getElementsByTagName("table");
    for(j=0; j<tables.length; j++)
    {
      if (tables[j].className.indexOf('zebra') > -1) // if the classname includes 'zebra'
      { for (k=0; k<tables[j].rows.length; k=k+2)
        {
          tables[j].rows[k].className='even';
        }
      }
    }
  }
}

paintZebra();
