
    	// Initialisation du formulaire

        function init() {

          goTop();

          document.frm.txtUser.focus();

        }

        // Place la frame Novacom en frame principale

        function goTop() {

          if (self != top) {

             top.location = location.href;

          }

        }

        function checkEnter(e){ //e is event object passed from function invocation

          var characterCode  //literal character code will be stored in this variable

          if(e && e.which){ //if which property of event object is supported (NN4)

            e = e

            characterCode = e.which //character code is contained in NN4's which property

          }

          else{

            e = event

            characterCode = e.keyCode //character code is contained in IE's keyCode property

          }

          if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)

            submitLogin() //submit the form

            return false

          }

          else{

            return true

          }

        }


        function submitLogin(){
			if (document.frm.txtUser.value == '')
				alert("Veuillez saisir votre 'Nom Utilisateur' s'il vous plait");
			else {
				if (document.frm.txtPassword.value == '')
					alert("Veuillez saisir votre mot de passe s'il vous plait");
				else {
					if (document.frm.MOTIF_CONNEXION.value == '')
						alert("Veuillez s\u00E9lectionner un 'Motif de connexion' s'il vous plait");
					else
		            	document.frm.submit();
				}
			}
        }