var theImages = new Array()

theImages[0] = 'http://www.070809.co.uk/imgs/polaroid/001.jpg'
theImages[1] = 'http://www.070809.co.uk/imgs/polaroid/002.jpg'
theImages[2] = 'http://www.070809.co.uk/imgs/polaroid/003.jpg'
theImages[3] = 'http://www.070809.co.uk/imgs/polaroid/004.jpg'
theImages[4] = 'http://www.070809.co.uk/imgs/polaroid/005.jpg'
theImages[5] = 'http://www.070809.co.uk/imgs/polaroid/006.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]+'" height="269" width="269" alt="Lisa &amp; Toby" />');
}

function popUp(popupwin){
window.open(popupwin,"_blank",'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=640,height=515,left=100,top=100');
}

function clearDefault(el) {

  if (el.defaultValue==el.value) el.value = ""

}
