// submit a regitrations to get accepted
  function checkForm() {
Utilisateur = document.getElementById('Utilisateur').value;
pass = document.getElementById('pass').value;
contact = document.getElementById('contact').value;
email = document.getElementById('email').value;
tel = document.getElementById('tel').value;

  
  if (Utilisateur == '') {
  hideAllErrors();
document.getElementById('UtilisateurError').style.display = 'inline';
document.getElementById('Utilisateur').select();
document.getElementById('Utilisateur').focus();
  return false;
      } else if (pass == '') {
hideAllErrors();
document.getElementById('passError').style.display = 'inline';
document.getElementById('pass').select();
document.getElementById('pass').focus();
  return false;
    }
	else if (contact== '') {
hideAllErrors();
document.getElementById('contactError').style.display = 'inline';
document.getElementById('contact').select();
document.getElementById('contact').focus();
  return false;
    }
else if (email == '') {
hideAllErrors();
document.getElementById('emailError').style.display = 'inline';
document.getElementById('email').select();
  return false;
  } else if (email.indexOf('@') < 1) { //  must contain @, and it must not be the first character
hideAllErrors();
document.getElementById('emailError').style.display = 'inline';
document.getElementById('email').select();
  return false;
  } else if (email.lastIndexOf('.') <= email.indexOf('@')) {  // last dot must be after the @
hideAllErrors();
document.getElementById('emailError').style.display = 'inline';
document.getElementById('email').select();
  return false;  
  } else if (email.indexOf('@') == email.length) {  // @ must not be the last character
hideAllErrors();
document.getElementById('emailError').style.display = 'inline';
document.getElementById('email').select();
  return false;  
  } else if (email.indexOf('..') >=0) { // two periods in a row is not valid
hideAllErrors();
document.getElementById('emailError').style.display = 'inline';
document.getElementById('email').select();
  return false; 
  } else if (email.indexOf('.') == email.length) {  // . must not be the last character
hideAllErrors();
document.getElementById('emailError').style.display = 'inline';
document.getElementById('email').select();
  return false; 
  
  
    }
else if (tel== '') {
hideAllErrors();
document.getElementById('telError').style.display = 'inline';
document.getElementById('tel').select();
document.getElementById('tel').focus();
  return false;
    }
  return true;
  }
 
  function hideAllErrors() {
document.getElementById('UtilisateurError').style.display = 'none'
document.getElementById('passError').style.display = 'none'
document.getElementById('contactError').style.display = 'none'
document.getElementById('emailError').style.display = 'none'
document.getElementById('telError').style.display = 'none'

  }
  //-->
  <!-- Popups
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function isNumberKey(evt)
      {
         var charCode = (evt.which) ? evt.which : event.keyCode
         if (charCode > 31 && (charCode < 48 || charCode > 57))
            return false;

         return true;

      }
//-->
