//	Performs the validation of the email address form
//	Must be included after the communfunctions.js file.
//
//	Returns:
//	false:	If any validation fails.
//	true:	If validation passes.
function validateEmailForm()
{
	var form = document.emailForm;
	var email = form.email;
	var bReturn = true;
	var bEmpty = false;
	var bIsNav = true;
     
	// if navigator 4 or below do not validate   
	bIsNav = isNav4();
	if (bIsNav) {
 		return true;
	}	
	//validate that the email field has been entered
	bEmpty = isEmptyNoSpace(email)
	
	if(bEmpty) {
	    bReturn = false;
		alert("I'm sorry, you cannot complete this form unless all the mandatory information (marked with a red asterix) is complete. Please try again.");
	    chgFocus(email);
	}
	
	//validate email field
	if(bReturn) {
	    var msg = validateEmail(email);
		if (msg != "")
		{
		    alert (msg);
			chgFocus(email);
			bReturn = false;
		}
	}
	//confrim email address
	if(bReturn) {
		bConfirmed = window.confirm("Please confirm that " + email.value + " is your correct email address.")
		if ( bConfirmed != true ) {
				bReturn = false;
				chgFocus(email);
		}
	}
	return bReturn;
} // End validateEmailForm
