//Create an array of images.
var ads = new Array('http://www.pixietrixcomix.com/images/zc_160x347_1.jpg',
'http://www.pixietrixcomix.com/images/zc_160x347_2.jpg',
'http://www.pixietrixcomix.com/images/EC_zoom_newsbox.jpg',
'http://www.pixietrixcomix.com/images/ma3_zoom_newsbox.jpg',
'http://www.pixietrixcomix.com/images/MC_zoom_newsbox2.jpg');
var links = new Array('http://www.zoomcomics.com/',
'http://www.zoomcomics.com/',
'http://www.eeriecuties.com/',
'http://www.ma3comic.com/',
'http://www.magickchicks.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 = "<a href='" + links[num] + "'><img src='" + ads[num] + "' width=\"160\" height=\"347\" border=\"0\" /></a>";

//Display the image where the javascript is located in the html file.
document.write(DisplayAd);
