function alternate(id){
if(document.getElementsByTagName){
if(document.getElementById(id) != null){ // make sure the id exists
   var table = document.getElementById(id);
   var rows = table.getElementsByTagName("tr");
   for(i = 0; i < rows.length; i++){     // start at i=1 so that you skip the header row
    //manipulate rows
    if(i % 2 == 0){
     rows[i].className = "even";
    }else{
     rows[i].className = "odd";
    }
   }
  }
 }
}


function alternateCells(id){
if(document.getElementsByTagName){
if(document.getElementById(id) != null){ // make sure the id exists
   var table = document.getElementById(id);
   var rows = table.getElementsByTagName("tr");
   for(i = 0; i < rows.length; i++){     // start at i=1 so that you skip the header row
   		cells=rows[i].getElementsByTagName("td");
			for (j=0; j< cells.length; j++){
				if (cells[j].className==""){
				if (i%2==0){
					if (j%2==0){
						cells[j].className="even";	
					}else{
						cells[j].className="odd";
					}				
				}else{
					if (j%2==0){
						cells[j].className="odd";	
					}else{
						cells[j].className="even";
					}
				}
				}
			}
   }
  }
 }	
}