function animSquare(ts) {
        if (startTime === undefined) {
                startTime = ts;
                 requestAnimationFrame(animSquare);
                return;
        }


        var runningTime = (ts - startTime) / 1000;
        var proportion = runningTime / duration;


        if (currentX <= endX) {
                currentX = startX + (endX * proportion);
                s1.setAttribute("x", currentX);
                requestAnimationFrame(animSquare);
        }
};


// Lancement denl' running
nimationFrame(animSquare);