function checkForm(form) {
    var complete = ""
    var plural = false
    var mailField = form.elements[3].value
    if (form.Name.value == "") {    //if name field is empty
        complete = "name"
    }   
    if (mailField == "") {      //if e-mail field is empty
        if (complete.length) {
            complete += " and e-mail address"   //determine if one or both fields empty
            plural = true
        } else {
            complete = "e-mail address"
        }
    } else if ((mailField.indexOf("@") == -1) || (mailField.indexOf(".") == -1) || (mailField.lastIndexOf(".") - mailField.indexOf("@") < 2)) { //if email not properly formatted
        if (complete.length) {
            complete += " and properly formatted (i.e., --@---.com) e-mail address"
            plural = true
        } else {
            complete = "properly formatted (i.e., --@---.com) e-mail address"
        }
    }
    if (complete.length) {              //if either field is improperly entered
        complete = "Please enter your " + complete + " in the appropriate field"
        if (plural == true) {       // then 2 fields empty
            complete +="s."
        } else {                //only 1 field empty
            complete +="."
        }
        alert(complete)
        return false
    } else {        //if all fields filled out
        return true
    }
}