false);
    }, false);

    polynomial.addEventListener('mouseleave', function(e){
        polynomial_draw(0, 0, false);
    }, false);
}

function polynomial_draw(client_x, client_y, do_guides){
    polynomial = document.getElementById("polynomial");
    var polynomial_context = polynomial.getContext("2d");
    polynomial_context.font = "16px sans-serif";
    // background
    polynomial_context.fillStyle="#eeeeee";
    polynomial_context.fillRect(0, 0, w, h);

    // grid
    draw_grid_on(polynomial_conte