function alternateRowColors () // alternates class grey/white each 3 lines
{
	tables = document.getElementsByTagName ('table');
	for (x = 0; x < tables.length; x++)
	{
		if (tbody = tables[x].getElementsByTagName ('tbody')) rows = tbody[0].getElementsByTagName ('tr');
		else rows = tables[x].getElementsByTagName ('tr');

		for (i = 0; i < rows.length; i++)
		{
			if (Math.floor(i/3)%2) rows[i].setAttribute ('class', rows[i].getAttribute ('class') + ' white');
			else rows[i].setAttribute ('class', rows[i].getAttribute ('class') + ' grey');
		}
	}
}