/**
 * Change the background of the course line in the form
 *
 * @param int rowid Row ID
 * @param bool highlight Shall I highlight the row or unhighlight?
 */
function cord_toggle_row(rowid, highlight) {
    var row = document.getElementById(rowid);
    // XXX does not remove "ordered" from class for some reason :-S I need to use element style
    //if (row.className.search(/ordered/) != -1) {
    //    row.className.replace(' ordered', '');
    //} else {
    //    row.className += ' ordered';
    //}
    
    if (highlight == 1) {
        row.style.backgroundColor = '#bfffbf';
    } else {
        row.style.backgroundColor = '';
    }
}

