function frmContact_Focus() {
	document.frmContact.strCompany.focus();
}

function frmContact_Validate(theForm) {
	var validator = new Validate();

	theForm.strCompany.value = stripBlanks(theForm.strCompany.value);
	theForm.strName.value = stripBlanks(theForm.strName.value);
	theForm.strPhone.value = stripBlanks(theForm.strPhone.value);
	theForm.strEmail.value = stripBlanks(theForm.strEmail.value);
	theForm.strFax.value = stripBlanks(theForm.strFax.value);
	theForm.strAddress.value = stripBlanks(theForm.strAddress.value);
	theForm.strCity.value = stripBlanks(theForm.strCity.value);
	theForm.strZip.value = stripBlanks(theForm.strZip.value);

	var strCompany = theForm.strCompany.value;
	var strName = theForm.strName.value;
	var strPhone = theForm.strPhone.value;
	var strEmail = theForm.strEmail.value;
	var strFax = theForm.strFax.value;
	var strAddress = theForm.strAddress.value;
	var strCity = theForm.strCity.value;
	var strZip = theForm.strZip.value;

	if (strName.length == 0) {
		alert("Name is required please.")
		theForm.strName.focus();
		return false;
	}

	if (strPhone.length == 0) {
		alert("Phone is required please.")
		theForm.strPhone.focus();
		return false;
	}

	if (validator.isValidNTelephoneNum(strPhone)) {
	}
	else {
		alert("The format of the phone number needs to be 999-999-9999.\nPlease check your phone number entry.")
		theForm.strPhone.focus();
		return false;
	}

	if (strEmail.length == 0) {
		alert("E-Mail address is required please.")
		theForm.strEmail.focus();
		return false;
	}

	if (validator.isValidEmail(strEmail)) {
	}
	else {
		alert("The e-mail address is an improper format.\nPlease check your e-mail address entry.")
		theForm.strEmail.focus();
		return false;
	}

	if (strFax.length > 0) {
		if (validator.isValidNTelephoneNum(strFax)) {
		}
		else {
			alert("The format of the fax number needs to be 999-999-9999.\nPlease check your fax number entry.")
			theForm.strFax.focus();
			return false;
		}
	}

	if (strZip.length > 0) {
		 if (validator.isValidZipCode(strZip)) {
		}
		else {
			alert("The format of the zip needs needs to be 99999 or 99999-9999.\nPlease check your zip code entry.")
			theForm.strZip.focus();
			return false;
		}
	}

	return true;
}
