/* 
   Instant Required Field Check
   Version 1.0
   February 15, 2010

   Will Bontrager
   http://www.willmaster.com/
   Copyright 2010 Bontrager Connection, LLC

   Bontrager Connection, LLC grants you 
   a royalty free license to use or modify 
   this software provided this notice appears 
   on all copies. This software is provided 
   "AS IS," without a warranty of any kind.
*/
// Leave next line as is.
var ID_Message = new Array();

// // // // // // // // // // // //
// Configuration section:
//
// Below, list the id an error message for each required 
//    field in this format:
//       ID_Message["idvalue"] = "Error Message";
// Examples:
//       ID_Message["email"] = "Please provide email address.";
//       ID_Message["phone"] = "A telephone number is required.";
// If the message itself contains quotation marks, they 
//    need to be escaped with a preceding backslash 
//    character. Example:
//       ID_Message["nick"] = "Please provide your \"nick\" name.";

ID_Message["firstname"] = "Please provide your First Name.";
ID_Message["lastname"] = "Please provide your Last Name.";
ID_Message["email"] = "An EMAIL address is required, or we won't be able to contact you if there is a problem!";

// End of configuration section.
// // // // // // // // // // // //
function CheckAllRequiredFields() {
var message = new Array();
for(var k in ID_Message) {
   if(!document.getElementById(k).value.length) { message.push(ID_Message[k]); }
   }
if(message.length) {
   alert(message.join("\n\n"));
   return false;
   }
return true;
}

