function validator(theForm) {
    // is subName empty?
    if(emailSubForm.name.value == "") {
        // it is empty, so alert them and don't submit the form
        alert("You must enter a value for the NAME field");
        return false;
    }

    // is subEmail empty?
    if(emailSubForm.emailAddress.value == "") {
        // it is empty, so alert them and don't submit the form
        alert("You must enter a value for the EMAIL field");
        return false;
    }

    return true;
}