// JavaScript Document
// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array. Rememeber
// to increment the theImages[x] index!

theImages[0] = 'http://www.sportingdevils.co.uk/images/adswap/advert0001.jpg'
theImages[1] = 'http://www.sportingdevils.co.uk/images/adswap/advert0002.jpg'
theImages[2] = 'http://www.sportingdevils.co.uk/images/adswap/advert0003.jpg'
theImages[3] = 'http://www.sportingdevils.co.uk/images/adswap/advert0004.jpg'
theImages[4] = 'http://www.sportingdevils.co.uk/images/adswap/advert0005.jpg'
theImages[5] = 'http://www.sportingdevils.co.uk/images/adswap/advert0006.jpg'
theImages[6] = 'http://www.sportingdevils.co.uk/images/adswap/advert0007.jpg'
theImages[7] = 'http://www.sportingdevils.co.uk/images/adswap/advert0008.jpg'
theImages[8] = 'http://www.sportingdevils.co.uk/images/adswap/advert0009.jpg'
theImages[9] = 'http://www.sportingdevils.co.uk/images/adswap/advert0010.jpg'
theImages[10] = 'http://www.sportingdevils.co.uk/images/adswap/advert0011.jpg'
theImages[11] = 'http://www.sportingdevils.co.uk/images/adswap/advert0012.jpg'
theImages[12] = 'http://www.sportingdevils.co.uk/images/adswap/advert0013.jpg'
theImages[13] = 'http://www.sportingdevils.co.uk/images/adswap/advert0014.jpg'
theImages[14] = 'http://www.sportingdevils.co.uk/images/adswap/advert0015.jpg'
theImages[15] = 'http://www.sportingdevils.co.uk/images/adswap/advert0016.jpg'
theImages[16] = 'http://www.sportingdevils.co.uk/images/adswap/advert0017.jpg'
theImages[16] = 'http://www.sportingdevils.co.uk/images/adswap/advert0018.jpg'

// ======================================
// do not change anything below this line
// ======================================

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(){
document.write('<img src="'+theImages[whichImage]+'">');
}

//-->
