function checkFields() {
missinginfo = "";
if (document.form.Name.value == "") {
missinginfo += "\n     -  Name";
}
if ((document.form.Email.value == "") || 
(document.form.Email.value.indexOf('@') == -1) || 
(document.form.Email.value.indexOf('.') == -1)) {
missinginfo += "\n     -  Email address";
}
if(document.form.Message.value == "") {
missinginfo += "\n     -  Comments";
}

ctrl = document.form.consent;
if (!ctrl.checked) 
{
alert ('Please tick the box to confirm you are happy for Hull Health Trainers to contact you.');
      ctrl.select();
        return false;
}

if (missinginfo != "") {
missinginfo ="_____________________________\n" +
"You failed to correctly fill in your:\n" +
missinginfo + "\n_____________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}
