
// Last updated:  9.24.09

function validateAll() {

	if(document.frmRef['Exposure1Other_FirstName'].value=='') {
		alert('* Enter your First Name *');
		document.frmRef['Exposure1Other_FirstName'].focus();
		return false;
	}
	if(document.frmRef['Exposure1Other_LastName'].value=='') {
		alert('* Enter your Last Name *');
		document.frmRef['Exposure1Other_LastName'].focus();
		return false;
	}

	
	if(document.frmRef['Contact0FirstName'].value=='') {
		alert('*  Enter your Referral\s First Name *');
		document.frmRef['Contact0FirstName'].focus();
		return false;
	}
	if(document.frmRef['Contact0LastName'].value=='') {
		alert('*  Enter your Referral\'s Last Name *');
		document.frmRef['Contact0LastName'].focus();
		return false;
	}
	if(document.frmRef['Contact0Phone1'].value=='') {
		alert('*  Enter your Referral\'s Phone Number *');
		document.frmRef['Contact0Phone1'].focus();
		return false;
	}

	if(document.frmRef['Contact0Email'].value=='' || document.frmRef['Email1'].value=='') {
		if(document.frmRef['Contact0Email'].value=='' && document.frmRef['Email1'].value=='') {
			alert('* Enter your Referral\'s Email Address *');
			document.frmRef['Contact0Email'].focus();
			return false;
		}
		else {
			if(document.frmRef['Contact0Email'].value=='') {
				alert('* Enter your Referral\'s Email into the 1st box *');
				document.frmRef['Contact0Email'].focus();
				return false;
			}
			if(document.frmRef['Email1'].value=='') {
				alert('* Enter your Referral\'s Email into the 2nd box *');
				document.frmRef['Email1'].focus();
				return false;
			}			
		}

	}
	if((document.frmRef['Email1'].value!='' && document.frmRef['Contact0Email'].value!='') &&
	  (document.frmRef['Email1'].value != document.frmRef['Contact0Email'].value)) {
		alert('* Your Referral\'s Email entries do not match *\n* Please check both entries *');
		document.frmRef['Email1'].focus();
		return false;
	}

	return true;

}
