
function checkForm() {
	with (document.forms['kontakt']) {
		var alertMsg = "Wypełnij poniższe pola:\n";

		if ((k_firma.value == "")) alertMsg += "\nNazwa firmy";
		if ((k_osoba.value == "")) alertMsg += "\nImię i nazwisko";
		if ((k_telefon.value == "")) alertMsg += "\nTelefon";

		if ((k_email.value =="Twój adres e-mail") || (k_email.value == "") || (k_email.value.indexOf ('@') == -1) || (k_email.value.indexOf ('.') == -1)) alertMsg += "\nTwój email";
		if ((k_kod.value == "") ) alertMsg += "\nKod";
	}



	if (alertMsg != "Wypełnij poniższe pola:\n") {
		alert(alertMsg);
		return false;
	} else {
		return true;
	}
}


function checkForm1() {
	with (document.forms['advaform']) {
		var alertMsg = "Wypełnij poniższe pola:\n";

		if ((imie.value == "") || (imie.value == "Imię i nazwisko *" ) ) alertMsg += "\nImię i nazwisko";
		if ((tel.value == "") || (tel.value == "Twój numer telefonu *") ) alertMsg += "\nTelefon";
	}



	if (alertMsg != "Wypełnij poniższe pola:\n") {
		alert(alertMsg);
		return false;
	} else {
		return true;
	}
}



function checkFormPass() {
	with (document.forms['kontakt']) {
		var alertMsg = "Wypełnij poniższe pola:\n";

		if ((k_firma.value == "")) alertMsg += "\nNazwa firmy";
		if ((k_email.value =="Twój adres e-mail") || (k_email.value == "") || (k_email.value.indexOf ('@') == -1) || (k_email.value.indexOf ('.') == -1)) alertMsg += "\nTwój email";
		if ((k_kod.value == "") ) alertMsg += "\nKod";
	}



	if (alertMsg != "Wypełnij poniższe pola:\n") {
		alert(alertMsg);
		return false;
	} else {
		return true;
	}
}



function checkFormPass1() {
	with (document.forms['kontakt']) {
		var alertMsg = "Wypełnij poniższe pola:\n";

		if ((k_pass.value == "")) alertMsg += "\nNowe hasło";
		if ((k_kod.value == "") ) alertMsg += "\nKod";
	}



	if (alertMsg != "Wypełnij poniższe pola:\n") {
		alert(alertMsg);
		return false;
	} else {
		return true;
	}
}


