

function validateForm(form) 

{ 

   if (form.name.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your full name."); //Informs user of empty field
   form.name.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 your address."); //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
   }
   
   if (form.city.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your city."); //Informs user of empty field
   form.city.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.area.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your state."); //Informs user of empty field
   form.area.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.postcode.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your zip code."); //Informs user of empty field
   form.postcode.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.country.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your country."); //Informs user of empty field
   form.country.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }

   if (form.username.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your username."); //Informs user of empty field
   form.username.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
      if (form.password.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your account password."); //Informs user of empty field
   form.password.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }


   
   {
checkEmail = form.Email.value
if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.'))) 
{alert("You have entered an invalid email address. Please try again.");
form.Email.select();
return false;
}

} 

}

