function ValidateForm(thisForm) {
	var strErr = '';
	var blnVendorContactInfoNotFound = true;
	
	if (!format_zipcodes(thisForm.strContactZip)) { 
		return false;
	}
	
	if (!format_phone(thisForm.strContactPhone)) { 
		return false;
	}
	
	if (!format_zipcodes(thisForm.strVendorZip)) { 
		return false;
	}
	
	if (!format_phone(thisForm.strVendorPhone)) { 
		return false;
	}

	if (!emailChecking(thisForm.strContactEmail)) { 
		return false;
	}

	if (!emailChecking(thisForm.strVendorEmail)) { 
		return false;
	}

	if (thisForm.strCompanyRep.value == 'Y') {
		for (x=3; x>=1; x--) { 
			if (eval('thisForm.strBusRef' + x + 'Phone.value') == '' && eval('thisForm.strBusRef' + x + 'Email.value') == '') {
				strErr ='Reference ' + x + ' Phone or Email is required.\n' +  strErr
				eval('thisForm.strBusRef' + x + 'Phone.focus()');
			}
			if (eval('thisForm.strBusRef' + x + 'Name.value') == '') {
				strErr ='Reference ' + x + ' Name is required.\n' +  strErr
				eval('thisForm.strBusRef' + x + 'Name.focus()');
			}
		}
		if (thisForm.strTaxPayerID.value == '') {
			strErr ='Taxpayer Identification Number is required.\n' +  strErr
			thisForm.strTaxPayerID.focus();
		}
	}

	if (thisForm.strVendorZip.value == '') {
		//strErr ='Company Zip is required.\n' +  strErr
		//thisForm.strVendorZip.focus();
	}
	
	if (thisForm.strVendorState.value == '') {
		//strErr ='Company State is required.\n' +  strErr
		//thisForm.strVendorState.focus();
	}

	if (thisForm.strVendorCity.value == '') {
		//strErr ='Company City is required.\n' +  strErr
		//thisForm.strVendorCity.focus();
	}

	if (thisForm.strVendorAddress1.value == '') {
		//strErr ='Company Address is required.\n' +  strErr
		//thisForm.strVendorAddress1.focus();
	}

	if (thisForm.strVendorPhone.value != '') {
		blnVendorContactInfoNotFound = false;
		//strErr ='Company Phone is required.\n' +  strErr
		//thisForm.strVendorPhone.focus();
	}

	if (thisForm.strVendorEmail.value != '') {
		blnVendorContactInfoNotFound = false;
		//strErr ='Company Phone is required.\n' +  strErr
		//thisForm.strVendorEmail.focus();
	}
	if (blnVendorContactInfoNotFound) { 
		strErr ='Company Phone or Email is required.\n' +  strErr
		thisForm.strVendorPhone.focus();
	} 

	if (thisForm.strVendorDesc.value == '') {
		strErr ='Description of Product or Service is required.\n' +  strErr
		thisForm.strVendorDesc.focus();
	}

	if (thisForm.strVendorContact.value == '') {
		strErr ='Contact Name is required.\n' +  strErr
		thisForm.strVendorContact.focus();
	}

	if (thisForm.strVendorCompany.value == '') {
		strErr ='Company Name is required.\n' +  strErr
		thisForm.strVendorCompany.focus();
	}
	
	if (thisForm.strContactZip.value == '') {
		strErr ='Zip is required.\n' +  strErr
		thisForm.strContactZip.focus();
	}
	
	if (thisForm.strContactState.value == '') {
		strErr ='State is required.\n' +  strErr
		thisForm.strContactState.focus();
	}

	if (thisForm.strContactCity.value == '') {
		strErr ='City is required.\n' +  strErr
		thisForm.strContactCity.focus();
	}

	if (thisForm.strContactAddress1.value == '') {
		strErr ='Address is required.\n' +  strErr
		thisForm.strContactAddress1.focus();
	}

	if (thisForm.strContactPhone.value == '') {
		strErr ='Daytime Phone is required.\n' +  strErr
		thisForm.strContactPhone.focus();
	}

	if (thisForm.strContactEmail.value == '') {
		strErr ='Email is required.\n' +  strErr
		thisForm.strContactEmail.focus();
	}
	
	//if (thisForm.strMemberNo.value == '') {
		//strErr ='Member # is required.\n' +  strErr
		//thisForm.strMemberNo.focus();
	//}

	if (thisForm.strContactLast.value == '') {
		strErr ='Last Name is required.\n' +  strErr
		thisForm.strContactLast.focus();
	}

	if (thisForm.strContactFirst.value == '') {
		strErr ='First Name is required.\n' +  strErr
		thisForm.strContactFirst.focus();
	}
	
	if (strErr != '') { 
		alert(strErr);
		return false;
	} else { 
		return true;
	}
}

function Match_Data() { 
	document.frmVendor.strVendorPhone.value	= document.frmVendor.strContactPhone.value;
	document.frmVendor.strVendorEmail.value			= document.frmVendor.strContactEmail.value;
	document.frmVendor.strVendorAddress1.value		= document.frmVendor.strContactAddress1.value;
	document.frmVendor.strVendorAddress2.value		= document.frmVendor.strContactAddress2.value;
	document.frmVendor.strVendorCity.value			= document.frmVendor.strContactCity.value;
	document.frmVendor.strVendorState.selectedIndex	= document.frmVendor.strContactState.selectedIndex;
	document.frmVendor.strVendorZip.value			= document.frmVendor.strContactZip.value;
	//document.frmVendor.MatchData.checked = false;	
}