//Create an array of images.
var ads = new Array('http://www.pixietrixcomix.com/images/aaj_160x347_1.jpg',
'http://www.pixietrixcomix.com/images/aaj_160x347_2.jpg',
'http://www.pixietrixcomix.com/images/aoi_160x347_1.jpg',
'http://www.pixietrixcomix.com/images/aoi_160x347_2.jpg',
'http://www.pixietrixcomix.com/images/de_160x347_1.jpg',
'http://www.pixietrixcomix.com/images/pms_160x347_1.jpg',
'http://www.pixietrixcomix.com/images/pms_160x347_ad_3.jpg',
'http://www.pixietrixcomix.com/images/vc_160x347_1.jpg',
'http://www.pixietrixcomix.com/images/vc_160x347_2.jpg');
var links = new Array('http://www.amazingagentjennifer.com/',
'http://www.amazingagentjennifer.com/',
'http://www.aoihouse.net/',
'http://www.aoihouse.net/',
'http://www.draculaeverlasting.com/',
'http://www.paranormalmysterysquad.com/',
'http://www.paranormalmysterysquad.com/',
'http://www.vampirecheerleaders.net/',
'http://www.vampirecheerleaders.net/');

//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);
