//Javascript (c) Copyright ESMEDIA a.s.

var path = "pic/";

if (document.images) {
     ukaz= new Image ();
     ukaz.src= "pic/ukaz.gif";

}

function PushOn(image_name) {
        if (document.images) {
         document.images[image_name].src = "pic/ukaz.gif";
 }
}
function PushOff(image_name) {
        if (document.images) {
 			document.images[image_name].src = "pic/sp.gif";
 }
}

function nahled(kc) {
	prewiev2 = window.open('obrazek.asp?kc='+kc,'nahledy','toolbar=no,status=no,scrollbars=no,location=no,menubar=no,directories=no,width=200,height=100,left=10,top=10');
	prewiev2.window.focus();
}

function kalendar(datumovka,od_do) {
	prewiev2 = window.open('kalendar.asp?datum='+datumovka+'&od_do='+od_do,'kalendar','toolbar=no,status=no,scrollbars=no,location=no,menubar=no,directories=no,width=200,height=170');
	prewiev2.window.focus();
}


function kontroladov() {
	oblast =document.vyber.oblast.selectedIndex;
	stredisko =document.vyber.stredisko.selectedIndex;

 if (oblast == 0 && stredisko == 0){
			alert("Vyberte si svou oblíbenou lokalitu nebo pobytové místo ");
			return false;
			}
 }

re = /^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,4}$/;

function kontrolaobj() {
	termin_od=document.vyber.termin_od.value;
	termin_do=document.vyber.termin_do.value;
	jmeno=document.vyber.jmeno.value;
	prijmeni=document.vyber.prijmeni.value;
	osob=document.vyber.osob.value;
	telefon=document.vyber.telefon.value;
	email=document.vyber.email.value;

 if (termin_od == ""){
			alert("Vložte termín OD");
    document.vyber.termin_od.focus();
    document.vyber.termin_od.select();
			return false;
			}
 if (termin_od == ""){
			alert("Vložte termín DO");
    document.vyber.termin_od.focus();
    document.vyber.termin_od.select();
			return false;
			}
 if (jmeno == ""){
			alert("Vložte prosím Vaše jméno");
    document.vyber.jmeno.focus();
    document.vyber.jmeno.select();
			return false;
			}
 if (prijmeni == ""){
			alert("Vložte prosím Vaše příjmení");
    document.vyber.prijmeni.focus();
    document.vyber.prijmeni.select();
			return false;
			}
 if (osob == ""){
			alert("Vložte prosím počet osob");
    document.vyber.osob.focus();
    document.vyber.osob.select();
			return false;
			}
 if (telefon == ""){
			alert("Vložte prosím Váš telefon");
    document.vyber.telefon.focus();
    document.vyber.telefon.select();
			return false;
			}
 if (email == ""){
			alert("Vložte prosím Váš e-mail");
    document.vyber.email.focus();
    document.vyber.email.select();
			return false;
			}


//	Kontrola e-mailu
	if ( document.vyber.email.value != "" ) {
		if (re.test(document.vyber.email.value) == 0) {
			alert ("E-mailová adresa není platná");
			document.vyber.email.focus();
			document.vyber.email.select();
			return false;
		}
	}

	if(!document.vyber.souhlas.checked) {
		 alert("Musíte souhlasit s důležitými informacemi a závaznými podmínkami");
	   document.vyber.souhlas.focus();
	   return false;
	}




 }

function kontrolahorska() {
	email=document.hsluzba.email.value;

 if (email == ""){
			alert("Vložte prosím Váš e-mail");
    document.hsluzba.email.focus();
    document.hsluzba.email.select();
			return false;
			}


//	Kontrola e-mailu
	if ( document.hsluzba.email.value != "" ) {
		if (re.test(document.hsluzba.email.value) == 0) {
			alert ("E-mailová adresa není platná");
			document.hsluzba.email.focus();
			document.hsluzba.email.select();
			return false;
		}
	}
 }

function akce() {
	prewiev2 = window.open('akce/hotbratislava/akce.html','akce','toolbar=no,status=no,scrollbars=no,location=no,menubar=no,directories=no,width=600,height=565');
	prewiev2.window.focus();
}
