<!--




function pomoc(plik,szer,wys,op) { 
	PX=0;
	PY=0;
	config='left='+PX+',top='+PY+',width='+szer+',height='+wys+',innerheight='+wys+',innerwidth='+szer+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+op+',resizable=0';
	kitekSC='oknopomoc';
	stadion=window.open(''+plik,kitekSC,config)
	stadion.focus();
}





function noe(formname,nextfield) {
	if(document.all && window.event && window.event.keyCode==13) {
		document.forms[formname].elements[nextfield].focus();
		return false; 
	}
}

function check(formname,chkfield) {
	document.forms[formname].elements[chkfield].checked=!(document.forms[formname].elements[chkfield].checked);
}

function checkHaslo(formname,fieldn) {
    if(!document.forms[formname].elements[fieldn].value.length) {
	alert('Nie podałeś hasła.\n Musisz wpisać swoje hasło.');
	return false;
    }
    return true;
}


function Trim(lancuch)
{
	if (lancuch=='')
		return lancuch;
	while (lancuch.charAt(0) == " ") 
		lancuch = lancuch.substring(1,lancuch.length);
	while (lancuch.charAt(lancuch.length-1) == " ") 
		lancuch = lancuch.substring(0,lancuch.length-2);
	return lancuch;	
}

function CheckEMail(email)
{
	if (Trim(email) == '')
		return false;

	if (email.indexOf('@') == -1)
		return false;
		
	if (email.indexOf('.') == -1)
		return false;

	if (email.length < 4)
		return false;

	if (email.indexOf('@') != email.lastIndexOf('@'))
		return false;

	return true;
}

function sprawdz() {
	if (!CheckEMail(document.form1.email.value)) {
		alert("Adres e-mail jest niepoprawny!");
		return false;
		}
	return true;
}


function CheckSzukaj(pattern)
{
	if (pattern.length < 2)
		return false;

	return true;
}


function sprawdzszukaj() {
	if (!CheckSzukaj(document.modSearch.pattern.value)) {
		alert("Wprowadzony ciąg znaków jest za krótki. Wprowadź minimum 2 znaki");
		return false;
		}
	return true;
}




function checkLogPass() {
	
	fil = document.forms["rejestracja"].elements["du_rok"].value;

	if(!document.forms["rejestracja"].elements["imie"].value.length) {
	    alert('Podaj Twoje imię.');
	    return false;
	}
	if(!document.forms["rejestracja"].elements["nazwisko"].value.length) {
	    alert('Podaj Twoje nazwisko.');
	    return false;
	}
	if(!document.forms["rejestracja"].elements["du_dzien"].selectedIndex) {
	    alert('Wybierz Twój dzien urodzenia.');
	    return false;
	}
	if(!document.forms["rejestracja"].elements["du_mies"].selectedIndex) {
	    alert('Wybierz Twój miesiąc urodzenia.');
	    return false;
	}


	if(!document.forms["rejestracja"].elements["du_rok"].value.length) {
	    alert('Podaj Twoj rok urodzenia.');
	    return false;
	}
	if(fil.length < 4) {
	    alert('Proszę wpisać prawidłowo rok. \n(cztery cyfry np. 1970)');
	    return false;
	}
	if(fil.length > 4) {
	    alert('Proszę wpisać prawidłowo rok. \n(cztery cyfry np. 2002)');
	    return false;
	}


	if(!document.forms["rejestracja"].elements["plec"].selectedIndex) {
	    alert('podaj Twoją płeć.');
	    return false;
	}


        if(!document.forms["rejestracja"].elements["ulica"].value.length) {
            alert('Podaj ulicę.');
            return false;
        }


        if(!document.forms["rejestracja"].elements["kod"].value.length) {
            alert('Podaj kod pocztowy.');
            return false;
        }


        if(!document.forms["rejestracja"].elements["miasto"].value.length) {
            alert('Podaj miejscowość.');
            return false;
        }


        if(!document.forms["rejestracja"].elements["wojewodztwo"].selectedIndex) {
            alert('Wybierz województwo.');
            return false;
        }


        if(!document.forms["rejestracja"].elements["wyksztalcenie"].selectedIndex) {
            alert('Podaj wykształcenie.');
            return false;
        }



        if(!document.forms["rejestracja"].elements["prawo_jazdy"].selectedIndex) {
            alert('Czy posiadasz prawo jazdy ?');
            return false;
        }


        if(!document.forms["rejestracja"].elements["wlasny_sam"].selectedIndex) {
            alert('Czy posiadasz własny samochód ?');
            return false;
        }

        if(!document.forms["rejestracja"].elements["wlasny_komp"].selectedIndex) {
            alert('Czy posiadasz własny komputer ?');
            return false;
        }


        if(!document.forms["rejestracja"].elements["internet_dost"].selectedIndex) {
            alert('Czy posiadasz dostęp do Internetu ?');
            return false;

        }

        if(!document.forms["rejestracja"].elements["status"].selectedIndex) {
            alert('Wybierz status.');
            return false;
        }


	return true;
}


//-->
