function alternateRows() {
	el = document.getElementsByTagName("table");  
	for (i=0; i<el.length; i++)
		if (el[i].className == "altRows") {
			rows = el[i].getElementsByTagName("tr");    
		for (j=0; j<rows.length; j++)      
			rows[j].className = "row" + (j % 2);  
	}
}
window.onload = function() {
	alternateRows();
}