How about some lovely CSS3?

li { background: green; }
li:nth-child(odd) { background: red; }