
function chkForm(frm) {
  // the name of the form
  f = frm;



if (f.msg) {
    if (f.msg.value == '') {
      alert('Check all required fields');
      return false;
    }
  }
 
 // change msg to the name of any field you want to make required.
  if (f.Surname) {
    if (f.Surname.value == 'Surname *') {
      alert('Check all required fields');
      return false;
    }
  }
  
  if (f.FirstName) {
    if (f.FirstName.value == 'FirstName *') {
      alert('Check all required fields');
      return false;
    }
  }
  
  
  
    if (f.Telephone) {
    if (f.Telephone.value == 'Telephone *') {
      alert('Check all required fields');
      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, please check and try again. Thank you !');
      return false;
    }
    else if (f.email.value == '') {
      return confirm('Are you sure you want to send this message without an email address?');
    }
  }
}

  
