function doSend() 
{
   var mailRE = /^[^\@]+\@[^\@]+$/
   var engOnRE = /^[a-zA-Z0-9\_\-\.]+$/
   var engMailOnRE = /^[a-zA-Z0-9\_\-\.\@]+$/
   toSend = true
   if (document.regForm.loginName.value && document.regForm.userPass.value &&  document.regForm.userPass2.value && document.regForm.userFirstName.value && document.regForm.userNameLast && document.regForm.userEmail.value) {
   
//   if (document.writeForm.theName.value && document.writeForm.eMail.value && !document.writeForm.subject.options[0].selected  && document.writeForm.detailField.value) {
       toSend = true;
   } else {
        toSend = false;
		errCode = 1
   }
   // Check that user name does contain English string
   if (!engOnRE.test(document.regForm.loginName.value) && toSend) {
        toSend = false;
		errCode = 2
   }
   // Check that Password does contain English string
   if (!engOnRE.test(document.regForm.userPass.value) && toSend) {
        toSend = false;
		errCode = 3
   }
   // check that both passwords are equal
   if ((document.regForm.userPass.value != document.regForm.userPass2.value) && toSend) {
        toSend = false;
		errCode = 4
 }
//   Now to find out if there is a @ in the E-mails
   if (
        (
      (!mailRE.test(document.regForm.userEmail.value)) || 
	  (!engMailOnRE.test(document.regForm.userEmail.value))
	    ) && (toSend)) {
        toSend = false;
		errCode = 5
 }
   if (toSend) {
      return true
   } else {
      switch (errCode) {
	     case 1:
            alert ("Fields marked with * must be filled")
			break;
	     case 2:
            alert ("Please use English without spaces in the login name")
            document.regForm.loginName.focus()
            document.regForm.loginName.select()
			break;
	     case 3:
            alert ("Please use English without spaces in the password field")
            document.regForm.userPass.focus()
            document.regForm.userPass.select()
			break;
	     case 4:
            alert ("Confirmed password is not equal to original password")
            document.regForm.userPass.focus()
            document.regForm.userPass.select()
			break;
	     case 5:
            alert ("Illegal E-mail address")
            document.regForm.userEmail.focus()
            document.regForm.userEmail.select()
			break;
	  } // switch
	  return false
   }  // else to send
}

