// JavaScript Document
function Validate() {
	// \n is a line break;
	var sErrorMessage = "Please enter in the following information:\n";
	var iErrorCount = 0;

	// the following are variables that point to the actual control on the page
	var oFirstName = document.getElementById("FirstName");
	var oLastName = document.getElementById("LastName");
	var oEmailAddress = document.getElementById("EmailAddress");
	var oMessage = document.getElementById("Message");
	
	//alert();
	
	if(oFirstName.value.length <= 0)
	{
		// the next line increments iErrorCount by 1
		iErrorCount++;
		// the next line adds the value on the right hand side to sErrorMessage
		//    variable
		sErrorMessage += iErrorCount + ". Your first name\n";
	}

	if(oLastName.value.length <= 0)
	{
		iErrorCount++;
		sErrorMessage += iErrorCount + ". Your last name\n";
	}
	if(oEmailAddress.value.length <= 0)
	{
		iErrorCount++;
		sErrorMessage += iErrorCount + ". Your email address\n";
	}
	if(oMessage.value.length <= 0)
	{
		iErrorCount++;
		sErrorMessage += iErrorCount + ". Your message\n";
	}
	if(iErrorCount > 0)
	{
		alert(sErrorMessage);
		return false;
	}
	else
	{
		return true;
	}
}