// JavaScript Document

// 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] = 'photos/lake.jpg'
theImages[1] = 'photos/mountains.jpg'
theImages[2] = 'photos/skyline.jpg'
theImages[3] = 'photos/tree.jpg'
theImages[4] = 'photos/waterfall.jpg'
theImages[5] = 'photos/balsam.jpg'
theImages[6] = 'photos/beach.jpg'
theImages[7] = 'photos/boston.jpg'
theImages[8] = 'photos/butterfly.jpg'
theImages[9] = 'photos/caterpillar.jpg'
theImages[10] = 'photos/caterpillar2.jpg'
theImages[11] = 'photos/owl.jpg'
theImages[12] = 'photos/spider.jpg'
theImages[13] = 'photos/swan.jpg'

// 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('<img src="'+theImages[whichImage]+'">');
}

//////////////////////////////////////////////
function validateContactForm(objForm)
{
	
	//Check Name
	if (Trim(objForm.Name.value) == "")
	{
		alert("Please specify a valid Full Name.");
		objForm.Name.focus();
		return false;
	}
	
	//Check Email
	if (!isEmail(Trim(objForm.Email.value)))
	{
		alert("Please specify a valid Email Address.");
		objForm.Email.focus();
		return false;
	}

	
	return true;
}
//////////////////////////////////////////////