<!--

var message;
var fieldtofocus;

function contact_validator(form)  
  { var passed=true;
  fieldtofocus="";
  
  message="Please check that you have completed the following fields correctly: \n"
  
  if(form.fname.value=="")
    {message +="--First Name\n";
	 passed=false;
	 fieldtofocus=form.fname;
	 if (fieldtofocus==""){fieldtofocus=form.fname}
	}
	
  if(form.lname.value=="")
    {message +="--Last Name\n";
	 passed=false;
	 fieldtofocus=form.lname;
	 if (fieldtofocus==""){fieldtofocus=form.lname}
	}

	x = form.email.value;
	filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	
	if (!filter.test(x)) 
	{message +="--Valid Email\n";
	 passed=false;
	 fieldtofocus=form.email;
     if (fieldtofocus==""){fieldtofocus=form.email}
	}
	
	
 if(form.comments.value=="")
    {message +="--Comments\n";
	 passed=false;
	 fieldtofocus=form.comments;
     if (fieldtofocus==""){fieldtofocus=form.comments}
	}

  if (passed==false) {fixfieldinfo(message, fieldtofocus);}

  return passed;

}  	 

function fixfieldinfo(message, fieldtofocus)
  {alert(message);
   fieldtofocus.focus();
  }
//-->