View Single Post
Old 05-06-2006, 10:26 AM  
OG LennyT
Wall Street Pimp
 
OG LennyT's Avatar
 
Industry Role:
Join Date: Jun 2003
Location: Phoenix, AZ
Posts: 14,345
Code:
<script language="Javascript">
<!--


var currentdate = 0;
var core = 0;

function initArray() {

this.length = initArray.arguments.length;
  for (var i = 0; i < this.length; i++) {
  this[i] = initArray.arguments[i];
  }
}

link = new initArray(
"http://www.yourlink1",
"http://www.yourlink2",
"http://www.yourlink3",
"http://www.yourlink4"
);

image = new initArray(
"http://imagelink.gif",
"http://imagelink.gif",
"http://imagelink.gif",
"http://imagelink.gif"
);

text = new initArray(
"textforlink!",
"text!",
"texxt!",
"rollovertext!"
);

var currentdate = new Date();
var core = currentdate.getSeconds() % image.length;
var ranlink  = link[core];
var ranimage = image[core];
var rantext  = text[core];

document.write('<a href=\"' +ranlink+ '\" target=\"_blank\"><img src=\"'+ranimage+'\" border="0" alt=\"'+rantext+'\"></a>');

//-->
</SCRIPT>
I use this for banner rotation, works well.
OG LennyT is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote