<!--
function checkEmail (strng) {
var error="";
if (strng == "") {
   error = "You didn't enter an email address.\n";
}
    var emailFilter=/^.+@.+\..{2,3}$/;
    if (!(emailFilter.test(strng))) { 
       error = "Please enter a valid email address.\n";
    }
    else {
//test email for illegal characters
       var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/
         if (strng.match(illegalChars)) {
          error = "The email address contains illegal characters.\n";
       }
    }
return error;    
}


function isEmpty(strng) {
var error = "";
  if (strng.length == 0) {
     error = "You haven't provided your surname.\n"
  }
return error;  
}


function checkDropdown(idx) {
var error = "";

    if (idx == 0) {
    error = "You didn't choose an option from the drop-down list.\n";
    }    
return error;
}    

function checkWholeForm() {
    var why = "";
    why += checkDropdown(register_details.user_title.selectedIndex);
    why += isEmpty(register_details.surname.value);
    why += checkEmail(register_details.email_address.value);
    if (why != "") {
       alert(why);
       return false;
    }
return true;
}
-->