<!--
function do_stat(konto){
    //res - resolution
    //id_konto - identyfikator konta
    //loc - lokacja (url);
    //ref - lokalizacja strony z której było wejście.
    if(document.referrer=="") ref="Bezposrednio";
    else ref=document.referrer;
    res = screen.width + "x" + screen.height;
    loc = document.location;
    document.write('<div style="position:absolute; visibility:hidden; z-index:-1;">');
    document.write('<img src="http://www.stat.doit.mazury.pl/add_stat.php?res=' + res + '&id_konto=' + konto + '&loc=' + loc + '&ref=' + escape(ref) + '">');
    document.write('</div>');
    return "" ;
}//get_last_from_history

  function sprawdz_formularz_add_account_s1(){
      ok = true;
      komunikat = "";
      el = document.getElementsByName('opis');
      if(el[0].value.length<1 ) {
          komunikat = komunikat + "Podaj opis konta, wg. którego będziesz je później rozpoznawał. \n";
          ok = false;
      }
      el = document.getElementsByName('il_dni_wstecz');
      if(el[0].value.length<1 && el[0].value<1) {
          komunikat = komunikat + "Podaj na ile dni wstecz powinny być liczone statystyki dzienne. \n";
          ok = false;
      }
      el = document.getElementsByName('il_mies_wstecz');
      if(el[0].value.length<1 && el[0].value<1) {
          komunikat = komunikat + "Podaj na ile miesięcy wstecz powinny być liczone statystyki miesięczne. \n" ;
          ok = false;
      }
      el = document.getElementsByName('il_lat_wstecz');
      if(el[0].value.length<1 && el[0].value<1) {
          komunikat = komunikat + "Podaj na ile lat wstecz powinny być liczone statystyki roczne. \n" ;
          ok = false;
      }

      if(! ok) alert(komunikat);
      return ok;
  }//sprawdz_formularz_add_account_s1

  function sprawdz_formularz_step2(){
      ok = true;
      komunikat = "";

      el = document.getElementsByName('login');
      if(el[0].value.length<6) {
          komunikat = komunikat + "Podaj poprawny login (min.6 znaków). \n"
          ok = false;
      }
      el1 = document.getElementsByName('haslo1');
      el2 = document.getElementsByName('haslo2');
      if((el1[0].value.length<6) || (el1[0].value != el2[0].value)) {
          komunikat = komunikat + "Podaj 2 razy poprawne hasło (min.6 znaków). \n"
          ok = false;
      }
      if(! ok) alert(komunikat);
      return ok;
  }//sprawdz_formularz_step2

  function sprawdz_formularz_step1(){
      ok = true;
      komunikat = "";
      el = document.getElementsByName('imie');
      if(el[0].value.length<2) {
          komunikat = komunikat + "Podaj swoje imię. \n"
          ok = false;
      }
      el = document.getElementsByName('nazwisko');
      if(el[0].value.length<2) {
          komunikat = komunikat + "Podaj swoje nazwisko. \n"
          ok = false;
      }
      el = document.getElementsByName('ulica');
      if(el[0].value.length<2) {
          komunikat = komunikat + "Podaj ulicę i numer domu. \n"
          ok = false;
      }
      el = document.getElementsByName('kod_pocz');
      if(el[0].value.length!=6) {
          komunikat = komunikat + "Podaj poprawny kod pocztowy. \n"
          ok = false;
      }
      el = document.getElementsByName('miasto');
      if(el[0].value.length<2) {
          komunikat = komunikat + "Podaj nazwe miasta. \n"
          ok = false;
      }
      el = document.getElementsByName('email');
      if((el[0].value.length<2) || (el[0].value.indexOf('\@') == -1)) {
          komunikat = komunikat + "Podaj poprawny adres e-mail. \n"
          ok = false;
      }
      el = document.getElementsByName('czyfirma');
      if(el[0].value == "tak"){
          el = document.getElementsByName('firma');
          if(el[0].value.length<2) {
              komunikat = komunikat + "Podaj nazwę swojej firmy. \n"
              ok = false;
          }
          el = document.getElementsByName('nip');
          if(el[0].value.length!=13) {
              komunikat = komunikat + "Podaj poprawny NIP: xxx-xxx-xx-xx. \n"
              ok = false;
          }
      }//
      el = document.getElementsByName('login');
      if(el[0].value.length<6) {
          komunikat = komunikat + "Podaj poprawny login (min.6 znaków). \n"
          ok = false;
      }
      el1 = document.getElementsByName('haslo1');
      el2 = document.getElementsByName('haslo2');
      if((el1[0].value.length<6) || (el1[0].value != el2[0].value)) {
          komunikat = komunikat + "Podaj 2 razy poprawne hasło (min.6 znaków). \n"
          ok = false;
      }

      if(! ok) alert(komunikat);
      return ok;
  }//sprawdz_formularz

  function f_firma(){
      el = document.getElementsByName('firma');
      el[0].disabled = false;
      el = document.getElementsByName('nip');
      el[0].disabled = false;
      el = document.getElementsByName('czyfirma');
      el[0].value = "tak";
  }//firma

  function f_prywatnie(){
      el = document.getElementsByName('firma');
      el[0].disabled = true;
      el = document.getElementsByName('nip');
      el[0].disabled = true;
      el = document.getElementsByName('czyfirma');
      el[0].value = "nie";
  }//prywatnie
  
  function upewnij_sie_co_do_decyzji(){
      if(confirm("Czy jesteś pewien, że chcesz skasować wpisy w zaznaczonych działach?")) return true;
      else return false;
  }//upewnij_sie_co_do_decyzji


-->
