
function trHoverInit(tableId)
{
    // Fetch the table.
    hoverTable = document.getElementById(tableId);
    if (!hoverTable) {
        return false;
    }


    // Add an event handler to every row.
    var rows = hoverTable.rows;
    for (var i = 0; i < rows.length; i++) {
        // Add event listeners to highlight the row on mouseover in IE only.
        // Other browsers are handled by :hover in css.
        if (navigator.appName == 'Microsoft Internet Explorer') {
            rows[i].onmouseover = function() {
                this.className += ' hover';
            }
            rows[i].onmouseout = function() {
                this.className = this.className.replace(' hover', '');
            }
        }
    }
}
