
  var lista;
  var lista_id;
  var css_plugins_args;

  fccn_init();

  HTMLArea.loadPlugin("TableOperations");
  HTMLArea.loadPlugin("SpellChecker");
  HTMLArea.loadPlugin("CSS");

  function initDocument() {
  // cache these values as we need to pass it for both editors
    css_plugin_args = {
    combos : [
            { label: "Syntax",
                         // menu text       // CSS class
              options: { "None"           : "",
                         "Code" : "code",
                         "String" : "string",
                         "Comment" : "comment",
                         "Variable name" : "variable-name",
                         "Type" : "type",
                         "Reference" : "reference",
                         "Preprocessor" : "preprocessor",
                         "Keyword" : "keyword",
                         "Function name" : "function-name",
                         "Html tag" : "html-tag",
                         "Html italic" : "html-helper-italic",
                         "Warning" : "warning",
                         "Html bold" : "html-helper-bold"
                       },
              context: "pre"
            },
            { label: "Info",
              options: { "None"           : "",
                         "Quote"          : "quote",
                         "Highlight"      : "highlight",
                         "Deprecated"     : "deprecated"
                       }
            }
          ]
  };

  for(i = 0; i < lista_id; i++) {
    fccn_textarea_activa(lista[i]);
  }

};


function fccn_init() {
  lista = new Array();
  lista_id = 0;
}

function fccn_textarea_register(nome_elemento)
{
  lista[lista_id] = nome_elemento;
  lista_id++; 
};

function fccn_textarea_activa(nome_elemento)
{
  var editor = new HTMLArea(nome_elemento);
//  editor.registerPlugin(TableOperations);
//  editor.registerPlugin(SpellChecker);
//  editor.registerPlugin(CSS, css_plugin_args);

//  editor.config.pageStyle = "@import url(/themes/FCCN/style.css);";
  editor.generate();
};


