top);
        chebyshev_draw(e.clientX - canvas_rect.left, e.clientY - canvas_rect.top, false);
    }, false);

    chebyshev.addEventListener('mouseleave', function(e){
        chebyshev_draw(0, 0, false);
    }, false);
}

function chebyshev_draw(client_x, client_y, do_guides){
    chebyshev = document.getElementById("chebyshev");
    var chebyshev_context = chebyshev.getContext("2d");
    chebyshev_context.font = "16px sans-serif";
    // background
    chebyshev_context.fillStyle="#eeeeee";
    chebyshe