var theImages = new Array()

//Random-loading images
theImages[0] = 'ads/pic1.gif' // replace with names of images
theImages[1] = 'ads/pic2.gif' // replace with names of images
theImages[2] = 'ads/pic3.gif' // replace with names of images
theImages[3] = 'ads/pic4.gif' // replace with names of images
theImages[4] = 'ads/pic5.gif' // replace with names of images
theImages[5] = 'ads/pic6.gif' // replace with names of images
theImages[6] = 'ads/pic7.gif' // replace with names of images
theImages[7] = 'ads/pic8.gif' // replace with names of images
theImages[8] = 'ads/pic9.gif' // replace with names of images
theImages[9] = 'ads/pic10.gif' // replace with names of images
theImages[10] = 'ads/pic11.gif' // replace with names of images
theImages[11] = 'ads/pic12.gif' // replace with names of images
theImages[12] = 'ads/pic13.gif' // replace with names of images
theImages[13] = 'ads/pic14.gif' // replace with names of images

var j = 0
var p = theImages.length;
var preBuffer = new Array()

for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));

function showImage(){
if(whichImage==0){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=500 height=59></a>');
}
else if(whichImage==1){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=500 height=59></a>');
}
else if(whichImage==2){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=500 height=59></a>');
}
else if(whichImage==3){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=500 height=59></a>');
}
else if(whichImage==4){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=500 height=59></a>');
}
else if(whichImage==5){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=500 height=59></a>');
}
else if(whichImage==6){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=500 height=59></a>');
}
else if(whichImage==7){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=500 height=59></a>');
}
else if(whichImage==8){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=500 height=59></a>');
}
else if(whichImage==9){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=500 height=59></a>');
}
else if(whichImage==10){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=500 height=59></a>');
}
else if(whichImage==11){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=500 height=59></a>');
}
else if(whichImage==12){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=500 height=59></a>');
}
else if(whichImage==13){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=500 height=59></a>');
}
else if(whichImage==14){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=500 height=59></a>');
}




}

