<!-- Begin
// 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.

theImages[0] = ['http://www.premium-portfolio.com/images/banners/1.jpg', 'http://www.salescat.co.uk/catalogue/']
theImages[1] = ['http://www.premium-portfolio.com/images/banners/2.jpg', 'http://www.salescat.co.uk/catalogue/']
theImages[2] = ['http://www.premium-portfolio.com/images/banners/3.jpg', 'http://www.salescat.co.uk/catalogue/']
theImages[3] = ['http://www.premium-portfolio.com/images/banners/4.jpg', 'http://www.salescat.co.uk/catalogue/']
theImages[4] = ['http://www.premium-portfolio.com/images/banners/4.jpg', 'http://www.salescat.co.uk/catalogue/']

// do not edit 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('<a href="'+theImages[whichImage][1]+'"><img src="'+theImages[whichImage][0]+'"></a>');
}
<!-- Begin
showImage();
//  End -->

