Frame animation for JavaScript DOM sprites