function ColorRows(id) {
var i, rowtc;
var tbl = document.getElementById(id);
for (i = 0; i < tbl.rows.length; i++) {
rowtc = tbl.rows[i];
if (i % 2 == 0)
{ rowtc.className = "type1";}
else
{ rowtc.className = "type2";}
}
}
ColorRows('tbl');