//message object

function messageObj(fieldName)
{
//start devloper error messages
this.fieldName = fieldName;
this.two_same_name_error_msg= 'Develpor Message: you the developer may have 2 fields with';
this.two_same_name_error_msg+='the same name or the field you passed does not exist, please check.';
this.two_same_name_error_msg+='If you named 2 fields with the same name, one of the fields you duplicated is highlighted red ';
this.non_exist_error_msg = 'the field you have passed does not exist, check your spelling of each input string passed.';
this.validation_pass_error_msg = 'Develpor Message: One of the MACROS you input for validation is not valid.';
this.dup_fields_error_msg = 'Develpor Message: You have an error on the page, check for duplicate fields.';
this.dup_formname_error_msg = 'Develpor Message: You have forms with the same name please change one of the form names.';
this.nest_lyr_errormsg ='Develpor Message: You have nested layers. The validator will not work for nested layers in netscape 4.';
this.noparam_error_msg ='Develpor Message: You may not have passed any parameters to a function because an array object is null, check your function calls.';
this.nomess_msg='Developer Message: You have default messaging turned off but no messages passed in the interface for the errors that occur.';
this.nomess_msg+=' Use the message overide function, or turn default messaging on.'; 
//end devloper error messages

if(this.fieldName)
{this.field_blank_error = 'Please fill in the '+this.fieldName+' field';
 this.num_only_error = 'Please only digits in the '+this.fieldName+' field';
 this.alpha_only_error = 'Please only alphanumeric characters in the '+this.fieldName+' field';
 this.non_select_error = 'Please select one of the choices in the '+this.fieldName+' field';
 this.no_wht_space_error ='There are no whitespaces allowed in the '+this.fieldName+' field';
 this.no_wht_or_alpha ='There are no whitespaces or alphanumeric characters allowed in the '+this.fieldName+' field';
 this.unex_error ='There was an unexpected error in the field name '+this.fieldName+'.';
 this.dollar_error='Please enter a dollar amount without commas and with up to 2 decimal places in the '+this.fieldName+' field  ex: 1449.95';
 this.missing_check_error ='Please check the '+this.fieldName+' box.';
 this.not_selected_error ='Please make a selection in the '+this.fieldName+' pull-down.';
 }


this.zipcode_fmt_error = 'Use "99999" or "99999-9999" format for zip codes.';
this.date_fmt_error ='Please enter a valid date, including the century.  ex: 04/30/1999';
this.phone_fmt_error ='Please enter a valid phone number. ex: 404.555.1234';
this.month_fmt_error ='Please enter a valid month. ex: 04-05-04';
this.time_fmt_error ='Please enter a valid time format(hh:mm).  ex: 10:30';

//email specific errors
this.email_format_error = 'The e-mail address must be in "name@domain.ext" format.';
this.email_miss_at_error = 'The email address must have an "@" character somewhere in the field.';
this.email_miss_dot_error = 'The email address must have an "." character somewhere in the field.';

}//end message object

function messObj_retCharMsg(charlength,type)
{
if(charlength&&type)
 { if(type=='min')return 'Please fill in the '+this.fieldName+' field with at least '+charlength+' characters.';
  if(type=='max')return 'The '+this.fieldName+' field has too many characters, the character max is '+charlength+' characters.';
  if(type=='eq')return 'The '+this.fieldName+' field must have '+charlength+' characters.';
//added 11-11-04 for pw validation
 if(type=='alpha')return 'The '+this.fieldName+' field must have at least '+charlength+' alphabetic character(s).';
 if(type=='num')return 'The '+this.fieldName+' field must have at least '+charlength+' numeric character(s).';
 if(type=='spch')return 'The '+this.fieldName+' field must have at least '+charlength+' special character(s).';
 if(type=='conChar')return 'The '+this.fieldName+' field must not have '+charlength+' of the same consecutive characters.';

  }
 }
messageObj.prototype.retCharMsg = messObj_retCharMsg;

