Carousel loads only after page refresh, no jQuery

Guys, check out my website here:

constantin-music.com

I used vanilla javascript to create carousel at the bottom of the home page. Unfortunately it doesn’t work when you first load the page, you always have to refresh it. Google yields jQuery only and it’s not helpful.

Another problem that I encountered is when you resize the browser the images get displaces from their starting position. Please, help! I’d love to solve it without using jQuery or any plugins.