﻿function alternate(id, tag)
{
    if (document.getElementsByTagName)
    {  
       var thisItem = document.getElementById(id);  
       if(thisItem)
       { 
            var rows = thisItem.getElementsByTagName(tag);   
            //manipulate rows 
            for(i = 0; i < rows.length; i++)
            {
                if(i % 2 == 0)
                { 
                    rows[i].className = "odd";
                }
                else
                { 
                    rows[i].className = "even"; 
                }
            }
       }
    } 
}
