/***
 This JavaScript file is used by the 'cPropertyDetail.cfm' module to
 validate the 'moreInfoRequest' fields and will be created by the 
 'validator_client.cfm' automatically.
 ***/

/*** Include the common JavaScript functions ***/
document.write('<script language="javascript" type="text/javascript" src="/idx/lib/javascript/validator/common.js"></script>');

/*** Validates all required fields found on the 'ePropertyDetail.cfm' module. ***/
/***         Fields to verify:    form.name, form.email & form.phone          ***/
function validateForm(thisform)
{
	with(thisform)
	{
		if (name != null && !(checkName(name.value)))
		{ 
       name.focus();
   		 return false;
		}
		if (email != null && !(checkEmail(email.value.toLowerCase())))
		{ 
       email.focus();
   		 return false;
		}
		if (phone != null && phone.value!='' && !(checkPhone(phone.value)))
		{
			 phone.focus();
			 return false;
		}
	}
	return true;
}
