
function validateclientStep1() {
	with (document.form1) {
		var missing = false;
		var theMsg = "";
		var theMissingFields = "";

		// Make Sure All Required Fields Have Been Filled-In, Selected, or Checked.
		if (gender.value == "") {
			missing = true;
			theMsg = theMsg + "	You have not entered your Gender.\n";
		}
		if (salutation.value == "") {
			missing = true;
			theMsg = theMsg + "	You have not entered your Salutation.\n";
		}
		if (fname.value == "") {
			missing = true;
			theMsg = theMsg + "	You have not entered your First Name.\n";
		}
		if (lname.value == "") {
			missing = true;
			theMsg = theMsg + "	You have not entered your Last Name.\n";
		}
		if (address1.value == "") {
			missing = true;
			theMsg = theMsg + "	You have not entered your Address.\n";
		}
		if (city.value == "") {
			missing = true;
			theMsg = theMsg + "	You have not entered your City.\n";
		}
		if (state.value == "") {
			missing = true;
			theMsg = theMsg + "	You have not entered your State.\n";
		}
		if (zip.value == "") {
			missing = true;
			theMsg = theMsg + "	You have not entered your Zip.\n";
		}
		
		if (email.value == "") {
			missing = true;
			theMsg = theMsg + "	You have not entered your Email Address.\n";
		}
		
		if (phone1.value == "") {
			missing = true;
			theMsg = theMsg + "	You have not entered your Home Phone.\n";
		}
		
		//if (!document.Client.disclaimer.checked) {
		//missing = true;
			//theMsg = theMsg + "	You have not agreed to our Participation policy. Please check the box next to the statement.\n";
		//}
		
		
		
		theMissingFields = theMsg;

		if (missing) {
			var theMsgHeader = "Some required information was not provided. Please note the missing information.\n";
			theMsg = theMsgHeader + "\n\n";
			if (theMissingFields != "") {
				theSectionMsg = theMissingFields;
			}
			theMsg = theMsg + theSectionMsg + "\n\n";
			alert(theMsg);
			return(false);
		}
		return(true);
	}
}

function trapEntry(theForm,theField,theType,theFlag) {
	retVal = 1;
	with (document.form1) {
		theFieldValue = new String(eval(theField + ".value"));

		if (theType == 'Phone') {
			if (theFlag) {
				// Required Entry
				theRE = eval("/^[0-9]{10}$/");
			} else {
				theRE = eval("/^$|^[0-9]{10}$/");
			}
			if (theRE.test(theFieldValue)) {
			} else {
				alert("Please use just 10 numbers in field.");
				eval(theField + ".value = ''");
				retVal = 0;
			}
		}
		if (theType == 'Zip') {
			if (theFlag) {
				// Required Entry
				theRE = eval("/^[0-9]{5}$/");
			} else {
				theRE = eval("/^$|^[0-9]{5}$/");
			}
			if (theRE.test(theFieldValue)) {
			} else {
				alert("Please use a 5 digit zip code.");
				eval(theField + ".value = ''");
				retVal = 0;
			}
		}



		if (theType == 'Email') {
			if (theFlag) {
				// Required Entry
				theRE = eval("/^[a-z0-9_\.-]+[@]{1}[a-z0-9_-]+\.[a-z]{2,4}$|^[a-z0-9_\.-]+[@]{1}[a-z0-9_-]+\.[a-z0-9_-]+\.[a-z]{2,4}$/i");
			} else {
				theRE = eval("/^$|^[a-z0-9_\.-]+[@]{1}[a-z0-9_-]+\.[a-z]{2,4}$|^[a-z0-9_\.-]+[@]{1}[a-z0-9_-]+\.[a-z0-9_-]+\.[a-z]{2,4}$/i");
			}
			if (theRE.test(theFieldValue)) {
			} else {
				alert("Please use the complete email address (eg. me@mymailbox.com).");
				eval(theField + ".value = ''");
				retVal = 0;
			}
		}
	}
	if (retVal) {
		return(true);
	} else {
		return(false);
	}
}
