function checkComm(checkAll){
var msgKom = document.getElementById('errCom');
var blad = true;

var com = document.addCom.komentarz.value;
com = sTrim(com);

if(com.length == 0){
msgKom.style.display = 'block';
blad = false;
}
else{
msgKom.style.display = 'none';
blad = true;
}

if(checkAll == 1){
  var msgPodpis = document.getElementById('errPod'); 
  var msgKod = document.getElementById('errKod');


  var podpis = document.addCom.podpis.value;
  podpis = sTrim(podpis);

  var kod = document.addCom.kod.value;
  kod = sTrim(kod);

  

  if(podpis.length == 0){
  msgPodpis.style.display = 'block';
  blad = false;
  }
  else{
  msgPodpis.style.display = 'none';
  if(blad) blad = true;
  }
  
  if(kod.length <4){
  msgKod.style.display = 'block';
  blad = false;
  }
  else{
  msgKod.style.display = 'none';
  if(blad) blad = true;
  }
}

return blad;
}

function sTrim(el) {
	return el.replace(/^\s+|\s+$/g,"");
}
