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


function Otevri(item) {
	if (document.getElementById(item)) {
   obj=document.getElementById(item);
   visible=(obj.style.display!="none");
   if (visible) {
     obj.style.display="none";
   } else {
      obj.style.display="block";
   }
  }
}

function Aktivni(item) {
	if (document.getElementById(item)) {
   document.getElementById(item).className = "aktivni"; 
  }
}


function kontrola() {
	
 if (document.uprav.jmeno.value== ""){
			alert("Prosím, vložte své jméno");
    document.uprav.jmeno.focus();
    document.uprav.jmeno.select();
			return false;
			}
 if (document.uprav.email.value== ""){
			alert("Prosím, vložte svůj email");
    document.uprav.email.focus();
    document.uprav.email.select();
			return false;
			}

//	Kontrola e-mailu
	if ( document.uprav.email.value != "" ) {
		if (re.test(document.uprav.email.value) == 0) {
			alert ("E-mailová adresa není správná");
			document.uprav.email.focus();
			document.uprav.email.select();
			return false;
		}
	}
 if (document.uprav.telefon.value== ""){
			alert("Prosím, vložte svůj telefon");
    document.uprav.telefon.focus();
    document.uprav.telefon.select();
			return false;
			}



}
