// usage: <form action="/cgi-bin/dbform.cgi" method="POST" onsubmit="return checkform(this);">

function checkForm ( myForm )
{

    if (myForm.Name.value == "") {
        alert( "NAME is a required field.  Please re-submit the form including your name." );
        myForm.Name.focus();
        return false ;
    }

    if (myForm.Email.value == null) if (myForm.Email.value == "") {
        alert( "EMAIL is a required field.  Please re-submit the form including your Email address." );
        myForm.Email.focus();
        return false ;
    }

    if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,6})+$/.test(myForm.Email.value)) {
        alert("The \"email\" field must be valid.");
        myForm.Email.focus();
        return false;
    }

    if (myForm.Comments.value == null) if (myForm.Comments.value == "") {
        alert( "Comments/Questions is a required field.  Please re-submit the form including this information." );
        myForm.comments.focus();
        return false ;
    }

    return true ;
}



//===========================================================================


