function editor_gen(editor){
  editor.registerPlugin("TableOperations");
  
  editor.registerPlugin("SpellChecker");
  editor.registerPlugin("ContextMenu");
  /*editor.registerPlugin("CSS", {
    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"
                 }
      }
    ]
  });*/

  editor.config.pageStyle = "@import url(htmlarea.css);";
  //editor.registerPlugin("FullPage");
  setTimeout('delay_editor(editor)', 1000);
  return false;
}
 HTMLArea.loadPlugin("TableOperations");
 HTMLArea.loadPlugin("SpellChecker");
 HTMLArea.loadPlugin("ContextMenu");
 //HTMLArea.loadPlugin("CSS");
 //HTMLArea.loadPlugin("FullPage");
var editor1=null;
var editor2=null;
var editor3=null;
var editor4=null;
var editor5=null;
var editor6=null;
var editor_cnt=1;
var editor=null;
var editorHasFocus=false;
function initEditor(control_name) {
  //eval("editor"+editor_cnt+"= new HTMLArea(control_name)");
  //eval("editor_gen(editor"+editor_cnt+")");
  //editor_cnt++;
  editor=new HTMLArea(control_name);
  editor_gen(editor);
 }
 function delay_editor(editor){
	 editor.generate();
	 editor.focusEditor();
 }
