// bytefx script - per fare il toggle degli appunti

function hideMsg (id, timeFlag, time)
{
  var div = document.getElementById( id );
  if ( timeFlag )
    setTimeout( "hideMsg( '"+id+"', false, 0 )", time );
  else
    div.style.display = 'none';
}

function toggleDiv( id )
{
  var div = document.getElementById( id );
  if ( div.style.display == 'none' )
    div.style.display = 'block';
  else
    div.style.display = 'none';
}

// disegna il tiny editor

function drawEditor ( edName, edContent, height )
{
  var sBasePath = "lib/editor/" ;
  var oFCKeditor = new FCKeditor( edName ) ;
  oFCKeditor.BasePath     = sBasePath ;
  oFCKeditor.ToolbarSet = 'Basic' ;
  oFCKeditor.Width = 405;
  oFCKeditor.Height       = height ;
  oFCKeditor.Value        = edContent ;
  oFCKeditor.Create() ;
}


function checkCancel ( nome, newLocat)
{
  // bisogna fargli dire di si o no...
  var answer = confirm ( "sei sicuro di voler cancellare " + nome );
  if ( answer )
  {
    window.location.href = newLocat;
  }
}