<script type="text/javascript">
  var users = new Array("user1", "user2", "user3");
  var passwords = new Array("pass1", "pass2", "pass3");

  function btnZalogujClick()
  {
    var user = document.getElementById("user").value;
    var pass = document.getElementById("pass").value;
    for(var i = 0; i < users.length; i++){
      if((user == users[i]) && (pass == passwords[i])){
        document.location.href = "strona_glowna.html"; 
        return;
      }
    }
    alert('Niepoprawne hasło!');
  }
</script>