// preload images:

if (document.images) {
homeon = new Image(113, 44); homeon.src = "images/homeon.gif";
homeoff = new Image(113, 44); homeoff.src = "images/homeoff.gif";
abouton = new Image(168, 44); abouton.src = "images/abouton.gif";
aboutoff = new Image(168, 44); aboutoff.src = "images/aboutoff.gif";
galleryon = new Image(110, 44); galleryon.src = "images/galleryon.gif";
galleryoff = new Image(110, 44); galleryoff.src = "images/galleryoff.gif";
pricingon = new Image(126, 44); pricingon.src = "images/pricingon.gif";
pricingoff = new Image(126, 44); pricingoff.src = "images/pricingoff.gif";
serviceson = new Image(114, 44); serviceson.src = "images/serviceson.gif";
servicesoff = new Image(114, 44); servicesoff.src = "images/servicesoff.gif";
proofingon = new Image(184, 44); proofingon.src = "images/proofingon.gif";
proofingoff = new Image(184, 44); proofingoff.src = "images/proofingoff.gif";
contacton = new Image(138, 44); contacton.src = "images/contacton.gif";
contactoff = new Image(138, 44); contactoff.src = "images/contactoff.gif";
}

function hiLite(imgName,imgObjName) {
if (document.images) {
  document.images[imgName].src = eval(imgObjName + ".src");
}}


var theImages = new Array()

theImages[0] = 'images/random/1.jpg'
theImages[1] = 'images/random/2.jpg'
theImages[2] = 'images/random/3.jpg'
theImages[3] = 'images/random/4.jpg'
theImages[4] = 'images/random/5.jpg'
theImages[5] = 'images/random/6.jpg'
theImages[6] = 'images/random/7.jpg'
theImages[7] = 'images/random/8.jpg'
theImages[8] = 'images/random/9.jpg'
theImages[9] = 'images/random/10.jpg'
theImages[10] = 'images/random/11.jpg'
theImages[11] = 'images/random/12.jpg'
theImages[12] = 'images/random/13.jpg'
theImages[13] = 'images/random/14.jpg'
theImages[14] = 'images/random/15.jpg'


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]+'">');
}