<!--
function zkontroluj_email(adresa)
{
  re = /^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,3}$/;
  return adresa.search(re) == 0;
}

function ResizeTextArea(txtBox) 
{ 
nCols = txtBox.cols; 
sVal = txtBox.value; 
nVal = sVal.length; 
nRowCnt = 3; 

for (i=0;i<nVal;i++) 
{ if (sVal.charAt(i).charCodeAt(0) == 13) { nRowCnt +=1; } } 

if (nRowCnt < (nVal / nCols)) { nRowCnt = 1 + (nVal / nCols); } 
txtBox.rows = nRowCnt+1; 
} 

function winOp(link,width,height) {
	window.open(link, '', 'toolbar="no",scrollbars=yes,resizeable=yes,height=' + height + ',width=' + width + ',top=5,left=5');
}

function zkontroluj_email(adresa)
{
  re = /^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,3}$/;
  return adresa.search(re) == 0;
}

function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

function zmen_table() {
document.getElementById('row1').style.display = 'none';
document.getElementById('row2').style.display = 'none';
document.getElementById('row3').style.display = 'none';
document.getElementById('row4').style.display = 'none';
document.getElementById('row5').style.display = 'none';
if (document.kontakt.druh.value>1) {
document.getElementById('row1').style.display = 'block';
document.getElementById('row2').style.display = 'block';
document.getElementById('row3').style.display = 'block';
document.getElementById('row4').style.display = 'block';
document.getElementById('row5').style.display = 'block';
}
}

function check_dotaz() {
var write="";
if (document.kontakt.f_jmeno.value=='') write+="Vaše jméno\n";
if (document.kontakt.f_telefon.value=='') write+="Váš telefon\n";
if (document.kontakt.f_email.value=='') write+="Váš email\n";
if (document.kontakt.kontrolni_kod.value=='') write+="kontrolní kod\n";
if (document.kontakt.f_poznamka.value=='') write+="Váš dotaz na majitele ubytování\n";
if (!zkontroluj_email(document.kontakt.f_email.value)) write+="špatný formát emailu\n";

if (write!='')
{
alert ("Chybějící údaje\n\n" + write);
}
else
{
document.kontakt.submit();
}
}

function tiskni() {
window.print();
}

function change_overflow(layer,stav) { 

if (stav=='show') {
document.getElementById(layer).style.overflow="visible";
document.getElementById(layer).style.height="auto";
}

if (stav=='hide') {
document.getElementById(layer).style.overflow="hidden";
document.getElementById(layer).style.height="120px";
}

} 
//-->
