// BASED ON:

// 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 the classname includes 'zebra'
      if (tables[j].className.indexOf('zebra') > -1) { 
	odd = 1;
	for (k=0; k<tables[j].rows.length; ++k) {
	  if (tables[j].rows[k].className.indexOf('zskip') > -1) {
	    odd = 1;
	  } else {
	    newclass = (odd ? "odd" : "even");
	    odd = !odd;
	    if (tables[j].rows[k].className) {
	      tables[j].rows[k].className = tables[j].rows[k].className + " " + newclass;
	    } else {
	      tables[j].rows[k].className = newclass;
	    }
	  }
	}
      }
    }
  }
}
