function verifyfrmappl() {
var txt = "";

  if (document.frmappl.first_name.value=="") {
     txt = txt + "\n * First Name";
  }
  if (document.frmappl.last_name.value=="") {
     txt = txt + "\n * Last Name";
  }
  if (document.frmappl.address_1.value=="") {
     txt = txt + "\n * Address";
  }
  if (document.frmappl.city.value=="") {
     txt = txt + "\n * City";
  }
  if (document.frmappl.county.value=="") {
     txt = txt + "\n * County";
  }
  if (document.frmappl.postcode.value=="") {
     txt = txt + "\n * Post Code";
  }
  var str=document.frmappl.email.value
  var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i 
  if (!filter.test(str)) {
     txt = txt + "\n * Please input a valid Email address";
  }
  
  if (document.frmappl.ref1_name.value=="") {
     txt = txt + "\n * Reference 1 Name";
  }
  if (document.frmappl.ref1_company.value=="") {
     txt = txt + "\n * Reference 1 Company";
  }
  if (document.frmappl.ref1_telephone.value=="") {
     txt = txt + "\n * Reference 1 Telephone";
  }
  var str=document.frmappl.ref1_email.value
  var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i 
  if (!filter.test(str)) {
     txt = txt + "\n * Please input a valid Reference 1 Email address";
  }
  
  if (document.frmappl.ref2_name.value=="") {
     txt = txt + "\n * Reference 2 Name";
  }
  if (document.frmappl.ref2_company.value=="") {
     txt = txt + "\n * Reference 2 Company";
  }
  if (document.frmappl.ref2_telephone.value=="") {
     txt = txt + "\n * Reference 2 Telephone";
  }
  var str=document.frmappl.ref2_email.value
  var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i 
  if (!filter.test(str)) {
     txt = txt + "\n * Please input a valid Reference 2 Email address";
  }

	if (txt) {
		alert ("The folowing fields are required:\n" + txt);
		return false;
	}	
}