1 /** highlight/unset the row of a table **/
2 function set_row(idx) {
3 var table = document.getElementById('user-grades');
4 var rowsize = table.rows[idx].cells.length;
5 for (var i = 1; i < rowsize; i++) {
6 if (table.rows[idx].cells[i]) {
7 if (table.rows[idx].cells[i].className.search(/hmarked/) != -1) {
8 table.rows[idx].cells[i].className = table.rows[idx].cells[i].className.replace(' hmarked', '');
10 table.rows[idx].cells[i].className += ' hmarked';
16 /** highlight/unset the column of a table **/
17 function set_col(idx) {
18 var table = document.getElementById('user-grades');
19 for (var i = 1; i < table.rows.length; i++) {
20 if (table.rows[i].cells[idx]) {
21 if (table.rows[i].cells[idx].className.search(/vmarked/) != -1) {
22 table.rows[i].cells[idx].className = table.rows[i].cells[idx].className.replace(' vmarked', '');
24 table.rows[i].cells[idx].className += ' vmarked';