// JavaScript Document
/**
 * main.js
 * @author  Mgr. Karel Pribyl, info@codekey.cz
 * @version 1.0.1 
 */  
 
function isEmpty(pole)
{
	if (pole.value =="") return  true 
	else  return false 
}

function showid(listID) { 
  listID.style.display="block"; 
} 
function show(bid) { 
    showid(document.getElementById(bid));  
} 

function hideid(listID) { 
  listID.style.display="none"; 
} 
function hide(bid) { 
    hideid(document.getElementById(bid));  
    //window.alert(bid);
} 

function openClose(elid, spanid, on, off)
{
  docid = document.getElementById(elid);
  if(docid.style.display == "none") showid(docid);
  else  hideid(docid);
  if(spanid != '')
  {
    docspanid = document.getElementById(spanid);
    if (docspanid.innerHTML   == on) docspanid.innerHTML = off;
    else docspanid.innerHTML = on;
  }
}


var textAlert = "";
function checkFormul(formul)
{
	var resultAlert = "";
	textAlert = "";
	resultAlert = checkValues(formul)
	if (resultAlert != "") 
	{
	    window.alert("Následující údaje jsou povinné: \n"+resultAlert);
	    return false;
	}
	else return true;
}
