Let's say I have a banner on my site that randomly rotates between images that depict the month of January. Is it possible to have 10 images randomly rotate the entire month, then to have a new 10 images rotate randomly for the following month? I also need each image to link to its link.
I was thinking an If/Then statement might work, but I have no clue... and frankly, I'm not a very good coder.
IF MONTH=January, then show this
<center><script language="JavaScript">
<!--
function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]=""
myimages[2]=""
myimages[3]=""
myimages[4]=""
myimages[5]=""
myimages[6]=""
myimages[7]=""
myimages[8]=""
myimages[9]=""
myimages[10]=""
//specify corresponding links below
var imagelinks=new Array()
imagelinks[1]=""
imagelinks[2]=""
imagelinks[3]=""
imagelinks[4]=""
imagelinks[5]=""
imagelinks[6]=""
imagelinks[7]=""
imagelinks[8]=""
imagelinks[9]=""
imagelinks[10]=""
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" style="border:4px #660000 solid;"></a>')
}
random_imglink()
//-->
</script></center>
IF MONTH=February, then show this
<center><script language="JavaScript">
<!--
function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]=""
myimages[2]=""
myimages[3]=""
myimages[4]=""
myimages[5]=""
myimages[6]=""
myimages[7]=""
myimages[8]=""
myimages[9]=""
myimages[10]=""
//specify corresponding links below
var imagelinks=new Array()
imagelinks[1]=""
imagelinks[2]=""
imagelinks[3]=""
imagelinks[4]=""
imagelinks[5]=""
imagelinks[6]=""
imagelinks[7]=""
imagelinks[8]=""
imagelinks[9]=""
imagelinks[10]=""
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" style="border:4px #660000 solid;"></a>')
}
random_imglink()
//-->
</script></center>