<!--



function open_full_size_photo(photo,w,h){
  full_foto=open("foto.php?foto="+photo+"", 'FullFoto', 'width='+w+',height='+h+'');
//full_foto=open("index.php", 'FullFoto', 'scrollbars=yes,width=400,hight=600');
}

function open_movie_win(){
  full_foto=open("filmik.html", 'FullFoto', 'width=384,height=288');
//full_foto=open("index.php", 'FullFoto', 'scrollbars=yes,width=400,hight=600');
}

function showHideMiejsce(obj){
	if(obj.options[obj.selectedIndex].value == 3) {
		document.getElementById("miejsce:3").style.display = '';	
	}else {
		document.getElementById("miejsce:3").style.display = 'none';
	}
}

function wyslijRezerwacje() {
	var dobrze = 1;
	if(document.getElementById("plec").options[document.getElementById("plec").selectedIndex].value == 0){
		dobrze = 0;	
	}
	if(document.getElementById("imie").value.length == 0){
		dobrze = 0;	
	}
	if(document.getElementById("nazwisko").value.length == 0){
		dobrze = 0;	
	}
	if(document.getElementById("adres").value.length == 0){
		dobrze = 0;	
	}
	if(document.getElementById("miasto").value.length == 0){
		dobrze = 0;	
	}
	if(document.getElementById("kodpocztowy").value.length == 0){
		dobrze = 0;	
	}
	if(document.getElementById("wojewodztwo").value.length == 0){
		dobrze = 0;	
	}
	if(document.getElementById("telefon").value.length == 0){
		dobrze = 0;	
	}
	if(document.getElementById("eemail").value.length == 0){
		dobrze = 0;	
	}else {
		reg = /^[a-zA-Z0-9规瓿耋溈煡剖Ｑ訉瘡]*@[a-zA-Z0-9规瓿耋溈煡剖Ｑ訉瘡]+(\.[a-zA-Z0-9规瓿耋溈煡剖Ｑ訉瘡]+)+$/;
    	wyn = document.getElementById("eemail").value.match(reg);
    	if (wyn == null) {
        	alert("Prosz臋 poda膰 poprawny adrs email.");
       		return false;
		}
	}
	if(document.getElementById("pname").value.length == 0){
		dobrze = 0;	
	}
	if(document.getElementById("czasr").value.length == 0){
		dobrze = 0;	
	}
	if(document.getElementById("miejsce").options[document.getElementById("miejsce").selectedIndex].value == 0){
		dobrze = 0;	
	}else{
		if(document.getElementById("miejsce").options[document.getElementById("miejsce").selectedIndex].value == 3 && document.getElementById("miejsce_inne").value.length == 0){
			dobrze = 0;
		}
	}
	if(document.getElementById("lp").options[document.getElementById("lp").selectedIndex].value == 0){
		dobrze = 0;	
	}
	if(document.getElementById("samochod").options[document.getElementById("samochod").selectedIndex].value == 0){
		dobrze = 0;	
	}
	if(document.getElementById("typ_uslugi").options[document.getElementById("typ_uslugi").selectedIndex].value == 0){
		dobrze = 0;	
	}
	if(document.getElementById("platnosc").options[document.getElementById("platnosc").selectedIndex].value == 0){
		dobrze = 0;	
	}
	if(document.getElementById("mdocelowe").value.length == 0){
		dobrze = 0;	
	}
	if(dobrze == 0)
		alert("wszystkie pola oznaczone * musz膮 by膰 wype艂nione");
	else
		document.getElementById("rezerwacja").submit();
	
}


function sendRezerwacje() {
	var dobrze = 1;
	if(document.getElementById("plec").options[document.getElementById("plec").selectedIndex].value == 0){
		dobrze = 0;	
	}
	if(document.getElementById("imie").value.length == 0){
		dobrze = 0;	
	}
	if(document.getElementById("nazwisko").value.length == 0){
		dobrze = 0;	
	}
	if(document.getElementById("adres").value.length == 0){
		dobrze = 0;	
	}
	if(document.getElementById("miasto").value.length == 0){
		dobrze = 0;	
	}
	if(document.getElementById("kodpocztowy").value.length == 0){
		dobrze = 0;	
	}
	if(document.getElementById("wojewodztwo").value.length == 0){
		dobrze = 0;	
	}
	if(document.getElementById("telefon").value.length == 0){
		dobrze = 0;	
	}
	if(document.getElementById("eemail").value.length == 0){
		dobrze = 0;	
	}else {
		reg = /^[a-zA-Z0-9规瓿耋溈煡剖Ｑ訉瘡]*@[a-zA-Z0-9规瓿耋溈煡剖Ｑ訉瘡]+(\.[a-zA-Z0-9规瓿耋溈煡剖Ｑ訉瘡]+)+$/;
    	wyn = document.getElementById("eemail").value.match(reg);
    	if (wyn == null) {
        	alert("E-mail adress is not valid.");
       		return false;
		}
	}
	if(document.getElementById("pname").value.length == 0){
		dobrze = 0;	
	}
	if(document.getElementById("czasr").value.length == 0){
		dobrze = 0;	
	}
	if(document.getElementById("miejsce").options[document.getElementById("miejsce").selectedIndex].value == 0){
		dobrze = 0;	
	}else{
		if(document.getElementById("miejsce").options[document.getElementById("miejsce").selectedIndex].value == 3 && document.getElementById("miejsce_inne").value.length == 0){
			dobrze = 0;
		}
	}
	if(document.getElementById("lp").options[document.getElementById("lp").selectedIndex].value == 0){
		dobrze = 0;	
	}
	if(document.getElementById("samochod").options[document.getElementById("samochod").selectedIndex].value == 0){
		dobrze = 0;	
	}
	if(document.getElementById("typ_uslugi").options[document.getElementById("typ_uslugi").selectedIndex].value == 0){
		dobrze = 0;	
	}
	if(document.getElementById("platnosc").options[document.getElementById("platnosc").selectedIndex].value == 0){
		dobrze = 0;	
	}
	if(document.getElementById("mdocelowe").value.length == 0){
		dobrze = 0;	
	}
	if(dobrze == 0)
		alert("Fill all fields marked with *");
	else
		document.getElementById("rezerwacja").submit();
	
}


function zegar2() {
//pobranie aktualnej godziny, minuty i sekundy
var czas = new Date();
godzina = czas.getHours(); 
godzina = godzina - 6;
if (godzina <= 9) {godzina = "0"+godzina;}
minuta = czas.getMinutes(); if (minuta <= 9) {minuta = "0"+minuta;}
sekunda = czas.getSeconds(); if (sekunda <= 9) {sekunda = "0"+sekunda;}

 
//wyswietlenie godziny w polu formularza
//zapis przypisania do pola formularza wyglada tak:
document.getElementById('zegar2').innerHTML = godzina + ":" + minuta + ":" + sekunda;
//document.forms["zegarek"].elements["pokaz"].value = godzina + ":" + minuta + ":" + sekunda;
}
function zegar3() {
//pobranie aktualnej godziny, minuty i sekundy
var czas = new Date();
godzina = czas.getHours(); godzina = godzina - 1; if (godzina <= 9) {godzina = "0"+godzina;}
minuta = czas.getMinutes(); if (minuta <= 9) {minuta = "0"+minuta;}
sekunda = czas.getSeconds(); if (sekunda <= 9) {sekunda = "0"+sekunda;}

 
//wyswietlenie godziny w polu formularza
//zapis przypisania do pola formularza wyglada tak:
document.getElementById('zegar3').innerHTML = godzina + ":" + minuta + ":" + sekunda;
//document.forms["zegarek"].elements["pokaz"].value = godzina + ":" + minuta + ":" + sekunda;
}

function zegar() {
//pobranie aktualnej godziny, minuty i sekundy
var czas = new Date();
godzina = czas.getHours(); if (godzina <= 9) {godzina = "0"+godzina;}
minuta = czas.getMinutes(); if (minuta <= 9) {minuta = "0"+minuta;}
sekunda = czas.getSeconds(); if (sekunda <= 9) {sekunda = "0"+sekunda;}

 
//wyswietlenie godziny w polu formularza
//zapis przypisania do pola formularza wyglada tak:
document.getElementById('zegar').innerHTML = godzina + ":" + minuta + ":" + sekunda;
//document.forms["zegarek"].elements["pokaz"].value = godzina + ":" + minuta + ":" + sekunda;
}
setInterval("zegar()",1000);
setInterval("zegar2()",1000);
setInterval("zegar3()",1000);
// -->


