spacer


Okay, so maybe they aren't the most thoughout images in the world, but it shows how the script works. This javascript randomly selects an image to display on your page. This is extremely usefull if you have more than one logo for your page. This is also usefull if you want to have a random page layout with many different graphics.
The source..


<script language="Javascript">
<!--
// please keep these lines on when you copy the source
// made by: Nicolas - www.javascript-page.com

var currentdate = 0
var core = 0

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '

  }
}

image = new StringArray(10)
image[0] = '0.gif'
image[1] = '1.gif'
image[2] = '2.gif'
image[3] = '3.gif'
image[4] = '4.gif'
image[5] = '5.gif'
image[6] = '6.gif'
image[7] = '7.gif'
image[8] = '8.gif'
image[9] = '9.gif'

var ran = 60/image.length

function ranimage() {
  currentdate = new Date()
  core = currentdate.getSeconds()
  core = Math.floor(core/ran)
    return(image[core])
}

document.write("<img src="/img/spacer.gif"> ")

//-->
</script>

Color coding..


This is the number of different images you have. The different images are stated by image[the number in line -1]="image.extension" so you can add or subtract the number of messages in the list by following this pattern.

spacer
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.