//Create an array of images.
var ads = new Array('http://www.crfh.net/shoutboxcrfhes.jpg','http://www.doomies.com/cajita.jpg','http://www.moco-comics.com/wp-content/uploads/2010/07/banner-patote-maritza-ingles.jpg','http://www.catscratchcomic.com/img/caja_catscratch.jpg','http://www.kimecan.com/shoutbox/shoutbox-tdk-ENG.jpg','http://www.atomiclaundromat.com/wp-content/uploads/2010/07/cajamaricza.jpg');
var links = new Array('http://www.crfh.net','http://www.doomies.com','http://www.en.moco-comics.com/','http://www.catscratchcomic.com','http://www.kimecan.com/Comic_Eng/','http://www.atomiclaundromat.com');

//Get the max length.
var max = ads.length;

//Get the random number between 1 and max length.
var num = Math.floor((Math.random() * max));

//Create variable for displaying the image.
var DisplayAd = "<table border=0 cellspacing=0 cellpadding=0><tr><td><a href='" + links[num] + "'><img src='" + ads[num] + "' border=0></a></td></tr></table>";

//Display the image where the javascript is located in the html file.
document.write(DisplayAd);