//var isExistNote = 'false';
var existID;
var existEditID;

function display(note) {
  document.getElementById(note).style.display = 'block';
  //document.getElementById(note).style.visibility = 'visible';
  //document.getElementById('ta' + note).focus();
  
}


function displayNew(note, id) {
 
  document.getElementById('new' + note).style.display = 'block';
  
  if(existID != id) {
    var newFCKeditor = new FCKeditor('ta' + note);
    newFCKeditor.BasePath = "/fckeditor/";
    newFCKeditor.ToolbarSet = 'MyToolbar' ;
    newFCKeditor.Height = "250" ;
    newFCKeditor.ReplaceTextarea();
  
    existID = id;
  } 
  return false; 
}


function displayEdit(note, id) {
  document.getElementById(note).style.display = 'none'; 
  
  document.getElementById('edit' + note).style.display = 'block';
  
  if(existEditID != id) {
    var oFCKeditor = new FCKeditor('ta' + note);
    oFCKeditor.BasePath = "/fckeditor/";
    oFCKeditor.ToolbarSet = 'MyToolbar';
    oFCKeditor.Height = "250";
    oFCKeditor.ReplaceTextarea();
    
    existEditID = id;
  }
   
}
function displayChangeCat(note) {
  document.getElementById(note).style.display = 'none'; 
  document.getElementById('presun' + note).style.display = 'block';
  return false; 
}

function hide(note) {
  document.getElementById(note).style.display = 'none';
  return false;
}

function displayMenu(note){

  document.getElementById(note).style.display = 'block'; 
  
  return false;
}

function closeNote(note){

  document.getElementById(note).style.display = 'none';

}

function openRule(){
  window.open("http://poznamky.infoware.cz/rules.html","_blank","statusbar=no,menubar=no,toolbar=no,scrollbars=yes,width=635,height=620");
}
