/*
** Used by Availability UI to toggle the css class of the timepoint cell
** and the value of the hidden field.
*/
function toggle( id ) {
    var e = document.getElementById( "time_cell_" + id )
    var control = document.getElementById( "control_" + id )
    if( e.className == "active1" ) {
        e.className = "active0"
        control.value = 0
    }
    else {
        e.className = "active1"
        control.value = 1
    }
}