<!--

function catPhone(objForm){
	return objForm.Area.value + objForm.Prefix.value + objForm.Suffix.value;	
 
  }


  



function isValidEmail(objEmail) {
  /*
 
    A regular expression is constructed to determine that line entered
    email address conforms to the format: x.@x.x where x represents a string,
    and which can also include more dots ("."). For example:
    
  */

    var emailRE = /^((\w+)(\.\w+)*)@((\w+)(\.\w+)+)$/

    if (objEmail.value.search(emailRE) == -1) {
    	alert("Please enter a valid email address.");
    	objEmail.focus();
    	
    	objEmail.select();
    	return false;
    }
    return true;
}

function isValidPhone (varPhone) {

   // ensure something is entered in area field
	if (varPhone == "Object"){
		if (varPhone.value.search(/\d\d\d\d\d\d\d\d\d\d/) == -1) {
			alert("Please enter a valid phone number.");
			
			varPhone.focus();
			varPhone.select();			
			return false;
		} 	
		return true;
	}
	else {    
		if (varPhone.search(/\d\d\d\d\d\d\d\d\d\d/) == -1) {
			alert("Please enter a valid phone number.");
			
						
			return false;
		} 	
		return true;
	}
}

function isValidPostalCode (objPostalCode) {
	  
    
    // Ensure that postal code length is = 5 and is all numeric  
    if ((objPostalCode.value.length != 5) || (objPostalCode.value.search(/\d{5}/) == -1)) {
	   	alert("Please enter a five digit Zip Code.");
    	objPostalCode.focus();
    	objPostalCode.select();
    	return false;
    }	
		
  return true;
}


function isValidBirthdate (objForm) {
	
  // Ensure that birhtday month length is filled in  
    if (objForm.bmonth.value.length == 0) {
		alert("Please enter your birthday month.");
    
	objForm.bmonth.focus();
    
    	
	return false;
	}
// Ensure that birhtday day length is filled in  	  
   else if(objForm.bday.value.length == 0)
	{
	alert("Please enter your birthday day");
  	objForm.bday.focus();
	
   	return false;
 	}
   
    // Ensure that birhtday year length is = 4 and is all numeric  
    else if((objForm.byear.value.length != 4) || (objForm.byear.value.search(/\d{4}/) == -1))
	 {
		alert("Please enter your four digit birthday year.");
  		objForm.byear.focus();
		return false;
	}	
    			
  return true;

}




function validateAccountInfo(objForm)
{
	if (validateClientFormData(objForm)==false)
	{
		return false;
	}
	
	
	
	if (isValidEmail(objForm.Email)==false)
	{
		return false;
	}		
	
	
	if (objForm.Email2.value.length > 0)
	{
		if (isValidEmail(objForm.Email2)==false)
			{
				return false;
			}
	}
	if (isValidPostalCode(objForm.ZipCode)==false)
	{
		return false;
	}	
	if (isValidBirthdate(objForm)==false)
	{
		return false;
	}
	
	if (isValidPhone(catPhone(objForm))==false)
	{
		return false;
	}
	
	
	
	if (objForm.Password.value!=objForm.txtVerify.value)
	{
			
			alert("Passwords do not match.  Please re-enter your passwords.");
			objForm.Password.focus();
			return false;
	}
	
	return true;
}
//-->
