<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script>
function rotate(imageNumber) {
//Modify these variables as needed
//vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
var myimage1 = "image1.jpg";
var myimage2 = "image2.jpg";
var myimage3 = "image3.jpg";
var myimage4 = "image4.jpg";
var link1 = 'http://link1.com';
var link2 = 'http://link2.com';
var link3 = 'http://link3.com';
var link4 = 'http://link4.com';
var time = 5000; //5000 milliseconds = 5 seconds
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
var image = document.getElementById('rotator');
switch (imageNumber) {
case 1:
image.src = myimage1;
image.onclick = function () { window.location = link1; };
aspan.innerHTML = imageNumber;
imageNumber++;
break;
case 2:
image.src = myimage2;
image.onclick = function () { window.location = link2; };
aspan.innerHTML = imageNumber;
imageNumber++;
break;
case 3:
image.src = myimage3;
image.onclick = function () { window.location = link3; };
aspan.innerHTML = imageNumber;
imageNumber++;
break;
case 4:
image.src = myimage4;
image.onclick = function () { window.location = link4; };
aspan.innerHTML = imageNumber;
imageNumber = 1;
break;
}
var t = setTimeout("rotate(" + imageNumber + ")", time);
}
</script>
</head>
<body onload="rotate(1);">
<div>
<img src="Base.png" id="rotator" style="width:1027px;height:497px;" />
</div>
</body>
</html>