window.onload = function()
{
	if(typeof(window['validationSum']) == 'undefined')
	{
		document.forms[0].firstName.focus();
	}
}

function validateMe()
{
	var validationSum = document.getElementById("errorSummary");
	var errorCount = 0;
	var valFirstName = 0;
	var valLastName = 0;
	var valEmail = 0;
	var valPhone = 0;
	var valValues = "<div><strong>Please complete the fields listed below:</strong></div>";
	if(document.forms[0].firstName.value == "" && valFirstName == 0)
	{
		valValues += '<span>Please complete your first name.</span>';
		valFirstName++;
		errorCount++;
	}
	
	if(document.forms[0].lastName.value == "" && valLastName == 0)
	{
		valValues += '<span>Please complete your last name.</span>';
		valLastName++;
		errorCount++;
	}
	
	if((document.forms[0].email.value == "" || document.forms[0].email.value.indexOf("@") == -1) && valEmail == 0)
	{
		valValues += '<span>Please enter a valid email address.</span>';
		valEmail++;
		errorCount++;
	}
	
	if(document.forms[0].phone.value == "" && valPhone== 0)
	{
		valValues += '<span>Please complete your phone number.</span>';
		valPhone++;
		errorCount++;
	}
	
	if(errorCount != 0)
	{
		validationSum.innerHTML = valValues;
		validationSum.style.display = 'block';
		return false
	}
	return true;
}