
function validateclient() {
	with (document.Client) {
		var missing = false;
		var theMsg = "";
		var theMissingFields = "";
		
		//if ((ssn1.value == "") || (ssn2.value == "") || (ssn3.value == "")) {
			//missing = true;
			//theMsg = theMsg + "	You have not entered your Full Social Security Number.\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 (title.value == "") {
			missing = true;
			theMsg = theMsg + "	You have not entered your Posting Title.\n";
		}
		
		if (company.value == "") {
			missing = true;
			theMsg = theMsg + "	You have not entered your Company Name.\n";
		}
		if (country.value == "") {
			missing = true;
			theMsg = theMsg + "	You have not entered your Country.\n";
		}
		if (email.value == "") {
			missing = true;
			theMsg = theMsg + "	You have not entered your Email Address.\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.Client) {
		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 Phone/Fax fields.");
				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 == 'SSN') {
			if (theFlag) {
				// Required Entry
				theRE = eval("/^[0-9]{9}$/");
			} else {
				theRE = eval("/^$|^[0-9]{9}$/");
			}
			if (theRE.test(theFieldValue)) {
			} else {
				alert("Please use numbers only...and make sure you have entered 9 digits.");
				eval(theField + ".value = ''");
				retVal = 0;
			}
		}
		
		if (theType == 'Comment') {
			if (theFlag) {
				// Required Entry
				theRE = eval("/^[a-zA-Z \'\"\,?$!0-9_\.-]{0,400}$/");
			} else {
				theRE = eval("/^$|^[a-zA-Z \'\"\,?$!0-9_\.-]{0,400}$/");
			}
			if (theRE.test(theFieldValue)) {
			} else {
				alert("Please use do not use any special character. Your comment should not be more than 400 characters long.");
				eval(theField + ".value = ''");
				retVal = 0;
			}
		}
		
		if (theType == 'DOB') {
			if (theFlag) {
				// Required Entry
				theRE = eval("/^[0-9]{1,4}$/");
			} else {
				theRE = eval("/^$|^[0-9]{1,4}$/");
			}
			if (theRE.test(theFieldValue)) {
			} else {
				alert("Please use numbers only.");
				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);
	}
}


