function fCheckForm() { var sErr = ""; if (document.fBookOnline.sRegNo.value=="") { sErr += "\n - Vehicle reg"; } if (document.fBookOnline.sName.value=="") { sErr += "\n - Name"; } if (document.fBookOnline.sTel.value=="") { sErr += "\n - Tel"; } if (document.fBookOnline.sEmail.value=="") { sErr += "\n - Email"; } if (document.fBookOnline.sDateTime.value=="") { sErr += "\n - Preferred date/time"; } if (document.fBookOnline.sDetails.value=="") { sErr += "\n - Please provide details of how we can help"; } if (document.fBookOnline.bTerms.checked==false) { sErr += "\n - Please tick the box to agree to our terms & conditions"; } if (sErr!="") { alert("Please check the following:-\n" + sErr); } else { document.fBookOnline.action="pages/general/book-online_exec.php"; document.fBookOnline.submit(); } }