function rotateOne() { window.alert("first"); } window.setTimeout(rotateOne, 3000);