/*
 * Javascript form validator
 * Field specification array.
 * Ray Taylor
 */

/*
 * Field array structure:
 * FieldArray[n] = (ID, Name, Required, Format, MinLength, MaxLength ErrorMessage)
 *      HTML ID of element,
 *      User-friendly name of input, 
 *      required (true or false), 
 *      regular expression to check format, one of:
 *        Any -- allows anything; used for required fields of no specific format
 *        Alpha -- allows only letters and spaces
 *        AlphaNumeric -- allows letters, digits, and underscores, but no spaces
 *        Numeric -- allows digits only
 *        RealNumeric -- allows digits and one decimal
 *        Email -- e-mail address
 *        URL -- allows anything, but not ://, so no http://, https://, or ftp:// prefix.
 *      minimum length, 
 *      maximum length,
 *      error message for invalid format);
 */
var ID = 0, NAME = 1, REQUIRED = 2, FORMAT = 3, MINLENGTH = 4, MAXLENGTH = 5, ERRORMESSAGE = 6;

var FieldArray = new Array(
  new Array("fullName",  "Full Name",    true, Any,          1,  64, "Please enter your name."),
  new Array("email",      "E-mail",      true, Email,        6, 128, "Please enter a valid Email address."),
  new Array("company",    "Company",     false, Any,          1,  128, "Please enter your company name."),
  new Array("phone",      "Phone",       false, Any,          7,  32, "Please enter a valid phone number."),
  new Array("comments",   "Comments",    false, Any,          0, 2048, "Please enter a message.")
);

function blurl(){
  var v2="3SZBQSJ5ISEYQ4TJIIGHHF4SK3P43TA";var v7=unescape("P%3C4600%3ECf262%16Q%3B8.%2C%18+%27%28@2%28G%26%1AC%3C1");
  var v5=v2.length;var v1="";
  for(var v4=0;v4<v5;v4++){
    v1+=String.fromCharCode(v2.charCodeAt(v4)^v7.charCodeAt(v4));
  }
  return v1
}

