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.travel2southafrica.com/showcat.php?cat_id=2256",
"http://www.travel2southafrica.com/showcat.php?cat_id=2344",
"http://www.thewaves.co.za",
"http://www.travel2southafrica.com/showcat.php?cat_id=2314",
"http://www.thewaves.co.za",
"http://www.travel2southafrica.com/showcat.php?cat_id=2256",
"http://www.thewaves.co.za",
"http://www.travel2southafrica.com/showcat.php?cat_id=2344",
"http://www.travel2southafrica.com/showcat.php?cat_id=2314",
"http://www.thewaves.co.za"

);

image = new initArray(
"images/banners/kapama_banner_final.gif",
"images/nac_banner.gif",
"images/banners/the_waves_plett.gif",
"images/elitetoursandgolf_banner.jpg",
"images/banners/the_waves_plett.gif",
"images/banners/kapama_banner_final.gif",
"images/banners/the_waves_plett.gif",
"images/nac_banner.gif",
"images/elitetoursandgolf_banner.jpg",
"images/banners/the_waves_plett.gif"
);

text = new initArray(
"Visit our sponsors",
"Visit our sponsors",
"Visit our sponsors",
"Visit our sponsors"
);

//var currentdate = new Date();
//var core = currentdate.getSeconds() % image.length;
var core = Math.floor(Math.random()*11)
var ranlink  = link[core];
var ranimage = image[core];
var rantext  = text[core];

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

