function pokazCzas() {
	month = new Array ("Styczeñ", "Luty", "Marzec", "Kwiecieñ", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień")
	day = new Array ("Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota")
	var now=new Date()
   var years=now.getFullYear()
   var months=now.getMonth()
   var days=now.getDay()
   var day_n=now.getDate()
   var hrs=now.getHours()
   var min=now.getMinutes()
   var sec=now.getSeconds()
   if (hrs<10) { hrs="0"+hrs }
   if (min<10) { min="0"+min }
   if (sec<10) { sec="0"+sec }
   document.getElementById("zegar").innerHTML=day[days]+" "+day_n+" "+month[months]+" "+years+"<br>"+hrs+":"+min+":"+sec
   setTimeout("pokazCzas()",1000)
}
function isEmpty(v) {
	var re = /^\s{1,}$/g;
	if ((v.length==0) || (v==null) || ((v.search(re)) > -1)) {
		return true;
	}
	else {
		return false;
	}
}
function wyslijZapytanie() {
	var blad = false;
	var email = document.kontakt.email;
	var tresc = document.kontakt.tresc;
	if ( isEmpty ( email.value ) ) {
		alert ( "Proszę wpisać adres e-mail" );
        email.focus();
        blad = true;
        return;
	}
	else {
		chars = /^[^\s()<>@,;:\/]+@\w[\w\.-]+\.[a-z]{2,}$/i;
		if (!chars.test(email.value) || email.value.lastIndexOf("@")!= email.value.indexOf("@") ) {
			alert("Adres email nie jest poprawny.");
			email.focus();
			blad = true;
			return;
		}
    }
	if ( isEmpty ( tresc.value ) ) {
		alert ( "Proszę wpisać treść zapytania" );
        tresc.value = "";
        tresc.focus();
        blad = true;
        return;
	}
	if ( blad == false ) {
        conf = confirm ( "Jeśli formularz nie zawiera błędów, proszę potwierdzić jego wysyłkę" );
        if ( conf ) {
            document.kontakt.action = "kontakt.php";
            document.kontakt.submit();
        }
    }
}
