var subs;

function subrow(row)
{
for (y=0; y<2; y++)
subcells = row[y].getElementsByTagName("th");

for (x=0; x<subcells.length; x++)
if (subcells[x].className == "sub") {
	subs = "true";
	return subs;
}
else {
 subs = "false";
}
}


el = document.getElementsByTagName("table");
for (i=0; i<el.length; i++)
if ((el[i].className == "altRows") || (el[i].className == "tablelayout altRows")) {
rows = el[i].getElementsByTagName("tr");

 
 if (subrow(rows) == "true") {
  for (j=0; j<rows.length; j++)
rows[j].className = "row" + (j % 2);	 
 }
 else {
for (j=0; j<rows.length; j++)
rows[j].className = "row" + ((j+1) % 2);
}
}