/* #################################################################################################
# Javascript function: chkFields()                                                                 #
# Checks FORM fields by using DOM                                                                  #
# Copyright ARPros, LLC, 2000-2007                                                                 #
# All rights reserved                                                                              #
#                                                                                                  #
# Description:                                                                                     #
#                                                                                                  #
#                                                                                                  #
# Variables: missinginfo                                                                           #
#                                                                                                  #
#                                                                                                  #
#                                                                                                  #
# Main Website: http://www.arpros.com                                                              #
####################################################################################################
# version: xx.xx.xxx Date: yyyy-mm-dd                                                              #
################################################################################################# */

function chkFields() {
missinginfo = "";
if (document.NewslFORM.first_name.value == "") {
missinginfo += "\n     -  First Name";
}
if (document.NewslFORM.last_name.value == "") {
missinginfo += "\n     -  Last Name";
}
if ((document.NewslFORM.email.value == "") || 
(document.NewslFORM.email.value.indexOf('@') == -1) || 
(document.NewslFORM.email.value.indexOf('.') == -1)) {
missinginfo += "\n     -  Email Address";
}

if (missinginfo != "") {
missinginfo ="_____________________________\n" +
"You failed to correctly fill in your:\n" +
missinginfo + "\n_____________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}
