// The validation function:
function chkFrm(f)
{
	var msg="";
	// Only do this validation for the main registration form:
	if( f.id=="epsreg" )
	{
		if( f.fname.value=="" ) msg+="- First name\n";
		if( f.lname.value=="" ) msg+="- Last name\n";
		if( f.addr.value=="" ) msg+="- Address\n";
		if( f.city.value=="" ) msg+="- City\n";
		if( f.state.selectedIndex==0 ) msg+="- State\n";
		if( f.zip.value.length!=5 ) msg+="- Zip code\n";
		if( f.phonearea.value.length!=3 || f.phone.value.length!=8 ) msg+="- Phone number\n";
		if( f.dobM.selectedIndex==0 || f.dobD.selectedIndex==0 || f.dobY.selectedIndex==0 ) msg+="- Date of birth\n";
		else if( !isValidDate(f.dobM.value,f.dobD.value,f.dobY.value) ) msg+="- A valid date for your date of birth\n";
		if( f.email.value!="" && !isEmail(f.email.value) ) msg+="- A valid email address\n";
	}
	// Do this registration for all forms:
	if( f.sid.selectedIndex==0 ) msg+="- Session time\n";
	// Feedback:
	if( msg!="" ) alert("Please provide the following information:\n\n"+msg);
	return (msg=="");
}
