JavaScript GIF parser and player