
/* alternating row colors */
function applyTableRowStyle(CSSEven, CSSOdd) {
	var tables = document.getElementsByTagName('table');
	for (i = 0; i < tables.length; i++) {
		var table = tables[i];
		var rows = table.getElementsByTagName('tr');
		for(j = 0; j < rows.length; j++) {
			if (rows[j].className != "") {
				continue;
			} else if (j % 2 == 0) {
				//apply even style
				rows[j].className = CSSEven;
			} else if(j % 2 != 0) {
				//apply odd style
				rows[j].className = CSSOdd;
			}
		}
	}
}

onload = function() { applyTableRowStyle('even', 'odd'); }