<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no' );
}

function newsletter_usun() {
	  this.document.newsletter.action="usun_adres.php";
	  this.document.newsletter.submit();
}
function newsletter_dodaj() {
	  this.document.newsletter.action="dodaj_email.php";
	  this.document.newsletter.submit();
}

function potwierdzenie(pytanie){
  if (confirm(pytanie)) {
    return true;
  } else {
    return false;
  } 
 return true;
}

function checkkonto(param) {
 	goodSigns = "abcdefghijklmnopqrstuvwxyz0123456789"
 	for (i=0; i<param.length; i++) {
 		sign=param.charAt(i)
 		if (goodSigns.indexOf(sign,0) == -1){ return false }
 	}
 	return true;
}

function nowy_klient() {
	if (document.rejestracja.imie.value == "") {
 		alert("Pole IMIĘ jest obowiązkowe");
 		document.rejestracja.imie.focus();
 		document.rejestracja.imie.select(); 
		return false;
 	}
	if (document.rejestracja.nazwisko.value == "") {
 		alert("Pole NAZWISKO jest obowiązkowe");
 		document.rejestracja.nazwisko.focus();
 		document.rejestracja.nazwisko.select(); 
		return false;
 	}
	if (document.rejestracja.email.value == "") {
 		alert("Pole E-MAIL jest obowiązkowe");
 		document.rejestracja.email.focus();
 		document.rejestracja.email.select(); 
		return false;
 	}
	if (document.rejestracja.adres.value == "") {
 		alert("Pole ADRES jest obowiązkowe");
 		document.rejestracja.adres.focus();
 		document.rejestracja.adres.select(); 
		return false;
 	}
 	if (document.rejestracja.miasto.value == "") {
 		alert("Pole MIASTO jest obowiązkowe");
 		document.rejestracja.miasto.focus();
 		document.rejestracja.miasto.select(); 
		return false;
 	}
 	if (document.rejestracja.kod.value == "") {
 		alert("Pole KOD POCZTOWY jest obowiązkowe");
 		document.rejestracja.kod.focus();
 		document.rejestracja.kod.select(); 
		return false;
 	}

 	if (document.rejestracja.login.value == "") {
 		alert("Pole LOGIN jest obowiązkowe");
 		document.rejestracja.login.focus();
 		document.rejestracja.login.select(); 
		return false;
 	}
 	if (document.rejestracja.haslo.value == "") {
 		alert("Pole HASŁO jest obowiązkowe");
 		document.rejestracja.haslo.focus();
 		return false;
 	}
  	if (document.rejestracja.rehaslo.value == "") {
 		alert("Pole HASŁO jest obowiązkowe");
 		document.rejestracja.rehaslo.focus();
 		return false;
 	}
 	if (document.rejestracja.haslo.value != document.rejestracja.rehaslo.value) {
 		alert("HASŁA muszą być identyczne");
 		document.rejestracja.haslo.focus();
 		document.rejestracja.rehaslo.value='';
  		document.rejestracja.haslo.value='';
 		return false;
 	}
 	if (document.rejestracja.haslo.value == document.rejestracja.login.value) {
 		alert("Pole LOGIN i HASŁO nie mogą być identyczne");
 		document.rejestracja.haslo.focus();
 		document.rejestracja.rehaslo.value='';
 		document.rejestracja.haslo.value='';
 		return false;
 	}
 	if (document.rejestracja.login.value.length < 3 || document.rejestracja.login.value.length > 16) {
 		alert ("Pole LOGIN musi mieć długość od 3 do 16 znaków");
 		document.rejestracja.login.focus();
 		document.rejestracja.login.select();
 		return false;
 	}
 	if (document.rejestracja.haslo.value.length < 3 || document.rejestracja.haslo.value.length > 16) {
 		alert ("Pole HASŁO musi mieć długość od 3 do 16 znaków");
 		document.rejestracja.haslo.focus();
 		document.rejestracja.haslo.select();
 		return false;
 	}
  	if (document.rejestracja.rehaslo.value.length < 3 || document.rejestracja.rehaslo.value.length > 16) {
 		alert ("Pole HASŁO musi mieć długość od 3 do 16 znaków");
 		document.rejestracja.rehaslo.focus();
 		document.rejestracja.rehaslo.select();
 		return false;
 	}
	
 
 	if (!checkkonto(document.rejestracja.login.value)) {
 		alert("Pole LOGIN zawiera niedozwolone znaki!"
 		+ '\n\n' +
 		"Proszę użyć:"
 		+ '\n' +
 		"małych liter ( a-z ) i cyfr ( 0-9 )");
 		document.rejestracja.login.focus();
 		document.rejestracja.login.select();
 		return false;
 	}
 	if (!checkkonto(document.rejestracja.haslo.value)) {
 		alert("Pole HASŁO zawiera niedozwolone znaki!"
 		+ '\n\n' +
 		"Proszę użyć:"
 		+ '\n' +
 		"małych liter ( a-z ) i cyfr ( 0-9 )");
 		document.rejestracja.haslo.focus();
 		document.rejestracja.haslo.select();
 		return false;
 	}
 	if (!checkkonto(document.rejestracja.rehaslo.value)) {
 		alert("Pole HASŁO zawiera niedozwolone znaki!"
 		+ '\n\n' +
 		"Proszę użyć:"
 		+ '\n' +
 		"małych liter ( a-z ) i cyfr ( 0-9 )");
 		document.rejestracja.rehaslo.focus();
 		document.rejestracja.rehaslo.select();
 		return false;
 	}
 
 	return true;
}

function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=no,scrollbars=no,menubar=no' );
		  Win.creator=self
}


//-->