window.onload = function ()
{
var table = document.getElementsByTagName ('table')[0];
var sels = document.getElementsByTagName ('select')[0];
sels.onchange = function ()
{
for ( var j = 0; j < table.rows.length; j++)
{
table.rows[j].style.backgroundColor = j % 2 == 0 ? colors[this.selectedIndex][0] : colors[this.selectedIndex][1];
}
}
}