/*
 * Mark all of the mandatory fields and then validate the form and either present
 * an error message dialog, explaining the offending widgets and then allow the
 * user to correct the mistakes, or begin processing of the form data.
 */
function ValidateGwpForm(formObject)
{
	var formVal = new ValidateForm(formObject);
    formObject.update.value = 0;
    if(formObject.blnGWP.value == "True" || formObject.blnGWP.value == "true")
    {
	    // Set the mandatory fields
	    formVal.setTextMandatory("txtServiceAddress");
	    formVal.setTextMandatory("txtPhone");
    }

	//	Set the remainder of the mandatory fields.
	formVal.setTextMandatory("txtSubject");
	formVal.setTextMandatory("txtComments");

	// Return the validation state to the callback.
	var formVal_validateForm = formVal.validateForm();
	if(formVal_validateForm){formObject.update.value = 1;};
	return (formVal_validateForm);
}