var SLIDE = false;

function slide_to(content, location)
{
    if (!SLIDE) {
        var current = get_left(content);
        slide(content, location, current, 20);

        return false;
    }
}

function get_left(node)
{
    return node.style.left ? parseInt(node.style.left) : 0;
}

function slide(content, location, start, shift)
{
    SLIDE = true;
    var current = get_left(content);
    if ((start <= current && current < location) || (start >= current && current > location)) {
        content.style.left = current + parseFloat(shift * (start < location ? 1 : -1)) + 'px';
        setTimeout(function () {slide(content, location, start, shift)}, 0);
    } else {
        SLIDE = false;
        content.style.left = location + 'px';
    }
}