Animation box in Javascript using setInterval