// Adds onmouseover, onmouseout, and onclick handlers to each table row.  The onmouseover handler changes the row's class attribute to
// rowMouseOver.  The onmouseout handler changes it back.  The onclick function makes a request for the specified url, including the
// innerHTML of the specified column as a request parameter.
function addRowHandlers(language, tableId, rowClassName, url, paramName1, columnIndex1, paramName2, columnIndex2) {
    var previousClass = null;
    var table = document.getElementById(tableId);
    var rows = table.getElementsByTagName("tr");
    for (i = 1; i < rows.length; i++) {
        rows[i].onmouseover = function () {
            previousClass = this.className;
            this.className = "row-highlighted";
        };
        
        rows[i].onmouseout = function () {
            this.className = previousClass;
        };
        
        rows[i].onclick = function () {
            var cell1 = this.getElementsByTagName("td")[columnIndex1];
            var paramValue1 = cell1.innerHTML;
            var cell2 = this.getElementsByTagName("td")[columnIndex2];
            var paramValue2 = cell2.innerHTML;
            if(language == 'D'){
                location.href = "85.html?" + paramName1 + "=" + paramValue1 + "&" + paramName2 + "=" + paramValue2;
            } else {
                location.href = "86.html?" + paramName1 + "=" + paramValue1 + "&" + paramName2 + "=" + paramValue2;            
            }
        };
    }
}