window.onload = function(){ var curImg = document.getElementById("1").style.display = "inline"; setInterval(rotateImages, 6000); };