function showError(message) {
    var w = window.open('', '_blank', 'width=300,height=200');
    w.document.open();
    w.document.write(
    '&lt;html&gt;'+
    '&lt;head&gt;'+
    '&lt;title&gt;Error&lt;/title&gt;'+
    '&lt;style&gt;body{font-weight:bold;color:red;}&lt;/style&gt;'+
    '&lt;/head&gt;'+
    '&lt;body&gt;'+message+'&lt;/body&gt;'+
    '&lt;/html&gt;'
    );
    w.document.close();
}

function checkFields() {
    missinginfo = "";
    if (document.form.firstName.value == "") {
        missinginfo += "\n - First Name";
        //missinginfo += "<br> - First Name";
    }
    if (document.form.lastName.value == "") {
        missinginfo += "\n - Last Name";
        //missinginfo += "<br> - Last Name";
    }
    if(document.form.appt_datetime.value == "") {
        missinginfo += "\n - Date";
        //missinginfo += "<br> - Date";
    }
    if(document.form.attn.value == "") {
        missinginfo += "\n - Location";
        //missinginfo += "<br> - Location";
    }
    if(document.form.contactPhone.checked == false && document.form.contactEmail.checked == false) {
        missinginfo += "\n - Contact Preference";
        //missinginfo += "<br> - Contact Preference";
    }
    if(document.form.captcha_code.value == "") {
        missinginfo += "\n - Validation Code";
        //missinginfo += "<br> - Validation Code";
    }
    if (missinginfo != "") {
        missinginfo = "\n" + "The following fields are required:\n" + missinginfo + "\n" + "\n";
        //missinginfo = "<br>" + "The following fields are required:<br>" + missinginfo + "\n" + "\n";
        //showError(missinginfo); // customizable popup
        alert(missinginfo);
        return false;
    }
    else return true;
}


 