Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
</head>
<body>
<a href="#" target="_blank"><IMG id="feature" SRC="../MuniPortal/images/image.jpg" WIDTH="345" HEIGHT="100" BORDER="0" ></a>
<a href="#" target="_blank"><IMG id="feature2" SRC="../MuniPortal/images/image.jpg" WIDTH="345" HEIGHT="100" BORDER="0" ></a>
<script type="text/javascript">
ads = [
"http://www.vicsjavascripts.org.uk/StdImages/One.gif",
"http://www.vicsjavascripts.org.uk/StdImages/Two.gif",
"http://www.vicsjavascripts.org.uk/StdImages/Three.gif",
"http://www.vicsjavascripts.org.uk/StdImages/Four.gif",
"http://www.vicsjavascripts.org.uk/StdImages/Zero.gif"
];
newplace = [
"http://www.vicsjavascripts.org.uk/StdImages/Five.gif",
"http://www.vicsjavascripts.org.uk/StdImages/Six.gif",
"http://www.vicsjavascripts.org.uk/StdImages/Seven.gif",
"http://www.vicsjavascripts.org.uk/StdImages/Eight.gif",
"http://www.vicsjavascripts.org.uk/StdImages/Nine.gif"
];
ads2 = [
"http://www.vicsjavascripts.org.uk/StdImages/One.gif",
"http://www.vicsjavascripts.org.uk/StdImages/Two.gif",
"http://www.vicsjavascripts.org.uk/StdImages/Three.gif",
"http://www.vicsjavascripts.org.uk/StdImages/Four.gif"
];
function Feature(o) {
this.img=document.getElementById(o.ID);
this.cnt=0;
this.ms=o.Duration||1000;
this.ary1=o.Array1;
this.ary2=o.Array2;
this.timer=null;
}
Feature.prototype.Rotate=function() {
var oop=this;
this.timer=setTimeout( function(){ oop.Rotate(); },this.ms);
this.cnt=++this.cnt%this.ary1.length;
this.img.src = this.ary1[this.cnt];
this.img.parentNode.href=this.ary2[this.cnt]||this.ary1[this.cnt];
}
var S1=new Feature({
ID:'feature',
Array1:ads,
Array2:newplace,
Duration:1000
});
S1.Rotate();
var S2=new Feature({
ID:'feature2',
Array1:ads2,
Array2:newplace,
Duration:4000
});
S2.Rotate();
/*]]>*/
</script>
</body>
</html>
Bookmarks