function validateForm(theForm)
{
var strErrorMessage='';	
if (theForm.fname.value == ""){
	strErrorMessage+=" - The First Name field is Required.\n";
}
if (theForm.lname.value == ""){
	strErrorMessage+=" - The Last Name field is Required.\n";
}

if (theForm.phone.value == ""){
	strErrorMessage+=" - The Phone field is Required.\n";
}

if (theForm.email.value == ""){
	strErrorMessage+=" - The Email field is Required.\n";
	if (theForm.email.type != "hidden"){
			theForm.email.focus();
	}
	//return (false);
} else {
	RegExpEmail = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
	if(!RegExpEmail.test(theForm.email.value)){
		strErrorMessage+=" - The Email is invalid.\n";
		theForm.email.focus();
		//return (false);
	}
}
if (strErrorMessage!=""){
	strNewMessage="The form contains an error. Please correct the following mistake\nand resubmit the form:\n"+strErrorMessage+"\n";
	strErrorMessage=strNewMessage;
	alert(strErrorMessage);
	strErrorMessage="";
return (false);
}
	exit = false;
	return (true);
}

function validateForm2(theForm)
{
		
	if (theForm.fname.value == ""){
		alert("Please enter your first name.");
		if (theForm.fname.type != "hidden"){
			theForm.fname.focus();
		}
		return (false);
	}


	if (theForm.lname.value == ""){
		alert("Please enter your last name.");
		if (theForm.lname.type != "hidden"){
				theForm.lname.focus();
		}
		return (false);
	}


	if (theForm.address.value == ""){
		alert("Please enter your address.");
		if (theForm.address.type != "hidden"){
				theForm.address.focus();
		}
		return (false);
	}


	if (theForm.city.value == ""){
		alert("Please enter your city.");
		if (theForm.city.type != "hidden"){
				theForm.city.focus();
		}
		return (false);
	}

			
	if (theForm.zip.value == ""){
		alert("Please enter your zip code.");
		if (theForm.zip.type != "hidden"){
				theForm.zip.focus();
		}
		return (false);
	} else {
		RegExpZipCode = /\d\d\d\d\d+/
		if(!RegExpZipCode.test(theForm.zip.value)){
			alert("Please enter a 5 digit zip code");
			theForm.zip.focus();
			return (false);
		}
	}


	if (theForm.state.value == "-1"){
		alert("Please select your state.");
		if (theForm.state.type != "hidden"){
				theForm.state.focus();
		}
		return (false);
	}

			
	if (theForm.email1.value == ""){
		alert("Please enter your email address.");
		if (theForm.email1.type != "hidden"){
				theForm.email1.focus();
		}
		return (false);
	} else {
		RegExpEmail = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
		if(!RegExpEmail.test(theForm.email1.value)){
			alert("Please enter valid email address");
			theForm.email1.focus();
			return (false);
		}
	}


	if (theForm.phone.value == ""){
		alert("Please enter your phone number.");
		if (theForm.phone.type != "hidden"){
				theForm.phone.focus();
		}
		return (false);
	} else {
		RegExpPhoneNumber = /\d\d\d-\d\d\d-\d\d\d\d/
		RegExpNotPhoneNumber = /555-\d\d\d-\d\d\d\d/
		if(!RegExpPhoneNumber.test(theForm.phone.value) || RegExpNotPhoneNumber.test(theForm.phone.value)){
			alert("Please enter a valid Daytime Phone number in the specified format  555-555-5555.");
			theForm.phone.focus();
			return (false);
		}
	}
	
	
	if (theForm.cell.value == ""){
		alert("Please enter your phone number.");
		if (theForm.cell.type != "hidden"){
				theForm.cell.focus();
		}
		return (false);
	} else {
		RegExpPhoneNumber = /\d\d\d-\d\d\d-\d\d\d\d/
		RegExpNotPhoneNumber = /555-\d\d\d-\d\d\d\d/
		if(!RegExpPhoneNumber.test(theForm.cell.value) || RegExpNotPhoneNumber.test(theForm.cell.value)){
			alert("Please enter a valid Daytime Phone number in the specified format  555-555-5555.");
			theForm.cell.focus();
			return (false);
		}
	}
	exit = false;
	return (true);
}
