// alternate table row colors

function alternate(id) { 
	if (document.getElementById != null) 	{
		 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].style.backgroundColor = "#eee"; 
   			    	}
   			 else { 
       				rows[i].style.backgroundColor = "fff"; 
              	 	}       
            } 
      } 
 } 
}
