//Javascript to create zebra-striping on holiday calendar
function setTables()
{
	var tables = document.getElementsByTagName('table');
	
	for(var i = 0; i < tables.length; i++)
	{
		if(tables[i].className == 'calendar')
		{
			var rows = tables[i].getElementsByTagName('tr');
			
			for(var j = 0; j < rows.length; j++)
			{
				if(j % 2)
				{
					rows[j].className = 'altbackground';
				}
				else
				{
					rows[j].className = '';
				}
			}
		}
	}
}

function addLoadEvent(func)
{
	var oldonload = window.onload;
	if(typeof window.onload != 'function')
	{
		window.onload = func;
	}
	else
	{
		window.onload = function()
		{
			oldonload();
			func();
		}
	}
}

addLoadEvent(setTables);
