//Create an array of images.
var ads = new Array('http://www.pixietrixcomix.com/images/pixietrix460x60.png','http://www.pixietrixcomix.com/images/ma3_468x60.png','http://www.pixietrixcomix.com/images/flakypastry460x60.png','http://www.pixietrixcomix.com/images/candibanner468x60.png','http://www.pixietrixcomix.com/images/eeriecuties460x60b.jpg','http://www.pixietrixcomix.com/images/schoolbites468x60.jpg','http://www.pixietrixcomix.com/images/LOB_468X60.jpg');
var links = new Array('http://www.pixietrixcomix.com/','http://www.menagea3.net/','http://flakypastry.runningwithpencils.com/','http://www.candicomics.com/','http://www.eeriecuties.com/','http://www.schoolbites.net/','http://www.legendofbill.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 cellpadding=0 cellspacing=0><tr><td width=468 border=0 cellspacing=0 cellpadding=0><a href=http://www.pixietrixcomix.com/><img border=0 src=http://www.pixietrixcomix.com/images/pixietrixcomixbannerbar.png></A><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);