
// JavaScript Document
function checkKontaktForm()
{
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i

	if (document.getElementById('nazwa_firmy').value.length == 0) { alert('Podaj nazwe firmy.'); return false; }
	if (document.getElementById('osoba').value.length == 0) { alert('Podaj swoje imie i nazwisko.'); return false; }
	if (!filter.test(document.getElementById('email').value)) { alert('Podany adres E-Mail nie jest prawidlowy. Prosze poprawic.'); return false; }
	if (document.getElementById('opis').value.length == 0) { alert('W jakiej sprawie sie kontaktujesz? Prosze uzupelnic opis.'); return false; }
	if (document.getElementById('wyrazam_zgode').value.length == "TAK") { alert('zgoda.'); return false; }
	document.getElementById('kontaktForm').submit();
}
