// JavaScript Document


function validateForm(form) { //This is the name of the function



if (form.surname.value == "") { //This checks to make sure the field is not empty
   alert("Please enter Surname"); //Informs user of empty field
   form.surname.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }


if (form.email.value == "") { //This checks to make sure the field is not empty
   alert("Please enter Email Address"); //Informs user of empty field
   form.email.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.address1.value == "") { //This checks to make sure the field is not empty
   alert("Please enter Address 1"); //Informs user of empty field
   form.address1.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }



}

