Slideshow written in pure javascript