//-------------------------------------
// Scripts for zebra tables
// Author: Stephen Poley
// See http://www.xs4all.nl/~sbpoley/webmatters/zebra-tables.html
// ------------------------------------

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';
        }
      }
    }
  }
}

function paintQuagga()
{ if (document.getElementsByTagName) 
  { tables = document.getElementsByTagName("table");
    for(j=0; j<tables.length; j++)
    {
      if (tables[j].className.indexOf('quagga') > -1) // if the classname includes 'quagga'
      { for (k=0; k<tables[j].rows.length; k=k+2)
        { if(k%4==0)
            tables[j].rows[k].className='primary';
          else
            tables[j].rows[k].className='secondary';
        }
      }
    }
  } 
}

