// 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] = 'craft/craft-1.jpg'
theImages[1] = 'craft/craft-2.jpg'
theImages[2] = 'craft/craft-3.jpg'
theImages[3] = 'craft/craft-4.jpg'
theImages[4] = 'craft/craft-5.jpg'
theImages[5] = 'craft/craft-6.jpg'
theImages[6] = 'craft/craft-7.jpg'
theImages[7] = 'craft/craft-8.jpg'
theImages[8] = 'craft/craft-9.jpg'
theImages[9] = 'craft/craft-10.jpg'
theImages[10] = 'craft/craft-11.jpg'
theImages[11] = 'craft/craft-12.jpg'
theImages[12] = 'craft/craft-13.jpg'
theImages[13] = 'craft/craft-14.jpg'
theImages[14] = 'craft/craft-15.jpg'
theImages[15] = 'gold/gold-1.jpg'
theImages[16] = 'gold/gold-2.jpg'
theImages[17] = 'gold/gold-3.jpg'
theImages[18] = 'gold/gold-4.jpg'
theImages[19] = 'gold/gold-5.jpg'
theImages[20] = 'gold/gold-6.jpg'
theImages[21] = 'gold/gold-7.jpg'
theImages[22] = 'gold/gold-8.jpg'
theImages[23] = 'gold/gold-9.jpg'
theImages[24] = 'gold/gold-10.jpg'
theImages[25] = 'gold/gold-11.jpg'
theImages[26] = 'gold/gold-12.jpg'
theImages[27] = 'gold/gold-13.jpg'
theImages[28] = 'gold/gold-14.jpg'

var imageDir = 'images/products/'
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="'+imageDir+theImages[whichImage]+'">');
}

