    function updateObjects() {
    
        advAJAX.assign(document.getElementById("loginForm"), {
            onInitialization : function(obj) {
            
                obj.parameters["password"] = hex_md5(obj.parameters["password"]);
                document.getElementById("submitBtn").value = "czekaj...";
            },
            onComplete : function() {
            
                document.getElementById("submitBtn").value = "Zaloguj się";
            },
            onSuccess : function(obj) {//alert(obj.responseText);
            
                if (obj.responseText == "1")
                {
                document.getElementById("log").innerHTML = "<font>Zalogowany poprawnie</font>";
                document.location = "index.php";
                  }
                   else {
                document.getElementById("log").innerHTML = "<font>Błędny login lub hasło</font>";
                      document.getElementById("password").value = "";
                      window.setTimeout("document.getElementById('password').focus();", 100);
                  }
            },
            onError : function(obj) {
            
                alert("Nie można nawiązać połączenia z serwerem, spróbuj później.");
            }
        });
    }
