function _aPassword(){
	var re = /^\w*(?=\w*\d)(?=\w*[a-z])(?=\w*[A-Z])\w*$/
	if (!re.test(this.value)) { 
		this.error = "The " + this.description + " field must start with a letter and contain at least one number [1-0], one uppercase Letter[A-Z] and one lowercase letter[a-z]"; 
	}
}
function _AnAlphaNumeric(){
	// Set the parsed variable to equal true
	var parsed = true;
	// Set the valid characters
  var validchars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789- ";
	// Set the form field in a variable for easier access
	var the_value = this.value;
	// Loop over the form field and compare the value of each character with the allowed list
  for (var i=0; i < the_value.length; i++) {
    var letter = the_value.charAt(i).toLowerCase();
	// If an illegal character is found, set the parsed variable to false and then break the loop
    if (validchars.indexOf(letter) != -1)
      continue;
		parsed = false;
  // Set an error message to ensure that Q-Forms displays appropriately
    this.error = "The " + this.description + " field can only contain Alphanumeric Characters (a-z,A-Z,1-0)";
    break;
  }
}

function _AnAlpha(){
	// Set the parsed variable to equal true
	var parsed = true;
	// Set the valid characters
  var validchars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ- ";
	// Set the form field in a variable for easier access
	var the_value = this.value;
	// Loop over the form field and compare the value of each character with the allowed list
  for (var i=0; i < the_value.length; i++) {
    var letter = the_value.charAt(i).toLowerCase();
	// If an illegal character is found, set the parsed variable to false and then break the loop
    if (validchars.indexOf(letter) != -1)
      continue;
		parsed = false;
  // Set an error message to ensure that Q-Forms displays appropriately
    this.error = "The " + this.description + " field can only contain Alphabetic Characters (a-z,A-Z)";
    break;
  }
}

function _aTelephone()
{
	var telLength		=	objForm.telephone.getValue().length;
	var areaCode		=	objForm.area_code.getValue();
		
	if (areaCode == "Other")
		var requiredTelLen		=	10;
	else 
		var requiredTelLen		=	11 - objForm.area_code.getValue().length;

	if (telLength != requiredTelLen)
		this.error = "The Phone Number field must contain " + requiredTelLen + " numbers (including area code)."
}


function confirmSubmit(agree_msg)
{
var agree=confirm(agree_msg);
	if (agree)
	return true ;
	else
	return false ;
}