function chkForm(frm) {
  // the name of the form
  f = frm;

  // change msg to the name of any field you want to make required.
  if (f.msg) {
    if (f.msg.value == '') {
      alert('You need to provide a message!');
      return false;
    }
  }

  // if 'from' address field is used, this checks it to make sure address is valid
  if (f.email) {
    if (f.email.value != '' && (f.email.value.lastIndexOf('.') < 0 || f.email.value.lastIndexOf('@') < 1)) {
      alert('Invalid e-mail address');
      return false;
    }
    else if (f.email.value == '') {
       alert('Please provide your email address');
		return false;
    }
  }
}