<!--
function checkFields()
{
   var foundError = false;

   var passwordMessage = "";

   if (document.registration.password.value!=document.registration.password2.value)
   {
   		passwordNotSame = "The passwords did not match. Please try again.\n\n";
   		foundError = true;
   }
   
   var agreeMessage = "";
   if (document.registration.agree.checked==false)
   {
       agreeMessage = "You must agree to the Code of Conduct in order to proceed with the Registration process.\n\n";
       foundError = true;
   }
   
   var missing = "";
   if (document.registration.email.value=="")
   {
       missing += "Email address\n";
       foundError = true;
   }

   if (document.registration.password.value=="")
   {
       missing += "Password\n";
       foundError = true;
   }

   if (document.registration.firstname.value=="")
   {
       missing += "First name\n";
       foundError = true;
   }

   if (document.registration.lastname.value=="")
   {
       missing += "Last name\n";
       foundError = true;
   }

   if (document.registration.dobmonth[document.registration.dobmonth.selectedIndex].value=="00" || document.registration.dobday[document.registration.dobday.selectedIndex].value=="00" || document.registration.dobyear[document.registration.dobyear.selectedIndex].value=="0000")
   {
       missing += "Date of birth\n";
       foundError = true;
   }

   if (document.registration.grade[document.registration.grade.selectedIndex].value=="Grade")
   {
       missing += "Grade\n";
       foundError = true;
   }

   if (foundError == false)
   {
       return true;
   }
   else
   {
       if (missing != "")
       {
           missing = "Please fill in or complete the following field(s):\n" + missing + "\n\n";
       }
       
       alertMessage = missing + passwordMessage + agreeMessage;
       
       alert(alertMessage);
   }
      
   return false;
     
}
-->
