/* 
displays table rows with alternating colors
reference this script in the head
set TABLE Id = "colorme"
call script AFTER the table: <script language="javascript" defer>alternate('colorme');</script>

see hsreform/cccr/default.html for an example
*/

function alternate(id){
 if(document.getElementsByTagName){  
   var table = document.getElementById(id);  
   var rows = table.getElementsByTagName("tr");  
   for(i = 0; i < rows.length; i++){          
 //manipulate rows
     if(i % 2 == 0){
       rows[i].className = "eee";
     }      
   }
 }
}