<!--
var theAdverts = new Array()

theAdverts[0] = 'images/advert/1.png'
theAdverts[1] = 'images/advert/2.png'
theAdverts[2] = 'images/advert/3.png'
theAdverts[3] = 'images/advert/4.png'
theAdverts[4] = 'images/advert/5.png'
theAdverts[5] = 'images/advert/6.png'
theAdverts[6] = 'images/advert/7.png'
//theAdverts[7] = 'images/advert/8.png'

var j = 0
var t = theAdverts.length;

var preBuffer = new Array()
for (i = 0; i < t; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theAdverts[i]
}

var whichAdvert = Math.round(Math.random()*(t-1));
function showAdvert(){
document.write('<img src="'+theAdverts[whichAdvert]+'">');
}

//-->