function show(id){
   document.getElementById(id).style.visibility="visible";
}

function hide(id){
   document.getElementById(id).style.visibility="hidden";
}

function is_email($co) {
   re = new RegExp("^(([a-zA-Z0-9_\.\-]+@([a-zA-Z0-9_\-]+[\.]{1})+[a-zA-Z]{2,4}|\"[^\"]{0,64}\"<[a-zA-Z0-9_\.\-]+@([a-zA-Z0-9_\-]+[\.]{1})+[a-zA-Z]{2,4}>|\"[^\"]{0,64}<[a-zA-Z0-9_\.\-]+@([a-zA-Z0-9_\-]+[\.]{1})+[a-zA-Z]{2,4}>\")[, ]*)*$");
   if((!re.test($co))|$co==""){
      return false;
  }else{
     return true;
  }
}

function zanechte_vzkaz(){
   $hlaska="Please complete the following information:\n";
   $povol="ANO";
   if(document.forms.vzkaz.text.value==''){
      $povol="NE";
      $hlaska=$hlaska+"\nnews";
   }
   if(!is_email(document.forms.vzkaz.email.value)){
      $povol="NE";
      $hlaska=$hlaska+"\ne-mail";
   }
   if($povol=="NE"){
      alert($hlaska);
      return false;
   }else{
      if(confirm("Do you want to send the message?")){
         return true;
      }else{
         return false;
      }
   }
}