function inscriptionUppercase( e ) {
  var isLowerChar = function ( charCode ) {
    return ( charCode >= 97 && charCode <= 122 ) // a-z
      || ( charCode >= 224 && charCode <= 246 ) // à-ö
      || ( charCode >= 248 && charCode <= 253 ) // ø-ý
      ;
  }
  var fieldValue = this.value;
  var newValue = '';
  for( var i=0; i<fieldValue.length; i++ ) { // pour chaque lettre
    var charCode = fieldValue.charCodeAt( i );
    newValue += ( isLowerChar( charCode ) )
      ? String.fromCharCode( charCode - 32 )
      : String.fromCharCode( charCode );
  }
  this.value = newValue;
}

function inscriptionInitUppercase() {
  var oTextNom = document.getElementById( 'nom' );
  var oTextVille = document.getElementById( 'ville' );

  if ( isSet( oTextNom ) )
    oTextNom.onkeyup = inscriptionUppercase;
  if ( isSet( oTextVille ) )
    oTextVille.onkeyup = inscriptionUppercase;
}

addListener( window, 'load', inscriptionInitUppercase );