<!--
function showDetail(obsah) {
	det=window.open(obsah,'detail','scrollbars=no,width=500,height=350,screenX='+getCenterW(500)+',screenY='+getCenterH(350)+',top='+getCenterH(350)+',left='+getCenterW(500));
	det.focus();
}
function showDetailFlash(obsah,width,height) {
	det=window.open(obsah,'detail','scrollbars=no,width='+width+',height='+height+',screenX='+getCenterW(width)+',screenY='+getCenterH(height)+',top='+getCenterH(height)+',left='+getCenterW(width));
	det.focus();
}
function getCenterW(width) {
	return parseInt( eval( (screen.width-parseInt(width))/2 ) );
}
function getCenterH(height) {
	return parseInt( eval( (screen.height-parseInt(height))/2 ) );
}

function futureURL(cu,lng1,lng2) {
	var p=cu.indexOf("/".concat(lng1,"/"))+1;
	var part1=cu.substring(0,p);
	var part2=cu.substring(p+lng1.length,cu.length);
	return(part1.concat(lng2,part2));
}

function changeLng(lng1,lng2) {
	var current_url;
	current_url=location.href;
	location.replace(futureURL(current_url,lng1,lng2));
}

function goQuick(kam) {
	location.href=kam;
}

function show() {
	var vybrane=document.forms.fZajem.zajem.value;
	var pocet=document.forms.fZajem.zajem.options.length;
	for(i=1;i<pocet-1;i++) { //vse skryt
		eval("document.forms.fKalk"+i+".style.display='none'");
	}
	if(vybrane!='0') {//prvni polozka v seznamu je jen popisek
		eval("document.forms.fKalk"+vybrane+".style.display='inline'"); //zobrazit vybrane
		eval("document.forms.fKalk"+vybrane+".Kontaktni_osoba.focus()");
	}
	if(vybrane!='6') {
		document.forms.fKalk6.style.display='none';
	}
	if(vybrane=='0') {
		document.forms.fKalk6.style.display='inline';
	}
}

function isEmpty(str) {
   // Check whether string is empty.
   for (var intLoop = 0; intLoop < str.length; intLoop++)
      if (" " != str.charAt(intLoop))
         return false;
   return true;
}

function notValid(str) {
	if(str.indexOf('@')==-1) {
		return true;
	}
	else return false;
}

function checkRequired(f) {
	var strError = "";
	if (isEmpty(f.elements['Kontaktni_osoba'].value))
		strError += "kontaktní osoba\n";
	if (isEmpty(f.elements['Telefon'].value))
		strError += "telefon\n";
	if (isEmpty(f.elements['Email'].value) || notValid(f.elements['Email'].value))
		strError += "e-mail\n";
		
   if ("" != strError) {
      alert("Vyplňte prosím následující údaje:\n" + strError);
      return false;
   }
}
//-->