//Create an array of images.
var ads = new Array('teenbox_geekblather.jpg','teenbox_mastersart.jpg','teenbox_pennyaggie.jpg','teenbox_redstring.jpg','teenbox_subculture.jpg','teenbox_uglygirl.jpg','teenbox_yume.jpg','teenbox_dreamer.jpg','teenbox_mysteries.jpg');
var links = new Array('http://www.geekblather.com/','http://www.mastersoftheart.com/','http://www.pennyandaggie.com/','http://redstring.strawberrycomics.com/','http://www.subcultureofone.com/main.php','http://nanda.comicgenesis.com/','http://yume.rosalarian.com/','http://thedreamercomic.com/','http://mysteriesofthearcana.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 = "<map name='teenbit'> <area shape='rect' coords='1,1 120,45' target='_top' href='http://www.teenbit.net'> <area shape='rect' coords='1,45 120,165' target='_top' href='" + links[num] + "'></map><img src='http://www.teenbit.net/member_images/" + ads[num] + "' border=0 usemap='#teenbit'>";

//Display the image where the javascript is located in the html file.
document.write(DisplayAd);