// JavaScript Document

<!-- Begin JS Script -->

<!-- Begin
// Set up the image files to be used.
var theRImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

var theRDesc = new Array()

theRImages[0] = 'http://www.visitfraserburgh.com/images/bnr_homepage.gif'
theRImages[1] = 'http://www.visitfraserburgh.com/images/bnr_history_heritage.jpg'
theRImages[2] = 'http://www.visitfraserburgh.com/images/bnr_commerce.jpg'
theRImages[3] = 'http://www.visitfraserburgh.com/images/bnr_community.jpg'

theRDesc[0] = 'View from Fraserburgh to Rosehearty'
theRDesc[1] = 'Fraserburgh Harbour'
theRDesc[2] = 'Fraserburgh Town House'
theRDesc[3] = 'Fraserburgh Beach'

// do not edit anything below this line

var j = 0
var p = theRImages.length;
var preRBuffer = new Array()
for (i = 0; i < p; i++){
   preRBuffer[i] = new Image()
   preRBuffer[i].src = theRImages[i]
}
var whichRImage = Math.round(Math.random()*(p-1));
function showRImage(){
document.write('<img src="'+theRImages[whichRImage]+'" alt="'+theRDesc[whichRImage]+'">');

}

//  End -->