function shows(plik) {
var w = 'toolbar=no,scrollbars=yes,resizable=no,menubar=no,width=800,height=550,left=20,top=20';
window.open(plik,'Pomoc',w);
}

function sprawdz(theForm)
{

  if (theForm.domena.value == "")
  {
    alert("Podaj: Nazwa konta");
    theForm.domena.focus();
    return (false);
  }

   if (theForm.domena.value.length < 2)
  {
    alert("Nazwa konta musi mieć co najmniej 2 znaki");
    theForm.domena.focus();
    return (false);
  }
  
  if (theForm.domena.value.length > 20)
  {
    alert("WprowadĄ najwięcej 20 znaków w polu \"Nazwa konta\".");
    theForm.domena.focus();
    return (false);
  }

 if (theForm.password1.value == "")
  {
    alert("Podaj: hasło (min. 6 znaków)");
    theForm.password1.focus();
    return (false);
  }

   if (theForm.password1.value.length < 6)
  {
    alert("Hasło musi mieć co najmniej 6 znaków");
    theForm.password1.focus();
    return (false);
  }

 if (theForm.password2.value == "")
  {
    alert("Podaj: Powtórz hasło");
    theForm.password2.focus();
    return (false);
  }

if(theForm.password2.value != theForm.password1.value)
						{
							alert('hasło musi być takie samo.');
							theForm.password2.focus();
							return false;
						}
	


  if (theForm.identyfikacja.value == "")
  {
    alert("Podaj: Imię i Nazwisko lub Nazwa firmy");
    theForm.identyfikacja.focus();
    return (false);
  }

  if (theForm.adres_ulica.value == "")
  {
    alert("Podaj: Ulica");
    theForm.adres_ulica.focus();
    return (false);
  }

 if (theForm.nr_domu.value == "")
  {
    alert("Podaj: Nr domu/mieszania");
    theForm.nr_domu.focus();
    return (false);
  }
  
    if (theForm.adres_kod_pocztowy.value == "")
  {
    alert("Podaj: Kod pocztowy");
    theForm.adres_kod_pocztowy.focus();
    return (false);
  }
  
      if (theForm.adres_miasto.value == "")
  {
    alert("Podaj: Miasto");
    theForm.adres_miasto.focus();
    return (false);
  }
  
      if (theForm.osoba_kontaktowa.value == "")
  {
    alert("Podaj: Osoba kontaktowa");
    theForm.osoba_kontaktowa.focus();
    return (false);
  }
  
        if (theForm.tel.value == "")
  {
    alert("Podaj: Numer telefonu");
    theForm.tel.focus();
    return (false);
  }

 if (theForm.email2.value == "")
  {
    alert("Podaj: Adres e-mail");
    theForm.email2.focus();
    return (false);
  }

 if (theForm.nip.value == "")
  {
    alert("Podaj: Podaj numer NIP (np: xxx-xx-xx-xxx)");
    theForm.nip.focus();
    return (false);
  }

 if (theForm.regon.value == "")
  {
    alert("Podaj: Podaj numer REGON (Numer REGON musi mieć 9 cyfr)");
    theForm.regon.focus();
    return (false);
  }

 if (theForm.weryfikacja.value == "")
  {
    alert("Podaj: Kod z obrazka");
    theForm.weryfikacja.focus();
    return (false);
  }
    
  return (true);
}

function show(plik) {
var w = 'toolbar=no,scrollbars=yes,resizable=no,menubar=no,width=400,height=250,left=20,top=20';
window.open(plik,'Pomoc',w);
}

function admin()
{
	var wspx = (screen.availWidth-800)/2;
	var wspy = (screen.availHeight-600)/2;
	var w = 'width=800,height=600,left='+wspx+',top='+wspy+',resizable=0,scrollbars=yes,menubar=no';
	window.open('/panel','Panel klienta on-line',w );
}

function showDiv(id) {
 if (document.getElementById)
    current=(document.getElementById(id).style.display == 'none') ? 'block' : 'none';
    document.getElementById(id).style.display = current;
}

function ukrywanie(id) {
 if (document.getElementById)
 current=(document.getElementById(id).style.display == 'none') ? 'block' : 'none';
    document.getElementById(id).style.display = current;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}