// JavaScript Document
function error(tekst) {
	if (errfound) return;
		window.alert(tekst);
errfound = true;
}
function validate() {
	errfound = false;
	var bledy = "";
	with (document.forms[0]) {
		
if (imieinazwisko.value == "")  bledy += "Wpisz proszę Imię i Nazwisko. \n";
if (telefon.value == "")  bledy += "Wpisz proszę numer telefonu kontaktowego. \n";
if ((email.value.indexOf('@', 0) == -1) || (email.value.indexOf('.', 0) == -1))  bledy += "Adres e-mail wygląda na nieprawidłowy.\n";
		if (tresc.value == "") bledy += "Wpisz proszę Treść";
		if (bledy != "")  error(bledy); 
	}
return !errfound;
}
