function setDisplay(id,display){       
  document.getElementById(id).style.display = display;
}   
    
function confirmDelFile(id){
if(document.getElementById(id).checked == true){
  var smazat=confirm('Skutečně smazat tuto fotku? Fotka bude smazána po uložení změn');
    if(smazat==false)
      document.getElementById(id).checked = false;
  }  
}

function confirmDel(del_url,text){
  var smazat=confirm(text)
  if (smazat){
    window.location = del_url;
  }
}
        
function newFile(id,pocet_radku){
  if(pocet_radku!=<?php echo $max_fotek_pridej ?>)
  document.getElementById(id).style.display = 'block';
  if(pocet_radku==10)
    alert("Pozor! Přidávání více jak 10 fotek najednou může zabrat několik minut.");
  
  if(pocet_radku==<?php echo $max_fotek_pridej ?>){
    alert("Můžete přidat maximálně <?php echo $max_fotek_pridej ?> fotek najednou");
  }
}

function setHeightOfPicture(id,height){
  document.getElementById(id).style.height = height;
  return true; 
}

function insert(id, text1, text2) {
  texta = document.getElementById(id);
  s = texta.selectionStart; 
  k = texta.selectionEnd;
  texta.value = texta.value.substring(0,s) + text1 + texta.value.substring(s, k) + text2 + texta.value.substring(k, texta.value.length);
} 

function showItInBlock(id,id2,id3){       
  if(document.getElementById(id).style.display == 'none'){
    document.getElementById(id).style.display = 'block';
    document.getElementById(id2).style.display = 'inline';
    document.getElementById(id3).style.display = 'none';
    
  }else{
    document.getElementById(id).style.display = 'none';
    document.getElementById(id2).style.display = 'none';
    document.getElementById(id3).style.display = 'inline';
  }              
}

function showItInBubble(id,display){
  document.getElementById(id).style.display = display;       
}

function menuChange(id){
  document.getElementById(id).style.display = 'inline';       
}

function changeTextToBold(id,weight,decoration) {
  document.getElementById(id).style.fontWeight = weight;
  document.getElementById(id).style.textDecoration = decoration;
}

function linkIlusion(id) {
  document.getElementById(id).style.fontWeight = 'normal';
  document.getElementById(id).style.color = '#004180';
  document.getElementById(id).style.textDecoration = 'underline';
  document.getElementById(id).style.cursor = 'pointer';
}

function linkIlusionHover(id) {
  document.getElementById(id).style.fontWeight = 'normal';
  document.getElementById(id).style.color = '#aaaaaa';
  document.getElementById(id).style.textDecoration = 'underline';
  document.getElementById(id).style.cursor = 'pointer';
}

