e) {
    var counter = document.getElementById(counter_name+"_input");
    counter.value = Number(counter.value) - 1;
    eval('change_' + counter_name + '()');
}

function reset_all() {
    reset_pixels();
    draw_canvas();
}

function reset_magic_numbers() {
    grid_size = parseFloat(document.getElementById("grid_size").value);
    nd = document.getElementById("nd").value;
    weight = document.getElementById("weight").value;
    shiftd = document.getElementById("shiftd").value;
    draw_canvas();
}

  