<!--

function isEmail(elm) {
	if (elm.value.indexOf("@") != "-1" &&
		elm.value.indexOf(".") != "-1" &&
		elm.value != "")
	return true;
	else return false;
}

function isPhone(elm) {
var elmstr = elm.value + "";
	if (elmstr.length != 12) return false;
	for (var i = 0; i < elmstr.length; i++) {
		if ((i < 3 && i > -1) ||
			(i > 3 && i < 7) ||
			(i > 7 && i < 12)) {
			if (elmstr.charAt(i) < "0" ||
				elmstr.charAt(i) > "9") return false;
		}
		else if (elmstr.charAt(i) != "-") return false;
	}
	return true;
}


function validateForm(theForm){
	
	if (theForm.attorney.selectedIndex == 0)
	{
		alert("Please make a selection for the \"Attorney\" field.");
		theForm.attorney.focus();
		return (false);
	}

	if (theForm.name.value == "")
	{
		alert("Please enter a value for the \"Name\" field.");
		theForm.name.focus();
		return (false);
	}
	
	if (theForm.phone.value == "")
	{
		alert("Please enter a value for the \"Phone\" field.");
		theForm.phone.focus();
		return (false);
	}
	
	
	if (theForm.phone.value.length > 25)
	{
		alert("Please enter at most 25 characters in the \"Phone\" field.");
		theForm.phone.focus();
		return (false);
	}
	
		
	if (theForm.email.value == "")
	{
		alert("Please enter a value for the \"Email\" field.");
		theForm.email.focus();
		return (false);
	}
	
	if (isEmail(theForm.email) == false)
	{
		alert("You did not enter a valid email address.");
		theForm.email.focus();
		return (false);
	}
	
return (true);
}
//-->