Hi! I am making my bands website, n i though this template would make my vision easy to do..but it hasn’t worked out how i’d of liked it to.
[url]www.penitentiary.co.uk
I have already put the other half of the script in, but it is this part which is wrong. It is script so that every time the home page is visited, 1 of 6 images appears at random adding variety…however, 4 of the images link to different areas of the site (this is possible?)
Below is the script..if you could help me based on what I offer you, or even correct it for me, i’d be so appriciative..as i’m pulling my hair out over this.
~Blade376
<script language=”JavaScript” type=”text/javascript”>
// This script was supplied free by Hypergurl
// [url]http://www.hypergurl.com
<!–
// JavaScript to interpolate random images into a page.
var ic = 6; // Number of alternative images
var xoxo = new Array(ic); // Array to hold filenames
xoxo[0] = “
xoxo[1] = “
xoxo[2] = <p align=”center”><a href=”
xoxo[3] = <p align=”center”><a href=”
xoxo[4] = <p align=”center”><a href=”
xoxo[5] = <p align=”center”><a href=”
function pickRandom(range) {
if (Math.random)
return Math.round(Math.random() * (range-1));
else {
var now = new Date();
return (now.getTime() / 1000) % range;
}
}
// Write out an IMG tag, using a randomly-chosen image name.
var choice = pickRandom(ic);
// –>
</script>