function emil(id,jm,dom2,dom1,param){
  if(dom1==''){
    dom1='cz';
  }
  adr=jm+'@'+dom2+'.'+dom1;
  href='mailto:'+adr;
  if(param){href+= '?'+param;}
  document.getElementById(id).href=href;
  document.getElementById(id).innerHTML=adr;
}



function i(id,w,h){
  sw=screen.width;
  sh=screen.height;
  wid=Math.min(w,sw);
  hei=Math.min(h,sh);
  tp=(sh-hei)/2;
  le=(sw-wid)/2;
  url='/index.php?i='+id+'&w='+w+'&h='+h;
  vla='width='+wid+',height='+hei+',toolbar=no, ';
  vla+='menubar=no, location=no, scrollbars=auto, resize=yes, ';
  vla+='top='+tp+', left='+le;
  window.open(url,'foto',vla);
}


var kam1;//global
function redir(kam){
  kam1=kam;
  setTimeout("redir1()",1000);
}
function redir1(){
  document.location=kam1;
}



function build(){
  hMainMin=400;

  if(document.getElementById('stred')){
    hMain=document.getElementById('stred').offsetHeight;
  }
  else{
    hMain=0;
  }

  if(0){
    a='Omluvte prosím tuto zprávu,\nmomentálně se testuje.\n';
    a+='hMain: '+hMain;
    alert(a);
  }


  if(hMain<hMainMin){
      document.getElementById('stred').style.height = hMainMin+'px';
  }
  setTimeout('build()',1000);
}



function petice_k_fo(){
  ret=true;
  
  if(document.getElementById('jmeno').value==''){
    alert('Vyplňte prosím jméno.');
    document.getElementById('jmeno').focus();
    ret=false;
  }

  else if(document.getElementById('prijmeni').value==''){
    alert('Vyplňte prosím příjmení.');
    document.getElementById('prijmeni').focus();
    ret=false;
  }

  else if(document.getElementById('ulice').value==''){
    alert('Vyplňte prosím ulici.');
    document.getElementById('ulice').focus();
    ret=false;
  }

  else if(document.getElementById('cp').value==''){
    alert('Vyplňte prosím číslo popisné domu, kde bydlíte.');
    document.getElementById('cp').focus();
    ret=false;
  }

  else if(document.getElementById('obec').value==''){
    alert('Vyplňte prosím obec, kde bydlíte.');
    document.getElementById('obec').focus();
    ret=false;
  }

  else if(document.getElementById('psc').value==''){
    alert('Vyplňte prosím poštovní směrovací číslo obce, kde bydlíte.');
    document.getElementById('psc').focus();
    ret=false;
  }

  return ret;
}