Guys I don't know how to add some interval of time in javascript. Do you know how to add some time before changing src of an image. i get this code from W3schools
document.getElementById("image").src = "http://www.w3schools.com/js/landscape.jpg";
<!DOCTYPE html>
<html>
<body>
<img id="image" src="http://www.w3schools.com/js/smiley.gif" width="160" height="120">
<p>The original image was smiley.gif, but the script changed it to landscape.jpg</p>
</body>
</html>