Zamiana skryptu edytora z editArea na CodeMirror.
authorzuber <marek@stepniowski.com>
Fri, 14 Aug 2009 12:05:20 +0000 (14:05 +0200)
committerzuber <marek@stepniowski.com>
Fri, 14 Aug 2009 12:05:20 +0000 (14:05 +0200)
136 files changed:
project/static/css/master.css
project/static/css/xmlcolors.css [new file with mode: 0644]
project/static/js/codemirror/codemirror.js [new file with mode: 0644]
project/static/js/codemirror/editor.js [new file with mode: 0644]
project/static/js/codemirror/parsexml.js [new file with mode: 0644]
project/static/js/codemirror/select.js [new file with mode: 0644]
project/static/js/codemirror/stringstream.js [new file with mode: 0644]
project/static/js/codemirror/tokenize.js [new file with mode: 0644]
project/static/js/codemirror/undo.js [new file with mode: 0644]
project/static/js/codemirror/util.js [new file with mode: 0644]
project/static/js/edit_area.css [deleted file]
project/static/js/edit_area.js [deleted file]
project/static/js/edit_area_compressor.php [deleted file]
project/static/js/edit_area_full.gz [deleted file]
project/static/js/edit_area_full.js [deleted file]
project/static/js/edit_area_full_with_plugins.gz [deleted file]
project/static/js/edit_area_full_with_plugins.js [deleted file]
project/static/js/edit_area_functions.js [deleted file]
project/static/js/edit_area_loader.js [deleted file]
project/static/js/elements_functions.js [deleted file]
project/static/js/highlight.js [deleted file]
project/static/js/images/autocompletion.gif [deleted file]
project/static/js/images/close.gif [deleted file]
project/static/js/images/fullscreen.gif [deleted file]
project/static/js/images/go_to_line.gif [deleted file]
project/static/js/images/help.gif [deleted file]
project/static/js/images/highlight.gif [deleted file]
project/static/js/images/load.gif [deleted file]
project/static/js/images/move.gif [deleted file]
project/static/js/images/newdocument.gif [deleted file]
project/static/js/images/opacity.png [deleted file]
project/static/js/images/processing.gif [deleted file]
project/static/js/images/redo.gif [deleted file]
project/static/js/images/reset_highlight.gif [deleted file]
project/static/js/images/save.gif [deleted file]
project/static/js/images/search.gif [deleted file]
project/static/js/images/smooth_selection.gif [deleted file]
project/static/js/images/spacer.gif [deleted file]
project/static/js/images/statusbar_resize.gif [deleted file]
project/static/js/images/undo.gif [deleted file]
project/static/js/images/word_wrap.gif [deleted file]
project/static/js/keyboard.js [deleted file]
project/static/js/langs/bg.js [deleted file]
project/static/js/langs/cs.js [deleted file]
project/static/js/langs/de.js [deleted file]
project/static/js/langs/dk.js [deleted file]
project/static/js/langs/en.js [deleted file]
project/static/js/langs/eo.js [deleted file]
project/static/js/langs/es.js [deleted file]
project/static/js/langs/fi.js [deleted file]
project/static/js/langs/fr.js [deleted file]
project/static/js/langs/hr.js [deleted file]
project/static/js/langs/it.js [deleted file]
project/static/js/langs/ja.js [deleted file]
project/static/js/langs/mk.js [deleted file]
project/static/js/langs/nl.js [deleted file]
project/static/js/langs/pl.js [deleted file]
project/static/js/langs/pt.js [deleted file]
project/static/js/langs/ru.js [deleted file]
project/static/js/langs/sk.js [deleted file]
project/static/js/langs/zh.js [deleted file]
project/static/js/license_apache.txt [deleted file]
project/static/js/license_bsd.txt [deleted file]
project/static/js/license_lgpl.txt [deleted file]
project/static/js/manage_area.js [deleted file]
project/static/js/plugins/charmap/charmap.js [deleted file]
project/static/js/plugins/charmap/css/charmap.css [deleted file]
project/static/js/plugins/charmap/images/charmap.gif [deleted file]
project/static/js/plugins/charmap/jscripts/map.js [deleted file]
project/static/js/plugins/charmap/langs/bg.js [deleted file]
project/static/js/plugins/charmap/langs/cs.js [deleted file]
project/static/js/plugins/charmap/langs/de.js [deleted file]
project/static/js/plugins/charmap/langs/dk.js [deleted file]
project/static/js/plugins/charmap/langs/en.js [deleted file]
project/static/js/plugins/charmap/langs/eo.js [deleted file]
project/static/js/plugins/charmap/langs/es.js [deleted file]
project/static/js/plugins/charmap/langs/fr.js [deleted file]
project/static/js/plugins/charmap/langs/hr.js [deleted file]
project/static/js/plugins/charmap/langs/it.js [deleted file]
project/static/js/plugins/charmap/langs/ja.js [deleted file]
project/static/js/plugins/charmap/langs/mk.js [deleted file]
project/static/js/plugins/charmap/langs/nl.js [deleted file]
project/static/js/plugins/charmap/langs/pl.js [deleted file]
project/static/js/plugins/charmap/langs/pt.js [deleted file]
project/static/js/plugins/charmap/langs/ru.js [deleted file]
project/static/js/plugins/charmap/langs/sk.js [deleted file]
project/static/js/plugins/charmap/langs/zh.js [deleted file]
project/static/js/plugins/charmap/popup.html [deleted file]
project/static/js/plugins/test/css/test.css [deleted file]
project/static/js/plugins/test/images/Thumbs.db [deleted file]
project/static/js/plugins/test/images/test.gif [deleted file]
project/static/js/plugins/test/langs/bg.js [deleted file]
project/static/js/plugins/test/langs/cs.js [deleted file]
project/static/js/plugins/test/langs/de.js [deleted file]
project/static/js/plugins/test/langs/dk.js [deleted file]
project/static/js/plugins/test/langs/en.js [deleted file]
project/static/js/plugins/test/langs/eo.js [deleted file]
project/static/js/plugins/test/langs/es.js [deleted file]
project/static/js/plugins/test/langs/fr.js [deleted file]
project/static/js/plugins/test/langs/hr.js [deleted file]
project/static/js/plugins/test/langs/it.js [deleted file]
project/static/js/plugins/test/langs/ja.js [deleted file]
project/static/js/plugins/test/langs/mk.js [deleted file]
project/static/js/plugins/test/langs/nl.js [deleted file]
project/static/js/plugins/test/langs/pl.js [deleted file]
project/static/js/plugins/test/langs/pt.js [deleted file]
project/static/js/plugins/test/langs/ru.js [deleted file]
project/static/js/plugins/test/langs/sk.js [deleted file]
project/static/js/plugins/test/langs/zh.js [deleted file]
project/static/js/plugins/test/test.js [deleted file]
project/static/js/plugins/test/test2.js [deleted file]
project/static/js/reg_syntax.js [deleted file]
project/static/js/reg_syntax/basic.js [deleted file]
project/static/js/reg_syntax/brainfuck.js [deleted file]
project/static/js/reg_syntax/c.js [deleted file]
project/static/js/reg_syntax/coldfusion.js [deleted file]
project/static/js/reg_syntax/cpp.js [deleted file]
project/static/js/reg_syntax/css.js [deleted file]
project/static/js/reg_syntax/html.js [deleted file]
project/static/js/reg_syntax/java.js [deleted file]
project/static/js/reg_syntax/js.js [deleted file]
project/static/js/reg_syntax/pas.js [deleted file]
project/static/js/reg_syntax/perl.js [deleted file]
project/static/js/reg_syntax/php.js [deleted file]
project/static/js/reg_syntax/python.js [deleted file]
project/static/js/reg_syntax/robotstxt.js [deleted file]
project/static/js/reg_syntax/ruby.js [deleted file]
project/static/js/reg_syntax/sql.js [deleted file]
project/static/js/reg_syntax/tsql.js [deleted file]
project/static/js/reg_syntax/vb.js [deleted file]
project/static/js/reg_syntax/xml.js [deleted file]
project/static/js/regexp.js [deleted file]
project/static/js/resize_area.js [deleted file]
project/static/js/search_replace.js [deleted file]
project/static/js/template.html [deleted file]
project/templates/explorer/file_xml.html

index a80c82b..7c38ea0 100644 (file)
@@ -62,10 +62,9 @@ label {
     display: block;
 }
 
     display: block;
 }
 
-textarea {
+#text_id {
     width: 480px;
     height: 480px;
     width: 480px;
     height: 480px;
-    padding: 5px 10px;
 }
 
 #file-text {
 }
 
 #file-text {
@@ -79,10 +78,10 @@ textarea {
 
 #images {
     float: left;
 
 #images {
     float: left;
-    width: 480px;
+    width: 49%;
     height: 480px;
     border: 1px solid #999;
     height: 480px;
     border: 1px solid #999;
-    padding: 5px 10px;
+/*    padding: 5px 10px;*/
     overflow-y: scroll;
     overflow-x: hidden;
 }
     overflow-y: scroll;
     overflow-x: hidden;
 }
@@ -98,6 +97,7 @@ textarea {
     content: '';
     clear: both;
 }
     content: '';
     clear: both;
 }
+
 p { 
     margin: 0;
 }
\ No newline at end of file
 p { 
     margin: 0;
 }
\ No newline at end of file
diff --git a/project/static/css/xmlcolors.css b/project/static/css/xmlcolors.css
new file mode 100644 (file)
index 0000000..aa26579
--- /dev/null
@@ -0,0 +1,51 @@
+.editbox {
+  margin: .4em;
+  padding: 0;
+  font-family: monospace;
+  font-size: 10pt;
+  color: black;
+}
+
+.editbox p {
+  margin: 0;
+}
+
+span.xml-tagname {
+  color: #A0B;
+}
+
+span.xml-attribute {
+  color: #281;
+}
+
+span.xml-punctuation {
+  color: black;
+}
+
+span.xml-attname {
+  color: #00F;
+}
+
+span.xml-comment {
+  color: #A70;
+}
+
+span.xml-cdata {
+  color: #48A;
+}
+
+span.xml-processing {
+  color: #999;
+}
+
+span.xml-entity {
+  color: #A22;
+}
+
+span.xml-error {
+  color: #F00;
+}
+
+span.xml-text {
+  color: black;
+}
diff --git a/project/static/js/codemirror/codemirror.js b/project/static/js/codemirror/codemirror.js
new file mode 100644 (file)
index 0000000..97e2657
--- /dev/null
@@ -0,0 +1,310 @@
+/* CodeMirror main module
+ *
+ * Implements the CodeMirror constructor and prototype, which take care
+ * of initializing the editor frame, and providing the outside interface.
+ */
+
+// The CodeMirrorConfig object is used to specify a default
+// configuration. If you specify such an object before loading this
+// file, the values you put into it will override the defaults given
+// below. You can also assign to it after loading.
+var CodeMirrorConfig = window.CodeMirrorConfig || {};
+
+var CodeMirror = (function(){
+  function setDefaults(object, defaults) {
+    for (var option in defaults) {
+      if (!object.hasOwnProperty(option))
+        object[option] = defaults[option];
+    }
+  }
+  function forEach(array, action) {
+    for (var i = 0; i < array.length; i++)
+      action(array[i]);
+  }
+
+  // These default options can be overridden by passing a set of
+  // options to a specific CodeMirror constructor. See manual.html for
+  // their meaning.
+  setDefaults(CodeMirrorConfig, {
+    stylesheet: "",
+    path: "",
+    parserfile: [],
+    basefiles: ["util.js", "stringstream.js", "select.js", "undo.js", "editor.js", "tokenize.js"],
+    iframeClass: null,
+    passDelay: 200,
+    passTime: 50,
+    continuousScanning: false,
+    saveFunction: null,
+    onChange: null,
+    undoDepth: 50,
+    undoDelay: 800,
+    disableSpellcheck: true,
+    textWrapping: true,
+    readOnly: false,
+    width: "100%",
+    height: "300px",
+    autoMatchParens: false,
+    parserConfig: null,
+    tabMode: "indent", // or "spaces", "default", "shift"
+    reindentOnLoad: false,
+    activeTokens: null,
+    cursorActivity: null,
+    lineNumbers: false,
+    indentUnit: 2
+  });
+
+  function wrapLineNumberDiv(place) {
+    return function(node) {
+      var container = document.createElement("DIV"),
+          nums = document.createElement("DIV"),
+          scroller = document.createElement("DIV");
+      container.style.position = "relative";
+      nums.style.position = "absolute";
+      nums.style.height = "100%";
+      if (nums.style.setExpression) {
+        try {nums.style.setExpression("height", "this.previousSibling.offsetHeight + 'px'");}
+        catch(e) {} // Seems to throw 'Not Implemented' on some IE8 versions
+      }
+      nums.style.top = "0px";
+      nums.style.overflow = "hidden";
+      place(container);
+      container.appendChild(node);
+      container.appendChild(nums);
+      scroller.className = "CodeMirror-line-numbers";
+      nums.appendChild(scroller);
+    }
+  }
+
+  function applyLineNumbers(frame) {
+    var win = frame.contentWindow, doc = win.document,
+        nums = frame.nextSibling, scroller = nums.firstChild;
+
+    var nextNum = 1, barWidth = null;
+    function sizeBar() {
+      if (!frame.offsetWidth || !win.Editor) {
+        for (var cur = frame; cur.parentNode; cur = cur.parentNode) {
+          if (cur != document) {
+            clearInterval(sizeInterval);
+            return;
+          }
+        }
+      }
+
+      if (nums.offsetWidth != barWidth) {
+        barWidth = nums.offsetWidth;
+        nums.style.left = "-" + (frame.parentNode.style.marginLeft = barWidth + "px");
+      }
+    }
+    function update() {
+      var diff = 20 + Math.max(doc.body.offsetHeight, frame.offsetHeight) - scroller.offsetHeight;
+      for (var n = Math.ceil(diff / 10); n > 0; n--) {
+        var div = document.createElement("DIV");
+        div.appendChild(document.createTextNode(nextNum++));
+        scroller.appendChild(div);
+      }
+      nums.scrollTop = doc.body.scrollTop || doc.documentElement.scrollTop || 0;
+    }
+    sizeBar();
+    update();
+    win.addEventHandler(win, "scroll", update);
+    win.addEventHandler(win, "resize", update);
+    var sizeInterval = setInterval(sizeBar, 500);
+  }
+
+  function CodeMirror(place, options) {
+    // Backward compatibility for deprecated options.
+    if (options.dumbTabs) options.tabMode = "spaces";
+    else if (options.normalTab) options.tabMode = "default";
+
+    // Use passed options, if any, to override defaults.
+    this.options = options = options || {};
+    setDefaults(options, CodeMirrorConfig);
+
+    var frame = this.frame = document.createElement("IFRAME");
+    if (options.iframeClass) frame.className = options.iframeClass;
+    frame.frameBorder = 0;
+    frame.src = "javascript:false;";
+    frame.style.border = "0";
+    frame.style.width = options.width;
+    frame.style.height = options.height;
+    // display: block occasionally suppresses some Firefox bugs, so we
+    // always add it, redundant as it sounds.
+    frame.style.display = "block";
+
+    if (place.appendChild) {
+      var node = place;
+      place = function(n){node.appendChild(n);};
+    }
+    if (options.lineNumbers) place = wrapLineNumberDiv(place);
+    place(frame);
+
+    // Link back to this object, so that the editor can fetch options
+    // and add a reference to itself.
+    frame.CodeMirror = this;
+    this.win = frame.contentWindow;
+
+    if (typeof options.parserfile == "string")
+      options.parserfile = [options.parserfile];
+    if (typeof options.stylesheet == "string")
+      options.stylesheet = [options.stylesheet];
+
+    var html = ["<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html><head>"];
+    // Hack to work around a bunch of IE8-specific problems.
+    html.push("<meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\"/>");
+    forEach(options.stylesheet, function(file) {
+      html.push("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + file + "\"/>");
+    });
+    forEach(options.basefiles.concat(options.parserfile), function(file) {
+      html.push("<script type=\"text/javascript\" src=\"" + options.path + file + "\"></script>");
+    });
+    html.push("</head><body style=\"border-width: 0;\" class=\"editbox\" spellcheck=\"" +
+              (options.disableSpellcheck ? "false" : "true") + "\"></body></html>");
+
+    var doc = this.win.document;
+    doc.open();
+    doc.write(html.join(""));
+    doc.close();
+  }
+
+  CodeMirror.prototype = {
+    init: function() {
+      if (this.options.initCallback) this.options.initCallback(this);
+      if (this.options.lineNumbers) applyLineNumbers(this.frame);
+      if (this.options.reindentOnLoad) this.reindent();
+    },
+
+    getCode: function() {return this.editor.getCode();},
+    setCode: function(code) {this.editor.importCode(code);},
+    selection: function() {return this.editor.selectedText();},
+    reindent: function() {this.editor.reindent();},
+    reindentSelection: function() {this.editor.reindentSelection(null);},
+
+    focus: function() {
+      this.win.focus();
+      if (this.editor.selectionSnapshot) // IE hack
+        this.win.select.selectCoords(this.win, this.editor.selectionSnapshot);
+    },
+    replaceSelection: function(text) {
+      this.focus();
+      this.editor.replaceSelection(text);
+      return true;
+    },
+    replaceChars: function(text, start, end) {
+      this.editor.replaceChars(text, start, end);
+    },
+    getSearchCursor: function(string, fromCursor) {
+      return this.editor.getSearchCursor(string, fromCursor);
+    },
+
+    undo: function() {this.editor.history.undo();},
+    redo: function() {this.editor.history.redo();},
+    historySize: function() {return this.editor.history.historySize();},
+    clearHistory: function() {this.editor.history.clear();},
+
+    grabKeys: function(callback, filter) {this.editor.grabKeys(callback, filter);},
+    ungrabKeys: function() {this.editor.ungrabKeys();},
+
+    setParser: function(name) {this.editor.setParser(name);},
+
+    cursorPosition: function(start) {
+      if (this.win.select.ie_selection) this.focus();
+      return this.editor.cursorPosition(start);
+    },
+    firstLine: function() {return this.editor.firstLine();},
+    lastLine: function() {return this.editor.lastLine();},
+    nextLine: function(line) {return this.editor.nextLine(line);},
+    prevLine: function(line) {return this.editor.prevLine(line);},
+    lineContent: function(line) {return this.editor.lineContent(line);},
+    setLineContent: function(line, content) {this.editor.setLineContent(line, content);},
+    insertIntoLine: function(line, position, content) {this.editor.insertIntoLine(line, position, content);},
+    selectLines: function(startLine, startOffset, endLine, endOffset) {
+      this.win.focus();
+      this.editor.selectLines(startLine, startOffset, endLine, endOffset);
+    },
+    nthLine: function(n) {
+      var line = this.firstLine();
+      for (; n > 1 && line !== false; n--)
+        line = this.nextLine(line);
+      return line;
+    },
+    lineNumber: function(line) {
+      var num = 0;
+      while (line !== false) {
+        num++;
+        line = this.prevLine(line);
+      }
+      return num;
+    },
+
+    // Old number-based line interface
+    jumpToLine: function(n) {
+      this.selectLines(this.nthLine(n), 0);
+      this.win.focus();
+    },
+    currentLine: function() {
+      return this.lineNumber(this.cursorPosition().line);
+    }
+  };
+
+  CodeMirror.InvalidLineHandle = {toString: function(){return "CodeMirror.InvalidLineHandle";}};
+
+  CodeMirror.replace = function(element) {
+    if (typeof element == "string")
+      element = document.getElementById(element);
+    return function(newElement) {
+      element.parentNode.replaceChild(newElement, element);
+    };
+  };
+
+  CodeMirror.fromTextArea = function(area, options) {
+    if (typeof area == "string")
+      area = document.getElementById(area);
+
+    options = options || {};
+    if (area.style.width && options.width == null)
+      options.width = area.style.width;
+    if (area.style.height && options.height == null)
+      options.height = area.style.height;
+    if (options.content == null) options.content = area.value;
+
+    if (area.form) {
+      function updateField() {
+        area.value = mirror.getCode();
+      }
+      if (typeof area.form.addEventListener == "function")
+        area.form.addEventListener("submit", updateField, false);
+      else
+        area.form.attachEvent("onsubmit", updateField);
+    }
+
+    function insert(frame) {
+      if (area.nextSibling)
+        area.parentNode.insertBefore(frame, area.nextSibling);
+      else
+        area.parentNode.appendChild(frame);
+    }
+
+    area.style.display = "none";
+    var mirror = new CodeMirror(insert, options);
+    return mirror;
+  };
+
+  CodeMirror.isProbablySupported = function() {
+    // This is rather awful, but can be useful.
+    var match;
+    if (window.opera)
+      return Number(window.opera.version()) >= 9.52;
+    else if (/Apple Computers, Inc/.test(navigator.vendor) && (match = navigator.userAgent.match(/Version\/(\d+(?:\.\d+)?)\./)))
+      return Number(match[1]) >= 3;
+    else if (document.selection && window.ActiveXObject && (match = navigator.userAgent.match(/MSIE (\d+(?:\.\d*)?)\b/)))
+      return Number(match[1]) >= 6;
+    else if (match = navigator.userAgent.match(/gecko\/(\d{8})/i))
+      return Number(match[1]) >= 20050901;
+    else if (match = navigator.userAgent.match(/AppleWebKit\/(\d+)/))
+      return Number(match[1]) >= 525;
+    else
+      return null;
+  };
+
+  return CodeMirror;
+})();
diff --git a/project/static/js/codemirror/editor.js b/project/static/js/codemirror/editor.js
new file mode 100644 (file)
index 0000000..b8b7abc
--- /dev/null
@@ -0,0 +1,1307 @@
+/* The Editor object manages the content of the editable frame. It
+ * catches events, colours nodes, and indents lines. This file also
+ * holds some functions for transforming arbitrary DOM structures into
+ * plain sequences of <span> and <br> elements
+ */
+
+// Make sure a string does not contain two consecutive 'collapseable'
+// whitespace characters.
+function makeWhiteSpace(n) {
+  var buffer = [], nb = true;
+  for (; n > 0; n--) {
+    buffer.push((nb || n == 1) ? nbsp : " ");
+    nb = !nb;
+  }
+  return buffer.join("");
+}
+
+// Create a set of white-space characters that will not be collapsed
+// by the browser, but will not break text-wrapping either.
+function fixSpaces(string) {
+  if (string.charAt(0) == " ") string = nbsp + string.slice(1);
+  return string.replace(/\t/g, function(){return makeWhiteSpace(indentUnit);})
+    .replace(/[ \u00a0]{2,}/g, function(s) {return makeWhiteSpace(s.length);});
+}
+
+function cleanText(text) {
+  return text.replace(/\u00a0/g, " ").replace(/\u200b/g, "");
+}
+
+// Create a SPAN node with the expected properties for document part
+// spans.
+function makePartSpan(value, doc) {
+  var text = value;
+  if (value.nodeType == 3) text = value.nodeValue;
+  else value = doc.createTextNode(text);
+
+  var span = doc.createElement("SPAN");
+  span.isPart = true;
+  span.appendChild(value);
+  span.currentText = text;
+  return span;
+}
+
+// On webkit, when the last BR of the document does not have text
+// behind it, the cursor can not be put on the line after it. This
+// makes pressing enter at the end of the document occasionally do
+// nothing (or at least seem to do nothing). To work around it, this
+// function makes sure the document ends with a span containing a
+// zero-width space character. The traverseDOM iterator filters such
+// character out again, so that the parsers won't see them. This
+// function is called from a few strategic places to make sure the
+// zwsp is restored after the highlighting process eats it.
+var webkitLastLineHack = webkit ?
+  function(container) {
+    var last = container.lastChild;
+    if (!last || !last.isPart || last.textContent != "\u200b")
+      container.appendChild(makePartSpan("\u200b", container.ownerDocument));
+  } : function() {};
+
+var Editor = (function(){
+  // The HTML elements whose content should be suffixed by a newline
+  // when converting them to flat text.
+  var newlineElements = {"P": true, "DIV": true, "LI": true};
+
+  function asEditorLines(string) {
+    var tab = makeWhiteSpace(indentUnit);
+    return map(string.replace(/\t/g, tab).replace(/\u00a0/g, " ").replace(/\r\n?/g, "\n").split("\n"), fixSpaces);
+  }
+
+  // Helper function for traverseDOM. Flattens an arbitrary DOM node
+  // into an array of textnodes and <br> tags.
+  function simplifyDOM(root, atEnd) {
+    var doc = root.ownerDocument;
+    var result = [];
+    var leaving = true;
+
+    function simplifyNode(node, top) {
+      if (node.nodeType == 3) {
+        var text = node.nodeValue = fixSpaces(node.nodeValue.replace(/[\r\u200b]/g, "").replace(/\n/g, " "));
+        if (text.length) leaving = false;
+        result.push(node);
+      }
+      else if (node.nodeName == "BR" && node.childNodes.length == 0) {
+        leaving = true;
+        result.push(node);
+      }
+      else {
+        forEach(node.childNodes, simplifyNode);
+        if (!leaving && newlineElements.hasOwnProperty(node.nodeName)) {
+          leaving = true;
+          if (!atEnd || !top)
+            result.push(doc.createElement("BR"));
+        }
+      }
+    }
+
+    simplifyNode(root, true);
+    return result;
+  }
+
+  // Creates a MochiKit-style iterator that goes over a series of DOM
+  // nodes. The values it yields are strings, the textual content of
+  // the nodes. It makes sure that all nodes up to and including the
+  // one whose text is being yielded have been 'normalized' to be just
+  // <span> and <br> elements.
+  // See the story.html file for some short remarks about the use of
+  // continuation-passing style in this iterator.
+  function traverseDOM(start){
+    function yield(value, c){cc = c; return value;}
+    function push(fun, arg, c){return function(){return fun(arg, c);};}
+    function stop(){cc = stop; throw StopIteration;};
+    var cc = push(scanNode, start, stop);
+    var owner = start.ownerDocument;
+    var nodeQueue = [];
+
+    // Create a function that can be used to insert nodes after the
+    // one given as argument.
+    function pointAt(node){
+      var parent = node.parentNode;
+      var next = node.nextSibling;
+      return function(newnode) {
+        parent.insertBefore(newnode, next);
+      };
+    }
+    var point = null;
+
+    // Insert a normalized node at the current point. If it is a text
+    // node, wrap it in a <span>, and give that span a currentText
+    // property -- this is used to cache the nodeValue, because
+    // directly accessing nodeValue is horribly slow on some browsers.
+    // The dirty property is used by the highlighter to determine
+    // which parts of the document have to be re-highlighted.
+    function insertPart(part){
+      var text = "\n";
+      if (part.nodeType == 3) {
+        select.snapshotChanged();
+        part = makePartSpan(part, owner);
+        text = part.currentText;
+      }
+      part.dirty = true;
+      nodeQueue.push(part);
+      point(part);
+      return text;
+    }
+
+    // Extract the text and newlines from a DOM node, insert them into
+    // the document, and yield the textual content. Used to replace
+    // non-normalized nodes.
+    function writeNode(node, c, end) {
+      var toYield = [];
+      forEach(simplifyDOM(node, end), function(part) {
+        toYield.push(insertPart(part));
+      });
+      return yield(toYield.join(""), c);
+    }
+
+    // Check whether a node is a normalized <span> element.
+    function partNode(node){
+      if (node.isPart && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {
+        node.currentText = node.firstChild.nodeValue;
+        return !/[\n\t\r]/.test(node.currentText);
+      }
+      return false;
+    }
+
+    // Handle a node. Add its successor to the continuation if there
+    // is one, find out whether the node is normalized. If it is,
+    // yield its content, otherwise, normalize it (writeNode will take
+    // care of yielding).
+    function scanNode(node, c){
+      if (node.nextSibling)
+        c = push(scanNode, node.nextSibling, c);
+
+      if (partNode(node)){
+        nodeQueue.push(node);
+        return yield(node.currentText, c);
+      }
+      else if (node.nodeName == "BR") {
+        nodeQueue.push(node);
+        return yield("\n", c);
+      }
+      else {
+        var end = !node.nextSibling;
+        point = pointAt(node);
+        removeElement(node);
+        return writeNode(node, c, end);
+      }
+    }
+
+    // MochiKit iterators are objects with a next function that
+    // returns the next value or throws StopIteration when there are
+    // no more values.
+    return {next: function(){return cc();}, nodes: nodeQueue};
+  }
+
+  // Determine the text size of a processed node.
+  function nodeSize(node) {
+    if (node.nodeName == "BR")
+      return 1;
+    else
+      return node.currentText.length;
+  }
+
+  // Search backwards through the top-level nodes until the next BR or
+  // the start of the frame.
+  function startOfLine(node) {
+    while (node && node.nodeName != "BR") node = node.previousSibling;
+    return node;
+  }
+  function endOfLine(node, container) {
+    if (!node) node = container.firstChild;
+    else if (node.nodeName == "BR") node = node.nextSibling;
+
+    while (node && node.nodeName != "BR") node = node.nextSibling;
+    return node;
+  }
+
+  function time() {return new Date().getTime();}
+
+  // Replace all DOM nodes in the current selection with new ones.
+  // Needed to prevent issues in IE where the old DOM nodes can be
+  // pasted back into the document, still holding their old undo
+  // information.
+  function scrubPasted(container, start, start2) {
+    var end = select.selectionTopNode(container, true),
+        doc = container.ownerDocument;
+    if (start != null && start.parentNode != container) start = start2;
+    if (start === false) start = null;
+    if (start == end || !end || !container.firstChild) return;
+
+    var clear = traverseDOM(start ? start.nextSibling : container.firstChild);
+    while (end.parentNode == container) try{clear.next();}catch(e){break;}
+    forEach(clear.nodes, function(node) {
+      var newNode = node.nodeName == "BR" ? doc.createElement("BR") : makePartSpan(node.currentText, doc);
+      container.replaceChild(newNode, node);
+    });
+  }
+
+  // Client interface for searching the content of the editor. Create
+  // these by calling CodeMirror.getSearchCursor. To use, call
+  // findNext on the resulting object -- this returns a boolean
+  // indicating whether anything was found, and can be called again to
+  // skip to the next find. Use the select and replace methods to
+  // actually do something with the found locations.
+  function SearchCursor(editor, string, fromCursor) {
+    this.editor = editor;
+    this.history = editor.history;
+    this.history.commit();
+
+    // Are we currently at an occurrence of the search string?
+    this.atOccurrence = false;
+    // The object stores a set of nodes coming after its current
+    // position, so that when the current point is taken out of the
+    // DOM tree, we can still try to continue.
+    this.fallbackSize = 15;
+    var cursor;
+    // Start from the cursor when specified and a cursor can be found.
+    if (fromCursor && (cursor = select.cursorPos(this.editor.container))) {
+      this.line = cursor.node;
+      this.offset = cursor.offset;
+    }
+    else {
+      this.line = null;
+      this.offset = 0;
+    }
+    this.valid = !!string;
+
+    // Create a matcher function based on the kind of string we have.
+    var target = string.split("\n"), self = this;
+    this.matches = (target.length == 1) ?
+      // For one-line strings, searching can be done simply by calling
+      // indexOf on the current line.
+      function() {
+        var match = cleanText(self.history.textAfter(self.line).slice(self.offset)).indexOf(string);
+        if (match > -1)
+          return {from: {node: self.line, offset: self.offset + match},
+                  to: {node: self.line, offset: self.offset + match + string.length}};
+      } :
+      // Multi-line strings require internal iteration over lines, and
+      // some clunky checks to make sure the first match ends at the
+      // end of the line and the last match starts at the start.
+      function() {
+        var firstLine = cleanText(self.history.textAfter(self.line).slice(self.offset));
+        var match = firstLine.lastIndexOf(target[0]);
+        if (match == -1 || match != firstLine.length - target[0].length)
+          return false;
+        var startOffset = self.offset + match;
+
+        var line = self.history.nodeAfter(self.line);
+        for (var i = 1; i < target.length - 1; i++) {
+          if (cleanText(self.history.textAfter(line)) != target[i])
+            return false;
+          line = self.history.nodeAfter(line);
+        }
+
+        if (cleanText(self.history.textAfter(line)).indexOf(target[target.length - 1]) != 0)
+          return false;
+
+        return {from: {node: self.line, offset: startOffset},
+                to: {node: line, offset: target[target.length - 1].length}};
+      };
+  }
+
+  SearchCursor.prototype = {
+    findNext: function() {
+      if (!this.valid) return false;
+      this.atOccurrence = false;
+      var self = this;
+
+      // Go back to the start of the document if the current line is
+      // no longer in the DOM tree.
+      if (this.line && !this.line.parentNode) {
+        this.line = null;
+        this.offset = 0;
+      }
+
+      // Set the cursor's position one character after the given
+      // position.
+      function saveAfter(pos) {
+        if (self.history.textAfter(pos.node).length > pos.offset) {
+          self.line = pos.node;
+          self.offset = pos.offset + 1;
+        }
+        else {
+          self.line = self.history.nodeAfter(pos.node);
+          self.offset = 0;
+        }
+      }
+
+      while (true) {
+        var match = this.matches();
+        // Found the search string.
+        if (match) {
+          this.atOccurrence = match;
+          saveAfter(match.from);
+          return true;
+        }
+        this.line = this.history.nodeAfter(this.line);
+        this.offset = 0;
+        // End of document.
+        if (!this.line) {
+          this.valid = false;
+          return false;
+        }
+      }
+    },
+
+    select: function() {
+      if (this.atOccurrence) {
+        select.setCursorPos(this.editor.container, this.atOccurrence.from, this.atOccurrence.to);
+        select.scrollToCursor(this.editor.container);
+      }
+    },
+
+    replace: function(string) {
+      if (this.atOccurrence) {
+        var end = this.editor.replaceRange(this.atOccurrence.from, this.atOccurrence.to, string);
+        this.line = end.node;
+        this.offset = end.offset;
+        this.atOccurrence = false;
+      }
+    }
+  };
+
+  // The Editor object is the main inside-the-iframe interface.
+  function Editor(options) {
+    this.options = options;
+    window.indentUnit = options.indentUnit;
+    this.parent = parent;
+    this.doc = document;
+    var container = this.container = this.doc.body;
+    this.win = window;
+    this.history = new History(container, options.undoDepth, options.undoDelay,
+                               this, options.onChange);
+    var self = this;
+
+    if (!Editor.Parser)
+      throw "No parser loaded.";
+    if (options.parserConfig && Editor.Parser.configure)
+      Editor.Parser.configure(options.parserConfig);
+
+    if (!options.readOnly)
+      select.setCursorPos(container, {node: null, offset: 0});
+
+    this.dirty = [];
+    if (options.content)
+      this.importCode(options.content);
+    else // FF acts weird when the editable document is completely empty
+      container.appendChild(this.doc.createElement("BR"));
+
+    if (!options.readOnly) {
+      if (options.continuousScanning !== false) {
+        this.scanner = this.documentScanner(options.passTime);
+        this.delayScanning();
+      }
+
+      function setEditable() {
+        // In IE, designMode frames can not run any scripts, so we use
+        // contentEditable instead.
+        if (document.body.contentEditable != undefined && internetExplorer)
+          document.body.contentEditable = "true";
+        else
+          document.designMode = "on";
+
+        document.documentElement.style.borderWidth = "0";
+        if (!options.textWrapping)
+          container.style.whiteSpace = "nowrap";
+      }
+
+      // If setting the frame editable fails, try again when the user
+      // focus it (happens when the frame is not visible on
+      // initialisation, in Firefox).
+      try {
+        setEditable();
+      }
+      catch(e) {
+        var focusEvent = addEventHandler(document, "focus", function() {
+          focusEvent();
+          setEditable();
+        }, true);
+      }
+
+      addEventHandler(document, "keydown", method(this, "keyDown"));
+      addEventHandler(document, "keypress", method(this, "keyPress"));
+      addEventHandler(document, "keyup", method(this, "keyUp"));
+
+      function cursorActivity() {self.cursorActivity(false);}
+      addEventHandler(document.body, "mouseup", cursorActivity);
+      addEventHandler(document.body, "paste", function(event) {
+        cursorActivity();
+        if (internetExplorer) {
+          var text = null;
+          try {text = window.clipboardData.getData("Text");}catch(e){}
+          if (text != null) {
+            self.replaceSelection(text);
+            event.stop();
+          }
+          else {
+            var start = select.selectionTopNode(self.container, true),
+                start2 = start && start.previousSibling;
+            setTimeout(function(){scrubPasted(self.container, start, start2);}, 0);
+          }
+        }
+      });
+      addEventHandler(document.body, "cut", cursorActivity);
+
+      if (this.options.autoMatchParens)
+        addEventHandler(document.body, "click", method(this, "scheduleParenBlink"));
+    }
+    else if (!options.textWrapping) {
+      container.style.whiteSpace = "nowrap";
+    }
+  }
+
+  function isSafeKey(code) {
+    return (code >= 16 && code <= 18) || // shift, control, alt
+           (code >= 33 && code <= 40); // arrows, home, end
+  }
+
+  Editor.prototype = {
+    // Import a piece of code into the editor.
+    importCode: function(code) {
+      this.history.push(null, null, asEditorLines(code));
+      this.history.reset();
+    },
+
+    // Extract the code from the editor.
+    getCode: function() {
+      if (!this.container.firstChild)
+        return "";
+
+      var accum = [];
+      select.markSelection(this.win);
+      forEach(traverseDOM(this.container.firstChild), method(accum, "push"));
+      webkitLastLineHack(this.container);
+      select.selectMarked();
+      return cleanText(accum.join(""));
+    },
+
+    checkLine: function(node) {
+      if (node === false || !(node == null || node.parentNode == this.container))
+        throw parent.CodeMirror.InvalidLineHandle;
+    },
+
+    cursorPosition: function(start) {
+      if (start == null) start = true;
+      var pos = select.cursorPos(this.container, start);
+      if (pos) return {line: pos.node, character: pos.offset};
+      else return {line: null, character: 0};
+    },
+
+    firstLine: function() {
+      return null;
+    },
+
+    lastLine: function() {
+      if (this.container.lastChild) return startOfLine(this.container.lastChild);
+      else return null;
+    },
+
+    nextLine: function(line) {
+      this.checkLine(line);
+      var end = endOfLine(line, this.container);
+      return end || false;
+    },
+
+    prevLine: function(line) {
+      this.checkLine(line);
+      if (line == null) return false;
+      return startOfLine(line.previousSibling);
+    },
+
+    selectLines: function(startLine, startOffset, endLine, endOffset) {
+      this.checkLine(startLine);
+      var start = {node: startLine, offset: startOffset}, end = null;
+      if (endOffset !== undefined) {
+        this.checkLine(endLine);
+        end = {node: endLine, offset: endOffset};
+      }
+      select.setCursorPos(this.container, start, end);
+      select.scrollToCursor(this.container);
+    },
+
+    lineContent: function(line) {
+      this.checkLine(line);
+      var accum = [];
+      for (line = line ? line.nextSibling : this.container.firstChild;
+           line && line.nodeName != "BR"; line = line.nextSibling)
+        accum.push(nodeText(line));
+      return cleanText(accum.join(""));
+    },
+
+    setLineContent: function(line, content) {
+      this.history.commit();
+      this.replaceRange({node: line, offset: 0},
+                        {node: line, offset: this.history.textAfter(line).length},
+                        content);
+      this.addDirtyNode(line);
+      this.scheduleHighlight();
+    },
+
+    insertIntoLine: function(line, position, content) {
+      var before = null;
+      if (position == "end") {
+        before = endOfLine(line, this.container);
+      }
+      else {
+        for (var cur = line ? line.nextSibling : this.container.firstChild; cur; cur = cur.nextSibling) {
+          if (position == 0) {
+            before = cur;
+            break;
+          }
+          var text = (cur.innerText || cur.textContent || cur.nodeValue || "");
+          if (text.length > position) {
+            before = cur.nextSibling;
+            content = text.slice(0, position) + content + text.slice(position);
+            removeElement(cur);
+            break;
+          }
+          position -= text.length;
+        }
+      }
+
+      var lines = asEditorLines(content), doc = this.container.ownerDocument;
+      for (var i = 0; i < lines.length; i++) {
+        if (i > 0) this.container.insertBefore(doc.createElement("BR"), before);
+        this.container.insertBefore(makePartSpan(lines[i], doc), before);
+      }
+      this.addDirtyNode(line);
+      this.scheduleHighlight();
+    },
+
+    // Retrieve the selected text.
+    selectedText: function() {
+      var h = this.history;
+      h.commit();
+
+      var start = select.cursorPos(this.container, true),
+          end = select.cursorPos(this.container, false);
+      if (!start || !end) return "";
+
+      if (start.node == end.node)
+        return h.textAfter(start.node).slice(start.offset, end.offset);
+
+      var text = [h.textAfter(start.node).slice(start.offset)];
+      for (var pos = h.nodeAfter(start.node); pos != end.node; pos = h.nodeAfter(pos))
+        text.push(h.textAfter(pos));
+      text.push(h.textAfter(end.node).slice(0, end.offset));
+      return cleanText(text.join("\n"));
+    },
+
+    // Replace the selection with another piece of text.
+    replaceSelection: function(text) {
+      this.history.commit();
+      var start = select.cursorPos(this.container, true),
+          end = select.cursorPos(this.container, false);
+      if (!start || !end) return;
+
+      end = this.replaceRange(start, end, text);
+      select.setCursorPos(this.container, start, end);
+    },
+
+    replaceRange: function(from, to, text) {
+      var lines = asEditorLines(text);
+      lines[0] = this.history.textAfter(from.node).slice(0, from.offset) + lines[0];
+      var lastLine = lines[lines.length - 1];
+      lines[lines.length - 1] = lastLine + this.history.textAfter(to.node).slice(to.offset);
+      var end = this.history.nodeAfter(to.node);
+      this.history.push(from.node, end, lines);
+      return {node: this.history.nodeBefore(end),
+              offset: lastLine.length};
+    },
+
+    getSearchCursor: function(string, fromCursor) {
+      return new SearchCursor(this, string, fromCursor);
+    },
+
+    // Re-indent the whole buffer
+    reindent: function() {
+      if (this.container.firstChild)
+        this.indentRegion(null, this.container.lastChild);
+    },
+
+    reindentSelection: function(direction) {
+      if (!select.somethingSelected(this.win)) {
+        this.indentAtCursor(direction);
+      }
+      else {
+        var start = select.selectionTopNode(this.container, true),
+            end = select.selectionTopNode(this.container, false);
+        if (start === false || end === false) return;
+        this.indentRegion(start, end, direction);
+      }
+    },
+
+    grabKeys: function(eventHandler, filter) {
+      this.frozen = eventHandler;
+      this.keyFilter = filter;
+    },
+    ungrabKeys: function() {
+      this.frozen = "leave";
+      this.keyFilter = null;
+    },
+
+    setParser: function(name) {
+      Editor.Parser = window[name];
+      if (this.container.firstChild) {
+        forEach(this.container.childNodes, function(n) {
+          if (n.nodeType != 3) n.dirty = true;
+        });
+        this.addDirtyNode(this.firstChild);
+        this.scheduleHighlight();
+      }
+    },
+
+    // Intercept enter and tab, and assign their new functions.
+    keyDown: function(event) {
+      if (this.frozen == "leave") this.frozen = null;
+      if (this.frozen && (!this.keyFilter || this.keyFilter(event.keyCode))) {
+        event.stop();
+        this.frozen(event);
+        return;
+      }
+
+      var code = event.keyCode;
+      // Don't scan when the user is typing.
+      this.delayScanning();
+      // Schedule a paren-highlight event, if configured.
+      if (this.options.autoMatchParens)
+        this.scheduleParenBlink();
+
+      // The variouschecks for !altKey are there because AltGr sets both
+      // ctrlKey and altKey to true, and should not be recognised as
+      // Control.
+      if (code == 13) { // enter
+        if (event.ctrlKey && !event.altKey) {
+          this.reparseBuffer();
+        }
+        else {
+          select.insertNewlineAtCursor(this.win);
+          this.indentAtCursor();
+          select.scrollToCursor(this.container);
+        }
+        event.stop();
+      }
+      else if (code == 9 && this.options.tabMode != "default") { // tab
+        this.handleTab(!event.ctrlKey && !event.shiftKey);
+        event.stop();
+      }
+      else if (code == 32 && event.shiftKey && this.options.tabMode == "default") { // space
+        this.handleTab(true);
+        event.stop();
+      }
+      else if (code == 36 && !event.shiftKey && !event.ctrlKey) { // home
+        if (this.home())
+          event.stop();
+      }
+      else if ((code == 219 || code == 221) && event.ctrlKey && !event.altKey) { // [, ]
+        this.blinkParens(event.shiftKey);
+        event.stop();
+      }
+      else if (event.metaKey && !event.shiftKey && (code == 37 || code == 39)) { // Meta-left/right
+        var cursor = select.selectionTopNode(this.container);
+        if (cursor === false || !this.container.firstChild) return;
+
+        if (code == 37) select.focusAfterNode(startOfLine(cursor), this.container);
+        else {
+          var end = endOfLine(cursor, this.container);
+          select.focusAfterNode(end ? end.previousSibling : this.container.lastChild, this.container);
+        }
+        event.stop();
+      }
+      else if ((event.ctrlKey || event.metaKey) && !event.altKey) {
+        if ((event.shiftKey && code == 90) || code == 89) { // shift-Z, Y
+          select.scrollToNode(this.history.redo());
+          event.stop();
+        }
+        else if (code == 90 || (safari && code == 8)) { // Z, backspace
+          select.scrollToNode(this.history.undo());
+          event.stop();
+        }
+        else if (code == 83 && this.options.saveFunction) { // S
+          this.options.saveFunction();
+          event.stop();
+        }
+      }
+    },
+
+    // Check for characters that should re-indent the current line,
+    // and prevent Opera from handling enter and tab anyway.
+    keyPress: function(event) {
+      var electric = Editor.Parser.electricChars, self = this;
+      // Hack for Opera, and Firefox on OS X, in which stopping a
+      // keydown event does not prevent the associated keypress event
+      // from happening, so we have to cancel enter and tab again
+      // here.
+      if ((this.frozen && (!this.keyFilter || this.keyFilter(event.keyCode))) ||
+          event.code == 13 || (event.code == 9 && this.options.tabMode != "default") ||
+          (event.keyCode == 32 && event.shiftKey && this.options.tabMode == "default"))
+        event.stop();
+      else if (electric && electric.indexOf(event.character) != -1)
+        this.parent.setTimeout(function(){self.indentAtCursor(null);}, 0);
+    },
+
+    // Mark the node at the cursor dirty when a non-safe key is
+    // released.
+    keyUp: function(event) {
+      this.cursorActivity(isSafeKey(event.keyCode));
+    },
+
+    // Indent the line following a given <br>, or null for the first
+    // line. If given a <br> element, this must have been highlighted
+    // so that it has an indentation method. Returns the whitespace
+    // element that has been modified or created (if any).
+    indentLineAfter: function(start, direction) {
+      // whiteSpace is the whitespace span at the start of the line,
+      // or null if there is no such node.
+      var whiteSpace = start ? start.nextSibling : this.container.firstChild;
+      if (whiteSpace && !hasClass(whiteSpace, "whitespace"))
+        whiteSpace = null;
+
+      // Sometimes the start of the line can influence the correct
+      // indentation, so we retrieve it.
+      var firstText = whiteSpace ? whiteSpace.nextSibling : (start ? start.nextSibling : this.container.firstChild);
+      var nextChars = (start && firstText && firstText.currentText) ? firstText.currentText : "";
+
+      // Ask the lexical context for the correct indentation, and
+      // compute how much this differs from the current indentation.
+      var newIndent = 0, curIndent = whiteSpace ? whiteSpace.currentText.length : 0;
+      if (direction != null && this.options.tabMode == "shift")
+        newIndent = direction ? curIndent + indentUnit : Math.max(0, curIndent - indentUnit)
+      else if (start)
+        newIndent = start.indentation(nextChars, curIndent, direction);
+      else if (Editor.Parser.firstIndentation)
+        newIndent = Editor.Parser.firstIndentation(nextChars, curIndent, direction);
+      var indentDiff = newIndent - curIndent;
+
+      // If there is too much, this is just a matter of shrinking a span.
+      if (indentDiff < 0) {
+        if (newIndent == 0) {
+          if (firstText) select.snapshotMove(whiteSpace.firstChild, firstText.firstChild, 0);
+          removeElement(whiteSpace);
+          whiteSpace = null;
+        }
+        else {
+          select.snapshotMove(whiteSpace.firstChild, whiteSpace.firstChild, indentDiff, true);
+          whiteSpace.currentText = makeWhiteSpace(newIndent);
+          whiteSpace.firstChild.nodeValue = whiteSpace.currentText;
+        }
+      }
+      // Not enough...
+      else if (indentDiff > 0) {
+        // If there is whitespace, we grow it.
+        if (whiteSpace) {
+          whiteSpace.currentText = makeWhiteSpace(newIndent);
+          whiteSpace.firstChild.nodeValue = whiteSpace.currentText;
+        }
+        // Otherwise, we have to add a new whitespace node.
+        else {
+          whiteSpace = makePartSpan(makeWhiteSpace(newIndent), this.doc);
+          whiteSpace.className = "whitespace";
+          if (start) insertAfter(whiteSpace, start);
+          else this.container.insertBefore(whiteSpace, this.container.firstChild);
+        }
+        if (firstText) select.snapshotMove(firstText.firstChild, whiteSpace.firstChild, curIndent, false, true);
+      }
+      if (indentDiff != 0) this.addDirtyNode(start);
+      return whiteSpace;
+    },
+
+    // Re-highlight the selected part of the document.
+    highlightAtCursor: function() {
+      var pos = select.selectionTopNode(this.container, true);
+      var to = select.selectionTopNode(this.container, false);
+      if (pos === false || to === false) return;
+
+      select.markSelection(this.win);
+      if (this.highlight(pos, endOfLine(to, this.container), true, 20) === false)
+        return false;
+      select.selectMarked();
+      return true;
+    },
+
+    // When tab is pressed with text selected, the whole selection is
+    // re-indented, when nothing is selected, the line with the cursor
+    // is re-indented.
+    handleTab: function(direction) {
+      if (this.options.tabMode == "spaces")
+        select.insertTabAtCursor(this.win);
+      else
+        this.reindentSelection(direction);
+    },
+
+    home: function() {
+      var cur = select.selectionTopNode(this.container, true), start = cur;
+      if (cur === false || !(!cur || cur.isPart || cur.nodeName == "BR") || !this.container.firstChild)
+        return false;
+
+      while (cur && cur.nodeName != "BR") cur = cur.previousSibling;
+      var next = cur ? cur.nextSibling : this.container.firstChild;
+      if (next && next != start && next.isPart && hasClass(next, "whitespace"))
+        select.focusAfterNode(next, this.container);
+      else
+        select.focusAfterNode(cur, this.container);
+
+      select.scrollToCursor(this.container);
+      return true;
+    },
+
+    // Delay (or initiate) the next paren blink event.
+    scheduleParenBlink: function() {
+      if (this.parenEvent) this.parent.clearTimeout(this.parenEvent);
+      var self = this;
+      this.parenEvent = this.parent.setTimeout(function(){self.blinkParens();}, 300);
+    },
+
+    // Take the token before the cursor. If it contains a character in
+    // '()[]{}', search for the matching paren/brace/bracket, and
+    // highlight them in green for a moment, or red if no proper match
+    // was found.
+    blinkParens: function(jump) {
+      if (!window.select) return;
+      // Clear the event property.
+      if (this.parenEvent) this.parent.clearTimeout(this.parenEvent);
+      this.parenEvent = null;
+
+      // Extract a 'paren' from a piece of text.
+      function paren(node) {
+        if (node.currentText) {
+          var match = node.currentText.match(/^[\s\u00a0]*([\(\)\[\]{}])[\s\u00a0]*$/);
+          return match && match[1];
+        }
+      }
+      // Determine the direction a paren is facing.
+      function forward(ch) {
+        return /[\(\[\{]/.test(ch);
+      }
+
+      var ch, self = this, cursor = select.selectionTopNode(this.container, true);
+      if (!cursor || !this.highlightAtCursor()) return;
+      cursor = select.selectionTopNode(this.container, true);
+      if (!(cursor && ((ch = paren(cursor)) || (cursor = cursor.nextSibling) && (ch = paren(cursor)))))
+        return;
+      // We only look for tokens with the same className.
+      var className = cursor.className, dir = forward(ch), match = matching[ch];
+
+      // Since parts of the document might not have been properly
+      // highlighted, and it is hard to know in advance which part we
+      // have to scan, we just try, and when we find dirty nodes we
+      // abort, parse them, and re-try.
+      function tryFindMatch() {
+        var stack = [], ch, ok = true;;
+        for (var runner = cursor; runner; runner = dir ? runner.nextSibling : runner.previousSibling) {
+          if (runner.className == className && runner.nodeName == "SPAN" && (ch = paren(runner))) {
+            if (forward(ch) == dir)
+              stack.push(ch);
+            else if (!stack.length)
+              ok = false;
+            else if (stack.pop() != matching[ch])
+              ok = false;
+            if (!stack.length) break;
+          }
+          else if (runner.dirty || runner.nodeName != "SPAN" && runner.nodeName != "BR") {
+            return {node: runner, status: "dirty"};
+          }
+        }
+        return {node: runner, status: runner && ok};
+      }
+      // Temporarily give the relevant nodes a colour.
+      function blink(node, ok) {
+        node.style.fontWeight = "bold";
+        node.style.color = ok ? "#8F8" : "#F88";
+        self.parent.setTimeout(function() {node.style.fontWeight = ""; node.style.color = "";}, 500);
+      }
+
+      while (true) {
+        var found = tryFindMatch();
+        if (found.status == "dirty") {
+          this.highlight(found.node, endOfLine(found.node));
+          // Needed because in some corner cases a highlight does not
+          // reach a node.
+          found.node.dirty = false;
+          continue;
+        }
+        else {
+          blink(cursor, found.status);
+          if (found.node) {
+            blink(found.node, found.status);
+            if (jump) select.focusAfterNode(found.node.previousSibling, this.container);
+          }
+          break;
+        }
+      }
+    },
+
+    // Adjust the amount of whitespace at the start of the line that
+    // the cursor is on so that it is indented properly.
+    indentAtCursor: function(direction) {
+      if (!this.container.firstChild) return;
+      // The line has to have up-to-date lexical information, so we
+      // highlight it first.
+      if (!this.highlightAtCursor()) return;
+      var cursor = select.selectionTopNode(this.container, false);
+      // If we couldn't determine the place of the cursor,
+      // there's nothing to indent.
+      if (cursor === false)
+        return;
+      var lineStart = startOfLine(cursor);
+      var whiteSpace = this.indentLineAfter(lineStart, direction);
+      if (cursor == lineStart && whiteSpace)
+          cursor = whiteSpace;
+      // This means the indentation has probably messed up the cursor.
+      if (cursor == whiteSpace)
+        select.focusAfterNode(cursor, this.container);
+    },
+
+    // Indent all lines whose start falls inside of the current
+    // selection.
+    indentRegion: function(start, end, direction) {
+      var current = (start = startOfLine(start)), before = start && startOfLine(start.previousSibling);
+      if (end.nodeName != "BR") end = endOfLine(end, this.container);
+
+      do {
+        var next = endOfLine(current, this.container);
+        if (current) this.highlight(before, next, true);
+        this.indentLineAfter(current, direction);
+        before = current;
+        current = next;
+      } while (current != end);
+      select.setCursorPos(this.container, {node: start, offset: 0}, {node: end, offset: 0});
+    },
+
+    // Find the node that the cursor is in, mark it as dirty, and make
+    // sure a highlight pass is scheduled.
+    cursorActivity: function(safe) {
+      if (internetExplorer) {
+        this.container.createTextRange().execCommand("unlink");
+        this.selectionSnapshot = select.selectionCoords(this.win);
+      }
+
+      var activity = this.options.cursorActivity;
+      if (!safe || activity) {
+        var cursor = select.selectionTopNode(this.container, false);
+        if (cursor === false || !this.container.firstChild) return;
+        cursor = cursor || this.container.firstChild;
+        if (activity) activity(cursor);
+        if (!safe) {
+          this.scheduleHighlight();
+          this.addDirtyNode(cursor);
+        }
+      }
+    },
+
+    reparseBuffer: function() {
+      forEach(this.container.childNodes, function(node) {node.dirty = true;});
+      if (this.container.firstChild)
+        this.addDirtyNode(this.container.firstChild);
+    },
+
+    // Add a node to the set of dirty nodes, if it isn't already in
+    // there.
+    addDirtyNode: function(node) {
+      node = node || this.container.firstChild;
+      if (!node) return;
+
+      for (var i = 0; i < this.dirty.length; i++)
+        if (this.dirty[i] == node) return;
+
+      if (node.nodeType != 3)
+        node.dirty = true;
+      this.dirty.push(node);
+    },
+
+    // Cause a highlight pass to happen in options.passDelay
+    // milliseconds. Clear the existing timeout, if one exists. This
+    // way, the passes do not happen while the user is typing, and
+    // should as unobtrusive as possible.
+    scheduleHighlight: function() {
+      // Timeouts are routed through the parent window, because on
+      // some browsers designMode windows do not fire timeouts.
+      var self = this;
+      this.parent.clearTimeout(this.highlightTimeout);
+      this.highlightTimeout = this.parent.setTimeout(function(){self.highlightDirty();}, this.options.passDelay);
+    },
+
+    // Fetch one dirty node, and remove it from the dirty set.
+    getDirtyNode: function() {
+      while (this.dirty.length > 0) {
+        var found = this.dirty.pop();
+        // IE8 sometimes throws an unexplainable 'invalid argument'
+        // exception for found.parentNode
+        try {
+          // If the node has been coloured in the meantime, or is no
+          // longer in the document, it should not be returned.
+          while (found && found.parentNode != this.container)
+            found = found.parentNode
+          if (found && (found.dirty || found.nodeType == 3))
+            return found;
+        } catch (e) {}
+      }
+      return null;
+    },
+
+    // Pick dirty nodes, and highlight them, until options.passTime
+    // milliseconds have gone by. The highlight method will continue
+    // to next lines as long as it finds dirty nodes. It returns
+    // information about the place where it stopped. If there are
+    // dirty nodes left after this function has spent all its lines,
+    // it shedules another highlight to finish the job.
+    highlightDirty: function(force) {
+      // Prevent FF from raising an error when it is firing timeouts
+      // on a page that's no longer loaded.
+      if (!window.select) return;
+
+      if (!this.options.readOnly) select.markSelection(this.win);
+      var start, endTime = force ? null : time() + this.options.passTime;
+      while (time() < endTime && (start = this.getDirtyNode())) {
+        var result = this.highlight(start, endTime);
+        if (result && result.node && result.dirty)
+          this.addDirtyNode(result.node);
+      }
+      if (!this.options.readOnly) select.selectMarked();
+      if (start) this.scheduleHighlight();
+      return this.dirty.length == 0;
+    },
+
+    // Creates a function that, when called through a timeout, will
+    // continuously re-parse the document.
+    documentScanner: function(passTime) {
+      var self = this, pos = null;
+      return function() {
+        // FF timeout weirdness workaround.
+        if (!window.select) return;
+        // If the current node is no longer in the document... oh
+        // well, we start over.
+        if (pos && pos.parentNode != self.container)
+          pos = null;
+        select.markSelection(self.win);
+        var result = self.highlight(pos, time() + passTime, true);
+        select.selectMarked();
+        var newPos = result ? (result.node && result.node.nextSibling) : null;
+        pos = (pos == newPos) ? null : newPos;
+        self.delayScanning();
+      };
+    },
+
+    // Starts the continuous scanning process for this document after
+    // a given interval.
+    delayScanning: function() {
+      if (this.scanner) {
+        this.parent.clearTimeout(this.documentScan);
+        this.documentScan = this.parent.setTimeout(this.scanner, this.options.continuousScanning);
+      }
+    },
+
+    // The function that does the actual highlighting/colouring (with
+    // help from the parser and the DOM normalizer). Its interface is
+    // rather overcomplicated, because it is used in different
+    // situations: ensuring that a certain line is highlighted, or
+    // highlighting up to X milliseconds starting from a certain
+    // point. The 'from' argument gives the node at which it should
+    // start. If this is null, it will start at the beginning of the
+    // document. When a timestamp is given with the 'target' argument,
+    // it will stop highlighting at that time. If this argument holds
+    // a DOM node, it will highlight until it reaches that node. If at
+    // any time it comes across two 'clean' lines (no dirty nodes), it
+    // will stop, except when 'cleanLines' is true. maxBacktrack is
+    // the maximum number of lines to backtrack to find an existing
+    // parser instance. This is used to give up in situations where a
+    // highlight would take too long and freeze the browser interface.
+    highlight: function(from, target, cleanLines, maxBacktrack){
+      var container = this.container, self = this, active = this.options.activeTokens;
+      var endTime = (typeof target == "number" ? target : null);
+
+      if (!container.firstChild)
+        return;
+      // Backtrack to the first node before from that has a partial
+      // parse stored.
+      while (from && (!from.parserFromHere || from.dirty)) {
+        if (maxBacktrack != null && from.nodeName == "BR" && (--maxBacktrack) < 0)
+          return false;
+        from = from.previousSibling;
+      }
+      // If we are at the end of the document, do nothing.
+      if (from && !from.nextSibling)
+        return;
+
+      // Check whether a part (<span> node) and the corresponding token
+      // match.
+      function correctPart(token, part){
+        return !part.reduced && part.currentText == token.value && part.className == token.style;
+      }
+      // Shorten the text associated with a part by chopping off
+      // characters from the front. Note that only the currentText
+      // property gets changed. For efficiency reasons, we leave the
+      // nodeValue alone -- we set the reduced flag to indicate that
+      // this part must be replaced.
+      function shortenPart(part, minus){
+        part.currentText = part.currentText.substring(minus);
+        part.reduced = true;
+      }
+      // Create a part corresponding to a given token.
+      function tokenPart(token){
+        var part = makePartSpan(token.value, self.doc);     
+        part.className = token.style;
+        return part;
+      }
+
+      function maybeTouch(node) {
+        if (node) {
+          if (lineDirty || node.nextSibling != node.oldNextSibling)
+            self.history.touch(node);
+          node.oldNextSibling = node.nextSibling;
+        }
+        else {
+          if (lineDirty || self.container.firstChild != self.container.oldFirstChild)
+            self.history.touch(node);
+          self.container.oldFirstChild = self.container.firstChild;
+        }
+      }
+
+      // Get the token stream. If from is null, we start with a new
+      // parser from the start of the frame, otherwise a partial parse
+      // is resumed.
+      var traversal = traverseDOM(from ? from.nextSibling : container.firstChild),
+          stream = stringStream(traversal),
+          parsed = from ? from.parserFromHere(stream) : Editor.Parser.make(stream);
+
+      // parts is an interface to make it possible to 'delay' fetching
+      // the next DOM node until we are completely done with the one
+      // before it. This is necessary because often the next node is
+      // not yet available when we want to proceed past the current
+      // one.
+      var parts = {
+        current: null,
+        // Fetch current node.
+        get: function(){
+          if (!this.current)
+            this.current = traversal.nodes.shift();
+          return this.current;
+        },
+        // Advance to the next part (do not fetch it yet).
+        next: function(){
+          this.current = null;
+        },
+        // Remove the current part from the DOM tree, and move to the
+        // next.
+        remove: function(){
+          container.removeChild(this.get());
+          this.current = null;
+        },
+        // Advance to the next part that is not empty, discarding empty
+        // parts.
+        getNonEmpty: function(){
+          var part = this.get();
+          // Allow empty nodes when they are alone on a line, needed
+          // for the FF cursor bug workaround (see select.js,
+          // insertNewlineAtCursor).
+          while (part && part.nodeName == "SPAN" && part.currentText == "") {
+            var old = part;
+            this.remove();
+            part = this.get();
+            // Adjust selection information, if any. See select.js for details.
+            select.snapshotMove(old.firstChild, part && (part.firstChild || part), 0);
+          }
+          return part;
+        }
+      };
+
+      var lineDirty = false, prevLineDirty = true, lineNodes = 0;
+
+      // This forEach loops over the tokens from the parsed stream, and
+      // at the same time uses the parts object to proceed through the
+      // corresponding DOM nodes.
+      forEach(parsed, function(token){
+        var part = parts.getNonEmpty();
+
+        if (token.value == "\n"){
+          // The idea of the two streams actually staying synchronized
+          // is such a long shot that we explicitly check.
+          if (part.nodeName != "BR")
+            throw "Parser out of sync. Expected BR.";
+
+          if (part.dirty || !part.indentation) lineDirty = true;
+          maybeTouch(from);
+          from = part;
+
+          // Every <br> gets a copy of the parser state and a lexical
+          // context assigned to it. The first is used to be able to
+          // later resume parsing from this point, the second is used
+          // for indentation.
+          part.parserFromHere = parsed.copy();
+          part.indentation = token.indentation;
+          part.dirty = false;
+
+          // If the target argument wasn't an integer, go at least
+          // until that node.
+          if (endTime == null && part == target) throw StopIteration;
+
+          // A clean line with more than one node means we are done.
+          // Throwing a StopIteration is the way to break out of a
+          // MochiKit forEach loop.
+          if ((endTime != null && time() >= endTime) || (!lineDirty && !prevLineDirty && lineNodes > 1 && !cleanLines))
+            throw StopIteration;
+          prevLineDirty = lineDirty; lineDirty = false; lineNodes = 0;
+          parts.next();
+        }
+        else {
+          if (part.nodeName != "SPAN")
+            throw "Parser out of sync. Expected SPAN.";
+          if (part.dirty)
+            lineDirty = true;
+          lineNodes++;
+
+          // If the part matches the token, we can leave it alone.
+          if (correctPart(token, part)){
+            part.dirty = false;
+            parts.next();
+          }
+          // Otherwise, we have to fix it.
+          else {
+            lineDirty = true;
+            // Insert the correct part.
+            var newPart = tokenPart(token);
+            container.insertBefore(newPart, part);
+            if (active) active(newPart, token, self);
+            var tokensize = token.value.length;
+            var offset = 0;
+            // Eat up parts until the text for this token has been
+            // removed, adjusting the stored selection info (see
+            // select.js) in the process.
+            while (tokensize > 0) {
+              part = parts.get();
+              var partsize = part.currentText.length;
+              select.snapshotReplaceNode(part.firstChild, newPart.firstChild, tokensize, offset);
+              if (partsize > tokensize){
+                shortenPart(part, tokensize);
+                tokensize = 0;
+              }
+              else {
+                tokensize -= partsize;
+                offset += partsize;
+                parts.remove();
+              }
+            }
+          }
+        }
+      });
+      maybeTouch(from);
+      webkitLastLineHack(this.container);
+
+      // The function returns some status information that is used by
+      // hightlightDirty to determine whether and where it has to
+      // continue.
+      return {node: parts.getNonEmpty(),
+              dirty: lineDirty};
+    }
+  };
+
+  return Editor;
+})();
+
+addEventHandler(window, "load", function() {
+  var CodeMirror = window.frameElement.CodeMirror;
+  CodeMirror.editor = new Editor(CodeMirror.options);
+  this.parent.setTimeout(method(CodeMirror, "init"), 0);
+});
diff --git a/project/static/js/codemirror/parsexml.js b/project/static/js/codemirror/parsexml.js
new file mode 100644 (file)
index 0000000..95a8099
--- /dev/null
@@ -0,0 +1,292 @@
+/* This file defines an XML parser, with a few kludges to make it
+ * useable for HTML. autoSelfClosers defines a set of tag names that
+ * are expected to not have a closing tag, and doNotIndent specifies
+ * the tags inside of which no indentation should happen (see Config
+ * object). These can be disabled by passing the editor an object like
+ * {useHTMLKludges: false} as parserConfig option.
+ */
+
+var XMLParser = Editor.Parser = (function() {
+  var Kludges = {
+    autoSelfClosers: {"br": true, "img": true, "hr": true, "link": true, "input": true,
+                      "meta": true, "col": true, "frame": true, "base": true, "area": true},
+    doNotIndent: {"pre": true, "!cdata": true}
+  };
+  var NoKludges = {autoSelfClosers: {}, doNotIndent: {"!cdata": true}};
+  var UseKludges = Kludges;
+  var alignCDATA = false;
+
+  // Simple stateful tokenizer for XML documents. Returns a
+  // MochiKit-style iterator, with a state property that contains a
+  // function encapsulating the current state. See tokenize.js.
+  var tokenizeXML = (function() {
+    function inText(source, setState) {
+      var ch = source.next();
+      if (ch == "<") {
+        if (source.equals("!")) {
+          source.next();
+          if (source.equals("[")) {
+            if (source.lookAhead("[CDATA[", true)) {
+              setState(inBlock("xml-cdata", "]]>"));
+              return null;
+            }
+            else {
+              return "xml-text";
+            }
+          }
+          else if (source.lookAhead("--", true)) {
+            setState(inBlock("xml-comment", "-->"));
+            return null;
+          }
+          else {
+            return "xml-text";
+          }
+        }
+        else if (source.equals("?")) {
+          source.next();
+          source.nextWhileMatches(/[\w\._\-]/);
+          setState(inBlock("xml-processing", "?>"));
+          return "xml-processing";
+        }
+        else {
+          if (source.equals("/")) source.next();
+          setState(inTag);
+          return "xml-punctuation";
+        }
+      }
+      else if (ch == "&") {
+        while (!source.endOfLine()) {
+          if (source.next() == ";")
+            break;
+        }
+        return "xml-entity";
+      }
+      else {
+        source.nextWhileMatches(/[^&<\n]/);
+        return "xml-text";
+      }
+    }
+
+    function inTag(source, setState) {
+      var ch = source.next();
+      if (ch == ">") {
+        setState(inText);
+        return "xml-punctuation";
+      }
+      else if (/[?\/]/.test(ch) && source.equals(">")) {
+        source.next();
+        setState(inText);
+        return "xml-punctuation";
+      }
+      else if (ch == "=") {
+        return "xml-punctuation";
+      }
+      else if (/[\'\"]/.test(ch)) {
+        setState(inAttribute(ch));
+        return null;
+      }
+      else {
+        source.nextWhileMatches(/[^\s\u00a0=<>\"\'\/?]/);
+        return "xml-name";
+      }
+    }
+
+    function inAttribute(quote) {
+      return function(source, setState) {
+        while (!source.endOfLine()) {
+          if (source.next() == quote) {
+            setState(inTag);
+            break;
+          }
+        }
+        return "xml-attribute";
+      };
+    }
+
+    function inBlock(style, terminator) {
+      return function(source, setState) {
+        while (!source.endOfLine()) {
+          if (source.lookAhead(terminator, true)) {
+            setState(inText);
+            break;
+          }
+          source.next();
+        }
+        return style;
+      };
+    }
+
+    return function(source, startState) {
+      return tokenizer(source, startState || inText);
+    };
+  })();
+
+  // The parser. The structure of this function largely follows that of
+  // parseJavaScript in parsejavascript.js (there is actually a bit more
+  // shared code than I'd like), but it is quite a bit simpler.
+  function parseXML(source) {
+    var tokens = tokenizeXML(source);
+    var cc = [base];
+    var tokenNr = 0, indented = 0;
+    var currentTag = null, context = null;
+    var consume, marked;
+    
+    function push(fs) {
+      for (var i = fs.length - 1; i >= 0; i--)
+        cc.push(fs[i]);
+    }
+    function cont() {
+      push(arguments);
+      consume = true;
+    }
+    function pass() {
+      push(arguments);
+      consume = false;
+    }
+
+    function mark(style) {
+      marked = style;
+    }
+    function expect(text) {
+      return function(style, content) {
+        if (content == text) cont();
+        else mark("xml-error") || cont(arguments.callee);
+      };
+    }
+
+    function pushContext(tagname, startOfLine) {
+      var noIndent = UseKludges.doNotIndent.hasOwnProperty(tagname) || (context && context.noIndent);
+      context = {prev: context, name: tagname, indent: indented, startOfLine: startOfLine, noIndent: noIndent};
+    }
+    function popContext() {
+      context = context.prev;
+    }
+    function computeIndentation(baseContext) {
+      return function(nextChars, current) {
+        var context = baseContext;
+        if (context && context.noIndent)
+          return current;
+        if (alignCDATA && /<!\[CDATA\[/.test(nextChars))
+          return 0;
+        if (context && /^<\//.test(nextChars))
+          context = context.prev;
+        while (context && !context.startOfLine)
+          context = context.prev;
+        if (context)
+          return context.indent + indentUnit;
+        else
+          return 0;
+      };
+    }
+
+    function base() {
+      return pass(element, base);
+    }
+    var harmlessTokens = {"xml-text": true, "xml-entity": true, "xml-comment": true, "xml-processing": true};
+    function element(style, content) {
+      if (content == "<") cont(tagname, attributes, endtag(tokenNr == 1));
+      else if (content == "</") cont(closetagname, expect(">"));
+      else if (style == "xml-cdata") {
+        if (!context || context.name != "!cdata") pushContext("!cdata");
+        if (/\]\]>$/.test(content)) popContext();
+        cont();
+      }
+      else if (harmlessTokens.hasOwnProperty(style)) cont();
+      else mark("xml-error") || cont();
+    }
+    function tagname(style, content) {
+      if (style == "xml-name") {
+        currentTag = content.toLowerCase();
+        mark("xml-tagname");
+        cont();
+      }
+      else {
+        currentTag = null;
+        pass();
+      }
+    }
+    function closetagname(style, content) {
+      if (style == "xml-name" && context && content.toLowerCase() == context.name) {
+        popContext();
+        mark("xml-tagname");
+      }
+      else {
+        mark("xml-error");
+      }
+      cont();
+    }
+    function endtag(startOfLine) {
+      return function(style, content) {
+        if (content == "/>" || (content == ">" && UseKludges.autoSelfClosers.hasOwnProperty(currentTag))) cont();
+        else if (content == ">") pushContext(currentTag, startOfLine) || cont();
+        else mark("xml-error") || cont(arguments.callee);
+      };
+    }
+    function attributes(style) {
+      if (style == "xml-name") mark("xml-attname") || cont(attribute, attributes);
+      else pass();
+    }
+    function attribute(style, content) {
+      if (content == "=") cont(value);
+      else if (content == ">" || content == "/>") pass(endtag);
+      else pass();
+    }
+    function value(style) {
+      if (style == "xml-attribute") cont(value);
+      else pass();
+    }
+
+    return {
+      indentation: function() {return indented;},
+
+      next: function(){
+        var token = tokens.next();
+        if (token.style == "whitespace" && tokenNr == 0)
+          indented = token.value.length;
+        else
+          tokenNr++;
+        if (token.content == "\n") {
+          indented = tokenNr = 0;
+          token.indentation = computeIndentation(context);
+        }
+
+        if (token.style == "whitespace" || token.type == "xml-comment")
+          return token;
+
+        while(true){
+          consume = marked = false;
+          cc.pop()(token.style, token.content);
+          if (consume){
+            if (marked)
+              token.style = marked;
+            return token;
+          }
+        }
+      },
+
+      copy: function(){
+        var _cc = cc.concat([]), _tokenState = tokens.state, _context = context;
+        var parser = this;
+        
+        return function(input){
+          cc = _cc.concat([]);
+          tokenNr = indented = 0;
+          context = _context;
+          tokens = tokenizeXML(input, _tokenState);
+          return parser;
+        };
+      }
+    };
+  }
+
+  return {
+    make: parseXML,
+    electricChars: "/",
+    configure: function(config) {
+      if (config.useHTMLKludges != null)
+        UseKludges = config.useHTMLKludges ? Kludges : NoKludges;
+      if (config.alignCDATA)
+        alignCDATA = config.alignCDATA;
+    }
+  };
+})();
diff --git a/project/static/js/codemirror/select.js b/project/static/js/codemirror/select.js
new file mode 100644 (file)
index 0000000..9ceb24e
--- /dev/null
@@ -0,0 +1,619 @@
+/* Functionality for finding, storing, and restoring selections
+ *
+ * This does not provide a generic API, just the minimal functionality
+ * required by the CodeMirror system.
+ */
+
+// Namespace object.
+var select = {};
+
+(function() {
+  select.ie_selection = document.selection && document.selection.createRangeCollection;
+
+  // Find the 'top-level' (defined as 'a direct child of the node
+  // passed as the top argument') node that the given node is
+  // contained in. Return null if the given node is not inside the top
+  // node.
+  function topLevelNodeAt(node, top) {
+    while (node && node.parentNode != top)
+      node = node.parentNode;
+    return node;
+  }
+
+  // Find the top-level node that contains the node before this one.
+  function topLevelNodeBefore(node, top) {
+    while (!node.previousSibling && node.parentNode != top)
+      node = node.parentNode;
+    return topLevelNodeAt(node.previousSibling, top);
+  }
+
+  var fourSpaces = "\u00a0\u00a0\u00a0\u00a0";
+
+  select.scrollToNode = function(element) {
+    if (!element) return;
+    var doc = element.ownerDocument, body = doc.body,
+        win = (doc.defaultView || doc.parentWindow),
+        html = doc.documentElement,
+        atEnd = !element.nextSibling || !element.nextSibling.nextSibling
+                || !element.nextSibling.nextSibling.nextSibling;
+    // In Opera (and recent Webkit versions), BR elements *always*
+    // have a scrollTop property of zero.
+    var compensateHack = 0;
+    while (element && !element.offsetTop) {
+      compensateHack++;
+      element = element.previousSibling;
+    }
+    // atEnd is another kludge for these browsers -- if the cursor is
+    // at the end of the document, and the node doesn't have an
+    // offset, just scroll to the end.
+    if (compensateHack == 0) atEnd = false;
+
+    var y = compensateHack * (element ? element.offsetHeight : 0), x = 0, pos = element;
+    while (pos && pos.offsetParent) {
+      y += pos.offsetTop;
+      // Don't count X offset for <br> nodes
+      if (pos.nodeName != "BR")
+        x += pos.offsetLeft;
+      pos = pos.offsetParent;
+    }
+
+    var scroll_x = body.scrollLeft || html.scrollLeft || 0,
+        scroll_y = body.scrollTop || html.scrollTop || 0,
+        screen_x = x - scroll_x, screen_y = y - scroll_y, scroll = false;
+
+    if (screen_x < 0 || screen_x > (win.innerWidth || html.clientWidth || 0)) {
+      scroll_x = x;
+      scroll = true;
+    }
+    if (screen_y < 0 || atEnd || screen_y > (win.innerHeight || html.clientHeight || 0) - 50) {
+      scroll_y = atEnd ? 1e10 : y;
+      scroll = true;
+    }
+    if (scroll) win.scrollTo(scroll_x, scroll_y);
+  };
+
+  select.scrollToCursor = function(container) {
+    select.scrollToNode(select.selectionTopNode(container, true) || container.firstChild);
+  };
+
+  // Used to prevent restoring a selection when we do not need to.
+  var currentSelection = null;
+
+  select.snapshotChanged = function() {
+    if (currentSelection) currentSelection.changed = true;
+  };
+
+  // This is called by the code in editor.js whenever it is replacing
+  // a text node. The function sees whether the given oldNode is part
+  // of the current selection, and updates this selection if it is.
+  // Because nodes are often only partially replaced, the length of
+  // the part that gets replaced has to be taken into account -- the
+  // selection might stay in the oldNode if the newNode is smaller
+  // than the selection's offset. The offset argument is needed in
+  // case the selection does move to the new object, and the given
+  // length is not the whole length of the new node (part of it might
+  // have been used to replace another node).
+  select.snapshotReplaceNode = function(from, to, length, offset) {
+    if (!currentSelection) return;
+
+    function replace(point) {
+      if (from == point.node) {
+        currentSelection.changed = true;
+        if (length && point.offset > length) {
+          point.offset -= length;
+        }
+        else {
+          point.node = to;
+          point.offset += (offset || 0);
+        }
+      }
+    }
+    replace(currentSelection.start);
+    replace(currentSelection.end);
+  };
+
+  select.snapshotMove = function(from, to, distance, relative, ifAtStart) {
+    if (!currentSelection) return;
+
+    function move(point) {
+      if (from == point.node && (!ifAtStart || point.offset == 0)) {
+        currentSelection.changed = true;
+        point.node = to;
+        if (relative) point.offset = Math.max(0, point.offset + distance);
+        else point.offset = distance;
+      }
+    }
+    move(currentSelection.start);
+    move(currentSelection.end);
+  };
+
+  // Most functions are defined in two ways, one for the IE selection
+  // model, one for the W3C one.
+  if (select.ie_selection) {
+    function selectionNode(win, start) {
+      var range = win.document.selection.createRange();
+      range.collapse(start);
+
+      function nodeAfter(node) {
+        var found = null;
+        while (!found && node) {
+          found = node.nextSibling;
+          node = node.parentNode;
+        }
+        return nodeAtStartOf(found);
+      }
+
+      function nodeAtStartOf(node) {
+        while (node && node.firstChild) node = node.firstChild;
+        return {node: node, offset: 0};
+      }
+
+      var containing = range.parentElement();
+      if (!isAncestor(win.document.body, containing)) return null;
+      if (!containing.firstChild) return nodeAtStartOf(containing);
+
+      var working = range.duplicate();
+      working.moveToElementText(containing);
+      working.collapse(true);
+      for (var cur = containing.firstChild; cur; cur = cur.nextSibling) {
+        if (cur.nodeType == 3) {
+          var size = cur.nodeValue.length;
+          working.move("character", size);
+        }
+        else {
+          working.moveToElementText(cur);
+          working.collapse(false);
+        }
+
+        var dir = range.compareEndPoints("StartToStart", working);
+        if (dir == 0) return nodeAfter(cur);
+        if (dir == 1) continue;
+        if (cur.nodeType != 3) return nodeAtStartOf(cur);
+
+        working.setEndPoint("StartToEnd", range);
+        return {node: cur, offset: size - working.text.length};
+      }
+      return nodeAfter(containing);
+    }
+
+    select.markSelection = function(win) {
+      currentSelection = null;
+      var sel = win.document.selection;
+      if (!sel) return;
+      var start = selectionNode(win, true),
+          end = selectionNode(win, false);
+      if (!start || !end) return;
+      currentSelection = {start: start, end: end, window: win, changed: false};
+    };
+
+    select.selectMarked = function() {
+      if (!currentSelection || !currentSelection.changed) return;
+      var win = currentSelection.window, doc = win.document;
+
+      function makeRange(point) {
+        var range = doc.body.createTextRange(),
+            node = point.node;
+        if (!node) {
+          range.moveToElementText(currentSelection.window.document.body);
+          range.collapse(false);
+        }
+        else if (node.nodeType == 3) {
+          range.moveToElementText(node.parentNode);
+          var offset = point.offset;
+          while (node.previousSibling) {
+            node = node.previousSibling;
+            offset += (node.innerText || "").length;
+          }
+          range.move("character", offset);
+        }
+        else {
+          range.moveToElementText(node);
+          range.collapse(true);
+        }
+        return range;
+      }
+
+      var start = makeRange(currentSelection.start), end = makeRange(currentSelection.end);
+      start.setEndPoint("StartToEnd", end);
+      start.select();
+    };
+
+    // Get the top-level node that one end of the cursor is inside or
+    // after. Note that this returns false for 'no cursor', and null
+    // for 'start of document'.
+    select.selectionTopNode = function(container, start) {
+      var selection = container.ownerDocument.selection;
+      if (!selection) return false;
+
+      var range = selection.createRange(), range2 = range.duplicate();
+      range.collapse(start);
+      var around = range.parentElement();
+      if (around && isAncestor(container, around)) {
+        // Only use this node if the selection is not at its start.
+        range2.moveToElementText(around);
+        if (range.compareEndPoints("StartToStart", range2) == 1)
+          return topLevelNodeAt(around, container);
+      }
+
+      // Move the start of a range to the start of a node,
+      // compensating for the fact that you can't call
+      // moveToElementText with text nodes.
+      function moveToNodeStart(range, node) {
+        if (node.nodeType == 3) {
+          var count = 0, cur = node.previousSibling;
+          while (cur && cur.nodeType == 3) {
+            count += cur.nodeValue.length;
+            cur = cur.previousSibling;
+          }
+          if (cur) {
+            try{range.moveToElementText(cur);}
+            catch(e){alert(cur + " " + cur.nodeType + " " + (cur && cur.outerHTML));}
+            range.collapse(false);
+          }
+          else range.moveToElementText(node.parentNode);
+          if (count) range.move("character", count);
+        }
+        else range.moveToElementText(node);
+      }
+
+      // Do a binary search through the container object, comparing
+      // the start of each node to the selection
+      var start = 0, end = container.childNodes.length;
+      while (start != end) {
+        var middle = Math.ceil((end + start) / 2), node = container.childNodes[middle];
+        if (!node) return false; // Don't ask. IE6 manages this sometimes.
+        moveToNodeStart(range2, node);
+        if (range.compareEndPoints("StartToStart", range2) == 1)
+          start = middle;
+        else
+          end = middle - 1;
+      }
+      return container.childNodes[start] || null;
+    };
+
+    // Place the cursor after this.start. This is only useful when
+    // manually moving the cursor instead of restoring it to its old
+    // position.
+    select.focusAfterNode = function(node, container) {
+      var range = container.ownerDocument.body.createTextRange();
+      range.moveToElementText(node || container);
+      range.collapse(!node);
+      range.select();
+    };
+
+    select.somethingSelected = function(win) {
+      var sel = win.document.selection;
+      return sel && (sel.createRange().text != "");
+    };
+
+    function insertAtCursor(window, html) {
+      var selection = window.document.selection;
+      if (selection) {
+        var range = selection.createRange();
+        range.pasteHTML(html);
+        range.collapse(false);
+        range.select();
+      }
+    }
+
+    // Used to normalize the effect of the enter key, since browsers
+    // do widely different things when pressing enter in designMode.
+    select.insertNewlineAtCursor = function(window) {
+      insertAtCursor(window, "<br>");
+    };
+
+    select.insertTabAtCursor = function(window) {
+      insertAtCursor(window, fourSpaces);
+    };
+
+    // Get the BR node at the start of the line on which the cursor
+    // currently is, and the offset into the line. Returns null as
+    // node if cursor is on first line.
+    select.cursorPos = function(container, start) {
+      var selection = container.ownerDocument.selection;
+      if (!selection) return null;
+
+      var topNode = select.selectionTopNode(container, start);
+      while (topNode && topNode.nodeName != "BR")
+        topNode = topNode.previousSibling;
+
+      var range = selection.createRange(), range2 = range.duplicate();
+      range.collapse(start);
+      if (topNode) {
+        range2.moveToElementText(topNode);
+        range2.collapse(false);
+      }
+      else {
+        // When nothing is selected, we can get all kinds of funky errors here.
+        try { range2.moveToElementText(container); }
+        catch (e) { return null; }
+        range2.collapse(true);
+      }
+      range.setEndPoint("StartToStart", range2);
+
+      return {node: topNode, offset: range.text.length};
+    };
+
+    select.setCursorPos = function(container, from, to) {
+      function rangeAt(pos) {
+        var range = container.ownerDocument.body.createTextRange();
+        if (!pos.node) {
+          range.moveToElementText(container);
+          range.collapse(true);
+        }
+        else {
+          range.moveToElementText(pos.node);
+          range.collapse(false);
+        }
+        range.move("character", pos.offset);
+        return range;
+      }
+
+      var range = rangeAt(from);
+      if (to && to != from)
+        range.setEndPoint("EndToEnd", rangeAt(to));
+      range.select();
+    }
+
+    // Some hacks for storing and re-storing the selection when the editor loses and regains focus.
+    select.selectionCoords = function (win) {
+      var selection = win.document.selection;
+      if (!selection) return null;
+      var start = selection.createRange(), end = start.duplicate();
+      start.collapse(true);
+      end.collapse(false);
+
+      var body = win.document.body;
+      return {start: {x: start.boundingLeft + body.scrollLeft - 1,
+                      y: start.boundingTop + body.scrollTop},
+              end: {x: end.boundingLeft + body.scrollLeft - 1,
+                    y: end.boundingTop + body.scrollTop}};
+    };
+
+    // Restore a stored selection.
+    select.selectCoords = function(win, coords) {
+      if (!coords) return;
+
+      var range1 = win.document.body.createTextRange(), range2 = range1.duplicate();
+      // This can fail for various hard-to-handle reasons.
+      try {
+        range1.moveToPoint(coords.start.x, coords.start.y);
+        range2.moveToPoint(coords.end.x, coords.end.y);
+        range1.setEndPoint("EndToStart", range2);
+        range1.select();
+      } catch(e) {}
+    };
+  }
+  // W3C model
+  else {
+    // Store start and end nodes, and offsets within these, and refer
+    // back to the selection object from those nodes, so that this
+    // object can be updated when the nodes are replaced before the
+    // selection is restored.
+    select.markSelection = function (win) {
+      var selection = win.getSelection();
+      if (!selection || selection.rangeCount == 0)
+        return (currentSelection = null);
+      var range = selection.getRangeAt(0);
+
+      currentSelection = {
+        start: {node: range.startContainer, offset: range.startOffset},
+        end: {node: range.endContainer, offset: range.endOffset},
+        window: win,
+        changed: false
+      };
+
+      // We want the nodes right at the cursor, not one of their
+      // ancestors with a suitable offset. This goes down the DOM tree
+      // until a 'leaf' is reached (or is it *up* the DOM tree?).
+      function normalize(point){
+        while (point.node.nodeType != 3 && point.node.nodeName != "BR") {
+          var newNode = point.node.childNodes[point.offset] || point.node.nextSibling;
+          point.offset = 0;
+          while (!newNode && point.node.parentNode) {
+            point.node = point.node.parentNode;
+            newNode = point.node.nextSibling;
+          }
+          point.node = newNode;
+          if (!newNode)
+            break;
+        }
+      }
+
+      normalize(currentSelection.start);
+      normalize(currentSelection.end);
+    };
+
+    select.selectMarked = function () {
+      if (!currentSelection || !currentSelection.changed) return;
+      var win = currentSelection.window, range = win.document.createRange();
+
+      function setPoint(point, which) {
+        if (point.node) {
+          // Some magic to generalize the setting of the start and end
+          // of a range.
+          if (point.offset == 0)
+            range["set" + which + "Before"](point.node);
+          else
+            range["set" + which](point.node, point.offset);
+        }
+        else {
+          range.setStartAfter(win.document.body.lastChild || win.document.body);
+        }
+      }
+
+      setPoint(currentSelection.end, "End");
+      setPoint(currentSelection.start, "Start");
+      selectRange(range, win);
+    };
+
+    // Helper for selecting a range object.
+    function selectRange(range, window) {
+      var selection = window.getSelection();
+      selection.removeAllRanges();
+      selection.addRange(range);
+    };
+    function selectionRange(window) {
+      var selection = window.getSelection();
+      if (!selection || selection.rangeCount == 0)
+        return false;
+      else
+        return selection.getRangeAt(0);
+    }
+
+    // Finding the top-level node at the cursor in the W3C is, as you
+    // can see, quite an involved process.
+    select.selectionTopNode = function(container, start) {
+      var range = selectionRange(container.ownerDocument.defaultView);
+      if (!range) return false;
+
+      var node = start ? range.startContainer : range.endContainer;
+      var offset = start ? range.startOffset : range.endOffset;
+      // Work around (yet another) bug in Opera's selection model.
+      if (window.opera && !start && range.endContainer == container && range.endOffset == range.startOffset + 1 &&
+          container.childNodes[range.startOffset] && container.childNodes[range.startOffset].nodeName == "BR")
+        offset--;
+
+      // For text nodes, we look at the node itself if the cursor is
+      // inside, or at the node before it if the cursor is at the
+      // start.
+      if (node.nodeType == 3){
+        if (offset > 0)
+          return topLevelNodeAt(node, container);
+        else
+          return topLevelNodeBefore(node, container);
+      }
+      // Occasionally, browsers will return the HTML node as
+      // selection. If the offset is 0, we take the start of the frame
+      // ('after null'), otherwise, we take the last node.
+      else if (node.nodeName == "HTML") {
+        return (offset == 1 ? null : container.lastChild);
+      }
+      // If the given node is our 'container', we just look up the
+      // correct node by using the offset.
+      else if (node == container) {
+        return (offset == 0) ? null : node.childNodes[offset - 1];
+      }
+      // In any other case, we have a regular node. If the cursor is
+      // at the end of the node, we use the node itself, if it is at
+      // the start, we use the node before it, and in any other
+      // case, we look up the child before the cursor and use that.
+      else {
+        if (offset == node.childNodes.length)
+          return topLevelNodeAt(node, container);
+        else if (offset == 0)
+          return topLevelNodeBefore(node, container);
+        else
+          return topLevelNodeAt(node.childNodes[offset - 1], container);
+      }
+    };
+
+    select.focusAfterNode = function(node, container) {
+      var win = container.ownerDocument.defaultView,
+          range = win.document.createRange();
+      range.setStartBefore(container.firstChild || container);
+      // In Opera, setting the end of a range at the end of a line
+      // (before a BR) will cause the cursor to appear on the next
+      // line, so we set the end inside of the start node when
+      // possible.
+      if (node && !node.firstChild)
+        range.setEndAfter(node);
+      else if (node)
+        range.setEnd(node, node.childNodes.length);
+      else
+        range.setEndBefore(container.firstChild || container);
+      range.collapse(false);
+      selectRange(range, win);
+    };
+
+    select.somethingSelected = function(win) {
+      var range = selectionRange(win);
+      return range && !range.collapsed;
+    };
+
+    function insertNodeAtCursor(window, node) {
+      var range = selectionRange(window);
+      if (!range) return;
+
+      range.deleteContents();
+      range.insertNode(node);
+      webkitLastLineHack(window.document.body);
+      range = window.document.createRange();
+      range.selectNode(node);
+      range.collapse(false);
+      selectRange(range, window);
+    }
+
+    select.insertNewlineAtCursor = function(window) {
+      insertNodeAtCursor(window, window.document.createElement("BR"));
+    };
+
+    select.insertTabAtCursor = function(window) {
+      insertNodeAtCursor(window, window.document.createTextNode(fourSpaces));
+    };
+
+    select.cursorPos = function(container, start) {
+      var range = selectionRange(window);
+      if (!range) return;
+
+      var topNode = select.selectionTopNode(container, start);
+      while (topNode && topNode.nodeName != "BR")
+        topNode = topNode.previousSibling;
+
+      range = range.cloneRange();
+      range.collapse(start);
+      if (topNode)
+        range.setStartAfter(topNode);
+      else
+        range.setStartBefore(container);
+      return {node: topNode, offset: range.toString().length};
+    };
+
+    select.setCursorPos = function(container, from, to) {
+      var win = container.ownerDocument.defaultView,
+          range = win.document.createRange();
+
+      function setPoint(node, offset, side) {
+        if (!node)
+          node = container.firstChild;
+        else
+          node = node.nextSibling;
+
+        if (!node)
+          return;
+
+        if (offset == 0) {
+          range["set" + side + "Before"](node);
+          return true;
+        }
+
+        var backlog = []
+        function decompose(node) {
+          if (node.nodeType == 3)
+            backlog.push(node);
+          else
+            forEach(node.childNodes, decompose);
+        }
+        while (true) {
+          while (node && !backlog.length) {
+            decompose(node);
+            node = node.nextSibling;
+          }
+          var cur = backlog.shift();
+          if (!cur) return false;
+
+          var length = cur.nodeValue.length;
+          if (length >= offset) {
+            range["set" + side](cur, offset);
+            return true;
+          }
+          offset -= length;
+        }
+      }
+
+      to = to || from;
+      if (setPoint(to.node, to.offset, "End") && setPoint(from.node, from.offset, "Start"))
+        selectRange(range, win);
+    };
+  }
+})();
diff --git a/project/static/js/codemirror/stringstream.js b/project/static/js/codemirror/stringstream.js
new file mode 100644 (file)
index 0000000..6d9355f
--- /dev/null
@@ -0,0 +1,140 @@
+/* String streams are the things fed to parsers (which can feed them
+ * to a tokenizer if they want). They provide peek and next methods
+ * for looking at the current character (next 'consumes' this
+ * character, peek does not), and a get method for retrieving all the
+ * text that was consumed since the last time get was called.
+ *
+ * An easy mistake to make is to let a StopIteration exception finish
+ * the token stream while there are still characters pending in the
+ * string stream (hitting the end of the buffer while parsing a
+ * token). To make it easier to detect such errors, the strings throw
+ * an exception when this happens.
+ */
+
+// Make a string stream out of an iterator that returns strings. This
+// is applied to the result of traverseDOM (see codemirror.js), and
+// the resulting stream is fed to the parser.
+window.stringStream = function(source){
+  // String that's currently being iterated over.
+  var current = "";
+  // Position in that string.
+  var pos = 0;
+  // Accumulator for strings that have been iterated over but not
+  // get()-ed yet.
+  var accum = "";
+  // Make sure there are more characters ready, or throw
+  // StopIteration.
+  function ensureChars() {
+    while (pos == current.length) {
+      accum += current;
+      current = ""; // In case source.next() throws
+      pos = 0;
+      try {current = source.next();}
+      catch (e) {
+        if (e != StopIteration) throw e;
+        else return false;
+      }
+    }
+    return true;
+  }
+
+  return {
+    // Return the next character in the stream.
+    peek: function() {
+      if (!ensureChars()) return null;
+      return current.charAt(pos);
+    },
+    // Get the next character, throw StopIteration if at end, check
+    // for unused content.
+    next: function() {
+      if (!ensureChars()) {
+        if (accum.length > 0)
+          throw "End of stringstream reached without emptying buffer ('" + accum + "').";
+        else
+          throw StopIteration;
+      }
+      return current.charAt(pos++);
+    },
+    // Return the characters iterated over since the last call to
+    // .get().
+    get: function() {
+      var temp = accum;
+      accum = "";
+      if (pos > 0){
+        temp += current.slice(0, pos);
+        current = current.slice(pos);
+        pos = 0;
+      }
+      return temp;
+    },
+    // Push a string back into the stream.
+    push: function(str) {
+      current = current.slice(0, pos) + str + current.slice(pos);
+    },
+    lookAhead: function(str, consume, skipSpaces, caseInsensitive) {
+      function cased(str) {return caseInsensitive ? str.toLowerCase() : str;}
+      str = cased(str);
+      var found = false;
+
+      var _accum = accum, _pos = pos;
+      if (skipSpaces) this.nextWhileMatches(/[\s\u00a0]/);
+
+      while (true) {
+        var end = pos + str.length, left = current.length - pos;
+        if (end <= current.length) {
+          found = str == cased(current.slice(pos, end));
+          pos = end;
+          break;
+        }
+        else if (str.slice(0, left) == cased(current.slice(pos))) {
+          accum += current; current = "";
+          try {current = source.next();}
+          catch (e) {break;}
+          pos = 0;
+          str = str.slice(left);
+        }
+        else {
+          break;
+        }
+      }
+
+      if (!(found && consume)) {
+        current = accum.slice(_accum.length) + current;
+        pos = _pos;
+        accum = _accum;
+      }
+
+      return found;
+    },
+
+    // Utils built on top of the above
+    more: function() {
+      return this.peek() !== null;
+    },
+    applies: function(test) {
+      var next = this.peek();
+      return (next !== null && test(next));
+    },
+    nextWhile: function(test) {
+      var next;
+      while ((next = this.peek()) !== null && test(next))
+        this.next();
+    },
+    matches: function(re) {
+      var next = this.peek();
+      return (next !== null && re.test(next));
+    },
+    nextWhileMatches: function(re) {
+      var next;
+      while ((next = this.peek()) !== null && re.test(next))
+        this.next();
+    },
+    equals: function(ch) {
+      return ch === this.peek();
+    },
+    endOfLine: function() {
+      var next = this.peek();
+      return next == null || next == "\n";
+    }
+  };
+};
diff --git a/project/static/js/codemirror/tokenize.js b/project/static/js/codemirror/tokenize.js
new file mode 100644 (file)
index 0000000..071970c
--- /dev/null
@@ -0,0 +1,57 @@
+// A framework for simple tokenizers. Takes care of newlines and
+// white-space, and of getting the text from the source stream into
+// the token object. A state is a function of two arguments -- a
+// string stream and a setState function. The second can be used to
+// change the tokenizer's state, and can be ignored for stateless
+// tokenizers. This function should advance the stream over a token
+// and return a string or object containing information about the next
+// token, or null to pass and have the (new) state be called to finish
+// the token. When a string is given, it is wrapped in a {style, type}
+// object. In the resulting object, the characters consumed are stored
+// under the content property. Any whitespace following them is also
+// automatically consumed, and added to the value property. (Thus,
+// content is the actual meaningful part of the token, while value
+// contains all the text it spans.)
+
+function tokenizer(source, state) {
+  // Newlines are always a separate token.
+  function isWhiteSpace(ch) {
+    // The messy regexp is because IE's regexp matcher is of the
+    // opinion that non-breaking spaces are no whitespace.
+    return ch != "\n" && /^[\s\u00a0]*$/.test(ch);
+  }
+
+  var tokenizer = {
+    state: state,
+
+    take: function(type) {
+      if (typeof(type) == "string")
+        type = {style: type, type: type};
+
+      type.content = (type.content || "") + source.get();
+      if (!/\n$/.test(type.content))
+        source.nextWhile(isWhiteSpace);
+      type.value = type.content + source.get();
+      return type;
+    },
+
+    next: function () {
+      if (!source.more()) throw StopIteration;
+
+      var type;
+      if (source.equals("\n")) {
+        source.next();
+        return this.take("whitespace");
+      }
+      
+      if (source.applies(isWhiteSpace))
+        type = "whitespace";
+      else
+        while (!type)
+          type = this.state(source, function(s) {tokenizer.state = s;});
+
+      return this.take(type);
+    }
+  };
+  return tokenizer;
+}
diff --git a/project/static/js/codemirror/undo.js b/project/static/js/codemirror/undo.js
new file mode 100644 (file)
index 0000000..1930cfb
--- /dev/null
@@ -0,0 +1,403 @@
+/**
+ * Storage and control for undo information within a CodeMirror
+ * editor. 'Why on earth is such a complicated mess required for
+ * that?', I hear you ask. The goal, in implementing this, was to make
+ * the complexity of storing and reverting undo information depend
+ * only on the size of the edited or restored content, not on the size
+ * of the whole document. This makes it necessary to use a kind of
+ * 'diff' system, which, when applied to a DOM tree, causes some
+ * complexity and hackery.
+ *
+ * In short, the editor 'touches' BR elements as it parses them, and
+ * the History stores these. When nothing is touched in commitDelay
+ * milliseconds, the changes are committed: It goes over all touched
+ * nodes, throws out the ones that did not change since last commit or
+ * are no longer in the document, and assembles the rest into zero or
+ * more 'chains' -- arrays of adjacent lines. Links back to these
+ * chains are added to the BR nodes, while the chain that previously
+ * spanned these nodes is added to the undo history. Undoing a change
+ * means taking such a chain off the undo history, restoring its
+ * content (text is saved per line) and linking it back into the
+ * document.
+ */
+
+// A history object needs to know about the DOM container holding the
+// document, the maximum amount of undo levels it should store, the
+// delay (of no input) after which it commits a set of changes, and,
+// unfortunately, the 'parent' window -- a window that is not in
+// designMode, and on which setTimeout works in every browser.
+function History(container, maxDepth, commitDelay, editor, onChange) {
+  this.container = container;
+  this.maxDepth = maxDepth; this.commitDelay = commitDelay;
+  this.editor = editor; this.parent = editor.parent;
+  this.onChange = onChange;
+  // This line object represents the initial, empty editor.
+  var initial = {text: "", from: null, to: null};
+  // As the borders between lines are represented by BR elements, the
+  // start of the first line and the end of the last one are
+  // represented by null. Since you can not store any properties
+  // (links to line objects) in null, these properties are used in
+  // those cases.
+  this.first = initial; this.last = initial;
+  // Similarly, a 'historyTouched' property is added to the BR in
+  // front of lines that have already been touched, and 'firstTouched'
+  // is used for the first line.
+  this.firstTouched = false;
+  // History is the set of committed changes, touched is the set of
+  // nodes touched since the last commit.
+  this.history = []; this.redoHistory = []; this.touched = [];
+}
+
+History.prototype = {
+  // Schedule a commit (if no other touches come in for commitDelay
+  // milliseconds).
+  scheduleCommit: function() {
+    var self = this;
+    this.parent.clearTimeout(this.commitTimeout);
+    this.commitTimeout = this.parent.setTimeout(function(){self.tryCommit();}, this.commitDelay);
+  },
+
+  // Mark a node as touched. Null is a valid argument.
+  touch: function(node) {
+    this.setTouched(node);
+    this.scheduleCommit();
+  },
+
+  // Undo the last change.
+  undo: function() {
+    // Make sure pending changes have been committed.
+    this.commit();
+
+    if (this.history.length) {
+      // Take the top diff from the history, apply it, and store its
+      // shadow in the redo history.
+      var item = this.history.pop();
+      this.redoHistory.push(this.updateTo(item, "applyChain"));
+      if (this.onChange) this.onChange();
+      return this.chainNode(item);
+    }
+  },
+
+  // Redo the last undone change.
+  redo: function() {
+    this.commit();
+    if (this.redoHistory.length) {
+      // The inverse of undo, basically.
+      var item = this.redoHistory.pop();
+      this.addUndoLevel(this.updateTo(item, "applyChain"));
+      if (this.onChange) this.onChange();
+      return this.chainNode(item);
+    }
+  },
+
+  clear: function() {
+    this.history = [];
+    this.redoHistory = [];
+  },
+
+  // Ask for the size of the un/redo histories.
+  historySize: function() {
+    return {undo: this.history.length, redo: this.redoHistory.length};
+  },
+
+  // Push a changeset into the document.
+  push: function(from, to, lines) {
+    var chain = [];
+    for (var i = 0; i < lines.length; i++) {
+      var end = (i == lines.length - 1) ? to : this.container.ownerDocument.createElement("BR");
+      chain.push({from: from, to: end, text: cleanText(lines[i])});
+      from = end;
+    }
+    this.pushChains([chain], from == null && to == null);
+  },
+
+  pushChains: function(chains, doNotHighlight) {
+    this.commit(doNotHighlight);
+    this.addUndoLevel(this.updateTo(chains, "applyChain"));
+    this.redoHistory = [];
+  },
+
+  // Retrieve a DOM node from a chain (for scrolling to it after undo/redo).
+  chainNode: function(chains) {
+    for (var i = 0; i < chains.length; i++) {
+      var start = chains[i][0], node = start && (start.from || start.to);
+      if (node) return node;
+    }
+  },
+
+  // Clear the undo history, make the current document the start
+  // position.
+  reset: function() {
+    this.history = []; this.redoHistory = [];
+  },
+
+  textAfter: function(br) {
+    return this.after(br).text;
+  },
+
+  nodeAfter: function(br) {
+    return this.after(br).to;
+  },
+
+  nodeBefore: function(br) {
+    return this.before(br).from;
+  },
+
+  // Commit unless there are pending dirty nodes.
+  tryCommit: function() {
+    if (!window.History) return; // Stop when frame has been unloaded
+    if (this.editor.highlightDirty()) this.commit();
+    else this.scheduleCommit();
+  },
+
+  // Check whether the touched nodes hold any changes, if so, commit
+  // them.
+  commit: function(doNotHighlight) {
+    this.parent.clearTimeout(this.commitTimeout);
+    // Make sure there are no pending dirty nodes.
+    if (!doNotHighlight) this.editor.highlightDirty(true);
+    // Build set of chains.
+    var chains = this.touchedChains(), self = this;
+
+    if (chains.length) {
+      this.addUndoLevel(this.updateTo(chains, "linkChain"));
+      this.redoHistory = [];
+      if (this.onChange) this.onChange();
+    }
+  },
+
+  // [ end of public interface ]
+
+  // Update the document with a given set of chains, return its
+  // shadow. updateFunc should be "applyChain" or "linkChain". In the
+  // second case, the chains are taken to correspond the the current
+  // document, and only the state of the line data is updated. In the
+  // first case, the content of the chains is also pushed iinto the
+  // document.
+  updateTo: function(chains, updateFunc) {
+    var shadows = [], dirty = [];
+    for (var i = 0; i < chains.length; i++) {
+      shadows.push(this.shadowChain(chains[i]));
+      dirty.push(this[updateFunc](chains[i]));
+    }
+    if (updateFunc == "applyChain")
+      this.notifyDirty(dirty);
+    return shadows;
+  },
+
+  // Notify the editor that some nodes have changed.
+  notifyDirty: function(nodes) {
+    forEach(nodes, method(this.editor, "addDirtyNode"))
+    this.editor.scheduleHighlight();
+  },
+
+  // Link a chain into the DOM nodes (or the first/last links for null
+  // nodes).
+  linkChain: function(chain) {
+    for (var i = 0; i < chain.length; i++) {
+      var line = chain[i];
+      if (line.from) line.from.historyAfter = line;
+      else this.first = line;
+      if (line.to) line.to.historyBefore = line;
+      else this.last = line;
+    }
+  },
+
+  // Get the line object after/before a given node.
+  after: function(node) {
+    return node ? node.historyAfter : this.first;
+  },
+  before: function(node) {
+    return node ? node.historyBefore : this.last;
+  },
+
+  // Mark a node as touched if it has not already been marked.
+  setTouched: function(node) {
+    if (node) {
+      if (!node.historyTouched) {
+        this.touched.push(node);
+        node.historyTouched = true;
+      }
+    }
+    else {
+      this.firstTouched = true;
+    }
+  },
+
+  // Store a new set of undo info, throw away info if there is more of
+  // it than allowed.
+  addUndoLevel: function(diffs) {
+    this.history.push(diffs);
+    if (this.history.length > this.maxDepth)
+      this.history.shift();
+  },
+
+  // Build chains from a set of touched nodes.
+  touchedChains: function() {
+    var self = this;
+
+    // The temp system is a crummy hack to speed up determining
+    // whether a (currently touched) node has a line object associated
+    // with it. nullTemp is used to store the object for the first
+    // line, other nodes get it stored in their historyTemp property.
+    var nullTemp = null;
+    function temp(node) {return node ? node.historyTemp : nullTemp;}
+    function setTemp(node, line) {
+      if (node) node.historyTemp = line;
+      else nullTemp = line;
+    }
+
+    function buildLine(node) {
+      var text = [];
+      for (var cur = node ? node.nextSibling : self.container.firstChild;
+           cur && cur.nodeName != "BR"; cur = cur.nextSibling)
+        if (cur.currentText) text.push(cur.currentText);
+      return {from: node, to: cur, text: cleanText(text.join(""))};
+    }
+
+    // Filter out unchanged lines and nodes that are no longer in the
+    // document. Build up line objects for remaining nodes.
+    var lines = [];
+    if (self.firstTouched) self.touched.push(null);
+    forEach(self.touched, function(node) {
+      if (node && node.parentNode != self.container) return;
+
+      if (node) node.historyTouched = false;
+      else self.firstTouched = false;
+
+      var line = buildLine(node), shadow = self.after(node);
+      if (!shadow || shadow.text != line.text || shadow.to != line.to) {
+        lines.push(line);
+        setTemp(node, line);
+      }
+    });
+
+    // Get the BR element after/before the given node.
+    function nextBR(node, dir) {
+      var link = dir + "Sibling", search = node[link];
+      while (search && search.nodeName != "BR")
+        search = search[link];
+      return search;
+    }
+
+    // Assemble line objects into chains by scanning the DOM tree
+    // around them.
+    var chains = []; self.touched = [];
+    forEach(lines, function(line) {
+      // Note that this makes the loop skip line objects that have
+      // been pulled into chains by lines before them.
+      if (!temp(line.from)) return;
+
+      var chain = [], curNode = line.from, safe = true;
+      // Put any line objects (referred to by temp info) before this
+      // one on the front of the array.
+      while (true) {
+        var curLine = temp(curNode);
+        if (!curLine) {
+          if (safe) break;
+          else curLine = buildLine(curNode);
+        }
+        chain.unshift(curLine);
+        setTemp(curNode, null);
+        if (!curNode) break;
+        safe = self.after(curNode);
+        curNode = nextBR(curNode, "previous");
+      }
+      curNode = line.to; safe = self.before(line.from);
+      // Add lines after this one at end of array.
+      while (true) {
+        if (!curNode) break;
+        var curLine = temp(curNode);
+        if (!curLine) {
+          if (safe) break;
+          else curLine = buildLine(curNode);
+        }
+        chain.push(curLine);
+        setTemp(curNode, null);
+        safe = self.before(curNode);
+        curNode = nextBR(curNode, "next");
+      }
+      chains.push(chain);
+    });
+
+    return chains;
+  },
+
+  // Find the 'shadow' of a given chain by following the links in the
+  // DOM nodes at its start and end.
+  shadowChain: function(chain) {
+    var shadows = [], next = this.after(chain[0].from), end = chain[chain.length - 1].to;
+    while (true) {
+      shadows.push(next);
+      var nextNode = next.to;
+      if (!nextNode || nextNode == end)
+        break;
+      else
+        next = nextNode.historyAfter || this.before(end);
+      // (The this.before(end) is a hack -- FF sometimes removes
+      // properties from BR nodes, in which case the best we can hope
+      // for is to not break.)
+    }
+    return shadows;
+  },
+
+  // Update the DOM tree to contain the lines specified in a given
+  // chain, link this chain into the DOM nodes.
+  applyChain: function(chain) {
+    // Some attempt is made to prevent the cursor from jumping
+    // randomly when an undo or redo happens. It still behaves a bit
+    // strange sometimes.
+    var cursor = select.cursorPos(this.container, false), self = this;
+
+    // Remove all nodes in the DOM tree between from and to (null for
+    // start/end of container).
+    function removeRange(from, to) {
+      var pos = from ? from.nextSibling : self.container.firstChild;
+      while (pos != to) {
+        var temp = pos.nextSibling;
+        removeElement(pos);
+        pos = temp;
+      }
+    }
+
+    var start = chain[0].from, end = chain[chain.length - 1].to;
+    // Clear the space where this change has to be made.
+    removeRange(start, end);
+
+    // Insert the content specified by the chain into the DOM tree.
+    for (var i = 0; i < chain.length; i++) {
+      var line = chain[i];
+      // The start and end of the space are already correct, but BR
+      // tags inside it have to be put back.
+      if (i > 0)
+        self.container.insertBefore(line.from, end);
+
+      // Add the text.
+      var node = makePartSpan(fixSpaces(line.text), this.container.ownerDocument);
+      self.container.insertBefore(node, end);
+      // See if the cursor was on this line. Put it back, adjusting
+      // for changed line length, if it was.
+      if (cursor && cursor.node == line.from) {
+        var cursordiff = 0;
+        var prev = this.after(line.from);
+        if (prev && i == chain.length - 1) {
+          // Only adjust if the cursor is after the unchanged part of
+          // the line.
+          for (var match = 0; match < cursor.offset &&
+               line.text.charAt(match) == prev.text.charAt(match); match++);
+          if (cursor.offset > match)
+            cursordiff = line.text.length - prev.text.length;
+        }
+        select.setCursorPos(this.container, {node: line.from, offset: Math.max(0, cursor.offset + cursordiff)});
+      }
+      // Cursor was in removed line, this is last new line.
+      else if (cursor && (i == chain.length - 1) && cursor.node && cursor.node.parentNode != this.container) {
+        select.setCursorPos(this.container, {node: line.from, offset: line.text.length});
+      }
+    }
+
+    // Anchor the chain in the DOM tree.
+    this.linkChain(chain);
+    return start;
+  }
+};
diff --git a/project/static/js/codemirror/util.js b/project/static/js/codemirror/util.js
new file mode 100644 (file)
index 0000000..a1390a9
--- /dev/null
@@ -0,0 +1,116 @@
+/* A few useful utility functions. */
+
+var internetExplorer = document.selection && window.ActiveXObject && /MSIE/.test(navigator.userAgent);
+var webkit = /AppleWebKit/.test(navigator.userAgent);
+var safari = /Apple Computers, Inc/.test(navigator.vendor);
+
+// Capture a method on an object.
+function method(obj, name) {
+  return function() {obj[name].apply(obj, arguments);};
+}
+
+// The value used to signal the end of a sequence in iterators.
+var StopIteration = {toString: function() {return "StopIteration"}};
+
+// Apply a function to each element in a sequence.
+function forEach(iter, f) {
+  if (iter.next) {
+    try {while (true) f(iter.next());}
+    catch (e) {if (e != StopIteration) throw e;}
+  }
+  else {
+    for (var i = 0; i < iter.length; i++)
+      f(iter[i]);
+  }
+}
+
+// Map a function over a sequence, producing an array of results.
+function map(iter, f) {
+  var accum = [];
+  forEach(iter, function(val) {accum.push(f(val));});
+  return accum;
+}
+
+// Create a predicate function that tests a string againsts a given
+// regular expression. No longer used but might be used by 3rd party
+// parsers.
+function matcher(regexp){
+  return function(value){return regexp.test(value);};
+}
+
+// Test whether a DOM node has a certain CSS class. Much faster than
+// the MochiKit equivalent, for some reason.
+function hasClass(element, className){
+  var classes = element.className;
+  return classes && new RegExp("(^| )" + className + "($| )").test(classes);
+}
+
+// Insert a DOM node after another node.
+function insertAfter(newNode, oldNode) {
+  var parent = oldNode.parentNode;
+  parent.insertBefore(newNode, oldNode.nextSibling);
+  return newNode;
+}
+
+function removeElement(node) {
+  if (node.parentNode)
+    node.parentNode.removeChild(node);
+}
+
+function clearElement(node) {
+  while (node.firstChild)
+    node.removeChild(node.firstChild);
+}
+
+// Check whether a node is contained in another one.
+function isAncestor(node, child) {
+  while (child = child.parentNode) {
+    if (node == child)
+      return true;
+  }
+  return false;
+}
+
+// The non-breaking space character.
+var nbsp = "\u00a0";
+var matching = {"{": "}", "[": "]", "(": ")",
+                "}": "{", "]": "[", ")": "("};
+
+// Standardize a few unportable event properties.
+function normalizeEvent(event) {
+  if (!event.stopPropagation) {
+    event.stopPropagation = function() {this.cancelBubble = true;};
+    event.preventDefault = function() {this.returnValue = false;};
+  }
+  if (!event.stop) {
+    event.stop = function() {
+      this.stopPropagation();
+      this.preventDefault();
+    };
+  }
+
+  if (event.type == "keypress") {
+    event.code = (event.charCode == null) ? event.keyCode : event.charCode;
+    event.character = String.fromCharCode(event.code);
+  }
+  return event;
+}
+
+// Portably register event handlers.
+function addEventHandler(node, type, handler, removeFunc) {
+  function wrapHandler(event) {
+    handler(normalizeEvent(event || window.event));
+  }
+  if (typeof node.addEventListener == "function") {
+    node.addEventListener(type, wrapHandler, false);
+    if (removeFunc) return function() {node.removeEventListener(type, wrapHandler, false);};
+  }
+  else {
+    node.attachEvent("on" + type, wrapHandler);
+    if (removeFunc) return function() {node.detachEvent("on" + type, wrapHandler);};
+  }
+}
+
+function nodeText(node) {
+  return node.innerText || node.textContent || node.nodeValue || "";
+}
diff --git a/project/static/js/edit_area.css b/project/static/js/edit_area.css
deleted file mode 100755 (executable)
index 172b366..0000000
+++ /dev/null
@@ -1,530 +0,0 @@
-body, html{\r
-       margin: 0; \r
-       padding: 0;\r
-       height: 100%;\r
-       border: none;\r
-       overflow: hidden;\r
-       background-color: #FFF;\r
-}\r
-\r
-body, html, table, form, textarea{\r
-       font: 12px monospace, sans-serif;\r
-}\r
-\r
-#editor{\r
-       border: solid #888 1px;\r
-       overflow: hidden;\r
-}\r
-\r
-#result{\r
-       z-index: 4; \r
-       overflow-x: auto;\r
-       overflow-y: scroll;\r
-       border-top: solid #888 1px;\r
-       border-bottom: solid #888 1px;\r
-       position: relative;\r
-       clear: both;\r
-}\r
-\r
-#result.empty{\r
-       overflow: hidden;\r
-}\r
-\r
-#container{\r
-       overflow: hidden;\r
-       border: solid blue 0;\r
-       position: relative; \r
-       z-index: 10;\r
-       padding: 0 5px 0 45px;\r
-       /*padding-right: 5px;*/ \r
-}\r
-\r
-#textarea{\r
-       position: relative; \r
-       top: 0; \r
-       left: 0;\r
-       margin: 0;\r
-       padding: 0;\r
-       width: 100%;\r
-       height: 100%; \r
-       overflow: hidden;  \r
-       z-index: 7; \r
-       border-width: 0;\r
-       background-color: transparent;\r
-       resize: none;\r
-}\r
-\r
-#textarea, #textarea:hover{\r
-       outline: none;  /* safari outline fix */\r
-}\r
-\r
-#content_highlight{\r
-       white-space: pre;\r
-       margin: 0;\r
-       padding: 0;\r
-       position : absolute; \r
-       z-index: 4; \r
-       overflow: visible;\r
-}\r
-\r
-\r
-#selection_field, #selection_field_text{\r
-       margin: 0; \r
-       background-color: #E1F2F9; \r
-/*     height: 1px; */  \r
-       position: absolute;\r
-       z-index: 5;\r
-       top: -100px;\r
-       padding: 0;\r
-       white-space: pre;\r
-       overflow: hidden;\r
-}\r
-\r
-#selection_field.show_colors {\r
-       z-index: 3;\r
-       background-color:#EDF9FC;\r
-       \r
-}\r
-\r
-#selection_field strong{\r
-       font-weight:normal;\r
-}\r
-\r
-#selection_field.show_colors *, #selection_field_text * {\r
-       visibility: hidden;\r
-}\r
-\r
-#selection_field_text{\r
-       background-color:transparent;\r
-}\r
-\r
-#selection_field_text strong{\r
-       font-weight:normal;\r
-       background-color:#3399FE;\r
-       color: #FFF;\r
-       visibility:visible;\r
-}\r
-\r
-#container.word_wrap #content_highlight,\r
-#container.word_wrap #selection_field,\r
-#container.word_wrap #selection_field_text,\r
-#container.word_wrap #test_font_size{\r
-       white-space: pre-wrap;       /* css-3 */\r
-       white-space: -moz-pre-wrap !important;  /* Mozilla, since 1999 */\r
-       white-space: -pre-wrap;      /* Opera 4-6 */\r
-       white-space: -o-pre-wrap;    /* Opera 7 */\r
-       word-wrap: break-word;       /* Internet Explorer 5.5+ */\r
-       width: 99%;\r
-}\r
-\r
-#line_number{\r
-       position: absolute;\r
-       overflow: hidden;\r
-       border-right: solid black 1px;\r
-       z-index:8;\r
-       width: 38px;\r
-       padding: 0 5px 0 0;\r
-       margin: 0 0 0 -45px;\r
-       text-align: right;\r
-       color: #AAAAAA;\r
-}\r
-\r
-#test_font_size{\r
-       padding: 0; \r
-       margin: 0; \r
-       visibility: hidden;\r
-       position: absolute;\r
-       white-space: pre;\r
-}\r
-\r
-pre{\r
-       margin: 0;\r
-       padding: 0;\r
-}\r
-\r
-.hidden{\r
-       opacity: 0.2; \r
-       filter:alpha(opacity=20);\r
-}\r
-\r
-#result .edit_area_cursor{\r
-       position: absolute; \r
-       z-index:6; \r
-       background-color: #FF6633;\r
-       top: -100px;\r
-       margin: 0;\r
-}\r
-\r
-#result .edit_area_selection_field .overline{\r
-       background-color: #996600;\r
-}\r
-\r
-\r
-/* area popup */\r
-.editarea_popup{\r
-       border: solid 1px #888888;\r
-       background-color: #ECE9D8; \r
-       width: 250px; \r
-       padding: 4px; \r
-       position: absolute;\r
-       visibility: hidden; \r
-       z-index: 15;\r
-       top: -500px;\r
-}\r
-\r
-.editarea_popup, .editarea_popup table{\r
-       font-family: sans-serif;\r
-       font-size: 10pt;\r
-}\r
-\r
-.editarea_popup img{\r
-       border: 0;\r
-}\r
-\r
-.editarea_popup .close_popup{\r
-       float: right; \r
-       line-height: 16px; \r
-       border: 0; \r
-       padding: 0;\r
-}\r
-\r
-.editarea_popup h1,.editarea_popup h2,.editarea_popup h3,.editarea_popup h4,.editarea_popup h5,.editarea_popup h6{\r
-       margin: 0;\r
-       padding: 0;\r
-}\r
-\r
-.editarea_popup .copyright{\r
-       text-align: right;\r
-}      \r
-\r
-/* Area_search */\r
-div#area_search_replace{\r
-       /*width: 250px;*/\r
-}\r
-\r
-div#area_search_replace img{\r
-       border: 0;\r
-}\r
-\r
-div#area_search_replace div.button{\r
-       text-align: center;\r
-       line-height: 1.7em;\r
-}\r
-\r
-div#area_search_replace .button a{\r
-       cursor: pointer;\r
-       border: solid 1px #888888;\r
-       background-color: #DEDEDE;\r
-       text-decoration: none;\r
-       padding: 0 2px;\r
-       color: #000000; \r
-       white-space: nowrap;\r
-}\r
-\r
-div#area_search_replace a:hover{       \r
-       /*border: solid 1px #888888;*/\r
-       background-color: #EDEDED;\r
-}\r
-\r
-div#area_search_replace  #move_area_search_replace{\r
-       cursor: move; \r
-       border: solid 1px #888;\r
-}\r
-\r
-div#area_search_replace  #close_area_search_replace{\r
-       text-align: right; \r
-       vertical-align: top; \r
-       white-space: nowrap;\r
-}\r
-\r
-div#area_search_replace  #area_search_msg{\r
-       height: 18px; \r
-       overflow: hidden; \r
-       border-top: solid 1px #888; \r
-       margin-top: 3px;\r
-}\r
-\r
-/* area help */\r
-#edit_area_help{\r
-       width: 350px;\r
-}\r
-\r
-#edit_area_help div.close_popup{\r
-       float: right;\r
-}\r
-\r
-/* area_toolbar */\r
-.area_toolbar{\r
-       /*font: 11px sans-serif;*/\r
-       width: 100%; \r
-       /*height: 21px; */\r
-       margin: 0; \r
-       padding: 0;\r
-       background-color: #ECE9D8;\r
-       text-align: center;\r
-}\r
-\r
-.area_toolbar, .area_toolbar table{\r
-       font: 11px sans-serif;\r
-}\r
-\r
-.area_toolbar img{\r
-       border: 0;\r
-       vertical-align: middle;\r
-}\r
-\r
-.area_toolbar input{\r
-       margin: 0;\r
-       padding: 0;\r
-}\r
-\r
-.area_toolbar select{\r
-    font-family: 'MS Sans Serif',sans-serif,Verdana,Arial;\r
-    font-size: 7pt;\r
-    font-weight: normal;\r
-    margin: 2px 0 0 0 ;\r
-    padding: 0;\r
-    vertical-align: top;\r
-    background-color: #F0F0EE;\r
-}\r
-\r
-table.statusbar{\r
-       width: 100%;\r
-}\r
-\r
-.area_toolbar td.infos{\r
-       text-align: center;\r
-       width: 130px;\r
-       border-right: solid 1px #888;\r
-       border-width: 0 1px 0 0;\r
-       padding: 0;\r
-}\r
-\r
-.area_toolbar td.total{\r
-       text-align: right;\r
-       width: 50px;\r
-       padding: 0;\r
-}\r
-\r
-.area_toolbar td.resize{\r
-       text-align: right;\r
-}\r
-/*\r
-.area_toolbar span{\r
-       line-height: 1px;\r
-       padding: 0;\r
-       margin: 0;\r
-}*/\r
-\r
-.area_toolbar span#resize_area{\r
-       cursor: nw-resize;\r
-       visibility: hidden;\r
-}\r
-\r
-/* toolbar buttons */\r
-.editAreaButtonNormal, .editAreaButtonOver, .editAreaButtonDown, .editAreaSeparator, .editAreaSeparatorLine, .editAreaButtonDisabled, .editAreaButtonSelected {\r
-       border: 0; margin: 0; padding: 0; background: transparent;\r
-       margin-top: 0;\r
-       margin-left: 1px;\r
-       padding: 0;\r
-}\r
-\r
-.editAreaButtonNormal {\r
-       border: 1px solid #ECE9D8 !important;\r
-       cursor: pointer;\r
-}\r
-\r
-.editAreaButtonOver {\r
-       border: 1px solid #0A246A !important;\r
-       cursor: pointer;\r
-       background-color: #B6BDD2;\r
-}\r
-\r
-.editAreaButtonDown {\r
-       cursor: pointer;\r
-       border: 1px solid #0A246A !important;\r
-       background-color: #8592B5;\r
-}\r
-\r
-.editAreaButtonSelected {\r
-       border: 1px solid #C0C0BB !important;\r
-       cursor: pointer;\r
-       background-color: #F4F2E8;\r
-}\r
-\r
-.editAreaButtonDisabled {\r
-       filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);\r
-       -moz-opacity:0.3;\r
-       opacity: 0.3;\r
-       border: 1px solid #F0F0EE !important;\r
-       cursor: pointer;\r
-}\r
-\r
-.editAreaSeparatorLine {\r
-       margin: 1px 2px;\r
-       background-color: #C0C0BB;\r
-       width: 2px;\r
-       height: 18px;\r
-}\r
-\r
-/* waiting screen */\r
-#processing{\r
-       display: none; \r
-       background-color:#ECE9D8; \r
-       border: solid #888 1px;\r
-       position: absolute; \r
-       top: 0; \r
-       left: 0;\r
-       width: 100%; \r
-       height: 100%; \r
-       z-index: 100; \r
-       text-align: center;\r
-}\r
-\r
-#processing_text{\r
-       position:absolute;\r
-       left: 50%;\r
-       top: 50%;\r
-       width: 200px;\r
-       height: 20px; \r
-       margin-left: -100px;\r
-       margin-top: -10px;\r
-       text-align: center;\r
-}\r
-/* end */\r
-\r
-\r
-/**** tab browsing area ****/\r
-#tab_browsing_area{\r
-       display: none;\r
-       background-color: #CCC9A8;\r
-       border-top: 1px solid #888;\r
-       text-align: left;\r
-       margin: 0;\r
-}\r
-\r
-#tab_browsing_list {\r
-       padding: 0; \r
-       margin: 0; \r
-       list-style-type: none;\r
-       white-space: nowrap;\r
-}\r
-#tab_browsing_list li {\r
-       float: left;\r
-       margin: -1px;\r
-}\r
-#tab_browsing_list a {\r
-       position: relative;\r
-       display: block; \r
-       text-decoration: none; \r
-       float: left; \r
-       cursor: pointer;\r
-       line-height:14px;\r
-}\r
-\r
-#tab_browsing_list a span {\r
-       display: block; \r
-       color: #000; \r
-       background: #ECE9D8; \r
-       border: 1px solid #888; \r
-       border-width: 1px 1px 0; \r
-       text-align: center; \r
-       padding: 2px 2px 1px 4px; \r
-       position: relative;     /*IE 6 hack */\r
-}\r
-\r
-#tab_browsing_list a b {\r
-       display: block; \r
-       border-bottom: 2px solid #617994;\r
-}\r
-\r
-#tab_browsing_list a .edited {\r
-       display: none;\r
-}\r
-\r
-#tab_browsing_list a.edited .edited {\r
-       display: inline;\r
-}\r
-\r
-#tab_browsing_list a img{\r
-       margin-left: 7px;\r
-}\r
-\r
-#tab_browsing_list a.edited img{\r
-       margin-left: 3px;\r
-}\r
-\r
-#tab_browsing_list a:hover span {\r
-       background: #F4F2E8;\r
-       border-color: #0A246A;\r
-}\r
-\r
-#tab_browsing_list .selected a span{\r
-       background: #046380;\r
-       color: #FFF;\r
-}\r
-\r
-\r
-#no_file_selected{\r
-       height: 100%;\r
-       width: 150%; /* Opera need more than 100% */\r
-       background: #CCC;\r
-       display: none;\r
-       z-index: 20;\r
-       position: absolute;\r
-}\r
-\r
-\r
-/*** Non-editable mode ***/\r
-.non_editable #editor\r
-{\r
-       border-width: 0 1px;\r
-}\r
-\r
-.non_editable .area_toolbar\r
-{\r
-       display: none;\r
-}\r
-\r
-/*** Auto completion ***/\r
-#auto_completion_area\r
-{\r
-       background:     #FFF;\r
-       border:         solid 1px #888;\r
-       position:       absolute;\r
-       z-index:        15;\r
-       width:  280px;\r
-       height: 180px;\r
-       overflow: auto;\r
-       display:none;\r
-}\r
-\r
-#auto_completion_area a, #auto_completion_area a:visited\r
-{\r
-       display:        block;\r
-       padding:        0 2px 1px;\r
-       color:          #000;\r
-       text-decoration:none;\r
-}\r
-\r
-#auto_completion_area a:hover, #auto_completion_area a:focus, #auto_completion_area a.focus\r
-{\r
-       background:     #D6E1FE;\r
-       text-decoration:none;\r
-}\r
-\r
-#auto_completion_area ul\r
-{\r
-       margin: 0;\r
-       padding: 0;\r
-       list-style: none inside;\r
-}\r
-#auto_completion_area li\r
-{\r
-       padding:        0;\r
-}\r
-#auto_completion_area .prefix\r
-{\r
-       font-style: italic;\r
-       padding: 0 3px;\r
-}
\ No newline at end of file
diff --git a/project/static/js/edit_area.js b/project/static/js/edit_area.js
deleted file mode 100755 (executable)
index 27674f6..0000000
+++ /dev/null
@@ -1,525 +0,0 @@
-/******\r
- *\r
- *     EditArea \r
- *     Developped by Christophe Dolivet\r
- *     Released under LGPL, Apache and BSD licenses (use the one you want)\r
- *\r
-******/\r
-\r
-       function EditArea(){\r
-               var t=this;\r
-               t.error= false; // to know if load is interrrupt\r
-               \r
-               t.inlinePopup= [{popup_id: "area_search_replace", icon_id: "search"},\r
-                                                                       {popup_id: "edit_area_help", icon_id: "help"}];\r
-               t.plugins= {};\r
-       \r
-               t.line_number=0;\r
-               \r
-               parent.editAreaLoader.set_browser_infos(t);     // navigator identification\r
-               // fix IE8 detection as we run in IE7 emulate mode through X-UA <meta> tag\r
-               if( t.isIE >= 8 )\r
-                       t.isIE  = 7;\r
-               \r
-               t.last_selection={};            \r
-               t.last_text_to_highlight="";\r
-               t.last_hightlighted_text= "";\r
-               t.syntax_list= [];\r
-               t.allready_used_syntax= {};\r
-               t.check_line_selection_timer= 50;       // the timer delay for modification and/or selection change detection\r
-               \r
-               t.textareaFocused= false;\r
-               t.highlight_selection_line= null;\r
-               t.previous= [];\r
-               t.next= [];\r
-               t.last_undo="";\r
-               t.files= {};\r
-               t.filesIdAssoc= {};\r
-               t.curr_file= '';\r
-               //t.loaded= false;\r
-               t.assocBracket={};\r
-               t.revertAssocBracket= {};               \r
-               // bracket selection init \r
-               t.assocBracket["("]=")";\r
-               t.assocBracket["{"]="}";\r
-               t.assocBracket["["]="]";                \r
-               for(var index in t.assocBracket){\r
-                       t.revertAssocBracket[t.assocBracket[index]]=index;\r
-               }\r
-               t.is_editable= true;\r
-               \r
-               \r
-               /*t.textarea="";        \r
-               \r
-               t.state="declare";\r
-               t.code = []; // store highlight syntax for languagues*/\r
-               // font datas\r
-               t.lineHeight= 16;\r
-               /*t.default_font_family= "monospace";\r
-               t.default_font_size= 10;*/\r
-               t.tab_nb_char= 8;       //nb of white spaces corresponding to a tabulation\r
-               if(t.isOpera)\r
-                       t.tab_nb_char= 6;\r
-\r
-               t.is_tabbing= false;\r
-               \r
-               t.fullscreen= {'isFull': false};\r
-               \r
-               t.isResizing=false;     // resize var\r
-               \r
-               // init with settings and ID (area_id is a global var defined by editAreaLoader on iframe creation\r
-               t.id= area_id;\r
-               t.settings= editAreas[t.id]["settings"];\r
-               \r
-               if((""+t.settings['replace_tab_by_spaces']).match(/^[0-9]+$/))\r
-               {\r
-                       t.tab_nb_char= t.settings['replace_tab_by_spaces'];\r
-                       t.tabulation="";\r
-                       for(var i=0; i<t.tab_nb_char; i++)\r
-                               t.tabulation+=" ";\r
-               }else{\r
-                       t.tabulation="\t";\r
-               }\r
-                       \r
-               // retrieve the init parameter for syntax\r
-               if(t.settings["syntax_selection_allow"] && t.settings["syntax_selection_allow"].length>0)\r
-                       t.syntax_list= t.settings["syntax_selection_allow"].replace(/ /g,"").split(",");\r
-               \r
-               if(t.settings['syntax'])\r
-                       t.allready_used_syntax[t.settings['syntax']]=true;\r
-               \r
-               \r
-       };\r
-       EditArea.prototype.init= function(){\r
-               var t=this, a, s=t.settings;\r
-               t.textarea                      = _$("textarea");\r
-               t.container                     = _$("container");\r
-               t.result                        = _$("result");\r
-               t.content_highlight     = _$("content_highlight");\r
-               t.selection_field       = _$("selection_field");\r
-               t.selection_field_text= _$("selection_field_text");\r
-               t.processing_screen     = _$("processing");\r
-               t.editor_area           = _$("editor");\r
-               t.tab_browsing_area     = _$("tab_browsing_area");\r
-               t.test_font_size        = _$("test_font_size");\r
-               a = t.textarea;\r
-               \r
-               if(!s['is_editable'])\r
-                       t.set_editable(false);\r
-               \r
-               t.set_show_line_colors( s['show_line_colors'] );\r
-               \r
-               if(syntax_selec= _$("syntax_selection"))\r
-               {\r
-                       // set up syntax selection lsit in the toolbar\r
-                       for(var i=0; i<t.syntax_list.length; i++) {\r
-                               var syntax= t.syntax_list[i];\r
-                               var option= document.createElement("option");\r
-                               option.value= syntax;\r
-                               if(syntax==s['syntax'])\r
-                                       option.selected= "selected";\r
-                               option.innerHTML= t.get_translation("syntax_" + syntax, "word");\r
-                               syntax_selec.appendChild(option);\r
-                       }\r
-               }\r
-               \r
-               // add plugins buttons in the toolbar\r
-               spans= parent.getChildren(_$("toolbar_1"), "span", "", "", "all", -1);\r
-               \r
-               for(var i=0; i<spans.length; i++){\r
-               \r
-                       id=spans[i].id.replace(/tmp_tool_(.*)/, "$1");\r
-                       if(id!= spans[i].id){\r
-                               for(var j in t.plugins){\r
-                                       if(typeof(t.plugins[j].get_control_html)=="function" ){\r
-                                               html=t.plugins[j].get_control_html(id);\r
-                                               if(html!=false){\r
-                                                       html= t.get_translation(html, "template");\r
-                                                       var new_span= document.createElement("span");\r
-                                                       new_span.innerHTML= html;                               \r
-                                                       var father= spans[i].parentNode;\r
-                                                       spans[i].parentNode.replaceChild(new_span, spans[i]);   \r
-                                                       break; // exit the for loop                                     \r
-                                               }\r
-                                       }\r
-                               }\r
-                       }\r
-               }\r
-               \r
-               // init datas\r
-               //a.value       = 'a';//editAreas[t.id]["textarea"].value;\r
-       \r
-               if(s["debug"])\r
-               {\r
-                       t.debug=parent.document.getElementById("edit_area_debug_"+t.id);\r
-               }\r
-               // init size            \r
-               //this.update_size();\r
-               \r
-               if(_$("redo") != null)\r
-                       t.switchClassSticky(_$("redo"), 'editAreaButtonDisabled', true);\r
-               \r
-               // insert css rules for highlight mode          \r
-               if(typeof(parent.editAreaLoader.syntax[s["syntax"]])!="undefined"){\r
-                       for(var i in parent.editAreaLoader.syntax){\r
-                               if (typeof(parent.editAreaLoader.syntax[i]["styles"]) != "undefined"){\r
-                                       t.add_style(parent.editAreaLoader.syntax[i]["styles"]);\r
-                               }\r
-                       }\r
-               }\r
-       \r
-               // init key events\r
-               if(t.isOpera)\r
-                       _$("editor").onkeypress = keyDown;\r
-               else\r
-                       _$("editor").onkeydown  = keyDown;\r
-\r
-               for(var i=0; i<t.inlinePopup.length; i++){\r
-                       if(t.isOpera)\r
-                               _$(t.inlinePopup[i]["popup_id"]).onkeypress     = keyDown;\r
-                       else\r
-                               _$(t.inlinePopup[i]["popup_id"]).onkeydown      = keyDown;\r
-               }\r
-               \r
-               if(s["allow_resize"]=="both" || s["allow_resize"]=="x" || s["allow_resize"]=="y")\r
-                       t.allow_resize(true);\r
-               \r
-               parent.editAreaLoader.toggle(t.id, "on");\r
-               //a.focus();\r
-               // line selection init\r
-               t.change_smooth_selection_mode(editArea.smooth_selection);\r
-               // highlight\r
-               t.execCommand("change_highlight", s["start_highlight"]);\r
-       \r
-               // get font size datas          \r
-               t.set_font(editArea.settings["font_family"], editArea.settings["font_size"]);\r
-               \r
-               // set unselectable text\r
-               children= parent.getChildren(document.body, "", "selec", "none", "all", -1);\r
-               for(var i=0; i<children.length; i++){\r
-                       if(t.isIE)\r
-                               children[i].unselectable = true; // IE\r
-                       else\r
-                               children[i].onmousedown= function(){return false};\r
-               /*      children[i].style.MozUserSelect = "none"; // Moz\r
-                       children[i].style.KhtmlUserSelect = "none";  // Konqueror/Safari*/\r
-               }\r
-               \r
-               a.spellcheck= s["gecko_spellcheck"];\r
-       \r
-               /** Browser specific style fixes **/\r
-               \r
-               // fix rendering bug for highlighted lines beginning with no tabs\r
-               if( t.isFirefox >= '3' ) {\r
-                       t.content_highlight.style.paddingLeft= "1px";\r
-                       t.selection_field.style.paddingLeft= "1px";\r
-                       t.selection_field_text.style.paddingLeft= "1px";\r
-               }\r
-               \r
-               if(t.isIE && t.isIE < 8 ){\r
-                       a.style.marginTop= "-1px";\r
-               }\r
-               /*\r
-               if(t.isOpera){\r
-                       t.editor_area.style.position= "absolute";\r
-               }*/\r
-               \r
-               if( t.isSafari ){\r
-                       t.editor_area.style.position    = "absolute";\r
-                       a.style.marginLeft              ="-3px";\r
-                       if( t.isSafari < 3.2 ) // Safari 3.0 (3.1?)\r
-                               a.style.marginTop       ="1px";\r
-               }\r
-               \r
-               // si le textarea n'est pas grand, un click sous le textarea doit provoquer un focus sur le textarea\r
-               parent.editAreaLoader.add_event(t.result, "click", function(e){ if((e.target || e.srcElement)==editArea.result) { editArea.area_select(editArea.textarea.value.length, 0);}  });\r
-               \r
-               if(s['is_multi_files']!=false)\r
-                       t.open_file({'id': t.curr_file, 'text': ''});\r
-       \r
-               t.set_word_wrap( s['word_wrap'] );\r
-               \r
-               setTimeout("editArea.focus();editArea.manage_size();editArea.execCommand('EA_load');", 10);             \r
-               //start checkup routine\r
-               t.check_undo();\r
-               t.check_line_selection(true);\r
-               t.scroll_to_view();\r
-               \r
-               for(var i in t.plugins){\r
-                       if(typeof(t.plugins[i].onload)=="function")\r
-                               t.plugins[i].onload();\r
-               }\r
-               if(s['fullscreen']==true)\r
-                       t.toggle_full_screen(true);\r
-       \r
-               parent.editAreaLoader.add_event(window, "resize", editArea.update_size);\r
-               parent.editAreaLoader.add_event(parent.window, "resize", editArea.update_size);\r
-               parent.editAreaLoader.add_event(top.window, "resize", editArea.update_size);\r
-               parent.editAreaLoader.add_event(window, "unload", function(){\r
-                       // in case where editAreaLoader have been already cleaned\r
-                       if( parent.editAreaLoader )\r
-                       {\r
-                               parent.editAreaLoader.remove_event(parent.window, "resize", editArea.update_size);\r
-                               parent.editAreaLoader.remove_event(top.window, "resize", editArea.update_size);\r
-                       }\r
-                       if(editAreas[editArea.id] && editAreas[editArea.id]["displayed"]){\r
-                               editArea.execCommand("EA_unload");\r
-                       }\r
-               });\r
-               \r
-               \r
-               /*date= new Date();\r
-               alert(date.getTime()- parent.editAreaLoader.start_time);*/\r
-       };\r
-       \r
-       \r
-       \r
-       //called by the toggle_on\r
-       EditArea.prototype.update_size= function(){\r
-               var d=document,pd=parent.document,height,width,popup,maxLeft,maxTop;\r
-               \r
-               if( typeof editAreas != 'undefined' && editAreas[editArea.id] && editAreas[editArea.id]["displayed"]==true){\r
-                       if(editArea.fullscreen['isFull']){      \r
-                               pd.getElementById("frame_"+editArea.id).style.width             = pd.getElementsByTagName("html")[0].clientWidth + "px";\r
-                               pd.getElementById("frame_"+editArea.id).style.height    = pd.getElementsByTagName("html")[0].clientHeight + "px";\r
-                       }\r
-                       \r
-                       if(editArea.tab_browsing_area.style.display=='block' && ( !editArea.isIE || editArea.isIE >= 8 ) )\r
-                       {\r
-                               editArea.tab_browsing_area.style.height = "0px";\r
-                               editArea.tab_browsing_area.style.height = (editArea.result.offsetTop - editArea.tab_browsing_area.offsetTop -1)+"px";\r
-                       }\r
-                       \r
-                       height  = d.body.offsetHeight - editArea.get_all_toolbar_height() - 4;\r
-                       editArea.result.style.height    = height +"px";\r
-                       \r
-                       width   = d.body.offsetWidth -2;\r
-                       editArea.result.style.width             = width+"px";\r
-                       //alert("result h: "+ height+" w: "+width+"\ntoolbar h: "+this.get_all_toolbar_height()+"\nbody_h: "+document.body.offsetHeight);\r
-                       \r
-                       // check that the popups don't get out of the screen\r
-                       for( i=0; i < editArea.inlinePopup.length; i++ )\r
-                       {\r
-                               popup   = _$(editArea.inlinePopup[i]["popup_id"]);\r
-                               maxLeft = d.body.offsetWidth - popup.offsetWidth;\r
-                               maxTop  = d.body.offsetHeight - popup.offsetHeight;\r
-                               if( popup.offsetTop > maxTop )\r
-                                       popup.style.top         = maxTop+"px";\r
-                               if( popup.offsetLeft > maxLeft )\r
-                                       popup.style.left        = maxLeft+"px";\r
-                       }\r
-                       \r
-                       editArea.manage_size( true );\r
-                       editArea.fixLinesHeight( editArea.textarea.value, 0,-1);\r
-               }               \r
-       };\r
-       \r
-       \r
-       EditArea.prototype.manage_size= function(onlyOneTime){\r
-               if(!editAreas[this.id])\r
-                       return false;\r
-                       \r
-               if(editAreas[this.id]["displayed"]==true && this.textareaFocused)\r
-               {\r
-                       var area_height,resized= false;\r
-                       \r
-                       //1) Manage display width\r
-                       //1.1) Calc the new width to use for display\r
-                       if( !this.settings['word_wrap'] )\r
-                       {\r
-                               var area_width= this.textarea.scrollWidth;\r
-                               area_height= this.textarea.scrollHeight;\r
-                               // bug on old opera versions\r
-                               if(this.isOpera && this.isOpera < 9.6 ){\r
-                                       area_width=10000;                                                               \r
-                               }\r
-                               //1.2) the width is not the same, we must resize elements\r
-                               if(this.textarea.previous_scrollWidth!=area_width)\r
-                               {       \r
-                                       this.container.style.width= area_width+"px";\r
-                                       this.textarea.style.width= area_width+"px";\r
-                                       this.content_highlight.style.width= area_width+"px";    \r
-                                       this.textarea.previous_scrollWidth=area_width;\r
-                                       resized=true;\r
-                               }\r
-                       }\r
-                       // manage wrap width\r
-                       if( this.settings['word_wrap'] )\r
-                       {\r
-                               newW=this.textarea.offsetWidth;\r
-                               if( this.isFirefox || this.isIE )\r
-                                       newW-=2;\r
-                               if( this.isSafari )\r
-                                       newW-=6;\r
-                               this.content_highlight.style.width=this.selection_field_text.style.width=this.selection_field.style.width=this.test_font_size.style.width=newW+"px";\r
-                       }\r
-                       \r
-                       //2) Manage display height\r
-                       //2.1) Calc the new height to use for display\r
-                       if( this.isOpera || this.isFirefox || this.isSafari ) { \r
-                               area_height= this.getLinePosTop( this.last_selection["nb_line"] + 1 );\r
-                       } else {\r
-                               area_height = this.textarea.scrollHeight;\r
-                       }       \r
-                       //2.2) the width is not the same, we must resize elements \r
-                       if(this.textarea.previous_scrollHeight!=area_height)    \r
-                       {       \r
-                               this.container.style.height= (area_height+2)+"px";\r
-                               this.textarea.style.height= area_height+"px";\r
-                               this.content_highlight.style.height= area_height+"px";  \r
-                               this.textarea.previous_scrollHeight= area_height;\r
-                               resized=true;\r
-                       }\r
-               \r
-                       //3) if there is new lines, we add new line numbers in the line numeration area\r
-                       if(this.last_selection["nb_line"] >= this.line_number)\r
-                       {\r
-                               var newLines= '', destDiv=_$("line_number"), start=this.line_number, end=this.last_selection["nb_line"]+100;\r
-                               for( i = start+1; i < end; i++ )\r
-                               {\r
-                                       newLines+='<div id="line_'+ i +'">'+i+"</div>";\r
-                                       this.line_number++;\r
-                               }\r
-                               destDiv.innerHTML= destDiv.innerHTML + newLines;\r
-                               \r
-                               this.fixLinesHeight( this.textarea.value, start, -1 );\r
-                       }\r
-               \r
-                       //4) be sure the text is well displayed\r
-                       this.textarea.scrollTop="0px";\r
-                       this.textarea.scrollLeft="0px";\r
-                       if(resized==true){\r
-                               this.scroll_to_view();\r
-                       }\r
-               }\r
-               \r
-               if(!onlyOneTime)\r
-                       setTimeout("editArea.manage_size();", 100);\r
-       };\r
-       \r
-       EditArea.prototype.execCommand= function(cmd, param){\r
-               \r
-               for(var i in this.plugins){\r
-                       if(typeof(this.plugins[i].execCommand)=="function"){\r
-                               if(!this.plugins[i].execCommand(cmd, param))\r
-                                       return;\r
-                       }\r
-               }\r
-               switch(cmd){\r
-                       case "save":\r
-                               if(this.settings["save_callback"].length>0)\r
-                                       eval("parent."+this.settings["save_callback"]+"('"+ this.id +"', editArea.textarea.value);");\r
-                               break;\r
-                       case "load":\r
-                               if(this.settings["load_callback"].length>0)\r
-                                       eval("parent."+this.settings["load_callback"]+"('"+ this.id +"');");\r
-                               break;\r
-                       case "onchange":\r
-                               if(this.settings["change_callback"].length>0)\r
-                                       eval("parent."+this.settings["change_callback"]+"('"+ this.id +"');");\r
-                               break;          \r
-                       case "EA_load":\r
-                               if(this.settings["EA_load_callback"].length>0)\r
-                                       eval("parent."+this.settings["EA_load_callback"]+"('"+ this.id +"');");\r
-                               break;\r
-                       case "EA_unload":\r
-                               if(this.settings["EA_unload_callback"].length>0)\r
-                                       eval("parent."+this.settings["EA_unload_callback"]+"('"+ this.id +"');");\r
-                               break;\r
-                       case "toggle_on":\r
-                               if(this.settings["EA_toggle_on_callback"].length>0)\r
-                                       eval("parent."+this.settings["EA_toggle_on_callback"]+"('"+ this.id +"');");\r
-                               break;\r
-                       case "toggle_off":\r
-                               if(this.settings["EA_toggle_off_callback"].length>0)\r
-                                       eval("parent."+this.settings["EA_toggle_off_callback"]+"('"+ this.id +"');");\r
-                               break;\r
-                       case "re_sync":\r
-                               if(!this.do_highlight)\r
-                                       break;\r
-                       case "file_switch_on":\r
-                               if(this.settings["EA_file_switch_on_callback"].length>0)\r
-                                       eval("parent."+this.settings["EA_file_switch_on_callback"]+"(param);");\r
-                               break;\r
-                       case "file_switch_off":\r
-                               if(this.settings["EA_file_switch_off_callback"].length>0)\r
-                                       eval("parent."+this.settings["EA_file_switch_off_callback"]+"(param);");\r
-                               break;\r
-                       case "file_close":\r
-                               if(this.settings["EA_file_close_callback"].length>0)\r
-                                       return eval("parent."+this.settings["EA_file_close_callback"]+"(param);");\r
-                               break;\r
-                       \r
-                       default:\r
-                               if(typeof(eval("editArea."+cmd))=="function")\r
-                               {\r
-                                       if(this.settings["debug"])\r
-                                               eval("editArea."+ cmd +"(param);");\r
-                                       else\r
-                                               try{eval("editArea."+ cmd +"(param);");}catch(e){};\r
-                               }\r
-               }\r
-       };\r
-       \r
-       EditArea.prototype.get_translation= function(word, mode){\r
-               if(mode=="template")\r
-                       return parent.editAreaLoader.translate(word, this.settings["language"], mode);\r
-               else\r
-                       return parent.editAreaLoader.get_word_translation(word, this.settings["language"]);\r
-       };\r
-       \r
-       EditArea.prototype.add_plugin= function(plug_name, plug_obj){\r
-               for(var i=0; i<this.settings["plugins"].length; i++){\r
-                       if(this.settings["plugins"][i]==plug_name){\r
-                               this.plugins[plug_name]=plug_obj;\r
-                               plug_obj.baseURL=parent.editAreaLoader.baseURL + "plugins/" + plug_name + "/";\r
-                               if( typeof(plug_obj.init)=="function" )\r
-                                       plug_obj.init();\r
-                       }\r
-               }\r
-       };\r
-       \r
-       EditArea.prototype.load_css= function(url){\r
-               try{\r
-                       link = document.createElement("link");\r
-                       link.type = "text/css";\r
-                       link.rel= "stylesheet";\r
-                       link.media="all";\r
-                       link.href = url;\r
-                       head = document.getElementsByTagName("head");\r
-                       head[0].appendChild(link);\r
-               }catch(e){\r
-                       document.write("<link href='"+ url +"' rel='stylesheet' type='text/css' />");\r
-               }\r
-       };\r
-       \r
-       EditArea.prototype.load_script= function(url){\r
-               try{\r
-                       script = document.createElement("script");\r
-                       script.type = "text/javascript";\r
-                       script.src  = url;\r
-                       script.charset= "UTF-8";\r
-                       head = document.getElementsByTagName("head");\r
-                       head[0].appendChild(script);\r
-               }catch(e){\r
-                       document.write("<script type='text/javascript' src='" + url + "' charset=\"UTF-8\"><"+"/script>");\r
-               }\r
-       };\r
-       \r
-       // add plugin translation to language translation array\r
-       EditArea.prototype.add_lang= function(language, values){\r
-               if(!parent.editAreaLoader.lang[language])\r
-                       parent.editAreaLoader.lang[language]={};\r
-               for(var i in values)\r
-                       parent.editAreaLoader.lang[language][i]= values[i];\r
-       };\r
-       \r
-       // short cut for document.getElementById()\r
-       function _$(id){return document.getElementById( id );};\r
-\r
-       var editArea = new EditArea();  \r
-       parent.editAreaLoader.add_event(window, "load", init);\r
-       \r
-       function init(){                \r
-               setTimeout("editArea.init();  ", 10);\r
-       };\r
diff --git a/project/static/js/edit_area_compressor.php b/project/static/js/edit_area_compressor.php
deleted file mode 100755 (executable)
index f2cc532..0000000
+++ /dev/null
@@ -1,408 +0,0 @@
-<?php\r
-       /******\r
-        *\r
-        *      EditArea PHP compressor\r
-        *      Developped by Christophe Dolivet\r
-        *      Released under LGPL, Apache and BSD licenses\r
-        *      v1.1.3 (2007/01/18)      \r
-        *\r
-       ******/\r
-       \r
-       // CONFIG\r
-       $param['cache_duration']= 3600 * 24 * 10;               // 10 days util client cache expires\r
-       $param['compress'] = true;                                              // enable the code compression, should be activated but it can be usefull to desactivate it for easier error retrieving (true or false)\r
-       $param['debug'] = false;                                                // Enable this option if you need debuging info\r
-       $param['use_disk_cache']= true;                                 // If you enable this option gzip files will be cached on disk.\r
-       $param['use_gzip']= true;                                               // Enable gzip compression\r
-       // END CONFIG\r
-       \r
-       $compressor= new Compressor($param);\r
-       \r
-       class Compressor{\r
-       \r
-               \r
-               function compressor($param)\r
-               {\r
-                       $this->__construct($param);\r
-               }\r
-               \r
-               function __construct($param)\r
-               {\r
-                       $this->start_time= $this->get_microtime();\r
-                       $this->file_loaded_size=0;\r
-                       $this->param= $param;\r
-                       $this->script_list="";\r
-                       $this->path= dirname(__FILE__)."/";\r
-                       if(isset($_GET['plugins'])){\r
-                               $this->load_all_plugins= true;\r
-                               $this->full_cache_file= $this->path."edit_area_full_with_plugins.js";\r
-                               $this->gzip_cache_file= $this->path."edit_area_full_with_plugins.gz";\r
-                       }else{\r
-                               $this->load_all_plugins= false;\r
-                               $this->full_cache_file= $this->path."edit_area_full.js";\r
-                               $this->gzip_cache_file= $this->path."edit_area_full.gz";\r
-                       }\r
-                       \r
-                       $this->check_gzip_use();\r
-                       $this->send_headers();\r
-                       $this->check_cache();\r
-                       $this->load_files();\r
-                       $this->send_datas();\r
-               }\r
-               \r
-               function send_headers()\r
-               {\r
-                       header("Content-type: text/javascript; charset: UTF-8");\r
-                       header("Vary: Accept-Encoding"); // Handle proxies\r
-                       header(sprintf("Expires: %s GMT", gmdate("D, d M Y H:i:s", time() + $this->param['cache_duration'])) );\r
-                       if($this->use_gzip)\r
-                               header("Content-Encoding: ".$this->gzip_enc_header);\r
-               }\r
-               \r
-               function check_gzip_use()\r
-               {\r
-                       $encodings = array();\r
-                       $desactivate_gzip=false;\r
-                                       \r
-                       if (isset($_SERVER['HTTP_ACCEPT_ENCODING']))\r
-                               $encodings = explode(',', strtolower(preg_replace("/\s+/", "", $_SERVER['HTTP_ACCEPT_ENCODING'])));\r
-                       \r
-                       // desactivate gzip for IE version < 7\r
-                       if(preg_match("/(?:msie )([0-9.]+)/i", $_SERVER['HTTP_USER_AGENT'], $ie))\r
-                       {\r
-                               if($ie[1]<7)\r
-                                       $desactivate_gzip=true; \r
-                       }\r
-                       \r
-                       // Check for gzip header or northon internet securities\r
-                       if (!$desactivate_gzip && $this->param['use_gzip'] && (in_array('gzip', $encodings) || in_array('x-gzip', $encodings) || isset($_SERVER['---------------'])) && function_exists('ob_gzhandler') && !ini_get('zlib.output_compression')) {\r
-                               $this->gzip_enc_header= in_array('x-gzip', $encodings) ? "x-gzip" : "gzip";\r
-                               $this->use_gzip=true;\r
-                               $this->cache_file=$this->gzip_cache_file;\r
-                       }else{\r
-                               $this->use_gzip=false;\r
-                               $this->cache_file=$this->full_cache_file;\r
-                       }\r
-               }\r
-               \r
-               function check_cache()\r
-               {\r
-                       // Only gzip the contents if clients and server support it\r
-                       if (file_exists($this->cache_file)) {\r
-                               // check if cache file must be updated\r
-                               $cache_date=0;                          \r
-                               if ($dir = opendir($this->path)) {\r
-                                       while (($file = readdir($dir)) !== false) {\r
-                                               if(is_file($this->path.$file) && $file!="." && $file!="..")\r
-                                                       $cache_date= max($cache_date, filemtime($this->path.$file));\r
-                                       }\r
-                                       closedir($dir);\r
-                               }\r
-                               if($this->load_all_plugins){\r
-                                       $plug_path= $this->path."plugins/";\r
-                                       if (($dir = @opendir($plug_path)) !== false)\r
-                                       {\r
-                                               while (($file = readdir($dir)) !== false)\r
-                                               {\r
-                                                       if ($file !== "." && $file !== "..")\r
-                                                       {\r
-                                                               if(is_dir($plug_path.$file) && file_exists($plug_path.$file."/".$file.".js"))\r
-                                                                       $cache_date= max($cache_date, filemtime("plugins/".$file."/".$file.".js"));\r
-                                                       }\r
-                                               }\r
-                                               closedir($dir);\r
-                                       }\r
-                               }\r
-\r
-                               if(filemtime($this->cache_file) >= $cache_date){\r
-                                       // if cache file is up to date\r
-                                       $last_modified = gmdate("D, d M Y H:i:s",filemtime($this->cache_file))." GMT";\r
-                                       if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"]) && strcasecmp($_SERVER["HTTP_IF_MODIFIED_SINCE"], $last_modified) === 0)\r
-                                       {\r
-                                               header("HTTP/1.1 304 Not Modified");\r
-                                               header("Last-modified: ".$last_modified);\r
-                                               header("Cache-Control: Public"); // Tells HTTP 1.1 clients to cache\r
-                                               header("Pragma:"); // Tells HTTP 1.0 clients to cache\r
-                                       }\r
-                                       else\r
-                                       {\r
-                                               header("Last-modified: ".$last_modified);\r
-                                               header("Cache-Control: Public"); // Tells HTTP 1.1 clients to cache\r
-                                               header("Pragma:"); // Tells HTTP 1.0 clients to cache\r
-                                               header('Content-Length: '.filesize($this->cache_file));\r
-                                               echo file_get_contents($this->cache_file);\r
-                                       }                               \r
-                                       die;\r
-                               }\r
-                       }\r
-                       return false;\r
-               }\r
-               \r
-               function load_files()\r
-               {\r
-                       $loader= $this->get_content("edit_area_loader.js")."\n";\r
-                       \r
-                       // get the list of other files to load\r
-               $loader= preg_replace("/(t\.scripts_to_load=\s*)\[([^\]]*)\];/e"\r
-                                               , "\$this->replace_scripts('script_list', '\\1', '\\2')"\r
-                                               , $loader);\r
-               \r
-                       $loader= preg_replace("/(t\.sub_scripts_to_load=\s*)\[([^\]]*)\];/e"\r
-                                               , "\$this->replace_scripts('sub_script_list', '\\1', '\\2')"\r
-                                               , $loader);\r
-\r
-                       $this->datas= $loader;\r
-                       $this->compress_javascript($this->datas);\r
-                       \r
-                       // load other scripts needed for the loader\r
-                       preg_match_all('/"([^"]*)"/', $this->script_list, $match);\r
-                       foreach($match[1] as $key => $value)\r
-                       {\r
-                               $content= $this->get_content(preg_replace("/\\|\//i", "", $value).".js");\r
-                               $this->compress_javascript($content);\r
-                               $this->datas.= $content."\n";\r
-                       }\r
-                       //$this->datas);\r
-                       //$this->datas= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', "", $this->datas);\r
-                       \r
-                       // improved compression step 1/2        \r
-                       $this->datas= preg_replace(array("/(\b)EditAreaLoader(\b)/", "/(\b)editAreaLoader(\b)/", "/(\b)editAreas(\b)/"), array("EAL", "eAL", "eAs"), $this->datas);\r
-                       //$this->datas= str_replace(array("EditAreaLoader", "editAreaLoader", "editAreas"), array("EAL", "eAL", "eAs"), $this->datas);\r
-                       $this->datas.= "var editAreaLoader= eAL;var editAreas=eAs;EditAreaLoader=EAL;";\r
-               \r
-                       // load sub scripts\r
-                       $sub_scripts="";\r
-                       $sub_scripts_list= array();\r
-                       preg_match_all('/"([^"]*)"/', $this->sub_script_list, $match);\r
-                       foreach($match[1] as $value){\r
-                               $sub_scripts_list[]= preg_replace("/\\|\//i", "", $value).".js";\r
-                       }\r
-               \r
-                       if($this->load_all_plugins){\r
-                               // load plugins scripts\r
-                               $plug_path= $this->path."plugins/";\r
-                               if (($dir = @opendir($plug_path)) !== false)\r
-                               {\r
-                                       while (($file = readdir($dir)) !== false)\r
-                                       {\r
-                                               if ($file !== "." && $file !== "..")\r
-                                               {\r
-                                                       if(is_dir($plug_path.$file) && file_exists($plug_path.$file."/".$file.".js"))\r
-                                                               $sub_scripts_list[]= "plugins/".$file."/".$file.".js";\r
-                                               }\r
-                                       }\r
-                                       closedir($dir);\r
-                               }\r
-                       }\r
-                                                       \r
-                       foreach($sub_scripts_list as $value){\r
-                               $sub_scripts.= $this->get_javascript_content($value);\r
-                       }\r
-                       // improved compression step 2/2        \r
-                       $sub_scripts= preg_replace(array("/(\b)editAreaLoader(\b)/", "/(\b)editAreas(\b)/", "/(\b)editArea(\b)/", "/(\b)EditArea(\b)/"), array("eAL", "eAs", "eA", "EA"), $sub_scripts);\r
-               //      $sub_scripts= str_replace(array("editAreaLoader", "editAreas", "editArea", "EditArea"), array("eAL", "eAs", "eA", "EA"), $sub_scripts);\r
-                       $sub_scripts.= "var editArea= eA;EditArea=EA;";\r
-                       \r
-                       \r
-                       // add the scripts\r
-               //      $this->datas.= sprintf("editAreaLoader.iframe_script= \"<script type='text/javascript'>%s</script>\";\n", $sub_scripts);\r
-               \r
-               \r
-                       // add the script and use a last compression \r
-                       if( $this->param['compress'] )\r
-                       {\r
-                               $last_comp      = array( 'Á' => 'this',\r
-                                                                'Â' => 'textarea',\r
-                                                                'Ã' => 'function',\r
-                                                                'Ä' => 'prototype',\r
-                                                                'Å' => 'settings',\r
-                                                                'Æ' => 'length',\r
-                                                                'Ç' => 'style',\r
-                                                                'È' => 'parent',\r
-                                                                'É' => 'last_selection',\r
-                                                                'Ê' => 'value',\r
-                                                                'Ë' => 'true',\r
-                                                                'Ì' => 'false'\r
-                                                                /*,\r
-                                                                       'Î' => '"',\r
-                                                                'Ï' => "\n",\r
-                                                                'À' => "\r"*/);\r
-                       }\r
-                       else\r
-                       {\r
-                               $last_comp      = array();\r
-                       }\r
-                       \r
-                       $js_replace= '';\r
-                       foreach( $last_comp as $key => $val )\r
-                               $js_replace .= ".replace(/". $key ."/g,'". str_replace( array("\n", "\r"), array('\n','\r'), $val ) ."')";\r
-                       \r
-                       $this->datas.= sprintf("editAreaLoader.iframe_script= \"<script type='text/javascript'>%s</script>\"%s;\n",\r
-                                                               str_replace( array_values($last_comp), array_keys($last_comp), $sub_scripts ), \r
-                                                               $js_replace);\r
-                       \r
-                       if($this->load_all_plugins)\r
-                               $this->datas.="editAreaLoader.all_plugins_loaded=true;\n";\r
-               \r
-                       \r
-                       // load the template\r
-                       $this->datas.= sprintf("editAreaLoader.template= \"%s\";\n", $this->get_html_content("template.html"));\r
-                       // load the css\r
-                       $this->datas.= sprintf("editAreaLoader.iframe_css= \"<style>%s</style>\";\n", $this->get_css_content("edit_area.css"));\r
-                                       \r
-               //      $this->datas= "function editArea(){};editArea.prototype.loader= function(){alert('bouhbouh');} var a= new editArea();a.loader();";\r
-                                       \r
-               }\r
-               \r
-               function send_datas()\r
-               {\r
-                       if($this->param['debug']){\r
-                               $header=sprintf("/* USE PHP COMPRESSION\n");\r
-                               $header.=sprintf("javascript size: based files: %s => PHP COMPRESSION => %s ", $this->file_loaded_size, strlen($this->datas));\r
-                               if($this->use_gzip){\r
-                                       $gzip_datas=  gzencode($this->datas, 9, FORCE_GZIP);                            \r
-                                       $header.=sprintf("=> GZIP COMPRESSION => %s", strlen($gzip_datas));\r
-                                       $ratio = round(100 - strlen($gzip_datas) / $this->file_loaded_size * 100.0);                    \r
-                               }else{\r
-                                       $ratio = round(100 - strlen($this->datas) / $this->file_loaded_size * 100.0);\r
-                               }\r
-                               $header.=sprintf(", reduced by %s%%\n", $ratio);\r
-                               $header.=sprintf("compression time: %s\n", $this->get_microtime()-$this->start_time); \r
-                               $header.=sprintf("%s\n", implode("\n", $this->infos));\r
-                               $header.=sprintf("*/\n");\r
-                               $this->datas= $header.$this->datas;     \r
-                       }\r
-                       $mtime= time(); // ensure that the 2 disk files will have the same update time\r
-                       // generate gzip file and cahce it if using disk cache\r
-                       if($this->use_gzip){\r
-                               $this->gzip_datas= gzencode($this->datas, 9, FORCE_GZIP);\r
-                               if($this->param['use_disk_cache'])\r
-                                       $this->file_put_contents($this->gzip_cache_file, $this->gzip_datas, $mtime);\r
-                       }\r
-                       \r
-                       // generate full js file and cache it if using disk cache                       \r
-                       if($this->param['use_disk_cache'])\r
-                               $this->file_put_contents($this->full_cache_file, $this->datas, $mtime);\r
-                       \r
-                       // generate output\r
-                       if($this->use_gzip)\r
-                               echo $this->gzip_datas;\r
-                       else\r
-                               echo $this->datas;\r
-                               \r
-//                     die;\r
-               }\r
-                               \r
-               \r
-               function get_content($end_uri)\r
-               {\r
-                       $end_uri=preg_replace("/\.\./", "", $end_uri); // Remove any .. (security)\r
-                       $file= $this->path.$end_uri;\r
-                       if(file_exists($file)){\r
-                               $this->infos[]=sprintf("'%s' loaded", $end_uri);\r
-                               /*$fd = fopen($file, 'rb');\r
-                               $content = fread($fd, filesize($file));\r
-                               fclose($fd);\r
-                               return $content;*/\r
-                               return $this->file_get_contents($file);\r
-                       }else{\r
-                               $this->infos[]=sprintf("'%s' not loaded", $end_uri);\r
-                               return "";\r
-                       }\r
-               }\r
-               \r
-               function get_javascript_content($end_uri)\r
-               {\r
-                       $val=$this->get_content($end_uri);\r
-       \r
-                       $this->compress_javascript($val);\r
-                       $this->prepare_string_for_quotes($val);\r
-                       return $val;\r
-               }\r
-               \r
-               function compress_javascript(&$code)\r
-               {\r
-                       if($this->param['compress'])\r
-                       {\r
-                               // remove all comments\r
-                               //      (\"(?:[^\"\\]*(?:\\\\)*(?:\\\"?)?)*(?:\"|$))|(\'(?:[^\'\\]*(?:\\\\)*(?:\\'?)?)*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))\r
-                               $code= preg_replace("/(\"(?:[^\"\\\\]*(?:\\\\\\\\)*(?:\\\\\"?)?)*(?:\"|$))|(\'(?:[^\'\\\\]*(?:\\\\\\\\)*(?:\\\\\'?)?)*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "$1$2$3", $code);\r
-                               // remove line return, empty line and tabulation\r
-                               $code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', " ", $code);\r
-                               // add line break before "else" otherwise navigators can't manage to parse the file\r
-                               $code= preg_replace('/(\b(else)\b)/', "\n$1", $code);\r
-                               // remove unnecessary spaces\r
-                               $code= preg_replace('/( |\t|\r)*(;|\{|\}|=|==|\-|\+|,|\(|\)|\|\||&\&|\:)( |\t|\r)*/', "$2", $code);\r
-                       }\r
-               }\r
-               \r
-               function get_css_content($end_uri){\r
-                       $code=$this->get_content($end_uri);\r
-                       // remove comments\r
-                       $code= preg_replace("/(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "", $code);\r
-                       // remove spaces\r
-                       $code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', "", $code);\r
-                       // remove spaces\r
-                       $code= preg_replace('/( |\t|\r)?(\:|,|\{|\})( |\t|\r)+/', "$2", $code);\r
-               \r
-                       $this->prepare_string_for_quotes($code);\r
-                       return $code;\r
-               }\r
-               \r
-               function get_html_content($end_uri){\r
-                       $code=$this->get_content($end_uri);\r
-                       //$code= preg_replace('/(\"(?:\\\"|[^\"])*(?:\"|$))|' . "(\'(?:\\\'|[^\'])*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "$1$2$3", $code);\r
-                       $code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', " ", $code);\r
-                       $this->prepare_string_for_quotes($code);\r
-                       return $code;\r
-               }\r
-               \r
-               function prepare_string_for_quotes(&$str){\r
-                       // prepare the code to be putted into quotes \r
-                       /*$pattern= array("/(\\\\)?\"/", '/\\\n/'       , '/\\\r/'      , "/(\r?\n)/");\r
-                       $replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r' , '\\\n"$1+"');*/\r
-                       $pattern= array("/(\\\\)?\"/", '/\\\n/' , '/\\\r/'      , "/(\r?\n)/");\r
-                       if($this->param['compress'])\r
-                               $replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r' , '\n');\r
-                       else\r
-                               $replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r' , "\\n\"\n+\"");\r
-                       $str= preg_replace($pattern, $replace, $str);\r
-               }\r
-               \r
-               function replace_scripts($var, $param1, $param2)\r
-               {\r
-                       $this->$var=stripslashes($param2);\r
-               return $param1."[];";\r
-               }\r
-\r
-               /* for php version that have not thoses functions */\r
-               function file_get_contents($file)\r
-               {\r
-                       $fd = fopen($file, 'rb');\r
-                       $content = fread($fd, filesize($file));\r
-                       fclose($fd);\r
-                       $this->file_loaded_size+= strlen($content);\r
-                       return $content;                                \r
-               }\r
-               \r
-               function file_put_contents($file, &$content, $mtime=-1)\r
-               {\r
-                       if($mtime==-1)\r
-                               $mtime=time();\r
-                       $fp = @fopen($file, "wb");\r
-                       if ($fp) {\r
-                               fwrite($fp, $content);\r
-                               fclose($fp);\r
-                               touch($file, $mtime);\r
-                               return true;\r
-                       }\r
-                       return false;\r
-               }\r
-               \r
-               function get_microtime()\r
-               {\r
-                  list($usec, $sec) = explode(" ", microtime());\r
-                  return ((float)$usec + (float)$sec);\r
-               }\r
-       }       \r
-?>\r
diff --git a/project/static/js/edit_area_full.gz b/project/static/js/edit_area_full.gz
deleted file mode 100755 (executable)
index 8cfc846..0000000
Binary files a/project/static/js/edit_area_full.gz and /dev/null differ
diff --git a/project/static/js/edit_area_full.js b/project/static/js/edit_area_full.js
deleted file mode 100755 (executable)
index db136a8..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
- function EAL(){var t=this;t.version="0.8.1.1";date=new Date();t.start_time=date.getTime();t.win="loading";t.error=false;t.baseURL="";t.template="";t.lang={};t.load_syntax={};t.syntax={};t.loadedFiles=[];t.waiting_loading={};t.scripts_to_load=[];t.sub_scripts_to_load=[];t.resize=[];t.hidden={};t.default_settings={debug:false,smooth_selection:true,font_size:"10",font_family:"monospace",start_highlight:false,toolbar:"search,go_to_line,fullscreen,|,undo,redo,|,select_font,|,change_smooth_selection,highlight,reset_highlight,word_wrap,|,help",begin_toolbar:"",end_toolbar:"",is_multi_files:false,allow_resize:"both",show_line_colors:false,min_width:400,min_height:125,replace_tab_by_spaces:false,allow_toggle:true,language:"en",syntax:"",syntax_selection_allow:"basic,brainfuck,c,coldfusion,cpp,css,html,java,js,pas,perl,php,python,ruby,robotstxt,sql,tsql,vb,xml",display:"onload",max_undo:30,browsers:"known",plugins:"",gecko_spellcheck:false,fullscreen:false,is_editable:true,cursor_position:"begin",word_wrap:false,autocompletion:false,load_callback:"",save_callback:"",change_callback:"",submit_callback:"",EA_init_callback:"",EA_delete_callback:"",EA_load_callback:"",EA_unload_callback:"",EA_toggle_on_callback:"",EA_toggle_off_callback:"",EA_file_switch_on_callback:"",EA_file_switch_off_callback:"",EA_file_close_callback:""};t.advanced_buttons=[ ['new_document','newdocument.gif','new_document',false],['search','search.gif','show_search',false],['go_to_line','go_to_line.gif','go_to_line',false],['undo','undo.gif','undo',true],['redo','redo.gif','redo',true],['change_smooth_selection','smooth_selection.gif','change_smooth_selection_mode',true],['reset_highlight','reset_highlight.gif','resync_highlight',true],['highlight','highlight.gif','change_highlight',true],['help','help.gif','show_help',false],['save','save.gif','save',false],['load','load.gif','load',false],['fullscreen','fullscreen.gif','toggle_full_screen',false],['word_wrap','word_wrap.gif','toggle_word_wrap',true],['autocompletion','autocompletion.gif','toggle_autocompletion',true] ];t.set_browser_infos(t);if(t.isIE>=6||t.isGecko||(t.isWebKit&&!t.isSafari<3)||t.isOpera>=9||t.isCamino)t.isValidBrowser=true;
-else t.isValidBrowser=false;t.set_base_url();for(var i=0;i<t.scripts_to_load.length;i++){setTimeout("eAL.load_script('"+t.baseURL+t.scripts_to_load[i]+".js');",1);t.waiting_loading[t.scripts_to_load[i]+".js"]=false;}t.add_event(window,"load",EAL.prototype.window_loaded);};EAL.prototype={has_error:function(){this.error=true;for(var i in EAL.prototype){EAL.prototype[i]=function(){};}},set_browser_infos:function(o){ua=navigator.userAgent;o.isWebKit=/WebKit/.test(ua);o.isGecko=!o.isWebKit&&/Gecko/.test(ua);o.isMac=/Mac/.test(ua);o.isIE=(navigator.appName=="Microsoft Internet Explorer");if(o.isIE){o.isIE=ua.replace(/^.*?MSIE\s+([0-9\.]+).*$/,"$1");if(o.isIE<6)o.has_error();}if(o.isOpera=(ua.indexOf('Opera')!=-1)){o.isOpera=ua.replace(/^.*?Opera.*?([0-9\.]+).*$/i,"$1");if(o.isOpera<9)o.has_error();o.isIE=false;}if(o.isFirefox=(ua.indexOf('Firefox')!=-1))o.isFirefox=ua.replace(/^.*?Firefox.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('Iceweasel')!=-1)o.isFirefox=ua.replace(/^.*?Iceweasel.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('GranParadiso')!=-1)o.isFirefox=ua.replace(/^.*?GranParadiso.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('BonEcho')!=-1)o.isFirefox=ua.replace(/^.*?BonEcho.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('SeaMonkey')!=-1)o.isFirefox=(ua.replace(/^.*?SeaMonkey.*?([0-9\.]+).*$/i,"$1"))+1;if(o.isCamino=(ua.indexOf('Camino')!=-1))o.isCamino=ua.replace(/^.*?Camino.*?([0-9\.]+).*$/i,"$1");if(o.isSafari=(ua.indexOf('Safari')!=-1))o.isSafari=ua.replace(/^.*?Version\/([0-9]+\.[0-9]+).*$/i,"$1");if(o.isChrome=(ua.indexOf('Chrome')!=-1)){o.isChrome=ua.replace(/^.*?Chrome.*?([0-9\.]+).*$/i,"$1");o.isSafari=false;}},window_loaded:function(){eAL.win="loaded";if(document.forms){for(var i=0;i<document.forms.length;i++){var form=document.forms[i];form.edit_area_replaced_submit=null;try{form.edit_area_replaced_submit=form.onsubmit;form.onsubmit="";}catch(e){}eAL.add_event(form,"submit",EAL.prototype.submit);eAL.add_event(form,"reset",EAL.prototype.reset);}}eAL.add_event(window,"unload",function(){for(var i in eAs){eAL.delete_instance(i);}});},init_ie_textarea:function(id){var a=document.getElementById(id);try{if(a&&typeof(a.focused)=="undefined"){a.focus();a.focused=true;a.selectionStart=a.selectionEnd=0;get_IE_selection(a);eAL.add_event(a,"focus",IE_textarea_focus);eAL.add_event(a,"blur",IE_textarea_blur);}}catch(ex){}},init:function(settings){var t=this,s=settings,i;if(!s["id"])t.has_error();if(t.error)return;if(eAs[s["id"]])t.delete_instance(s["id"]);for(i in t.default_settings){if(typeof(s[i])=="undefined")s[i]=t.default_settings[i];}if(s["browsers"]=="known"&&t.isValidBrowser==false){return;}if(s["begin_toolbar"].length>0)s["toolbar"]=s["begin_toolbar"]+","+s["toolbar"];if(s["end_toolbar"].length>0)s["toolbar"]=s["toolbar"]+","+s["end_toolbar"];s["tab_toolbar"]=s["toolbar"].replace(/ /g,"").split(",");s["plugins"]=s["plugins"].replace(/ /g,"").split(",");for(i=0;i<s["plugins"].length;i++){if(s["plugins"][i].length==0)s["plugins"].splice(i,1);}t.get_template();t.load_script(t.baseURL+"langs/"+s["language"]+".js");if(s["syntax"].length>0){s["syntax"]=s["syntax"].toLowerCase();t.load_script(t.baseURL+"reg_syntax/"+s["syntax"]+".js");}eAs[s["id"]]={"settings":s};eAs[s["id"]]["displayed"]=false;eAs[s["id"]]["hidden"]=false;t.start(s["id"]);},delete_instance:function(id){var d=document,fs=window.frames,span,iframe;eAL.execCommand(id,"EA_delete");if(fs["frame_"+id]&&fs["frame_"+id].editArea){if(eAs[id]["displayed"])eAL.toggle(id,"off");fs["frame_"+id].editArea.execCommand("EA_unload");}span=d.getElementById("EditAreaArroundInfos_"+id);if(span)span.parentNode.removeChild(span);iframe=d.getElementById("frame_"+id);if(iframe){iframe.parentNode.removeChild(iframe);try{delete fs["frame_"+id];}catch(e){}}delete eAs[id];},start:function(id){var t=this,d=document,f,span,father,next,html='',html_toolbar_content='',template,content,i;if(t.win!="loaded"){setTimeout("eAL.start('"+id+"');",50);return;}for(i in t.waiting_loading){if(t.waiting_loading[i]!="loaded"&&typeof(t.waiting_loading[i])!="function"){setTimeout("eAL.start('"+id+"');",50);return;}}if(!t.lang[eAs[id]["settings"]["language"]]||(eAs[id]["settings"]["syntax"].length>0&&!t.load_syntax[eAs[id]["settings"]["syntax"]])){setTimeout("eAL.start('"+id+"');",50);return;}if(eAs[id]["settings"]["syntax"].length>0)t.init_syntax_regexp();if(!d.getElementById("EditAreaArroundInfos_"+id)&&(eAs[id]["settings"]["debug"]||eAs[id]["settings"]["allow_toggle"])){span=d.createElement("span");span.id="EditAreaArroundInfos_"+id;if(eAs[id]["settings"]["allow_toggle"]){checked=(eAs[id]["settings"]["display"]=="onload")?"checked='checked'":"";html+="<div id='edit_area_toggle_"+i+"'>";html+="<input id='edit_area_toggle_checkbox_"+id+"' class='toggle_"+id+"' type='checkbox' onclick='eAL.toggle(\""+id+"\");' accesskey='e' "+checked+" />";html+="<label for='edit_area_toggle_checkbox_"+id+"'>{$toggle}</label></div>";}if(eAs[id]["settings"]["debug"])html+="<textarea id='edit_area_debug_"+id+"' spellcheck='off' style='z-index:20;width:100%;height:120px;overflow:auto;border:solid black 1px;'></textarea><br />";html=t.translate(html,eAs[id]["settings"]["language"]);span.innerHTML=html;father=d.getElementById(id).parentNode;next=d.getElementById(id).nextSibling;if(next==null)father.appendChild(span);
-else father.insertBefore(span,next);}if(!eAs[id]["initialized"]){t.execCommand(id,"EA_init");if(eAs[id]["settings"]["display"]=="later"){eAs[id]["initialized"]=true;return;}}if(t.isIE){t.init_ie_textarea(id);}area=eAs[id];for(i=0;i<area["settings"]["tab_toolbar"].length;i++){html_toolbar_content+=t.get_control_html(area["settings"]["tab_toolbar"][i],area["settings"]["language"]);}html_toolbar_content=t.translate(html_toolbar_content,area["settings"]["language"],"template");if(!t.iframe_script){t.iframe_script="";for(i=0;i<t.sub_scripts_to_load.length;i++)t.iframe_script+='<script language="javascript" type="text/javascript" src="'+t.baseURL+t.sub_scripts_to_load[i]+'.js"></script>';}for(i=0;i<area["settings"]["plugins"].length;i++){if(!t.all_plugins_loaded)t.iframe_script+='<script language="javascript" type="text/javascript" src="'+t.baseURL+'plugins/'+area["settings"]["plugins"][i]+'/'+area["settings"]["plugins"][i]+'.js"></script>';t.iframe_script+='<script language="javascript" type="text/javascript" src="'+t.baseURL+'plugins/'+area["settings"]["plugins"][i]+'/langs/'+area["settings"]["language"]+'.js"></script>';}if(!t.iframe_css){t.iframe_css="<link href='"+t.baseURL+"edit_area.css' rel='stylesheet' type='text/css' />";}template=t.template.replace(/\[__BASEURL__\]/g,t.baseURL);template=template.replace("[__TOOLBAR__]",html_toolbar_content);template=t.translate(template,area["settings"]["language"],"template");template=template.replace("[__CSSRULES__]",t.iframe_css);template=template.replace("[__JSCODE__]",t.iframe_script);template=template.replace("[__EA_VERSION__]",t.version);area.textarea=d.getElementById(area["settings"]["id"]);eAs[area["settings"]["id"]]["textarea"]=area.textarea;if(typeof(window.frames["frame_"+area["settings"]["id"]])!='undefined')delete window.frames["frame_"+area["settings"]["id"]];father=area.textarea.parentNode;content=d.createElement("iframe");content.name="frame_"+area["settings"]["id"];content.id="frame_"+area["settings"]["id"];content.style.borderWidth="0px";setAttribute(content,"frameBorder","0");content.style.overflow="hidden";content.style.display="none";next=area.textarea.nextSibling;if(next==null)father.appendChild(content);
-else father.insertBefore(content,next);f=window.frames["frame_"+area["settings"]["id"]];f.document.open();f.eAs=eAs;f.area_id=area["settings"]["id"];f.document.area_id=area["settings"]["id"];f.document.write(template);f.document.close();},toggle:function(id,toggle_to){if(!toggle_to)toggle_to=(eAs[id]["displayed"]==true)?"off":"on";if(eAs[id]["displayed"]==true&&toggle_to=="off"){this.toggle_off(id);}
-else if(eAs[id]["displayed"]==false&&toggle_to=="on"){this.toggle_on(id);}return false;},toggle_off:function(id){var fs=window.frames,f,t,parNod,nxtSib,selStart,selEnd,scrollTop,scrollLeft;if(fs["frame_"+id]){f=fs["frame_"+id];t=eAs[id]["textarea"];if(f.editArea.fullscreen['isFull'])f.editArea.toggle_full_screen(false);eAs[id]["displayed"]=false;t.wrap="off";setAttribute(t,"wrap","off");parNod=t.parentNode;nxtSib=t.nextSibling;parNod.removeChild(t);parNod.insertBefore(t,nxtSib);t.value=f.editArea.textarea.value;selStart=f.editArea.last_selection["selectionStart"];selEnd=f.editArea.last_selection["selectionEnd"];scrollTop=f.document.getElementById("result").scrollTop;scrollLeft=f.document.getElementById("result").scrollLeft;document.getElementById("frame_"+id).style.display='none';t.style.display="inline";try{t.focus();}catch(e){};if(this.isIE){t.selectionStart=selStart;t.selectionEnd=selEnd;t.focused=true;set_IE_selection(t);}
-else{if(this.isOpera&&this.isOpera < 9.6){t.setSelectionRange(0,0);}try{t.setSelectionRange(selStart,selEnd);}catch(e){};}t.scrollTop=scrollTop;t.scrollLeft=scrollLeft;f.editArea.execCommand("toggle_off");}},toggle_on:function(id){var fs=window.frames,f,t,selStart=0,selEnd=0,scrollTop=0,scrollLeft=0,curPos,elem;if(fs["frame_"+id]){f=fs["frame_"+id];t=eAs[id]["textarea"];area=f.editArea;area.textarea.value=t.value;curPos=eAs[id]["settings"]["cursor_position"];if(t.use_last==true){selStart=t.last_selectionStart;selEnd=t.last_selectionEnd;scrollTop=t.last_scrollTop;scrollLeft=t.last_scrollLeft;t.use_last=false;}
-else if(curPos=="auto"){try{selStart=t.selectionStart;selEnd=t.selectionEnd;scrollTop=t.scrollTop;scrollLeft=t.scrollLeft;}catch(ex){}}this.set_editarea_size_from_textarea(id,document.getElementById("frame_"+id));t.style.display="none";document.getElementById("frame_"+id).style.display="inline";area.execCommand("focus");eAs[id]["displayed"]=true;area.execCommand("update_size");f.document.getElementById("result").scrollTop=scrollTop;f.document.getElementById("result").scrollLeft=scrollLeft;area.area_select(selStart,selEnd-selStart);area.execCommand("toggle_on");}
-else{elem=document.getElementById(id);elem.last_selectionStart=elem.selectionStart;elem.last_selectionEnd=elem.selectionEnd;elem.last_scrollTop=elem.scrollTop;elem.last_scrollLeft=elem.scrollLeft;elem.use_last=true;eAL.start(id);}},set_editarea_size_from_textarea:function(id,frame){var elem,width,height;elem=document.getElementById(id);width=Math.max(eAs[id]["settings"]["min_width"],elem.offsetWidth)+"px";height=Math.max(eAs[id]["settings"]["min_height"],elem.offsetHeight)+"px";if(elem.style.width.indexOf("%")!=-1)width=elem.style.width;if(elem.style.height.indexOf("%")!=-1)height=elem.style.height;frame.style.width=width;frame.style.height=height;},set_base_url:function(){var t=this,elems,i,docBasePath;if(!this.baseURL){elems=document.getElementsByTagName('script');for(i=0;i<elems.length;i++){if(elems[i].src&&elems[i].src.match(/edit_area_[^\\\/]*$/i)){var src=elems[i].src;src=src.substring(0,src.lastIndexOf('/'));this.baseURL=src;this.file_name=elems[i].src.substr(elems[i].src.lastIndexOf("/")+1);break;}}}docBasePath=document.location.href;if(docBasePath.indexOf('?')!=-1)docBasePath=docBasePath.substring(0,docBasePath.indexOf('?'));docBasePath=docBasePath.substring(0,docBasePath.lastIndexOf('/'));if(t.baseURL.indexOf('://')==-1&&t.baseURL.charAt(0)!='/'){t.baseURL=docBasePath+"/"+t.baseURL;}t.baseURL+="/";},get_button_html:function(id,img,exec,isFileSpecific,baseURL){var cmd,html;if(!baseURL)baseURL=this.baseURL;cmd='editArea.execCommand(\''+exec+'\')';html='<a id="a_'+id+'" href="javascript:'+cmd+'" onclick="'+cmd+';return false;" onmousedown="return false;" target="_self" fileSpecific="'+(isFileSpecific?'yes':'no')+'">';html+='<img id="'+id+'" src="'+baseURL+'images/'+img+'" title="{$'+id+'}" width="20" height="20" class="editAreaButtonNormal" onmouseover="editArea.switchClass(this,\'editAreaButtonOver\');" onmouseout="editArea.restoreClass(this);" onmousedown="editArea.restoreAndSwitchClass(this,\'editAreaButtonDown\');" /></a>';return html;},get_control_html:function(button_name,lang){var t=this,i,but,html,si;for(i=0;i<t.advanced_buttons.length;i++){but=t.advanced_buttons[i];if(but[0]==button_name){return t.get_button_html(but[0],but[1],but[2],but[3]);}}switch(button_name){case "*":case "return":return "<br />";case "|":case "separator":return '<img src="'+t.baseURL+'images/spacer.gif" width="1" height="15" class="editAreaSeparatorLine">';case "select_font":html="<select id='area_font_size' onchange='javascript:editArea.execCommand(\"change_font_size\")' fileSpecific='yes'>";html+="<option value='-1'>{$font_size}</option>";si=[8,9,10,11,12,14];for(i=0;i<si.length;i++){html+="<option value='"+si[i]+"'>"+si[i]+" pt</option>";}html+="</select>";return html;case "syntax_selection":html="<select id='syntax_selection' onchange='javascript:editArea.execCommand(\"change_syntax\",this.value)' fileSpecific='yes'>";html+="<option value='-1'>{$syntax_selection}</option>";html+="</select>";return html;}return "<span id='tmp_tool_"+button_name+"'>["+button_name+"]</span>";},get_template:function(){if(this.template==""){var xhr_object=null;if(window.XMLHttpRequest)xhr_object=new XMLHttpRequest();
-else if(window.ActiveXObject)xhr_object=new ActiveXObject("Microsoft.XMLHTTP");
-else{alert("XMLHTTPRequest not supported. EditArea not loaded");return;}xhr_object.open("GET",this.baseURL+"template.html",false);xhr_object.send(null);if(xhr_object.readyState==4)this.template=xhr_object.responseText;
-else this.has_error();}},translate:function(text,lang,mode){if(mode=="word")text=eAL.get_word_translation(text,lang);
-else if(mode="template"){eAL.current_language=lang;text=text.replace(/\{\$([^\}]+)\}/gm,eAL.translate_template);}return text;},translate_template:function(){return eAL.get_word_translation(EAL.prototype.translate_template.arguments[1],eAL.current_language);},get_word_translation:function(val,lang){var i;for(i in eAL.lang[lang]){if(i==val)return eAL.lang[lang][i];}return "_"+val;},load_script:function(url){var t=this,d=document,script,head;if(t.loadedFiles[url])return;try{script=d.createElement("script");script.type="text/javascript";script.src=url;script.charset="UTF-8";d.getElementsByTagName("head")[0].appendChild(script);}catch(e){d.write('<sc'+'ript language="javascript" type="text/javascript" src="'+url+'" charset="UTF-8"></sc'+'ript>');}t.loadedFiles[url]=true;},add_event:function(obj,name,handler){try{if(obj.attachEvent){obj.attachEvent("on"+name,handler);}
-else{obj.addEventListener(name,handler,false);}}catch(e){}},remove_event:function(obj,name,handler){try{if(obj.detachEvent)obj.detachEvent("on"+name,handler);
-else obj.removeEventListener(name,handler,false);}catch(e){}},reset:function(e){var formObj,is_child,i,x;formObj=eAL.isIE ? window.event.srcElement:e.target;if(formObj.tagName!='FORM')formObj=formObj.form;for(i in eAs){is_child=false;for(x=0;x<formObj.elements.length;x++){if(formObj.elements[x].id==i)is_child=true;}if(window.frames["frame_"+i]&&is_child&&eAs[i]["displayed"]==true){var exec='window.frames["frame_'+i+'"].editArea.textarea.value=document.getElementById("'+i+'").value;';exec+='window.frames["frame_'+i+'"].editArea.execCommand("focus");';exec+='window.frames["frame_'+i+'"].editArea.check_line_selection();';exec+='window.frames["frame_'+i+'"].editArea.execCommand("reset");';window.setTimeout(exec,10);}}return;},submit:function(e){var formObj,is_child,fs=window.frames,i,x;formObj=eAL.isIE ? window.event.srcElement:e.target;if(formObj.tagName!='FORM')formObj=formObj.form;for(i in eAs){is_child=false;for(x=0;x<formObj.elements.length;x++){if(formObj.elements[x].id==i)is_child=true;}if(is_child){if(fs["frame_"+i]&&eAs[i]["displayed"]==true)document.getElementById(i).value=fs["frame_"+i].editArea.textarea.value;eAL.execCommand(i,"EA_submit");}}if(typeof(formObj.edit_area_replaced_submit)=="function"){res=formObj.edit_area_replaced_submit();if(res==false){if(eAL.isIE)return false;
-else e.preventDefault();}}return;},getValue:function(id){if(window.frames["frame_"+id]&&eAs[id]["displayed"]==true){return window.frames["frame_"+id].editArea.textarea.value;}
-else if(elem=document.getElementById(id)){return elem.value;}return false;},setValue:function(id,new_val){var fs=window.frames;if((f=fs["frame_"+id])&&eAs[id]["displayed"]==true){f.editArea.textarea.value=new_val;f.editArea.execCommand("focus");f.editArea.check_line_selection(false);f.editArea.execCommand("onchange");}
-else if(elem=document.getElementById(id)){elem.value=new_val;}},getSelectionRange:function(id){var sel,eA,fs=window.frames;sel={"start":0,"end":0};if(fs["frame_"+id]&&eAs[id]["displayed"]==true){eA=fs["frame_"+id].editArea;sel["start"]=eA.textarea.selectionStart;sel["end"]=eA.textarea.selectionEnd;}
-else if(elem=document.getElementById(id)){sel=getSelectionRange(elem);}return sel;},setSelectionRange:function(id,new_start,new_end){var fs=window.frames;if(fs["frame_"+id]&&eAs[id]["displayed"]==true){fs["frame_"+id].editArea.area_select(new_start,new_end-new_start);if(!this.isIE){fs["frame_"+id].editArea.check_line_selection(false);fs["frame_"+id].editArea.scroll_to_view();}}
-else if(elem=document.getElementById(id)){setSelectionRange(elem,new_start,new_end);}},getSelectedText:function(id){var sel=this.getSelectionRange(id);return this.getValue(id).substring(sel["start"],sel["end"]);},setSelectedText:function(id,new_val){var fs=window.frames,d=document,sel,text,scrollTop,scrollLeft,new_sel_end;new_val=new_val.replace(/\r/g,"");sel=this.getSelectionRange(id);text=this.getValue(id);if(fs["frame_"+id]&&eAs[id]["displayed"]==true){scrollTop=fs["frame_"+id].document.getElementById("result").scrollTop;scrollLeft=fs["frame_"+id].document.getElementById("result").scrollLeft;}
-else{scrollTop=d.getElementById(id).scrollTop;scrollLeft=d.getElementById(id).scrollLeft;}text=text.substring(0,sel["start"])+new_val+text.substring(sel["end"]);this.setValue(id,text);new_sel_end=sel["start"]+new_val.length;this.setSelectionRange(id,sel["start"],new_sel_end);if(new_val !=this.getSelectedText(id).replace(/\r/g,"")){this.setSelectionRange(id,sel["start"],new_sel_end+new_val.split("\n").length-1);}if(fs["frame_"+id]&&eAs[id]["displayed"]==true){fs["frame_"+id].document.getElementById("result").scrollTop=scrollTop;fs["frame_"+id].document.getElementById("result").scrollLeft=scrollLeft;fs["frame_"+id].editArea.execCommand("onchange");}
-else{d.getElementById(id).scrollTop=scrollTop;d.getElementById(id).scrollLeft=scrollLeft;}},insertTags:function(id,open_tag,close_tag){var old_sel,new_sel;old_sel=this.getSelectionRange(id);text=open_tag+this.getSelectedText(id)+close_tag;eAL.setSelectedText(id,text);new_sel=this.getSelectionRange(id);if(old_sel["end"] > old_sel["start"])this.setSelectionRange(id,new_sel["end"],new_sel["end"]);
-else this.setSelectionRange(id,old_sel["start"]+open_tag.length,old_sel["start"]+open_tag.length);},hide:function(id){var fs=window.frames,d=document,t=this,scrollTop,scrollLeft,span;if(d.getElementById(id)&&!t.hidden[id]){t.hidden[id]={};t.hidden[id]["selectionRange"]=t.getSelectionRange(id);if(d.getElementById(id).style.display!="none"){t.hidden[id]["scrollTop"]=d.getElementById(id).scrollTop;t.hidden[id]["scrollLeft"]=d.getElementById(id).scrollLeft;}if(fs["frame_"+id]){t.hidden[id]["toggle"]=eAs[id]["displayed"];if(fs["frame_"+id]&&eAs[id]["displayed"]==true){scrollTop=fs["frame_"+id].document.getElementById("result").scrollTop;scrollLeft=fs["frame_"+id].document.getElementById("result").scrollLeft;}
-else{scrollTop=d.getElementById(id).scrollTop;scrollLeft=d.getElementById(id).scrollLeft;}t.hidden[id]["scrollTop"]=scrollTop;t.hidden[id]["scrollLeft"]=scrollLeft;if(eAs[id]["displayed"]==true)eAL.toggle_off(id);}span=d.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='none';}d.getElementById(id).style.display="none";}},show:function(id){var fs=window.frames,d=document,t=this,span;if((elem=d.getElementById(id))&&t.hidden[id]){elem.style.display="inline";elem.scrollTop=t.hidden[id]["scrollTop"];elem.scrollLeft=t.hidden[id]["scrollLeft"];span=d.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='inline';}if(fs["frame_"+id]){elem.style.display="inline";if(t.hidden[id]["toggle"]==true)eAL.toggle_on(id);scrollTop=t.hidden[id]["scrollTop"];scrollLeft=t.hidden[id]["scrollLeft"];if(fs["frame_"+id]&&eAs[id]["displayed"]==true){fs["frame_"+id].document.getElementById("result").scrollTop=scrollTop;fs["frame_"+id].document.getElementById("result").scrollLeft=scrollLeft;}
-else{elem.scrollTop=scrollTop;elem.scrollLeft=scrollLeft;}}sel=t.hidden[id]["selectionRange"];t.setSelectionRange(id,sel["start"],sel["end"]);delete t.hidden[id];}},getCurrentFile:function(id){return this.execCommand(id,'get_file',this.execCommand(id,'curr_file'));},getFile:function(id,file_id){return this.execCommand(id,'get_file',file_id);},getAllFiles:function(id){return this.execCommand(id,'get_all_files()');},openFile:function(id,file_infos){return this.execCommand(id,'open_file',file_infos);},closeFile:function(id,file_id){return this.execCommand(id,'close_file',file_id);},setFileEditedMode:function(id,file_id,to){var reg1,reg2;reg1=new RegExp('\\\\','g');reg2=new RegExp('"','g');return this.execCommand(id,'set_file_edited_mode("'+file_id.replace(reg1,'\\\\').replace(reg2,'\\"')+'",'+to+')');},execCommand:function(id,cmd,fct_param){switch(cmd){case "EA_init":if(eAs[id]['settings']["EA_init_callback"].length>0)eval(eAs[id]['settings']["EA_init_callback"]+"('"+id+"');");break;case "EA_delete":if(eAs[id]['settings']["EA_delete_callback"].length>0)eval(eAs[id]['settings']["EA_delete_callback"]+"('"+id+"');");break;case "EA_submit":if(eAs[id]['settings']["submit_callback"].length>0)eval(eAs[id]['settings']["submit_callback"]+"('"+id+"');");break;}if(window.frames["frame_"+id]&&window.frames["frame_"+id].editArea){if(fct_param!=undefined)return eval('window.frames["frame_'+id+'"].editArea.'+cmd+'(fct_param);');
-else return eval('window.frames["frame_'+id+'"].editArea.'+cmd+';');}return false;}};var eAL=new EAL();var eAs={}; function getAttribute(elm,aName){var aValue,taName,i;try{aValue=elm.getAttribute(aName);}catch(exept){}if(! aValue){for(i=0;i < elm.attributes.length;i++){taName=elm.attributes[i] .name.toLowerCase();if(taName==aName){aValue=elm.attributes[i] .value;return aValue;}}}return aValue;};function setAttribute(elm,attr,val){if(attr=="class"){elm.setAttribute("className",val);elm.setAttribute("class",val);}
-else{elm.setAttribute(attr,val);}};function getChildren(elem,elem_type,elem_attribute,elem_attribute_match,option,depth){if(!option)var option="single";if(!depth)var depth=-1;if(elem){var children=elem.childNodes;var result=null;var results=[];for(var x=0;x<children.length;x++){strTagName=new String(children[x].tagName);children_class="?";if(strTagName!="undefined"){child_attribute=getAttribute(children[x],elem_attribute);if((strTagName.toLowerCase()==elem_type.toLowerCase()||elem_type=="")&&(elem_attribute==""||child_attribute==elem_attribute_match)){if(option=="all"){results.push(children[x]);}
-else{return children[x];}}if(depth!=0){result=getChildren(children[x],elem_type,elem_attribute,elem_attribute_match,option,depth-1);if(option=="all"){if(result.length>0){results=results.concat(result);}}
-else if(result!=null){return result;}}}}if(option=="all")return results;}return null;};function isChildOf(elem,parent){if(elem){if(elem==parent)return true;while(elem.parentNode !='undefined'){return isChildOf(elem.parentNode,parent);}}return false;};function getMouseX(e){if(e!=null&&typeof(e.pageX)!="undefined"){return e.pageX;}
-else{return(e!=null?e.x:event.x)+document.documentElement.scrollLeft;}};function getMouseY(e){if(e!=null&&typeof(e.pageY)!="undefined"){return e.pageY;}
-else{return(e!=null?e.y:event.y)+document.documentElement.scrollTop;}};function calculeOffsetLeft(r){return calculeOffset(r,"offsetLeft")};function calculeOffsetTop(r){return calculeOffset(r,"offsetTop")};function calculeOffset(element,attr){var offset=0;while(element){offset+=element[attr];element=element.offsetParent}return offset;};function get_css_property(elem,prop){if(document.defaultView){return document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop);}
-else if(elem.currentStyle){var prop=prop.replace(/-\D/gi,function(sMatch){return sMatch.charAt(sMatch.length-1).toUpperCase();});return elem.currentStyle[prop];}
-else return null;}var _mCE;function start_move_element(e,id,frame){var elem_id=(e.target||e.srcElement).id;if(id)elem_id=id;if(!frame)frame=window;if(frame.event)e=frame.event;_mCE=frame.document.getElementById(elem_id);_mCE.frame=frame;frame.document.onmousemove=move_element;frame.document.onmouseup=end_move_element;mouse_x=getMouseX(e);mouse_y=getMouseY(e);_mCE.start_pos_x=mouse_x-(_mCE.style.left.replace("px","")||calculeOffsetLeft(_mCE));_mCE.start_pos_y=mouse_y-(_mCE.style.top.replace("px","")||calculeOffsetTop(_mCE));return false;};function end_move_element(e){_mCE.frame.document.onmousemove="";_mCE.frame.document.onmouseup="";_mCE=null;};function move_element(e){var newTop,newLeft,maxLeft;if(_mCE.frame&&_mCE.frame.event)e=_mCE.frame.event;newTop=getMouseY(e)-_mCE.start_pos_y;newLeft=getMouseX(e)-_mCE.start_pos_x;maxLeft=_mCE.frame.document.body.offsetWidth-_mCE.offsetWidth;max_top=_mCE.frame.document.body.offsetHeight-_mCE.offsetHeight;newTop=Math.min(Math.max(0,newTop),max_top);newLeft=Math.min(Math.max(0,newLeft),maxLeft);_mCE.style.top=newTop+"px";_mCE.style.left=newLeft+"px";return false;};var nav=eAL.nav;function getSelectionRange(textarea){return{"start":textarea.selectionStart,"end":textarea.selectionEnd};};function setSelectionRange(t,start,end){t.focus();start=Math.max(0,Math.min(t.value.length,start));end=Math.max(start,Math.min(t.value.length,end));if(this.isOpera&&this.isOpera < 9.6){t.selectionEnd=1;t.selectionStart=0;t.selectionEnd=1;t.selectionStart=0;}t.selectionStart=start;t.selectionEnd=end;if(isIE)set_IE_selection(t);};function get_IE_selection(t){var d=document,div,range,stored_range,elem,scrollTop,relative_top,line_start,line_nb,range_start,range_end,tab;if(t&&t.focused){if(!t.ea_line_height){div=d.createElement("div");div.style.fontFamily=get_css_property(t,"font-family");div.style.fontSize=get_css_property(t,"font-size");div.style.visibility="hidden";div.innerHTML="0";d.body.appendChild(div);t.ea_line_height=div.offsetHeight;d.body.removeChild(div);}range=d.selection.createRange();try{stored_range=range.duplicate();stored_range.moveToElementText(t);stored_range.setEndPoint('EndToEnd',range);if(stored_range.parentElement()==t){elem=t;scrollTop=0;while(elem.parentNode){scrollTop+=elem.scrollTop;elem=elem.parentNode;}relative_top=range.offsetTop-calculeOffsetTop(t)+scrollTop;line_start=Math.round((relative_top / t.ea_line_height)+1);line_nb=Math.round(range.boundingHeight / t.ea_line_height);range_start=stored_range.text.length-range.text.length;tab=t.value.substr(0,range_start).split("\n");range_start+=(line_start-tab.length)*2;t.selectionStart=range_start;range_end=t.selectionStart+range.text.length;tab=t.value.substr(0,range_start+range.text.length).split("\n");range_end+=(line_start+line_nb-1-tab.length)*2;t.selectionEnd=range_end;}}catch(e){}}setTimeout("get_IE_selection(document.getElementById('"+t.id+"'));",50);};function IE_textarea_focus(){event.srcElement.focused=true;}function IE_textarea_blur(){event.srcElement.focused=false;}function set_IE_selection(t){var nbLineStart,nbLineStart,nbLineEnd,range;if(!window.closed){nbLineStart=t.value.substr(0,t.selectionStart).split("\n").length-1;nbLineEnd=t.value.substr(0,t.selectionEnd).split("\n").length-1;try{range=document.selection.createRange();range.moveToElementText(t);range.setEndPoint('EndToStart',range);range.moveStart('character',t.selectionStart-nbLineStart);range.moveEnd('character',t.selectionEnd-nbLineEnd-(t.selectionStart-nbLineStart));range.select();}catch(e){}}};eAL.waiting_loading["elements_functions.js"]="loaded";
- EAL.prototype.start_resize_area=function(){var d=document,a,div,width,height,father;d.onmouseup=eAL.end_resize_area;d.onmousemove=eAL.resize_area;eAL.toggle(eAL.resize["id"]);a=eAs[eAL.resize["id"]]["textarea"];div=d.getElementById("edit_area_resize");if(!div){div=d.createElement("div");div.id="edit_area_resize";div.style.border="dashed #888888 1px";}width=a.offsetWidth-2;height=a.offsetHeight-2;div.style.display="block";div.style.width=width+"px";div.style.height=height+"px";father=a.parentNode;father.insertBefore(div,a);a.style.display="none";eAL.resize["start_top"]=calculeOffsetTop(div);eAL.resize["start_left"]=calculeOffsetLeft(div);};EAL.prototype.end_resize_area=function(e){var d=document,div,a,width,height;d.onmouseup="";d.onmousemove="";div=d.getElementById("edit_area_resize");a=eAs[eAL.resize["id"]]["textarea"];width=Math.max(eAs[eAL.resize["id"]]["settings"]["min_width"],div.offsetWidth-4);height=Math.max(eAs[eAL.resize["id"]]["settings"]["min_height"],div.offsetHeight-4);if(eAL.isIE==6){width-=2;height-=2;}a.style.width=width+"px";a.style.height=height+"px";div.style.display="none";a.style.display="inline";a.selectionStart=eAL.resize["selectionStart"];a.selectionEnd=eAL.resize["selectionEnd"];eAL.toggle(eAL.resize["id"]);return false;};EAL.prototype.resize_area=function(e){var allow,newHeight,newWidth;allow=eAs[eAL.resize["id"]]["settings"]["allow_resize"];if(allow=="both"||allow=="y"){newHeight=Math.max(20,getMouseY(e)-eAL.resize["start_top"]);document.getElementById("edit_area_resize").style.height=newHeight+"px";}if(allow=="both"||allow=="x"){newWidth=Math.max(20,getMouseX(e)-eAL.resize["start_left"]);document.getElementById("edit_area_resize").style.width=newWidth+"px";}return false;};eAL.waiting_loading["resize_area.js"]="loaded";
-       EAL.prototype.get_regexp=function(text_array){res="(\\b)(";for(i=0;i<text_array.length;i++){if(i>0)res+="|";res+=this.get_escaped_regexp(text_array[i]);}res+=")(\\b)";reg=new RegExp(res);return res;};EAL.prototype.get_escaped_regexp=function(str){return str.toString().replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\}|\{|\$|\^|\|)/g,"\\$1");};EAL.prototype.init_syntax_regexp=function(){var lang_style={};for(var lang in this.load_syntax){if(!this.syntax[lang]){this.syntax[lang]={};this.syntax[lang]["keywords_reg_exp"]={};this.keywords_reg_exp_nb=0;if(this.load_syntax[lang]['KEYWORDS']){param="g";if(this.load_syntax[lang]['KEYWORD_CASE_SENSITIVE']===false)param+="i";for(var i in this.load_syntax[lang]['KEYWORDS']){if(typeof(this.load_syntax[lang]['KEYWORDS'][i])=="function")continue;this.syntax[lang]["keywords_reg_exp"][i]=new RegExp(this.get_regexp(this.load_syntax[lang]['KEYWORDS'][i]),param);this.keywords_reg_exp_nb++;}}if(this.load_syntax[lang]['OPERATORS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['OPERATORS']){if(typeof(this.load_syntax[lang]['OPERATORS'][i])=="function")continue;if(nb>0)str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['OPERATORS'][i]);nb++;}if(str.length>0)this.syntax[lang]["operators_reg_exp"]=new RegExp("("+str+")","g");}if(this.load_syntax[lang]['DELIMITERS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['DELIMITERS']){if(typeof(this.load_syntax[lang]['DELIMITERS'][i])=="function")continue;if(nb>0)str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['DELIMITERS'][i]);nb++;}if(str.length>0)this.syntax[lang]["delimiters_reg_exp"]=new RegExp("("+str+")","g");}var syntax_trace=[];this.syntax[lang]["quotes"]={};var quote_tab=[];if(this.load_syntax[lang]['QUOTEMARKS']){for(var i in this.load_syntax[lang]['QUOTEMARKS']){if(typeof(this.load_syntax[lang]['QUOTEMARKS'][i])=="function")continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['QUOTEMARKS'][i]);this.syntax[lang]["quotes"][x]=x;quote_tab[quote_tab.length]="("+x+"(\\\\.|[^"+x+"])*(?:"+x+"|$))";syntax_trace.push(x);}}this.syntax[lang]["comments"]={};if(this.load_syntax[lang]['COMMENT_SINGLE']){for(var i in this.load_syntax[lang]['COMMENT_SINGLE']){if(typeof(this.load_syntax[lang]['COMMENT_SINGLE'][i])=="function")continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_SINGLE'][i]);quote_tab[quote_tab.length]="("+x+"(.|\\r|\\t)*(\\n|$))";syntax_trace.push(x);this.syntax[lang]["comments"][x]="\n";}}if(this.load_syntax[lang]['COMMENT_MULTI']){for(var i in this.load_syntax[lang]['COMMENT_MULTI']){if(typeof(this.load_syntax[lang]['COMMENT_MULTI'][i])=="function")continue;var start=this.get_escaped_regexp(i);var end=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_MULTI'][i]);quote_tab[quote_tab.length]="("+start+"(.|\\n|\\r)*?("+end+"|$))";syntax_trace.push(start);syntax_trace.push(end);this.syntax[lang]["comments"][i]=this.load_syntax[lang]['COMMENT_MULTI'][i];}}if(quote_tab.length>0)this.syntax[lang]["comment_or_quote_reg_exp"]=new RegExp("("+quote_tab.join("|")+")","gi");if(syntax_trace.length>0)this.syntax[lang]["syntax_trace_regexp"]=new RegExp("((.|\n)*?)(\\\\*("+syntax_trace.join("|")+"|$))","gmi");if(this.load_syntax[lang]['SCRIPT_DELIMITERS']){this.syntax[lang]["script_delimiters"]={};for(var i in this.load_syntax[lang]['SCRIPT_DELIMITERS']){if(typeof(this.load_syntax[lang]['SCRIPT_DELIMITERS'][i])=="function")continue;this.syntax[lang]["script_delimiters"][i]=this.load_syntax[lang]['SCRIPT_DELIMITERS'];}}this.syntax[lang]["custom_regexp"]={};if(this.load_syntax[lang]['REGEXPS']){for(var i in this.load_syntax[lang]['REGEXPS']){if(typeof(this.load_syntax[lang]['REGEXPS'][i])=="function")continue;var val=this.load_syntax[lang]['REGEXPS'][i];if(!this.syntax[lang]["custom_regexp"][val['execute']])this.syntax[lang]["custom_regexp"][val['execute']]={};this.syntax[lang]["custom_regexp"][val['execute']][i]={'regexp':new RegExp(val['search'],val['modifiers']),'class':val['class']};}}if(this.load_syntax[lang]['STYLES']){lang_style[lang]={};for(var i in this.load_syntax[lang]['STYLES']){if(typeof(this.load_syntax[lang]['STYLES'][i])=="function")continue;if(typeof(this.load_syntax[lang]['STYLES'][i])!="string"){for(var j in this.load_syntax[lang]['STYLES'][i]){lang_style[lang][j]=this.load_syntax[lang]['STYLES'][i][j];}}
-else{lang_style[lang][i]=this.load_syntax[lang]['STYLES'][i];}}}var style="";for(var i in lang_style[lang]){if(lang_style[lang][i].length>0){style+="."+lang+" ."+i.toLowerCase()+" span{"+lang_style[lang][i]+"}\n";style+="."+lang+" ."+i.toLowerCase()+"{"+lang_style[lang][i]+"}\n";}}this.syntax[lang]["styles"]=style;}}};eAL.waiting_loading["reg_syntax.js"]="loaded";
-var editAreaLoader= eAL;var editAreas=eAs;EditAreaLoader=EAL;editAreaLoader.iframe_script= "<script type='text/javascript'> Ã EA(){var t=Á;t.error=Ì;t.inlinePopup=[{popup_id:\"area_search_replace\",icon_id:\"search\"},{popup_id:\"edit_area_help\",icon_id:\"help\"}];t.plugins={};t.line_number=0;È.eAL.set_browser_infos(t);if(t.isIE >=8)t.isIE=7;t.É={};t.last_text_to_highlight=\"\";t.last_hightlighted_text=\"\";t.syntax_list=[];t.allready_used_syntax={};t.check_line_selection_timer=50;t.ÂFocused=Ì;t.highlight_selection_line=null;t.previous=[];t.next=[];t.last_undo=\"\";t.files={};t.filesIdAssoc={};t.curr_file='';t.assocBracket={};t.revertAssocBracket={};t.assocBracket[\"(\"]=\")\";t.assocBracket[\"{\"]=\"}\";t.assocBracket[\"[\"]=\"]\";for(var index in t.assocBracket){t.revertAssocBracket[t.assocBracket[index]]=index;}t.is_editable=Ë;t.lineHeight=16;t.tab_nb_char=8;if(t.isOpera)t.tab_nb_char=6;t.is_tabbing=Ì;t.fullscreen={'isFull':Ì};t.isResizing=Ì;t.id=area_id;t.Å=eAs[t.id][\"Å\"];if((\"\"+t.Å['replace_tab_by_spaces']).match(/^[0-9]+$/)){t.tab_nb_char=t.Å['replace_tab_by_spaces'];t.tabulation=\"\";for(var i=0;i<t.tab_nb_char;i++)t.tabulation+=\" \";}\nelse{t.tabulation=\"\t\";}if(t.Å[\"syntax_selection_allow\"]&&t.Å[\"syntax_selection_allow\"].Æ>0)t.syntax_list=t.Å[\"syntax_selection_allow\"].replace(/ /g,\"\").split(\",\");if(t.Å['syntax'])t.allready_used_syntax[t.Å['syntax']]=Ë;};EA.Ä.init=Ã(){var t=Á,a,s=t.Å;t.Â=_$(\"Â\");t.container=_$(\"container\");t.result=_$(\"result\");t.content_highlight=_$(\"content_highlight\");t.selection_field=_$(\"selection_field\");t.selection_field_text=_$(\"selection_field_text\");t.processing_screen=_$(\"processing\");t.editor_area=_$(\"editor\");t.tab_browsing_area=_$(\"tab_browsing_area\");t.test_font_size=_$(\"test_font_size\");a=t.Â;if(!s['is_editable'])t.set_editable(Ì);t.set_show_line_colors(s['show_line_colors']);if(syntax_selec=_$(\"syntax_selection\")){for(var i=0;i<t.syntax_list.Æ;i++){var syntax=t.syntax_list[i];var option=document.createElement(\"option\");option.Ê=syntax;if(syntax==s['syntax'])option.selected=\"selected\";option.innerHTML=t.get_translation(\"syntax_\"+syntax,\"word\");syntax_selec.appendChild(option);}}spans=È.getChildren(_$(\"toolbar_1\"),\"span\",\"\",\"\",\"all\",-1);for(var i=0;i<spans.Æ;i++){id=spans[i].id.replace(/tmp_tool_(.*)/,\"$1\");if(id!=spans[i].id){for(var j in t.plugins){if(typeof(t.plugins[j].get_control_html)==\"Ã\"){html=t.plugins[j].get_control_html(id);if(html!=Ì){html=t.get_translation(html,\"template\");var new_span=document.createElement(\"span\");new_span.innerHTML=html;var father=spans[i].ÈNode;spans[i].ÈNode.replaceChild(new_span,spans[i]);break;}}}}}if(s[\"debug\"]){t.debug=È.document.getElementById(\"edit_area_debug_\"+t.id);}if(_$(\"redo\")!=null)t.switchClassSticky(_$(\"redo\"),'editAreaButtonDisabled',Ë);if(typeof(È.eAL.syntax[s[\"syntax\"]])!=\"undefined\"){for(var i in È.eAL.syntax){if(typeof(È.eAL.syntax[i][\"Çs\"])!=\"undefined\"){t.add_Ç(È.eAL.syntax[i][\"Çs\"]);}}}if(t.isOpera)_$(\"editor\").onkeypress=keyDown;\nelse _$(\"editor\").onkeydown=keyDown;for(var i=0;i<t.inlinePopup.Æ;i++){if(t.isOpera)_$(t.inlinePopup[i][\"popup_id\"]).onkeypress=keyDown;\nelse _$(t.inlinePopup[i][\"popup_id\"]).onkeydown=keyDown;}if(s[\"allow_resize\"]==\"both\"||s[\"allow_resize\"]==\"x\"||s[\"allow_resize\"]==\"y\")t.allow_resize(Ë);È.eAL.toggle(t.id,\"on\");t.change_smooth_selection_mode(eA.smooth_selection);t.execCommand(\"change_highlight\",s[\"start_highlight\"]);t.set_font(eA.Å[\"font_family\"],eA.Å[\"font_size\"]);children=È.getChildren(document.body,\"\",\"selec\",\"none\",\"all\",-1);for(var i=0;i<children.Æ;i++){if(t.isIE)children[i].unselectable=Ë;\nelse children[i].onmousedown=Ã(){return Ì};}a.spellcheck=s[\"gecko_spellcheck\"];if(t.isFirefox >='3'){t.content_highlight.Ç.paddingLeft=\"1px\";t.selection_field.Ç.paddingLeft=\"1px\";t.selection_field_text.Ç.paddingLeft=\"1px\";}if(t.isIE&&t.isIE < 8){a.Ç.marginTop=\"-1px\";}if(t.isSafari){t.editor_area.Ç.position=\"absolute\";a.Ç.marginLeft=\"-3px\";if(t.isSafari < 3.2)a.Ç.marginTop=\"1px\";}È.eAL.add_event(t.result,\"click\",Ã(e){if((e.target||e.srcElement)==eA.result){eA.area_select(eA.Â.Ê.Æ,0);}});if(s['is_multi_files']!=Ì)t.open_file({'id':t.curr_file,'text':''});t.set_word_wrap(s['word_wrap']);setTimeout(\"eA.focus();eA.manage_size();eA.execCommand('EA_load');\",10);t.check_undo();t.check_line_selection(Ë);t.scroll_to_view();for(var i in t.plugins){if(typeof(t.plugins[i].onload)==\"Ã\")t.plugins[i].onload();}if(s['fullscreen']==Ë)t.toggle_full_screen(Ë);È.eAL.add_event(window,\"resize\",eA.update_size);È.eAL.add_event(È.window,\"resize\",eA.update_size);È.eAL.add_event(top.window,\"resize\",eA.update_size);È.eAL.add_event(window,\"unload\",Ã(){if(È.eAL){È.eAL.remove_event(È.window,\"resize\",eA.update_size);È.eAL.remove_event(top.window,\"resize\",eA.update_size);}if(eAs[eA.id]&&eAs[eA.id][\"displayed\"]){eA.execCommand(\"EA_unload\");}});};EA.Ä.update_size=Ã(){var d=document,pd=È.document,height,width,popup,maxLeft,maxTop;if(typeof eAs !='undefined'&&eAs[eA.id]&&eAs[eA.id][\"displayed\"]==Ë){if(eA.fullscreen['isFull']){pd.getElementById(\"frame_\"+eA.id).Ç.width=pd.getElementsByTagName(\"html\")[0].clientWidth+\"px\";pd.getElementById(\"frame_\"+eA.id).Ç.height=pd.getElementsByTagName(\"html\")[0].clientHeight+\"px\";}if(eA.tab_browsing_area.Ç.display=='block'&&(!eA.isIE||eA.isIE >=8)){eA.tab_browsing_area.Ç.height=\"0px\";eA.tab_browsing_area.Ç.height=(eA.result.offsetTop-eA.tab_browsing_area.offsetTop-1)+\"px\";}height=d.body.offsetHeight-eA.get_all_toolbar_height()-4;eA.result.Ç.height=height+\"px\";width=d.body.offsetWidth-2;eA.result.Ç.width=width+\"px\";for(i=0;i < eA.inlinePopup.Æ;i++){popup=_$(eA.inlinePopup[i][\"popup_id\"]);maxLeft=d.body.offsetWidth-popup.offsetWidth;maxTop=d.body.offsetHeight-popup.offsetHeight;if(popup.offsetTop > maxTop)popup.Ç.top=maxTop+\"px\";if(popup.offsetLeft > maxLeft)popup.Ç.left=maxLeft+\"px\";}eA.manage_size(Ë);eA.fixLinesHeight(eA.Â.Ê,0,-1);}};EA.Ä.manage_size=Ã(onlyOneTime){if(!eAs[Á.id])return Ì;if(eAs[Á.id][\"displayed\"]==Ë&&Á.ÂFocused){var area_height,resized=Ì;if(!Á.Å['word_wrap']){var area_width=Á.Â.scrollWidth;area_height=Á.Â.scrollHeight;if(Á.isOpera&&Á.isOpera < 9.6){area_width=10000;}if(Á.Â.previous_scrollWidth!=area_width){Á.container.Ç.width=area_width+\"px\";Á.Â.Ç.width=area_width+\"px\";Á.content_highlight.Ç.width=area_width+\"px\";Á.Â.previous_scrollWidth=area_width;resized=Ë;}}if(Á.Å['word_wrap']){newW=Á.Â.offsetWidth;if(Á.isFirefox||Á.isIE)newW-=2;if(Á.isSafari)newW-=6;Á.content_highlight.Ç.width=Á.selection_field_text.Ç.width=Á.selection_field.Ç.width=Á.test_font_size.Ç.width=newW+\"px\";}if(Á.isOpera||Á.isFirefox||Á.isSafari){area_height=Á.getLinePosTop(Á.É[\"nb_line\"]+1);}\nelse{area_height=Á.Â.scrollHeight;}if(Á.Â.previous_scrollHeight!=area_height){Á.container.Ç.height=(area_height+2)+\"px\";Á.Â.Ç.height=area_height+\"px\";Á.content_highlight.Ç.height=area_height+\"px\";Á.Â.previous_scrollHeight=area_height;resized=Ë;}if(Á.É[\"nb_line\"] >=Á.line_number){var newLines='',destDiv=_$(\"line_number\"),start=Á.line_number,end=Á.É[\"nb_line\"]+100;for(i=start+1;i < end;i++){newLines+='<div id=\"line_'+i+'\">'+i+\"</div>\";Á.line_number++;}destDiv.innerHTML=destDiv.innerHTML+newLines;Á.fixLinesHeight(Á.Â.Ê,start,-1);}Á.Â.scrollTop=\"0px\";Á.Â.scrollLeft=\"0px\";if(resized==Ë){Á.scroll_to_view();}}if(!onlyOneTime)setTimeout(\"eA.manage_size();\",100);};EA.Ä.execCommand=Ã(cmd,param){for(var i in Á.plugins){if(typeof(Á.plugins[i].execCommand)==\"Ã\"){if(!Á.plugins[i].execCommand(cmd,param))return;}}switch(cmd){case \"save\":if(Á.Å[\"save_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"save_callback\"]+\"('\"+Á.id+\"',eA.Â.Ê);\");break;case \"load\":if(Á.Å[\"load_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"load_callback\"]+\"('\"+Á.id+\"');\");break;case \"onchange\":if(Á.Å[\"change_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"change_callback\"]+\"('\"+Á.id+\"');\");break;case \"EA_load\":if(Á.Å[\"EA_load_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_load_callback\"]+\"('\"+Á.id+\"');\");break;case \"EA_unload\":if(Á.Å[\"EA_unload_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_unload_callback\"]+\"('\"+Á.id+\"');\");break;case \"toggle_on\":if(Á.Å[\"EA_toggle_on_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_toggle_on_callback\"]+\"('\"+Á.id+\"');\");break;case \"toggle_off\":if(Á.Å[\"EA_toggle_off_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_toggle_off_callback\"]+\"('\"+Á.id+\"');\");break;case \"re_sync\":if(!Á.do_highlight)break;case \"file_switch_on\":if(Á.Å[\"EA_file_switch_on_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_file_switch_on_callback\"]+\"(param);\");break;case \"file_switch_off\":if(Á.Å[\"EA_file_switch_off_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_file_switch_off_callback\"]+\"(param);\");break;case \"file_close\":if(Á.Å[\"EA_file_close_callback\"].Æ>0)return eval(\"È.\"+Á.Å[\"EA_file_close_callback\"]+\"(param);\");break;default:if(typeof(eval(\"eA.\"+cmd))==\"Ã\"){if(Á.Å[\"debug\"])eval(\"eA.\"+cmd+\"(param);\");\nelse try{eval(\"eA.\"+cmd+\"(param);\");}catch(e){};}}};EA.Ä.get_translation=Ã(word,mode){if(mode==\"template\")return È.eAL.translate(word,Á.Å[\"language\"],mode);\nelse return È.eAL.get_word_translation(word,Á.Å[\"language\"]);};EA.Ä.add_plugin=Ã(plug_name,plug_obj){for(var i=0;i<Á.Å[\"plugins\"].Æ;i++){if(Á.Å[\"plugins\"][i]==plug_name){Á.plugins[plug_name]=plug_obj;plug_obj.baseURL=È.eAL.baseURL+\"plugins/\"+plug_name+\"/\";if(typeof(plug_obj.init)==\"Ã\")plug_obj.init();}}};EA.Ä.load_css=Ã(url){try{link=document.createElement(\"link\");link.type=\"text/css\";link.rel=\"Çsheet\";link.media=\"all\";link.href=url;head=document.getElementsByTagName(\"head\");head[0].appendChild(link);}catch(e){document.write(\"<link href='\"+url+\"' rel='Çsheet' type='text/css' />\");}};EA.Ä.load_script=Ã(url){try{script=document.createElement(\"script\");script.type=\"text/javascript\";script.src=url;script.charset=\"UTF-8\";head=document.getElementsByTagName(\"head\");head[0].appendChild(script);}catch(e){document.write(\"<script type='text/javascript' src='\"+url+\"' charset=\\\"UTF-8\\\"><\"+\"/script>\");}};EA.Ä.add_lang=Ã(language,Ês){if(!È.eAL.lang[language])È.eAL.lang[language]={};for(var i in Ês)È.eAL.lang[language][i]=Ês[i];};à_$(id){return document.getElementById(id);};var eA=new EA();È.eAL.add_event(window,\"load\",init);àinit(){setTimeout(\"eA.init();\",10);};    EA.Ä.focus=Ã(){Á.Â.focus();Á.ÂFocused=Ë;};EA.Ä.check_line_selection=Ã(timer_checkup){var changes,infos,new_top,new_width,i;var t1=t2=t2_1=t3=tLines=tend=new Date().getTime();if(!eAs[Á.id])return Ì;if(!Á.smooth_selection&&!Á.do_highlight){}\nelse if(Á.ÂFocused&&eAs[Á.id][\"displayed\"]==Ë&&Á.isResizing==Ì){infos=Á.get_selection_infos();changes=Á.checkTextEvolution(typeof(Á.É['full_text'])=='undefined' ? '':Á.É['full_text'],infos['full_text']);t2=new Date().getTime();if(Á.É[\"line_start\"] !=infos[\"line_start\"]||Á.É[\"line_nb\"] !=infos[\"line_nb\"]||infos[\"full_text\"] !=Á.É[\"full_text\"]||Á.reload_highlight||Á.É[\"selectionStart\"] !=infos[\"selectionStart\"]||Á.É[\"selectionEnd\"] !=infos[\"selectionEnd\"]||!timer_checkup){new_top=Á.getLinePosTop(infos[\"line_start\"]);new_width=Math.max(Á.Â.scrollWidth,Á.container.clientWidth-50);Á.selection_field.Ç.top=Á.selection_field_text.Ç.top=new_top+\"px\";if(!Á.Å['word_wrap']){Á.selection_field.Ç.width=Á.selection_field_text.Ç.width=Á.test_font_size.Ç.width=new_width+\"px\";}if(Á.do_highlight==Ë){var curr_text=infos[\"full_text\"].split(\"\\n\");var content=\"\";var start=Math.max(0,infos[\"line_start\"]-1);var end=Math.min(curr_text.Æ,infos[\"line_start\"]+infos[\"line_nb\"]-1);for(i=start;i< end;i++){content+=curr_text[i]+\"\\n\";}selLength=infos['selectionEnd']-infos['selectionStart'];content=content.substr(0,infos[\"curr_pos\"]-1)+\"\\r\\r\"+content.substr(infos[\"curr_pos\"]-1,selLength)+\"\\r\\r\"+content.substr(infos[\"curr_pos\"]-1+selLength);content='<span>'+content.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(\"\\r\\r\",'</span><strong>').replace(\"\\r\\r\",'</strong><span>')+'</span>';if(Á.isIE||(Á.isOpera&&Á.isOpera < 9.6)){Á.selection_field.innerHTML=\"<pre>\"+content.replace(/^\\r?\\n/,\"<br>\")+\"</pre>\";}\nelse{Á.selection_field.innerHTML=content;}Á.selection_field_text.innerHTML=Á.selection_field.innerHTML;t2_1=new Date().getTime();if(Á.reload_highlight||(infos[\"full_text\"] !=Á.last_text_to_highlight&&(Á.É[\"line_start\"]!=infos[\"line_start\"]||Á.show_line_colors||Á.Å['word_wrap']||Á.É[\"line_nb\"]!=infos[\"line_nb\"]||Á.É[\"nb_line\"]!=infos[\"nb_line\"]))){Á.maj_highlight(infos);}}}t3=new Date().getTime();if(Á.Å['word_wrap']&&infos[\"full_text\"] !=Á.É[\"full_text\"]){if(changes.newText.split(\"\\n\").Æ==1&&Á.É['nb_line']&&infos['nb_line']==Á.É['nb_line']){Á.fixLinesHeight(infos['full_text'],changes.lineStart,changes.lineStart);}\nelse{Á.fixLinesHeight(infos['full_text'],changes.lineStart,-1);}}tLines=new Date().getTime();if(infos[\"line_start\"] !=Á.É[\"line_start\"]||infos[\"curr_pos\"] !=Á.É[\"curr_pos\"]||infos[\"full_text\"].Æ!=Á.É[\"full_text\"].Æ||Á.reload_highlight||!timer_checkup){var selec_char=infos[\"curr_line\"].charAt(infos[\"curr_pos\"]-1);var no_real_move=Ë;if(infos[\"line_nb\"]==1&&(Á.assocBracket[selec_char]||Á.revertAssocBracket[selec_char])){no_real_move=Ì;if(Á.findEndBracket(infos,selec_char)===Ë){_$(\"end_bracket\").Ç.visibility=\"visible\";_$(\"cursor_pos\").Ç.visibility=\"visible\";_$(\"cursor_pos\").innerHTML=selec_char;_$(\"end_bracket\").innerHTML=(Á.assocBracket[selec_char]||Á.revertAssocBracket[selec_char]);}\nelse{_$(\"end_bracket\").Ç.visibility=\"hidden\";_$(\"cursor_pos\").Ç.visibility=\"hidden\";}}\nelse{_$(\"cursor_pos\").Ç.visibility=\"hidden\";_$(\"end_bracket\").Ç.visibility=\"hidden\";}Á.displayToCursorPosition(\"cursor_pos\",infos[\"line_start\"],infos[\"curr_pos\"]-1,infos[\"curr_line\"],no_real_move);if(infos[\"line_nb\"]==1&&infos[\"line_start\"]!=Á.É[\"line_start\"])Á.scroll_to_view();}Á.É=infos;}tend=new Date().getTime();if(timer_checkup){setTimeout(\"eA.check_line_selection(Ë)\",Á.check_line_selection_timer);}};EA.Ä.get_selection_infos=Ã(){var sel={},start,end,len,str;Á.getIESelection();start=Á.Â.selectionStart;end=Á.Â.selectionEnd;if(Á.É[\"selectionStart\"]==start&&Á.É[\"selectionEnd\"]==end&&Á.É[\"full_text\"]==Á.Â.Ê){return Á.É;}if(Á.tabulation!=\"\t\"&&Á.Â.Ê.indexOf(\"\t\")!=-1){len=Á.Â.Ê.Æ;Á.Â.Ê=Á.replace_tab(Á.Â.Ê);start=end=start+(Á.Â.Ê.Æ-len);Á.area_select(start,0);}sel[\"selectionStart\"]=start;sel[\"selectionEnd\"]=end;sel[\"full_text\"]=Á.Â.Ê;sel[\"line_start\"]=1;sel[\"line_nb\"]=1;sel[\"curr_pos\"]=0;sel[\"curr_line\"]=\"\";sel[\"indexOfCursor\"]=0;sel[\"selec_direction\"]=Á.É[\"selec_direction\"];var splitTab=sel[\"full_text\"].split(\"\\n\");var nbLine=Math.max(0,splitTab.Æ);var nbChar=Math.max(0,sel[\"full_text\"].Æ-(nbLine-1));if(sel[\"full_text\"].indexOf(\"\\r\")!=-1)nbChar=nbChar-(nbLine-1);sel[\"nb_line\"]=nbLine;sel[\"nb_char\"]=nbChar;if(start>0){str=sel[\"full_text\"].substr(0,start);sel[\"curr_pos\"]=start-str.lastIndexOf(\"\\n\");sel[\"line_start\"]=Math.max(1,str.split(\"\\n\").Æ);}\nelse{sel[\"curr_pos\"]=1;}if(end>start){sel[\"line_nb\"]=sel[\"full_text\"].substring(start,end).split(\"\\n\").Æ;}sel[\"indexOfCursor\"]=start;sel[\"curr_line\"]=splitTab[Math.max(0,sel[\"line_start\"]-1)];if(sel[\"selectionStart\"]==Á.É[\"selectionStart\"]){if(sel[\"selectionEnd\"]>Á.É[\"selectionEnd\"])sel[\"selec_direction\"]=\"down\";\nelse if(sel[\"selectionEnd\"]==Á.É[\"selectionStart\"])sel[\"selec_direction\"]=Á.É[\"selec_direction\"];}\nelse if(sel[\"selectionStart\"]==Á.É[\"selectionEnd\"]&&sel[\"selectionEnd\"]>Á.É[\"selectionEnd\"]){sel[\"selec_direction\"]=\"down\";}\nelse{sel[\"selec_direction\"]=\"up\";}_$(\"nbLine\").innerHTML=nbLine;_$(\"nbChar\").innerHTML=nbChar;_$(\"linePos\").innerHTML=sel[\"line_start\"];_$(\"currPos\").innerHTML=sel[\"curr_pos\"];return sel;};EA.Ä.getIESelection=Ã(){var selectionStart,selectionEnd,range,stored_range;if(!Á.isIE)return Ì;if(Á.Å['word_wrap'])Á.Â.wrap='off';try{range=document.selection.createRange();stored_range=range.duplicate();stored_range.moveToElementText(Á.Â);stored_range.setEndPoint('EndToEnd',range);if(stored_range.ÈElement()!=Á.Â)throw \"invalid focus\";var scrollTop=Á.result.scrollTop+document.body.scrollTop;var relative_top=range.offsetTop-È.calculeOffsetTop(Á.Â)+scrollTop;var line_start=Math.round((relative_top / Á.lineHeight)+1);var line_nb=Math.round(range.boundingHeight / Á.lineHeight);selectionStart=stored_range.text.Æ-range.text.Æ;selectionStart+=(line_start-Á.Â.Ê.substr(0,selectionStart).split(\"\\n\").Æ)*2;selectionStart-=(line_start-Á.Â.Ê.substr(0,selectionStart).split(\"\\n\").Æ)* 2;selectionEnd=selectionStart+range.text.Æ;selectionEnd+=(line_start+line_nb-1-Á.Â.Ê.substr(0,selectionEnd).split(\"\\n\").Æ)*2;Á.Â.selectionStart=selectionStart;Á.Â.selectionEnd=selectionEnd;}catch(e){}if(Á.Å['word_wrap'])Á.Â.wrap='soft';};EA.Ä.setIESelection=Ã(){var a=Á.Â,nbLineStart,nbLineEnd,range;if(!Á.isIE)return Ì;nbLineStart=a.Ê.substr(0,a.selectionStart).split(\"\\n\").Æ-1;nbLineEnd=a.Ê.substr(0,a.selectionEnd).split(\"\\n\").Æ-1;range=document.selection.createRange();range.moveToElementText(a);range.setEndPoint('EndToStart',range);range.moveStart('character',a.selectionStart-nbLineStart);range.moveEnd('character',a.selectionEnd-nbLineEnd-(a.selectionStart-nbLineStart));range.select();};EA.Ä.checkTextEvolution=Ã(lastText,newText){var ch={},baseStep=200,cpt=0,end,step,tStart=new Date().getTime();end=Math.min(newText.Æ,lastText.Æ);step=baseStep;while(cpt<end&&step>=1){if(lastText.substr(cpt,step)==newText.substr(cpt,step)){cpt+=step;}\nelse{step=Math.floor(step/2);}}ch.posStart=cpt;ch.lineStart=newText.substr(0,ch.posStart).split(\"\\n\").Æ-1;cpt_last=lastText.Æ;cpt=newText.Æ;step=baseStep;while(cpt>=0&&cpt_last>=0&&step>=1){if(lastText.substr(cpt_last-step,step)==newText.substr(cpt-step,step)){cpt-=step;cpt_last-=step;}\nelse{step=Math.floor(step/2);}}ch.posNewEnd=cpt;ch.posLastEnd=cpt_last;if(ch.posNewEnd<=ch.posStart){if(lastText.Æ < newText.Æ){ch.posNewEnd=ch.posStart+newText.Æ-lastText.Æ;ch.posLastEnd=ch.posStart;}\nelse{ch.posLastEnd=ch.posStart+lastText.Æ-newText.Æ;ch.posNewEnd=ch.posStart;}}ch.newText=newText.substring(ch.posStart,ch.posNewEnd);ch.lastText=lastText.substring(ch.posStart,ch.posLastEnd);ch.lineNewEnd=newText.substr(0,ch.posNewEnd).split(\"\\n\").Æ-1;ch.lineLastEnd=lastText.substr(0,ch.posLastEnd).split(\"\\n\").Æ-1;ch.newTextLine=newText.split(\"\\n\").slice(ch.lineStart,ch.lineNewEnd+1).join(\"\\n\");ch.lastTextLine=lastText.split(\"\\n\").slice(ch.lineStart,ch.lineLastEnd+1).join(\"\\n\");return ch;};EA.Ä.tab_selection=Ã(){if(Á.is_tabbing)return;Á.is_tabbing=Ë;Á.getIESelection();var start=Á.Â.selectionStart;var end=Á.Â.selectionEnd;var insText=Á.Â.Ê.substring(start,end);var pos_start=start;var pos_end=end;if(insText.Æ==0){Á.Â.Ê=Á.Â.Ê.substr(0,start)+Á.tabulation+Á.Â.Ê.substr(end);pos_start=start+Á.tabulation.Æ;pos_end=pos_start;}\nelse{start=Math.max(0,Á.Â.Ê.substr(0,start).lastIndexOf(\"\\n\")+1);endText=Á.Â.Ê.substr(end);startText=Á.Â.Ê.substr(0,start);tmp=Á.Â.Ê.substring(start,end).split(\"\\n\");insText=Á.tabulation+tmp.join(\"\\n\"+Á.tabulation);Á.Â.Ê=startText+insText+endText;pos_start=start;pos_end=Á.Â.Ê.indexOf(\"\\n\",startText.Æ+insText.Æ);if(pos_end==-1)pos_end=Á.Â.Ê.Æ;}Á.Â.selectionStart=pos_start;Á.Â.selectionEnd=pos_end;if(Á.isIE){Á.setIESelection();setTimeout(\"eA.is_tabbing=Ì;\",100);}\nelse{Á.is_tabbing=Ì;}};EA.Ä.invert_tab_selection=Ã(){var t=Á,a=Á.Â;if(t.is_tabbing)return;t.is_tabbing=Ë;t.getIESelection();var start=a.selectionStart;var end=a.selectionEnd;var insText=a.Ê.substring(start,end);var pos_start=start;var pos_end=end;if(insText.Æ==0){if(a.Ê.substring(start-t.tabulation.Æ,start)==t.tabulation){a.Ê=a.Ê.substr(0,start-t.tabulation.Æ)+a.Ê.substr(end);pos_start=Math.max(0,start-t.tabulation.Æ);pos_end=pos_start;}}\nelse{start=a.Ê.substr(0,start).lastIndexOf(\"\\n\")+1;endText=a.Ê.substr(end);startText=a.Ê.substr(0,start);tmp=a.Ê.substring(start,end).split(\"\\n\");insText=\"\";for(i=0;i<tmp.Æ;i++){for(j=0;j<t.tab_nb_char;j++){if(tmp[i].charAt(0)==\"\t\"){tmp[i]=tmp[i].substr(1);j=t.tab_nb_char;}\nelse if(tmp[i].charAt(0)==\" \")tmp[i]=tmp[i].substr(1);}insText+=tmp[i];if(i<tmp.Æ-1)insText+=\"\\n\";}a.Ê=startText+insText+endText;pos_start=start;pos_end=a.Ê.indexOf(\"\\n\",startText.Æ+insText.Æ);if(pos_end==-1)pos_end=a.Ê.Æ;}a.selectionStart=pos_start;a.selectionEnd=pos_end;if(t.isIE){t.setIESelection();setTimeout(\"eA.is_tabbing=Ì;\",100);}\nelse t.is_tabbing=Ì;};EA.Ä.press_enter=Ã(){if(!Á.smooth_selection)return Ì;Á.getIESelection();var scrollTop=Á.result.scrollTop;var scrollLeft=Á.result.scrollLeft;var start=Á.Â.selectionStart;var end=Á.Â.selectionEnd;var start_last_line=Math.max(0,Á.Â.Ê.substring(0,start).lastIndexOf(\"\\n\")+1);var begin_line=Á.Â.Ê.substring(start_last_line,start).replace(/^([ \t]*).*/gm,\"$1\");var lineStart=Á.Â.Ê.substring(0,start).split(\"\\n\").Æ;if(begin_line==\"\\n\"||begin_line==\"\\r\"||begin_line.Æ==0){return Ì;}if(Á.isIE||(Á.isOpera&&Á.isOpera < 9.6)){begin_line=\"\\r\\n\"+begin_line;}\nelse{begin_line=\"\\n\"+begin_line;}Á.Â.Ê=Á.Â.Ê.substring(0,start)+begin_line+Á.Â.Ê.substring(end);Á.area_select(start+begin_line.Æ,0);if(Á.isIE){Á.result.scrollTop=scrollTop;Á.result.scrollLeft=scrollLeft;}return Ë;};EA.Ä.findEndBracket=Ã(infos,bracket){var start=infos[\"indexOfCursor\"];var normal_order=Ë;if(Á.assocBracket[bracket])endBracket=Á.assocBracket[bracket];\nelse if(Á.revertAssocBracket[bracket]){endBracket=Á.revertAssocBracket[bracket];normal_order=Ì;}var end=-1;var nbBracketOpen=0;for(var i=start;i<infos[\"full_text\"].Æ&&i>=0;){if(infos[\"full_text\"].charAt(i)==endBracket){nbBracketOpen--;if(nbBracketOpen<=0){end=i;break;}}\nelse if(infos[\"full_text\"].charAt(i)==bracket)nbBracketOpen++;if(normal_order)i++;\nelse i--;}if(end==-1)return Ì;var endLastLine=infos[\"full_text\"].substr(0,end).lastIndexOf(\"\\n\");if(endLastLine==-1)line=1;\nelse line=infos[\"full_text\"].substr(0,endLastLine).split(\"\\n\").Æ+1;var curPos=end-endLastLine-1;var endLineLength=infos[\"full_text\"].substring(end).split(\"\\n\")[0].Æ;Á.displayToCursorPosition(\"end_bracket\",line,curPos,infos[\"full_text\"].substring(endLastLine+1,end+endLineLength));return Ë;};EA.Ä.displayToCursorPosition=Ã(id,start_line,cur_pos,lineContent,no_real_move){var elem,dest,content,posLeft=0,posTop,fixPadding,topOffset,endElem;elem=Á.test_font_size;dest=_$(id);content=\"<span id='test_font_size_inner'>\"+lineContent.substr(0,cur_pos).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\")+\"</span><span id='endTestFont'>\"+lineContent.substr(cur_pos).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\")+\"</span>\";if(Á.isIE||(Á.isOpera&&Á.isOpera < 9.6)){elem.innerHTML=\"<pre>\"+content.replace(/^\\r?\\n/,\"<br>\")+\"</pre>\";}\nelse{elem.innerHTML=content;}endElem=_$('endTestFont');topOffset=endElem.offsetTop;fixPadding=parseInt(Á.content_highlight.Ç.paddingLeft.replace(\"px\",\"\"));posLeft=45+endElem.offsetLeft+(!isNaN(fixPadding)&&topOffset > 0 ? fixPadding:0);posTop=Á.getLinePosTop(start_line)+topOffset;if(Á.isIE&&cur_pos > 0&&endElem.offsetLeft==0){posTop+=Á.lineHeight;}if(no_real_move!=Ë){dest.Ç.top=posTop+\"px\";dest.Ç.left=posLeft+\"px\";}dest.cursor_top=posTop;dest.cursor_left=posLeft;};EA.Ä.getLinePosTop=Ã(start_line){var elem=_$('line_'+start_line),posTop=0;if(elem)posTop=elem.offsetTop;\nelse posTop=Á.lineHeight *(start_line-1);return posTop;};EA.Ä.getTextHeight=Ã(text){var t=Á,elem,height;elem=t.test_font_size;content=text.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\");if(t.isIE||(Á.isOpera&&Á.isOpera < 9.6)){elem.innerHTML=\"<pre>\"+content.replace(/^\\r?\\n/,\"<br>\")+\"</pre>\";}\nelse{elem.innerHTML=content;}height=elem.offsetHeight;height=Math.max(1,Math.floor(elem.offsetHeight / Á.lineHeight))* Á.lineHeight;return height;};EA.Ä.fixLinesHeight=Ã(textValue,lineStart,lineEnd){var aText=textValue.split(\"\\n\");if(lineEnd==-1)lineEnd=aText.Æ-1;for(var i=Math.max(0,lineStart);i <=lineEnd;i++){if(elem=_$('line_'+(i+1))){elem.Ç.height=typeof(aText[i])!=\"undefined\" ? Á.getTextHeight(aText[i])+\"px\":Á.lineHeight;}}};EA.Ä.area_select=Ã(start,Æ){Á.Â.focus();start=Math.max(0,Math.min(Á.Â.Ê.Æ,start));end=Math.max(start,Math.min(Á.Â.Ê.Æ,start+Æ));if(Á.isIE){Á.Â.selectionStart=start;Á.Â.selectionEnd=end;Á.setIESelection();}\nelse{if(Á.isOpera&&Á.isOpera < 9.6){Á.Â.setSelectionRange(0,0);}Á.Â.setSelectionRange(start,end);}Á.check_line_selection();};EA.Ä.area_get_selection=Ã(){var text=\"\";if(document.selection){var range=document.selection.createRange();text=range.text;}\nelse{text=Á.Â.Ê.substring(Á.Â.selectionStart,Á.Â.selectionEnd);}return text;}; EA.Ä.replace_tab=Ã(text){return text.replace(/((\\n?)([^\t\\n]*)\t)/gi,eA.smartTab);};EA.Ä.smartTab=Ã(){val=\"                   \";return EA.Ä.smartTab.arguments[2]+EA.Ä.smartTab.arguments[3]+val.substr(0,eA.tab_nb_char-(EA.Ä.smartTab.arguments[3].Æ)%eA.tab_nb_char);};EA.Ä.show_waiting_screen=Ã(){width=Á.editor_area.offsetWidth;height=Á.editor_area.offsetHeight;if(!(Á.isIE&&Á.isIE<6)){width-=2;height-=2;}Á.processing_screen.Ç.display=\"block\";Á.processing_screen.Ç.width=width+\"px\";Á.processing_screen.Ç.height=height+\"px\";Á.waiting_screen_displayed=Ë;};EA.Ä.hide_waiting_screen=Ã(){Á.processing_screen.Ç.display=\"none\";Á.waiting_screen_displayed=Ì;};EA.Ä.add_Ç=Ã(Çs){if(Çs.Æ>0){newcss=document.createElement(\"Ç\");newcss.type=\"text/css\";newcss.media=\"all\";if(newcss.ÇSheet){newcss.ÇSheet.cssText=Çs;}\nelse{newcss.appendChild(document.createTextNode(Çs));}document.getElementsByTagName(\"head\")[0].appendChild(newcss);}};EA.Ä.set_font=Ã(family,size){var t=Á,a=Á.Â,s=Á.Å,elem_font,i,elem;var elems=[\"Â\",\"content_highlight\",\"cursor_pos\",\"end_bracket\",\"selection_field\",\"selection_field_text\",\"line_number\"];if(family&&family!=\"\")s[\"font_family\"]=family;if(size&&size>0)s[\"font_size\"]=size;if(t.isOpera&&t.isOpera < 9.6)s['font_family']=\"monospace\";if(elem_font=_$(\"area_font_size\")){for(i=0;i < elem_font.Æ;i++){if(elem_font.options[i].Ê&&elem_font.options[i].Ê==s[\"font_size\"])elem_font.options[i].selected=Ë;}}if(t.isFirefox){var nbTry=3;do{var div1=document.createElement('div'),text1=document.createElement('Â');var Çs={width:'40px',overflow:'scroll',zIndex:50,visibility:'hidden',fontFamily:s[\"font_family\"],fontSize:s[\"font_size\"]+\"pt\",lineHeight:t.lineHeight+\"px\",padding:'0',margin:'0',border:'none',whiteSpace:'nowrap'};var diff,changed=Ì;for(i in Çs){div1.Ç[ i ]=Çs[i];text1.Ç[ i ]=Çs[i];}text1.wrap='off';text1.setAttribute('wrap','off');t.container.appendChild(div1);t.container.appendChild(text1);div1.innerHTML=text1.Ê='azertyuiopqsdfghjklm';div1.innerHTML=text1.Ê=text1.Ê+'wxcvbn^p*ù$!:;,,';diff=text1.scrollWidth-div1.scrollWidth;if(Math.abs(diff)>=2){s[\"font_size\"]++;changed=Ë;}t.container.removeChild(div1);t.container.removeChild(text1);nbTry--;}while(changed&&nbTry > 0);}elem=t.test_font_size;elem.Ç.fontFamily=\"\"+s[\"font_family\"];elem.Ç.fontSize=s[\"font_size\"]+\"pt\";elem.innerHTML=\"0\";t.lineHeight=elem.offsetHeight;for(i=0;i<elems.Æ;i++){elem=_$(elems[i]);elem.Ç.fontFamily=s[\"font_family\"];elem.Ç.fontSize=s[\"font_size\"]+\"pt\";elem.Ç.lineHeight=t.lineHeight+\"px\";}t.add_Ç(\"pre{font-family:\"+s[\"font_family\"]+\"}\");if((t.isOpera&&t.isOpera < 9.6)||t.isIE >=8){var parNod=a.ÈNode,nxtSib=a.nextSibling,start=a.selectionStart,end=a.selectionEnd;parNod.removeChild(a);parNod.insertBefore(a,nxtSib);t.area_select(start,end-start);}Á.focus();Á.update_size();Á.check_line_selection();};EA.Ä.change_font_size=Ã(){var size=_$(\"area_font_size\").Ê;if(size>0)Á.set_font(\"\",size);};EA.Ä.open_inline_popup=Ã(popup_id){Á.close_all_inline_popup();var popup=_$(popup_id);var editor=_$(\"editor\");for(var i=0;i<Á.inlinePopup.Æ;i++){if(Á.inlinePopup[i][\"popup_id\"]==popup_id){var icon=_$(Á.inlinePopup[i][\"icon_id\"]);if(icon){Á.switchClassSticky(icon,'editAreaButtonSelected',Ë);break;}}}popup.Ç.height=\"auto\";popup.Ç.overflow=\"visible\";if(document.body.offsetHeight< popup.offsetHeight){popup.Ç.height=(document.body.offsetHeight-10)+\"px\";popup.Ç.overflow=\"auto\";}if(!popup.positionned){var new_left=editor.offsetWidth /2-popup.offsetWidth /2;var new_top=editor.offsetHeight /2-popup.offsetHeight /2;popup.Ç.left=new_left+\"px\";popup.Ç.top=new_top+\"px\";popup.positionned=Ë;}popup.Ç.visibility=\"visible\";};EA.Ä.close_inline_popup=Ã(popup_id){var popup=_$(popup_id);for(var i=0;i<Á.inlinePopup.Æ;i++){if(Á.inlinePopup[i][\"popup_id\"]==popup_id){var icon=_$(Á.inlinePopup[i][\"icon_id\"]);if(icon){Á.switchClassSticky(icon,'editAreaButtonNormal',Ì);break;}}}popup.Ç.visibility=\"hidden\";};EA.Ä.close_all_inline_popup=Ã(e){for(var i=0;i<Á.inlinePopup.Æ;i++){Á.close_inline_popup(Á.inlinePopup[i][\"popup_id\"]);}Á.Â.focus();};EA.Ä.show_help=Ã(){Á.open_inline_popup(\"edit_area_help\");};EA.Ä.new_document=Ã(){Á.Â.Ê=\"\";Á.area_select(0,0);};EA.Ä.get_all_toolbar_height=Ã(){var area=_$(\"editor\");var results=È.getChildren(area,\"div\",\"class\",\"area_toolbar\",\"all\",\"0\");var height=0;for(var i=0;i<results.Æ;i++){height+=results[i].offsetHeight;}return height;};EA.Ä.go_to_line=Ã(line){if(!line){var icon=_$(\"go_to_line\");if(icon !=null){Á.restoreClass(icon);Á.switchClassSticky(icon,'editAreaButtonSelected',Ë);}line=prompt(Á.get_translation(\"go_to_line_prompt\"));if(icon !=null)Á.switchClassSticky(icon,'editAreaButtonNormal',Ì);}if(line&&line!=null&&line.search(/^[0-9]+$/)!=-1){var start=0;var lines=Á.Â.Ê.split(\"\\n\");if(line > lines.Æ)start=Á.Â.Ê.Æ;\nelse{for(var i=0;i<Math.min(line-1,lines.Æ);i++)start+=lines[i].Æ+1;}Á.area_select(start,0);}};EA.Ä.change_smooth_selection_mode=Ã(setTo){if(Á.do_highlight)return;if(setTo !=null){if(setTo===Ì)Á.smooth_selection=Ë;\nelse Á.smooth_selection=Ì;}var icon=_$(\"change_smooth_selection\");Á.Â.focus();if(Á.smooth_selection===Ë){Á.switchClassSticky(icon,'editAreaButtonNormal',Ì);Á.smooth_selection=Ì;Á.selection_field.Ç.display=\"none\";_$(\"cursor_pos\").Ç.display=\"none\";_$(\"end_bracket\").Ç.display=\"none\";}\nelse{Á.switchClassSticky(icon,'editAreaButtonSelected',Ì);Á.smooth_selection=Ë;Á.selection_field.Ç.display=\"block\";_$(\"cursor_pos\").Ç.display=\"block\";_$(\"end_bracket\").Ç.display=\"block\";}};EA.Ä.scroll_to_view=Ã(show){var zone,lineElem;if(!Á.smooth_selection)return;zone=_$(\"result\");var cursor_pos_top=_$(\"cursor_pos\").cursor_top;if(show==\"bottom\"){cursor_pos_top+=Á.getLinePosTop(Á.É['line_start']+Á.É['line_nb']-1);}var max_height_visible=zone.clientHeight+zone.scrollTop;var miss_top=cursor_pos_top+Á.lineHeight-max_height_visible;if(miss_top>0){zone.scrollTop=zone.scrollTop+miss_top;}\nelse if(zone.scrollTop > cursor_pos_top){zone.scrollTop=cursor_pos_top;}var cursor_pos_left=_$(\"cursor_pos\").cursor_left;var max_width_visible=zone.clientWidth+zone.scrollLeft;var miss_left=cursor_pos_left+10-max_width_visible;if(miss_left>0){zone.scrollLeft=zone.scrollLeft+miss_left+50;}\nelse if(zone.scrollLeft > cursor_pos_left){zone.scrollLeft=cursor_pos_left;}\nelse if(zone.scrollLeft==45){zone.scrollLeft=0;}};EA.Ä.check_undo=Ã(only_once){if(!eAs[Á.id])return Ì;if(Á.ÂFocused&&eAs[Á.id][\"displayed\"]==Ë){var text=Á.Â.Ê;if(Á.previous.Æ<=1)Á.switchClassSticky(_$(\"undo\"),'editAreaButtonDisabled',Ë);if(!Á.previous[Á.previous.Æ-1]||Á.previous[Á.previous.Æ-1][\"text\"] !=text){Á.previous.push({\"text\":text,\"selStart\":Á.Â.selectionStart,\"selEnd\":Á.Â.selectionEnd});if(Á.previous.Æ > Á.Å[\"max_undo\"]+1)Á.previous.shift();}if(Á.previous.Æ >=2)Á.switchClassSticky(_$(\"undo\"),'editAreaButtonNormal',Ì);}if(!only_once)setTimeout(\"eA.check_undo()\",3000);};EA.Ä.undo=Ã(){if(Á.previous.Æ > 0){Á.getIESelection();Á.next.push({\"text\":Á.Â.Ê,\"selStart\":Á.Â.selectionStart,\"selEnd\":Á.Â.selectionEnd});var prev=Á.previous.pop();if(prev[\"text\"]==Á.Â.Ê&&Á.previous.Æ > 0)prev=Á.previous.pop();Á.Â.Ê=prev[\"text\"];Á.last_undo=prev[\"text\"];Á.area_select(prev[\"selStart\"],prev[\"selEnd\"]-prev[\"selStart\"]);Á.switchClassSticky(_$(\"redo\"),'editAreaButtonNormal',Ì);Á.resync_highlight(Ë);Á.check_file_changes();}};EA.Ä.redo=Ã(){if(Á.next.Æ > 0){var next=Á.next.pop();Á.previous.push(next);Á.Â.Ê=next[\"text\"];Á.last_undo=next[\"text\"];Á.area_select(next[\"selStart\"],next[\"selEnd\"]-next[\"selStart\"]);Á.switchClassSticky(_$(\"undo\"),'editAreaButtonNormal',Ì);Á.resync_highlight(Ë);Á.check_file_changes();}if(Á.next.Æ==0)Á.switchClassSticky(_$(\"redo\"),'editAreaButtonDisabled',Ë);};EA.Ä.check_redo=Ã(){if(eA.next.Æ==0||eA.Â.Ê!=eA.last_undo){eA.next=[];eA.switchClassSticky(_$(\"redo\"),'editAreaButtonDisabled',Ë);}\nelse{Á.switchClassSticky(_$(\"redo\"),'editAreaButtonNormal',Ì);}};EA.Ä.switchClass=Ã(element,class_name,lock_state){var lockChanged=Ì;if(typeof(lock_state)!=\"undefined\"&&element !=null){element.classLock=lock_state;lockChanged=Ë;}if(element !=null&&(lockChanged||!element.classLock)){element.oldClassName=element.className;element.className=class_name;}};EA.Ä.restoreAndSwitchClass=Ã(element,class_name){if(element !=null&&!element.classLock){Á.restoreClass(element);Á.switchClass(element,class_name);}};EA.Ä.restoreClass=Ã(element){if(element !=null&&element.oldClassName&&!element.classLock){element.className=element.oldClassName;element.oldClassName=null;}};EA.Ä.setClassLock=Ã(element,lock_state){if(element !=null)element.classLock=lock_state;};EA.Ä.switchClassSticky=Ã(element,class_name,lock_state){var lockChanged=Ì;if(typeof(lock_state)!=\"undefined\"&&element !=null){element.classLock=lock_state;lockChanged=Ë;}if(element !=null&&(lockChanged||!element.classLock)){element.className=class_name;element.oldClassName=class_name;}};EA.Ä.scroll_page=Ã(params){var dir=params[\"dir\"],shift_pressed=params[\"shift\"];var lines=Á.Â.Ê.split(\"\\n\");var new_pos=0,Æ=0,char_left=0,line_nb=0,curLine=0;var toScrollAmount=_$(\"result\").clientHeight-30;var nbLineToScroll=0,diff=0;if(dir==\"up\"){nbLineToScroll=Math.ceil(toScrollAmount / Á.lineHeight);for(i=Á.É[\"line_start\"];i-diff > Á.É[\"line_start\"]-nbLineToScroll;i--){if(elem=_$('line_'+i)){diff+=Math.floor((elem.offsetHeight-1)/ Á.lineHeight);}}nbLineToScroll-=diff;if(Á.É[\"selec_direction\"]==\"up\"){for(line_nb=0;line_nb< Math.min(Á.É[\"line_start\"]-nbLineToScroll,lines.Æ);line_nb++){new_pos+=lines[line_nb].Æ+1;}char_left=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É[\"curr_pos\"]-1);if(shift_pressed)Æ=Á.É[\"selectionEnd\"]-new_pos-char_left;Á.area_select(new_pos+char_left,Æ);view=\"top\";}\nelse{view=\"bottom\";for(line_nb=0;line_nb< Math.min(Á.É[\"line_start\"]+Á.É[\"line_nb\"]-1-nbLineToScroll,lines.Æ);line_nb++){new_pos+=lines[line_nb].Æ+1;}char_left=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É[\"curr_pos\"]-1);if(shift_pressed){start=Math.min(Á.É[\"selectionStart\"],new_pos+char_left);Æ=Math.max(new_pos+char_left,Á.É[\"selectionStart\"])-start;if(new_pos+char_left < Á.É[\"selectionStart\"])view=\"top\";}\nelse start=new_pos+char_left;Á.area_select(start,Æ);}}\nelse{var nbLineToScroll=Math.floor(toScrollAmount / Á.lineHeight);for(i=Á.É[\"line_start\"];i+diff < Á.É[\"line_start\"]+nbLineToScroll;i++){if(elem=_$('line_'+i)){diff+=Math.floor((elem.offsetHeight-1)/ Á.lineHeight);}}nbLineToScroll-=diff;if(Á.É[\"selec_direction\"]==\"down\"){view=\"bottom\";for(line_nb=0;line_nb< Math.min(Á.É[\"line_start\"]+Á.É[\"line_nb\"]-2+nbLineToScroll,lines.Æ);line_nb++){if(line_nb==Á.É[\"line_start\"]-1)char_left=Á.É[\"selectionStart\"]-new_pos;new_pos+=lines[line_nb].Æ+1;}if(shift_pressed){Æ=Math.abs(Á.É[\"selectionStart\"]-new_pos);Æ+=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É[\"curr_pos\"]);Á.area_select(Math.min(Á.É[\"selectionStart\"],new_pos),Æ);}\nelse{Á.area_select(new_pos+char_left,0);}}\nelse{view=\"top\";for(line_nb=0;line_nb< Math.min(Á.É[\"line_start\"]+nbLineToScroll-1,lines.Æ,lines.Æ);line_nb++){if(line_nb==Á.É[\"line_start\"]-1)char_left=Á.É[\"selectionStart\"]-new_pos;new_pos+=lines[line_nb].Æ+1;}if(shift_pressed){Æ=Math.abs(Á.É[\"selectionEnd\"]-new_pos-char_left);Æ+=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É[\"curr_pos\"])-char_left-1;Á.area_select(Math.min(Á.É[\"selectionEnd\"],new_pos+char_left),Æ);if(new_pos+char_left > Á.É[\"selectionEnd\"])view=\"bottom\";}\nelse{Á.area_select(new_pos+char_left,0);}}}Á.check_line_selection();Á.scroll_to_view(view);};EA.Ä.start_resize=Ã(e){È.eAL.resize[\"id\"]=eA.id;È.eAL.resize[\"start_x\"]=(e)? e.pageX:event.x+document.body.scrollLeft;È.eAL.resize[\"start_y\"]=(e)? e.pageY:event.y+document.body.scrollTop;if(eA.isIE){eA.Â.focus();eA.getIESelection();}È.eAL.resize[\"selectionStart\"]=eA.Â.selectionStart;È.eAL.resize[\"selectionEnd\"]=eA.Â.selectionEnd;È.eAL.start_resize_area();};EA.Ä.toggle_full_screen=Ã(to){var t=Á,p=È,a=t.Â,html,frame,selStart,selEnd,old,icon;if(typeof(to)==\"undefined\")to=!t.fullscreen['isFull'];old=t.fullscreen['isFull'];t.fullscreen['isFull']=to;icon=_$(\"fullscreen\");selStart=t.Â.selectionStart;selEnd=t.Â.selectionEnd;html=p.document.getElementsByTagName(\"html\")[0];frame=p.document.getElementById(\"frame_\"+t.id);if(to&&to!=old){t.fullscreen['old_overflow']=p.get_css_property(html,\"overflow\");t.fullscreen['old_height']=p.get_css_property(html,\"height\");t.fullscreen['old_width']=p.get_css_property(html,\"width\");t.fullscreen['old_scrollTop']=html.scrollTop;t.fullscreen['old_scrollLeft']=html.scrollLeft;t.fullscreen['old_zIndex']=p.get_css_property(frame,\"z-index\");if(t.isOpera){html.Ç.height=\"100%\";html.Ç.width=\"100%\";}html.Ç.overflow=\"hidden\";html.scrollTop=0;html.scrollLeft=0;frame.Ç.position=\"absolute\";frame.Ç.width=html.clientWidth+\"px\";frame.Ç.height=html.clientHeight+\"px\";frame.Ç.display=\"block\";frame.Ç.zIndex=\"999999\";frame.Ç.top=\"0px\";frame.Ç.left=\"0px\";frame.Ç.top=\"-\"+p.calculeOffsetTop(frame)+\"px\";frame.Ç.left=\"-\"+p.calculeOffsetLeft(frame)+\"px\";t.switchClassSticky(icon,'editAreaButtonSelected',Ì);t.fullscreen['allow_resize']=t.resize_allowed;t.allow_resize(Ì);if(t.isFirefox){p.eAL.execCommand(t.id,\"update_size();\");t.area_select(selStart,selEnd-selStart);t.scroll_to_view();t.focus();}\nelse{setTimeout(\"p.eAL.execCommand('\"+t.id+\"','update_size();');eA.focus();\",10);}}\nelse if(to!=old){frame.Ç.position=\"static\";frame.Ç.zIndex=t.fullscreen['old_zIndex'];if(t.isOpera){html.Ç.height=\"auto\";html.Ç.width=\"auto\";html.Ç.overflow=\"auto\";}\nelse if(t.isIE&&p!=top){html.Ç.overflow=\"auto\";}\nelse{html.Ç.overflow=t.fullscreen['old_overflow'];}html.scrollTop=t.fullscreen['old_scrollTop'];html.scrollLeft=t.fullscreen['old_scrollLeft'];p.eAL.hide(t.id);p.eAL.show(t.id);t.switchClassSticky(icon,'editAreaButtonNormal',Ì);if(t.fullscreen['allow_resize'])t.allow_resize(t.fullscreen['allow_resize']);if(t.isFirefox){t.area_select(selStart,selEnd-selStart);setTimeout(\"eA.scroll_to_view();\",10);}}};EA.Ä.allow_resize=Ã(allow){var resize=_$(\"resize_area\");if(allow){resize.Ç.visibility=\"visible\";È.eAL.add_event(resize,\"mouseup\",eA.start_resize);}\nelse{resize.Ç.visibility=\"hidden\";È.eAL.remove_event(resize,\"mouseup\",eA.start_resize);}Á.resize_allowed=allow;};EA.Ä.change_syntax=Ã(new_syntax,is_waiting){if(new_syntax==Á.Å['syntax'])return Ë;var founded=Ì;for(var i=0;i<Á.syntax_list.Æ;i++){if(Á.syntax_list[i]==new_syntax)founded=Ë;}if(founded==Ë){if(!È.eAL.load_syntax[new_syntax]){if(!is_waiting)È.eAL.load_script(È.eAL.baseURL+\"reg_syntax/\"+new_syntax+\".js\");setTimeout(\"eA.change_syntax('\"+new_syntax+\"',Ë);\",100);Á.show_waiting_screen();}\nelse{if(!Á.allready_used_syntax[new_syntax]){È.eAL.init_syntax_regexp();Á.add_Ç(È.eAL.syntax[new_syntax][\"Çs\"]);Á.allready_used_syntax[new_syntax]=Ë;}var sel=_$(\"syntax_selection\");if(sel&&sel.Ê!=new_syntax){for(var i=0;i<sel.Æ;i++){if(sel.options[i].Ê&&sel.options[i].Ê==new_syntax)sel.options[i].selected=Ë;}}Á.Å['syntax']=new_syntax;Á.resync_highlight(Ë);Á.hide_waiting_screen();return Ë;}}return Ì;};EA.Ä.set_editable=Ã(is_editable){if(is_editable){document.body.className=\"\";Á.Â.readOnly=Ì;Á.is_editable=Ë;}\nelse{document.body.className=\"non_editable\";Á.Â.readOnly=Ë;Á.is_editable=Ì;}if(eAs[Á.id][\"displayed\"]==Ë)Á.update_size();};EA.Ä.toggle_word_wrap=Ã(){Á.set_word_wrap(!Á.Å['word_wrap']);};EA.Ä.set_word_wrap=Ã(to){var t=Á,a=t.Â;if(t.isOpera){Á.Å['word_wrap']=Ì;t.switchClassSticky(_$(\"word_wrap\"),'editAreaButtonDisabled',Ë);return Ì;}if(to){wrap_mode='soft';Á.container.className+=' word_wrap';Á.container.Ç.width=\"\";Á.content_highlight.Ç.width=\"\";a.Ç.width=\"100%\";if(t.isIE&&t.isIE < 7){a.Ç.width=(a.offsetWidth-5)+\"px\";}t.switchClassSticky(_$(\"word_wrap\"),'editAreaButtonSelected',Ì);}\nelse{wrap_mode='off';Á.container.className=Á.container.className.replace(/word_wrap/g,'');t.switchClassSticky(_$(\"word_wrap\"),'editAreaButtonNormal',Ë);}Á.Â.previous_scrollWidth='';Á.Â.previous_scrollHeight='';a.wrap=wrap_mode;a.setAttribute('wrap',wrap_mode);if(!Á.isIE){var start=a.selectionStart,end=a.selectionEnd;var parNod=a.ÈNode,nxtSib=a.nextSibling;parNod.removeChild(a);parNod.insertBefore(a,nxtSib);Á.area_select(start,end-start);}Á.Å['word_wrap']=to;Á.focus();Á.update_size();Á.check_line_selection();};EA.Ä.open_file=Ã(Å){if(Å['id']!=\"undefined\"){var id=Å['id'];var new_file={};new_file['id']=id;new_file['title']=id;new_file['text']=\"\";new_file['É']=\"\";new_file['last_text_to_highlight']=\"\";new_file['last_hightlighted_text']=\"\";new_file['previous']=[];new_file['next']=[];new_file['last_undo']=\"\";new_file['smooth_selection']=Á.Å['smooth_selection'];new_file['do_highlight']=Á.Å['start_highlight'];new_file['syntax']=Á.Å['syntax'];new_file['scroll_top']=0;new_file['scroll_left']=0;new_file['selection_start']=0;new_file['selection_end']=0;new_file['edited']=Ì;new_file['font_size']=Á.Å[\"font_size\"];new_file['font_family']=Á.Å[\"font_family\"];new_file['word_wrap']=Á.Å[\"word_wrap\"];new_file['toolbar']={'links':{},'selects':{}};new_file['compare_edited_text']=new_file['text'];Á.files[id]=new_file;Á.update_file(id,Å);Á.files[id]['compare_edited_text']=Á.files[id]['text'];var html_id='tab_file_'+encodeURIComponent(id);Á.filesIdAssoc[html_id]=id;Á.files[id]['html_id']=html_id;if(!_$(Á.files[id]['html_id'])&&id!=\"\"){Á.tab_browsing_area.Ç.display=\"block\";var elem=document.createElement('li');elem.id=Á.files[id]['html_id'];var close=\"<img src=\\\"\"+È.eAL.baseURL+\"images/close.gif\\\" title=\\\"\"+Á.get_translation('close_tab','word')+\"\\\" onclick=\\\"eA.execCommand('close_file',eA.filesIdAssoc['\"+html_id+\"']);return Ì;\\\" class=\\\"hidden\\\" onmouseover=\\\"Á.className=''\\\" onmouseout=\\\"Á.className='hidden'\\\" />\";elem.innerHTML=\"<a onclick=\\\"javascript:eA.execCommand('switch_to_file',eA.filesIdAssoc['\"+html_id+\"']);\\\" selec=\\\"none\\\"><b><span><strong class=\\\"edited\\\">*</strong>\"+Á.files[id]['title']+close+\"</span></b></a>\";_$('tab_browsing_list').appendChild(elem);var elem=document.createElement('text');Á.update_size();}if(id!=\"\")Á.execCommand('file_open',Á.files[id]);Á.switch_to_file(id,Ë);return Ë;}\nelse return Ì;};EA.Ä.close_file=Ã(id){if(Á.files[id]){Á.save_file(id);if(Á.execCommand('file_close',Á.files[id])!==Ì){var li=_$(Á.files[id]['html_id']);li.ÈNode.removeChild(li);if(id==Á.curr_file){var next_file=\"\";var is_next=Ì;for(var i in Á.files){if(is_next){next_file=i;break;}\nelse if(i==id)is_next=Ë;\nelse next_file=i;}Á.switch_to_file(next_file);}delete(Á.files[id]);Á.update_size();}}};EA.Ä.save_file=Ã(id){var t=Á,save,a_links,a_selects,save_butt,img,i;if(t.files[id]){var save=t.files[id];save['É']=t.É;save['last_text_to_highlight']=t.last_text_to_highlight;save['last_hightlighted_text']=t.last_hightlighted_text;save['previous']=t.previous;save['next']=t.next;save['last_undo']=t.last_undo;save['smooth_selection']=t.smooth_selection;save['do_highlight']=t.do_highlight;save['syntax']=t.Å['syntax'];save['text']=t.Â.Ê;save['scroll_top']=t.result.scrollTop;save['scroll_left']=t.result.scrollLeft;save['selection_start']=t.É[\"selectionStart\"];save['selection_end']=t.É[\"selectionEnd\"];save['font_size']=t.Å[\"font_size\"];save['font_family']=t.Å[\"font_family\"];save['word_wrap']=t.Å[\"word_wrap\"];save['toolbar']={'links':{},'selects':{}};a_links=_$(\"toolbar_1\").getElementsByTagName(\"a\");for(i=0;i<a_links.Æ;i++){if(a_links[i].getAttribute('fileSpecific')=='yes'){save_butt={};img=a_links[i].getElementsByTagName('img')[0];save_butt['classLock']=img.classLock;save_butt['className']=img.className;save_butt['oldClassName']=img.oldClassName;save['toolbar']['links'][a_links[i].id]=save_butt;}}a_selects=_$(\"toolbar_1\").getElementsByTagName(\"select\");for(i=0;i<a_selects.Æ;i++){if(a_selects[i].getAttribute('fileSpecific')=='yes'){save['toolbar']['selects'][a_selects[i].id]=a_selects[i].Ê;}}t.files[id]=save;return save;}return Ì;};EA.Ä.update_file=Ã(id,new_Ês){for(var i in new_Ês){Á.files[id][i]=new_Ês[i];}};EA.Ä.display_file=Ã(id){var t=Á,a=t.Â,new_file,a_lis,a_selects,a_links,a_options,i,j;if(id==''){a.readOnly=Ë;t.tab_browsing_area.Ç.display=\"none\";_$(\"no_file_selected\").Ç.display=\"block\";t.result.className=\"empty\";if(!t.files['']){t.open_file({id:''});}}\nelse if(typeof(t.files[id])=='undefined'){return Ì;}\nelse{t.result.className=\"\";a.readOnly=!t.is_editable;_$(\"no_file_selected\").Ç.display=\"none\";t.tab_browsing_area.Ç.display=\"block\";}t.check_redo(Ë);t.check_undo(Ë);t.curr_file=id;a_lis=t.tab_browsing_area.getElementsByTagName('li');for(i=0;i<a_lis.Æ;i++){if(a_lis[i].id==t.files[id]['html_id'])a_lis[i].className='selected';\nelse a_lis[i].className='';}new_file=t.files[id];a.Ê=new_file['text'];t.set_font(new_file['font_family'],new_file['font_size']);t.area_select(new_file['É']['selection_start'],new_file['É']['selection_end']-new_file['É']['selection_start']);t.manage_size(Ë);t.result.scrollTop=new_file['scroll_top'];t.result.scrollLeft=new_file['scroll_left'];t.previous=new_file['previous'];t.next=new_file['next'];t.last_undo=new_file['last_undo'];t.check_redo(Ë);t.check_undo(Ë);t.execCommand(\"change_highlight\",new_file['do_highlight']);t.execCommand(\"change_syntax\",new_file['syntax']);t.execCommand(\"change_smooth_selection_mode\",new_file['smooth_selection']);t.execCommand(\"set_word_wrap\",new_file['word_wrap']);a_links=new_file['toolbar']['links'];for(i in a_links){if(img=_$(i).getElementsByTagName('img')[0]){img.classLock=a_links[i]['classLock'];img.className=a_links[i]['className'];img.oldClassName=a_links[i]['oldClassName'];}}a_selects=new_file['toolbar']['selects'];for(i in a_selects){a_options=_$(i).options;for(j=0;j<a_options.Æ;j++){if(a_options[j].Ê==a_selects[i])_$(i).options[j].selected=Ë;}}};EA.Ä.switch_to_file=Ã(file_to_show,force_refresh){if(file_to_show!=Á.curr_file||force_refresh){Á.save_file(Á.curr_file);if(Á.curr_file!='')Á.execCommand('file_switch_off',Á.files[Á.curr_file]);Á.display_file(file_to_show);if(file_to_show!='')Á.execCommand('file_switch_on',Á.files[file_to_show]);}};EA.Ä.get_file=Ã(id){if(id==Á.curr_file)Á.save_file(id);return Á.files[id];};EA.Ä.get_all_files=Ã(){tmp_files=Á.files;Á.save_file(Á.curr_file);if(tmp_files[''])delete(Á.files['']);return tmp_files;};EA.Ä.check_file_changes=Ã(){var id=Á.curr_file;if(Á.files[id]&&Á.files[id]['compare_edited_text']!=undefined){if(Á.files[id]['compare_edited_text'].Æ==Á.Â.Ê.Æ&&Á.files[id]['compare_edited_text']==Á.Â.Ê){if(Á.files[id]['edited']!=Ì)Á.set_file_edited_mode(id,Ì);}\nelse{if(Á.files[id]['edited']!=Ë)Á.set_file_edited_mode(id,Ë);}}};EA.Ä.set_file_edited_mode=Ã(id,to){if(Á.files[id]&&_$(Á.files[id]['html_id'])){var link=_$(Á.files[id]['html_id']).getElementsByTagName('a')[0];if(to==Ë){link.className='edited';}\nelse{link.className='';if(id==Á.curr_file)text=Á.Â.Ê;\nelse text=Á.files[id]['text'];Á.files[id]['compare_edited_text']=text;}Á.files[id]['edited']=to;}};EA.Ä.set_show_line_colors=Ã(new_Ê){Á.show_line_colors=new_Ê;if(new_Ê)Á.selection_field.className+=' show_colors';\nelse Á.selection_field.className=Á.selection_field.className.replace(/ show_colors/g,'');};var EA_keys={8:\"Retour arriere\",9:\"Tabulation\",12:\"Milieu(pave numerique)\",13:\"Entrer\",16:\"Shift\",17:\"Ctrl\",18:\"Alt\",19:\"Pause\",20:\"Verr Maj\",27:\"Esc\",32:\"Space\",33:\"Page up\",34:\"Page down\",35:\"End\",36:\"Begin\",37:\"Left\",38:\"Up\",39:\"Right\",40:\"Down\",44:\"Impr ecran\",45:\"Inser\",46:\"Suppr\",91:\"Menu Demarrer Windows / touche pomme Mac\",92:\"Menu Demarrer Windows\",93:\"Menu contextuel Windows\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"Verr Num\",145:\"Arret defil\"};àkeyDown(e){if(!e){e=event;}for(var i in eA.plugins){if(typeof(eA.plugins[i].onkeydown)==\"Ã\"){if(eA.plugins[i].onkeydown(e)===Ì){if(eA.isIE)e.keyCode=0;return Ì;}}}var target_id=(e.target||e.srcElement).id;var use=Ì;if(EA_keys[e.keyCode])letter=EA_keys[e.keyCode];\nelse letter=String.fromCharCode(e.keyCode);var low_letter=letter.toLowerCase();if(letter==\"Page up\"&&!eA.isOpera){eA.execCommand(\"scroll_page\",{\"dir\":\"up\",\"shift\":ShiftPressed(e)});use=Ë;}\nelse if(letter==\"Page down\"&&!eA.isOpera){eA.execCommand(\"scroll_page\",{\"dir\":\"down\",\"shift\":ShiftPressed(e)});use=Ë;}\nelse if(eA.is_editable==Ì){return Ë;}\nelse if(letter==\"Tabulation\"&&target_id==\"Â\"&&!CtrlPressed(e)&&!AltPressed(e)){if(ShiftPressed(e))eA.execCommand(\"invert_tab_selection\");\nelse eA.execCommand(\"tab_selection\");use=Ë;if(eA.isOpera||(eA.isFirefox&&eA.isMac))setTimeout(\"eA.execCommand('focus');\",1);}\nelse if(letter==\"Entrer\"&&target_id==\"Â\"){if(eA.press_enter())use=Ë;}\nelse if(letter==\"Entrer\"&&target_id==\"area_search\"){eA.execCommand(\"area_search\");use=Ë;}\nelse  if(letter==\"Esc\"){eA.execCommand(\"close_all_inline_popup\",e);use=Ë;}\nelse if(CtrlPressed(e)&&!AltPressed(e)&&!ShiftPressed(e)){switch(low_letter){case \"f\":eA.execCommand(\"area_search\");use=Ë;break;case \"r\":eA.execCommand(\"area_replace\");use=Ë;break;case \"q\":eA.execCommand(\"close_all_inline_popup\",e);use=Ë;break;case \"h\":eA.execCommand(\"change_highlight\");use=Ë;break;case \"g\":setTimeout(\"eA.execCommand('go_to_line');\",5);use=Ë;break;case \"e\":eA.execCommand(\"show_help\");use=Ë;break;case \"z\":use=Ë;eA.execCommand(\"undo\");break;case \"y\":use=Ë;eA.execCommand(\"redo\");break;default:break;}}if(eA.next.Æ > 0){setTimeout(\"eA.check_redo();\",10);}setTimeout(\"eA.check_file_changes();\",10);if(use){if(eA.isIE)e.keyCode=0;return Ì;}return Ë;};àAltPressed(e){if(window.event){return(window.event.altKey);}\nelse{if(e.modifiers)return(e.altKey||(e.modifiers % 2));\nelse return e.altKey;}};àCtrlPressed(e){if(window.event){return(window.event.ctrlKey);}\nelse{return(e.ctrlKey||(e.modifiers==2)||(e.modifiers==3)||(e.modifiers>5));}};àShiftPressed(e){if(window.event){return(window.event.shiftKey);}\nelse{return(e.shiftKey||(e.modifiers>3));}}; EA.Ä.show_search=Ã(){if(_$(\"area_search_replace\").Ç.visibility==\"visible\"){Á.hidden_search();}\nelse{Á.open_inline_popup(\"area_search_replace\");var text=Á.area_get_selection();var search=text.split(\"\\n\")[0];_$(\"area_search\").Ê=search;_$(\"area_search\").focus();}};EA.Ä.hidden_search=Ã(){Á.close_inline_popup(\"area_search_replace\");};EA.Ä.area_search=Ã(mode){if(!mode)mode=\"search\";_$(\"area_search_msg\").innerHTML=\"\";var search=_$(\"area_search\").Ê;Á.Â.focus();Á.Â.ÂFocused=Ë;var infos=Á.get_selection_infos();var start=infos[\"selectionStart\"];var pos=-1;var pos_begin=-1;var Æ=search.Æ;if(_$(\"area_search_replace\").Ç.visibility!=\"visible\"){Á.show_search();return;}if(search.Æ==0){_$(\"area_search_msg\").innerHTML=Á.get_translation(\"search_field_empty\");return;}if(mode!=\"replace\"){if(_$(\"area_search_reg_exp\").checked)start++;\nelse start+=search.Æ;}if(_$(\"area_search_reg_exp\").checked){var opt=\"m\";if(!_$(\"area_search_match_case\").checked)opt+=\"i\";var reg=new RegExp(search,opt);pos=infos[\"full_text\"].substr(start).search(reg);pos_begin=infos[\"full_text\"].search(reg);if(pos!=-1){pos+=start;Æ=infos[\"full_text\"].substr(start).match(reg)[0].Æ;}\nelse if(pos_begin!=-1){Æ=infos[\"full_text\"].match(reg)[0].Æ;}}\nelse{if(_$(\"area_search_match_case\").checked){pos=infos[\"full_text\"].indexOf(search,start);pos_begin=infos[\"full_text\"].indexOf(search);}\nelse{pos=infos[\"full_text\"].toLowerCase().indexOf(search.toLowerCase(),start);pos_begin=infos[\"full_text\"].toLowerCase().indexOf(search.toLowerCase());}}if(pos==-1&&pos_begin==-1){_$(\"area_search_msg\").innerHTML=\"<strong>\"+search+\"</strong> \"+Á.get_translation(\"not_found\");return;}\nelse if(pos==-1&&pos_begin !=-1){begin=pos_begin;_$(\"area_search_msg\").innerHTML=Á.get_translation(\"restart_search_at_begin\");}\nelse begin=pos;if(mode==\"replace\"&&pos==infos[\"indexOfCursor\"]){var replace=_$(\"area_replace\").Ê;var new_text=\"\";if(_$(\"area_search_reg_exp\").checked){var opt=\"m\";if(!_$(\"area_search_match_case\").checked)opt+=\"i\";var reg=new RegExp(search,opt);new_text=infos[\"full_text\"].substr(0,begin)+infos[\"full_text\"].substr(start).replace(reg,replace);}\nelse{new_text=infos[\"full_text\"].substr(0,begin)+replace+infos[\"full_text\"].substr(begin+Æ);}Á.Â.Ê=new_text;Á.area_select(begin,Æ);Á.area_search();}\nelse Á.area_select(begin,Æ);};EA.Ä.area_replace=Ã(){Á.area_search(\"replace\");};EA.Ä.area_replace_all=Ã(){var base_text=Á.Â.Ê;var search=_$(\"area_search\").Ê;var replace=_$(\"area_replace\").Ê;if(search.Æ==0){_$(\"area_search_msg\").innerHTML=Á.get_translation(\"search_field_empty\");return;}var new_text=\"\";var nb_change=0;if(_$(\"area_search_reg_exp\").checked){var opt=\"mg\";if(!_$(\"area_search_match_case\").checked)opt+=\"i\";var reg=new RegExp(search,opt);nb_change=infos[\"full_text\"].match(reg).Æ;new_text=infos[\"full_text\"].replace(reg,replace);}\nelse{if(_$(\"area_search_match_case\").checked){var tmp_tab=base_text.split(search);nb_change=tmp_tab.Æ-1;new_text=tmp_tab.join(replace);}\nelse{var lower_Ê=base_text.toLowerCase();var lower_search=search.toLowerCase();var start=0;var pos=lower_Ê.indexOf(lower_search);while(pos!=-1){nb_change++;new_text+=Á.Â.Ê.substring(start,pos)+replace;start=pos+search.Æ;pos=lower_Ê.indexOf(lower_search,pos+1);}new_text+=Á.Â.Ê.substring(start);}}if(new_text==base_text){_$(\"area_search_msg\").innerHTML=\"<strong>\"+search+\"</strong> \"+Á.get_translation(\"not_found\");}\nelse{Á.Â.Ê=new_text;_$(\"area_search_msg\").innerHTML=\"<strong>\"+nb_change+\"</strong> \"+Á.get_translation(\"occurrence_replaced\");setTimeout(\"eA.Â.focus();eA.Â.ÂFocused=Ë;\",100);}}; EA.Ä.change_highlight=Ã(change_to){if(Á.Å[\"syntax\"].Æ==0&&change_to==Ì){Á.switchClassSticky(_$(\"highlight\"),'editAreaButtonDisabled',Ë);Á.switchClassSticky(_$(\"reset_highlight\"),'editAreaButtonDisabled',Ë);return Ì;}if(Á.do_highlight==change_to)return Ì;Á.getIESelection();var pos_start=Á.Â.selectionStart;var pos_end=Á.Â.selectionEnd;if(Á.do_highlight===Ë||change_to==Ì)Á.disable_highlight();\nelse Á.enable_highlight();Á.Â.focus();Á.Â.selectionStart=pos_start;Á.Â.selectionEnd=pos_end;Á.setIESelection();};EA.Ä.disable_highlight=Ã(displayOnly){var t=Á,a=t.Â,new_Obj,old_class,new_class;t.selection_field.innerHTML=\"\";t.selection_field_text.innerHTML=\"\";t.content_highlight.Ç.visibility=\"hidden\";new_Obj=t.content_highlight.cloneNode(Ì);new_Obj.innerHTML=\"\";t.content_highlight.ÈNode.insertBefore(new_Obj,t.content_highlight);t.content_highlight.ÈNode.removeChild(t.content_highlight);t.content_highlight=new_Obj;old_class=È.getAttribute(a,\"class\");if(old_class){new_class=old_class.replace(\"hidden\",\"\");È.setAttribute(a,\"class\",new_class);}a.Ç.backgroundColor=\"transÈ\";t.switchClassSticky(_$(\"highlight\"),'editAreaButtonNormal',Ë);t.switchClassSticky(_$(\"reset_highlight\"),'editAreaButtonDisabled',Ë);t.do_highlight=Ì;t.switchClassSticky(_$(\"change_smooth_selection\"),'editAreaButtonSelected',Ë);if(typeof(t.smooth_selection_before_highlight)!=\"undefined\"&&t.smooth_selection_before_highlight===Ì){t.change_smooth_selection_mode(Ì);}};EA.Ä.enable_highlight=Ã(){var t=Á,a=t.Â,new_class;t.show_waiting_screen();t.content_highlight.Ç.visibility=\"visible\";new_class=È.getAttribute(a,\"class\")+\" hidden\";È.setAttribute(a,\"class\",new_class);if(t.isIE)a.Ç.backgroundColor=\"#FFFFFF\";t.switchClassSticky(_$(\"highlight\"),'editAreaButtonSelected',Ì);t.switchClassSticky(_$(\"reset_highlight\"),'editAreaButtonNormal',Ì);t.smooth_selection_before_highlight=t.smooth_selection;if(!t.smooth_selection)t.change_smooth_selection_mode(Ë);t.switchClassSticky(_$(\"change_smooth_selection\"),'editAreaButtonDisabled',Ë);t.do_highlight=Ë;t.resync_highlight();t.hide_waiting_screen();};EA.Ä.maj_highlight=Ã(infos){var debug_opti=\"\",tps_start=new Date().getTime(),tps_middle_opti=new Date().getTime();var t=Á,hightlighted_text,updated_highlight;var textToHighlight=infos[\"full_text\"],doSyntaxOpti=Ì,doHtmlOpti=Ì,stay_begin=\"\",stay_end=\"\",trace_new,trace_last;if(t.last_text_to_highlight==infos[\"full_text\"]&&t.resync_highlight!==Ë)return;if(t.reload_highlight===Ë){t.reload_highlight=Ì;}\nelse if(textToHighlight.Æ==0){textToHighlight=\"\\n \";}\nelse{changes=t.checkTextEvolution(t.last_text_to_highlight,textToHighlight);trace_new=t.get_syntax_trace(changes.newTextLine).replace(/\\r/g,'');trace_last=t.get_syntax_trace(changes.lastTextLine).replace(/\\r/g,'');doSyntaxOpti=(trace_new==trace_last);if(!doSyntaxOpti&&trace_new==\"\\n\"+trace_last&&/^[ \t\s]*\\n[ \t\s]*$/.test(changes.newText.replace(/\\r/g,''))&&changes.lastText==\"\"){doSyntaxOpti=Ë;}if(doSyntaxOpti){tps_middle_opti=new Date().getTime();stay_begin=t.last_hightlighted_text.split(\"\\n\").slice(0,changes.lineStart).join(\"\\n\");if(changes.lineStart>0)stay_begin+=\"\\n\";stay_end=t.last_hightlighted_text.split(\"\\n\").slice(changes.lineLastEnd+1).join(\"\\n\");if(stay_end.Æ>0)stay_end=\"\\n\"+stay_end;if(stay_begin.split('<span').Æ !=stay_begin.split('</span').Æ||stay_end.split('<span').Æ !=stay_end.split('</span').Æ){doSyntaxOpti=Ì;stay_end='';stay_begin='';}\nelse{if(stay_begin.Æ==0&&changes.posLastEnd==-1)changes.newTextLine+=\"\\n\";textToHighlight=changes.newTextLine;}}if(t.Å[\"debug\"]){var ch=changes;debug_opti=(doSyntaxOpti?\"Optimisation\":\"No optimisation\")+\" start:\"+ch.posStart+\"(\"+ch.lineStart+\")\"+\" end_new:\"+ch.posNewEnd+\"(\"+ch.lineNewEnd+\")\"+\" end_last:\"+ch.posLastEnd+\"(\"+ch.lineLastEnd+\")\"+\"\\nchanged_text:\"+ch.newText+\"=> trace:\"+trace_new+\"\\nchanged_last_text:\"+ch.lastText+\"=> trace:\"+trace_last+\"\\nchanged_line:\"+ch.newTextLine+\"\\nlast_changed_line:\"+ch.lastTextLine+\"\\nstay_begin:\"+stay_begin.slice(-100)+\"\\nstay_end:\"+stay_end.substr(0,100);+\"\\n\";}}tps_end_opti=new Date().getTime();updated_highlight=t.colorize_text(textToHighlight);tpsAfterReg=new Date().getTime();if(doSyntaxOpti){try{var replacedBloc,i,nbStart='',nbEnd='',newHtml,ÆOld,ÆNew;replacedBloc=t.last_hightlighted_text.substring(stay_begin.Æ,t.last_hightlighted_text.Æ-stay_end.Æ);ÆOld=replacedBloc.Æ;ÆNew=updated_highlight.Æ;for(i=0;i < ÆOld&&i < ÆNew&&replacedBloc.charAt(i)==updated_highlight.charAt(i);i++){}nbStart=i;for(i=0;i+nbStart < ÆOld&&i+nbStart < ÆNew&&replacedBloc.charAt(ÆOld-i-1)==updated_highlight.charAt(ÆNew-i-1);i++){}nbEnd=i;lastHtml=replacedBloc.substring(nbStart,ÆOld-nbEnd);newHtml=updated_highlight.substring(nbStart,ÆNew-nbEnd);if(newHtml.indexOf('<span')==-1&&newHtml.indexOf('</span')==-1&&lastHtml.indexOf('<span')==-1&&lastHtml.indexOf('</span')==-1){var beginStr,nbOpendedSpan,nbClosedSpan,nbUnchangedChars,span,textNode;doHtmlOpti=Ë;beginStr=t.last_hightlighted_text.substr(0,stay_begin.Æ+nbStart);nbOpendedSpan=beginStr.split('<span').Æ-1;nbClosedSpan=beginStr.split('</span').Æ-1;span=t.content_highlight.getElementsByTagName('span')[ nbOpendedSpan ];ÈSpan=span;maxStartOffset=maxEndOffset=0;if(nbOpendedSpan==nbClosedSpan){while(ÈSpan.ÈNode !=t.content_highlight&&ÈSpan.ÈNode.tagName !='PRE'){ÈSpan=ÈSpan.ÈNode;}}\nelse{maxStartOffset=maxEndOffset=beginStr.Æ+1;nbClosed=beginStr.substr(Math.max(0,beginStr.lastIndexOf('<span',maxStartOffset-1))).split('</span').Æ-1;while(nbClosed > 0){nbClosed--;ÈSpan=ÈSpan.ÈNode;}while(ÈSpan.ÈNode !=t.content_highlight&&ÈSpan.ÈNode.tagName !='PRE'&&(tmpMaxStartOffset=Math.max(0,beginStr.lastIndexOf('<span',maxStartOffset-1)))<(tmpMaxEndOffset=Math.max(0,beginStr.lastIndexOf('</span',maxEndOffset-1)))){maxStartOffset=tmpMaxStartOffset;maxEndOffset=tmpMaxEndOffset;}}if(ÈSpan.ÈNode==t.content_highlight||ÈSpan.ÈNode.tagName=='PRE'){maxStartOffset=Math.max(0,beginStr.indexOf('<span'));}if(maxStartOffset==beginStr.Æ){nbSubSpanBefore=0;}\nelse{lastEndPos=Math.max(0,beginStr.lastIndexOf('>',maxStartOffset));nbSubSpanBefore=beginStr.substr(lastEndPos).split('<span').Æ-1;}if(nbSubSpanBefore==0){textNode=ÈSpan.firstChild;}\nelse{lastSubSpan=ÈSpan.getElementsByTagName('span')[ nbSubSpanBefore-1 ];while(lastSubSpan.ÈNode !=ÈSpan){lastSubSpan=lastSubSpan.ÈNode;}if(lastSubSpan.nextSibling==null||lastSubSpan.nextSibling.nodeType !=3){textNode=document.createTextNode('');lastSubSpan.ÈNode.insertBefore(textNode,lastSubSpan.nextSibling);}\nelse{textNode=lastSubSpan.nextSibling;}}nbUnchangedChars=beginStr.Æ-Math.max(0,beginStr.lastIndexOf('>')+1);if(t.isIE){nbUnchangedChars-=(beginStr.substr(beginStr.Æ-nbUnchangedChars).split(\"\\n\").Æ-1);textNode.replaceData(nbUnchangedChars,lastHtml.replace(/\\n/g,'').Æ,newHtml.replace(/\\n/g,''));}\nelse{textNode.replaceData(nbUnchangedChars,lastHtml.Æ,newHtml);}}}catch(e){doHtmlOpti=Ì;}}tpsAfterOpti2=new Date().getTime();hightlighted_text=stay_begin+updated_highlight+stay_end;if(!doHtmlOpti){var new_Obj=t.content_highlight.cloneNode(Ì);if((t.isIE&&t.isIE < 8)||(t.isOpera&&t.isOpera < 9.6))new_Obj.innerHTML=\"<pre><span class='\"+t.Å[\"syntax\"]+\"'>\"+hightlighted_text+\"</span></pre>\";\nelse new_Obj.innerHTML=\"<span class='\"+t.Å[\"syntax\"]+\"'>\"+hightlighted_text+\"</span>\";t.content_highlight.ÈNode.replaceChild(new_Obj,t.content_highlight);t.content_highlight=new_Obj;}t.last_text_to_highlight=infos[\"full_text\"];t.last_hightlighted_text=hightlighted_text;tps3=new Date().getTime();if(t.Å[\"debug\"]){t.debug.Ê=\"Tps optimisation \"+(tps_end_opti-tps_start)+\" | tps reg exp:\"+(tpsAfterReg-tps_end_opti)+\" | tps opti HTML:\"+(tpsAfterOpti2-tpsAfterReg)+' '+(doHtmlOpti ? 'yes':'no')+\" | tps update highlight content:\"+(tps3-tpsAfterOpti2)+\" | tpsTotal:\"+(tps3-tps_start)+\"(\"+tps3+\")\\n\"+debug_opti;}};EA.Ä.resync_highlight=Ã(reload_now){Á.reload_highlight=Ë;Á.last_text_to_highlight=\"\";Á.focus();if(reload_now)Á.check_line_selection(Ì);}; EA.Ä.comment_or_quote=Ã(){var new_class=\"\",close_tag=\"\",sy,arg,i;sy=È.eAL.syntax[eA.current_code_lang];arg=EA.Ä.comment_or_quote.arguments[0];for(i in sy[\"quotes\"]){if(arg.indexOf(i)==0){new_class=\"quotesmarks\";close_tag=sy[\"quotes\"][i];}}if(new_class.Æ==0){for(var i in sy[\"comments\"]){if(arg.indexOf(i)==0){new_class=\"comments\";close_tag=sy[\"comments\"][i];}}}if(close_tag==\"\\n\"){return \"µ__\"+new_class+\"__µ\"+arg.replace(/(\\r?\\n)?$/m,\"µ_END_µ$1\");}\nelse{reg=new RegExp(È.eAL.get_escaped_regexp(close_tag)+\"$\",\"m\");if(arg.search(reg)!=-1)return \"µ__\"+new_class+\"__µ\"+arg+\"µ_END_µ\";\nelse return \"µ__\"+new_class+\"__µ\"+arg;}};EA.Ä.get_syntax_trace=Ã(text){if(Á.Å[\"syntax\"].Æ>0&&È.eAL.syntax[Á.Å[\"syntax\"]][\"syntax_trace_regexp\"])return text.replace(È.eAL.syntax[Á.Å[\"syntax\"]][\"syntax_trace_regexp\"],\"$3\");};EA.Ä.colorize_text=Ã(text){text=\" \"+text;if(Á.Å[\"syntax\"].Æ>0)text=Á.apply_syntax(text,Á.Å[\"syntax\"]);return text.substr(1).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/µ_END_µ/g,\"</span>\").replace(/µ__([a-zA-Z0-9]+)__µ/g,\"<span class='$1'>\");};EA.Ä.apply_syntax=Ã(text,lang){var sy;Á.current_code_lang=lang;if(!È.eAL.syntax[lang])return text;sy=È.eAL.syntax[lang];if(sy[\"custom_regexp\"]['before']){for(var i in sy[\"custom_regexp\"]['before']){var convert=\"$1µ__\"+sy[\"custom_regexp\"]['before'][i]['class']+\"__µ$2µ_END_µ$3\";text=text.replace(sy[\"custom_regexp\"]['before'][i]['regexp'],convert);}}if(sy[\"comment_or_quote_reg_exp\"]){text=text.replace(sy[\"comment_or_quote_reg_exp\"],Á.comment_or_quote);}if(sy[\"keywords_reg_exp\"]){for(var i in sy[\"keywords_reg_exp\"]){text=text.replace(sy[\"keywords_reg_exp\"][i],'µ__'+i+'__µ$2µ_END_µ');}}if(sy[\"delimiters_reg_exp\"]){text=text.replace(sy[\"delimiters_reg_exp\"],'µ__delimiters__µ$1µ_END_µ');}if(sy[\"operators_reg_exp\"]){text=text.replace(sy[\"operators_reg_exp\"],'µ__operators__µ$1µ_END_µ');}if(sy[\"custom_regexp\"]['after']){for(var i in sy[\"custom_regexp\"]['after']){var convert=\"$1µ__\"+sy[\"custom_regexp\"]['after'][i]['class']+\"__µ$2µ_END_µ$3\";text=text.replace(sy[\"custom_regexp\"]['after'][i]['regexp'],convert);}}return text;};var editArea= eA;EditArea=EA;</script>".replace(/Á/g,'this').replace(/Â/g,'textarea').replace(/Ã/g,'function').replace(/Ä/g,'prototype').replace(/Å/g,'settings').replace(/Æ/g,'length').replace(/Ç/g,'style').replace(/È/g,'parent').replace(/É/g,'last_selection').replace(/Ê/g,'value').replace(/Ë/g,'true').replace(/Ì/g,'false');
-editAreaLoader.template= "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"> <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" > <head> <title>EditArea</title> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /> <meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\"/> [__CSSRULES__] [__JSCODE__] </head> <body> <div id='editor'> <div class='area_toolbar' id='toolbar_1'>[__TOOLBAR__]</div> <div class='area_toolbar' id='tab_browsing_area'><ul id='tab_browsing_list' class='menu'> <li> </li> </ul></div> <div id='result'> <div id='no_file_selected'></div> <div id='container'> <div id='cursor_pos' class='edit_area_cursor'>&nbsp;</div> <div id='end_bracket' class='edit_area_cursor'>&nbsp;</div> <div id='selection_field'></div> <div id='line_number' selec='none'></div> <div id='content_highlight'></div> <div id='test_font_size'></div> <div id='selection_field_text'></div> <textarea id='textarea' wrap='off' onchange='editArea.execCommand(\"onchange\");' onfocus='javascript:editArea.textareaFocused=true;' onblur='javascript:editArea.textareaFocused=false;'> </textarea> </div> </div> <div class='area_toolbar' id='toolbar_2'> <table class='statusbar' cellspacing='0' cellpadding='0'> <tr> <td class='total' selec='none'>{$position}:</td> <td class='infos' selec='none'> {$line_abbr} <span  id='linePos'>0</span>, {$char_abbr} <span id='currPos'>0</span> </td> <td class='total' selec='none'>{$total}:</td> <td class='infos' selec='none'> {$line_abbr} <span id='nbLine'>0</span>, {$char_abbr} <span id='nbChar'>0</span> </td> <td class='resize'> <span id='resize_area'><img src='[__BASEURL__]images/statusbar_resize.gif' alt='resize' selec='none'></span> </td> </tr> </table> </div> </div> <div id='processing'> <div id='processing_text'> {$processing} </div> </div> <div id='area_search_replace' class='editarea_popup'> <table cellspacing='2' cellpadding='0' style='width: 100%'> <tr> <td selec='none'>{$search}</td> <td><input type='text' id='area_search' /></td> <td id='close_area_search_replace'> <a onclick='Javascript:editArea.execCommand(\"hidden_search\")'><img selec='none' src='[__BASEURL__]images/close.gif' alt='{$close_popup}' title='{$close_popup}' /></a><br /> </tr><tr> <td selec='none'>{$replace}</td> <td><input type='text' id='area_replace' /></td> <td><img id='move_area_search_replace' onmousedown='return parent.start_move_element(event,\"area_search_replace\", parent.frames[\"frame_\"+editArea.id]);'  src='[__BASEURL__]images/move.gif' alt='{$move_popup}' title='{$move_popup}' /></td> </tr> </table> <div class='button'> <input type='checkbox' id='area_search_match_case' /><label for='area_search_match_case' selec='none'>{$match_case}</label> <input type='checkbox' id='area_search_reg_exp' /><label for='area_search_reg_exp' selec='none'>{$reg_exp}</label> <br /> <a onclick='Javascript:editArea.execCommand(\"area_search\")' selec='none'>{$find_next}</a> <a onclick='Javascript:editArea.execCommand(\"area_replace\")' selec='none'>{$replace}</a> <a onclick='Javascript:editArea.execCommand(\"area_replace_all\")' selec='none'>{$replace_all}</a><br /> </div> <div id='area_search_msg' selec='none'></div> </div> <div id='edit_area_help' class='editarea_popup'> <div class='close_popup'> <a onclick='Javascript:editArea.execCommand(\"close_all_inline_popup\")'><img src='[__BASEURL__]images/close.gif' alt='{$close_popup}' title='{$close_popup}' /></a> </div> <div><h2>Editarea [__EA_VERSION__]</h2><br /> <h3>{$shortcuts}:</h3> {$tab}: {$add_tab}<br /> {$shift}+{$tab}: {$remove_tab}<br /> {$ctrl}+f: {$search_command}<br /> {$ctrl}+r: {$replace_command}<br /> {$ctrl}+h: {$highlight}<br /> {$ctrl}+g: {$go_to_line}<br /> {$ctrl}+z: {$undo}<br /> {$ctrl}+y: {$redo}<br /> {$ctrl}+e: {$help}<br /> {$ctrl}+q, {$esc}: {$close_popup}<br /> {$accesskey} E: {$toggle}<br /> <br /> <em>{$about_notice}</em> <br /><div class='copyright'>&copy; Christophe Dolivet 2007-2009</div> </div> </div> </body> </html> ";
-editAreaLoader.iframe_css= "<style>body,html{margin:0;padding:0;height:100%;border:none;overflow:hidden;background-color:#FFF;}body,html,table,form,textarea{font:12px monospace,sans-serif;}#editor{border:solid #888 1px;overflow:hidden;}#result{z-index:4;overflow-x:auto;overflow-y:scroll;border-top:solid #888 1px;border-bottom:solid #888 1px;position:relative;clear:both;}#result.empty{overflow:hidden;}#container{overflow:hidden;border:solid blue 0;position:relative;z-index:10;padding:0 5px 0 45px;}#textarea{position:relative;top:0;left:0;margin:0;padding:0;width:100%;height:100%;overflow:hidden;z-index:7;border-width:0;background-color:transparent;resize:none;}#textarea,#textarea:hover{outline:none;}#content_highlight{white-space:pre;margin:0;padding:0;position:absolute;z-index:4;overflow:visible;}#selection_field,#selection_field_text{margin:0;background-color:#E1F2F9;position:absolute;z-index:5;top:-100px;padding:0;white-space:pre;overflow:hidden;}#selection_field.show_colors {z-index:3;background-color:#EDF9FC;}#selection_field strong{font-weight:normal;}#selection_field.show_colors *,#selection_field_text * {visibility:hidden;}#selection_field_text{background-color:transparent;}#selection_field_text strong{font-weight:normal;background-color:#3399FE;color:#FFF;visibility:visible;}#container.word_wrap #content_highlight,#container.word_wrap #selection_field,#container.word_wrap #selection_field_text,#container.word_wrap #test_font_size{white-space:pre-wrap;white-space:-moz-pre-wrap !important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;width:99%;}#line_number{position:absolute;overflow:hidden;border-right:solid black 1px;z-index:8;width:38px;padding:0 5px 0 0;margin:0 0 0 -45px;text-align:right;color:#AAAAAA;}#test_font_size{padding:0;margin:0;visibility:hidden;position:absolute;white-space:pre;}pre{margin:0;padding:0;}.hidden{opacity:0.2;filter:alpha(opacity=20);}#result .edit_area_cursor{position:absolute;z-index:6;background-color:#FF6633;top:-100px;margin:0;}#result .edit_area_selection_field .overline{background-color:#996600;}.editarea_popup{border:solid 1px #888888;background-color:#ECE9D8;width:250px;padding:4px;position:absolute;visibility:hidden;z-index:15;top:-500px;}.editarea_popup,.editarea_popup table{font-family:sans-serif;font-size:10pt;}.editarea_popup img{border:0;}.editarea_popup .close_popup{float:right;line-height:16px;border:0;padding:0;}.editarea_popup h1,.editarea_popup h2,.editarea_popup h3,.editarea_popup h4,.editarea_popup h5,.editarea_popup h6{margin:0;padding:0;}.editarea_popup .copyright{text-align:right;}div#area_search_replace{}div#area_search_replace img{border:0;}div#area_search_replace div.button{text-align:center;line-height:1.7em;}div#area_search_replace .button a{cursor:pointer;border:solid 1px #888888;background-color:#DEDEDE;text-decoration:none;padding:0 2px;color:#000000;white-space:nowrap;}div#area_search_replace a:hover{background-color:#EDEDED;}div#area_search_replace  #move_area_search_replace{cursor:move;border:solid 1px #888;}div#area_search_replace  #close_area_search_replace{text-align:right;vertical-align:top;white-space:nowrap;}div#area_search_replace  #area_search_msg{height:18px;overflow:hidden;border-top:solid 1px #888;margin-top:3px;}#edit_area_help{width:350px;}#edit_area_help div.close_popup{float:right;}.area_toolbar{width:100%;margin:0;padding:0;background-color:#ECE9D8;text-align:center;}.area_toolbar,.area_toolbar table{font:11px sans-serif;}.area_toolbar img{border:0;vertical-align:middle;}.area_toolbar input{margin:0;padding:0;}.area_toolbar select{font-family:'MS Sans Serif',sans-serif,Verdana,Arial;font-size:7pt;font-weight:normal;margin:2px 0 0 0 ;padding:0;vertical-align:top;background-color:#F0F0EE;}table.statusbar{width:100%;}.area_toolbar td.infos{text-align:center;width:130px;border-right:solid 1px #888;border-width:0 1px 0 0;padding:0;}.area_toolbar td.total{text-align:right;width:50px;padding:0;}.area_toolbar td.resize{text-align:right;}.area_toolbar span#resize_area{cursor:nw-resize;visibility:hidden;}.editAreaButtonNormal,.editAreaButtonOver,.editAreaButtonDown,.editAreaSeparator,.editAreaSeparatorLine,.editAreaButtonDisabled,.editAreaButtonSelected {border:0; margin:0; padding:0; background:transparent;margin-top:0;margin-left:1px;padding:0;}.editAreaButtonNormal {border:1px solid #ECE9D8 !important;cursor:pointer;}.editAreaButtonOver {border:1px solid #0A246A !important;cursor:pointer;background-color:#B6BDD2;}.editAreaButtonDown {cursor:pointer;border:1px solid #0A246A !important;background-color:#8592B5;}.editAreaButtonSelected {border:1px solid #C0C0BB !important;cursor:pointer;background-color:#F4F2E8;}.editAreaButtonDisabled {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);-moz-opacity:0.3;opacity:0.3;border:1px solid #F0F0EE !important;cursor:pointer;}.editAreaSeparatorLine {margin:1px 2px;background-color:#C0C0BB;width:2px;height:18px;}#processing{display:none;background-color:#ECE9D8;border:solid #888 1px;position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;text-align:center;}#processing_text{position:absolute;left:50%;top:50%;width:200px;height:20px;margin-left:-100px;margin-top:-10px;text-align:center;}#tab_browsing_area{display:none;background-color:#CCC9A8;border-top:1px solid #888;text-align:left;margin:0;}#tab_browsing_list {padding:0;margin:0;list-style-type:none;white-space:nowrap;}#tab_browsing_list li {float:left;margin:-1px;}#tab_browsing_list a {position:relative;display:block;text-decoration:none;float:left;cursor:pointer;line-height:14px;}#tab_browsing_list a span {display:block;color:#000;background:#ECE9D8;border:1px solid #888;border-width:1px 1px 0;text-align:center;padding:2px 2px 1px 4px;position:relative;}#tab_browsing_list a b {display:block;border-bottom:2px solid #617994;}#tab_browsing_list a .edited {display:none;}#tab_browsing_list a.edited .edited {display:inline;}#tab_browsing_list a img{margin-left:7px;}#tab_browsing_list a.edited img{margin-left:3px;}#tab_browsing_list a:hover span {background:#F4F2E8;border-color:#0A246A;}#tab_browsing_list .selected a span{background:#046380;color:#FFF;}#no_file_selected{height:100%;width:150%;background:#CCC;display:none;z-index:20;position:absolute;}.non_editable #editor{border-width:0 1px;}.non_editable .area_toolbar{display:none;}#auto_completion_area{background:#FFF;border:solid 1px #888;position:absolute;z-index:15;width:280px;height:180px;overflow:auto;display:none;}#auto_completion_area a,#auto_completion_area a:visited{display:block;padding:0 2px 1px;color:#000;text-decoration:none;}#auto_completion_area a:hover,#auto_completion_area a:focus,#auto_completion_area a.focus{background:#D6E1FE;text-decoration:none;}#auto_completion_area ul{margin:0;padding:0;list-style:none inside;}#auto_completion_area li{padding:0;}#auto_completion_area .prefix{font-style:italic;padding:0 3px;}</style>";
diff --git a/project/static/js/edit_area_full_with_plugins.gz b/project/static/js/edit_area_full_with_plugins.gz
deleted file mode 100755 (executable)
index 19cd98c..0000000
Binary files a/project/static/js/edit_area_full_with_plugins.gz and /dev/null differ
diff --git a/project/static/js/edit_area_full_with_plugins.js b/project/static/js/edit_area_full_with_plugins.js
deleted file mode 100755 (executable)
index 4e21810..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
- function EAL(){var t=this;t.version="0.8.1.1";date=new Date();t.start_time=date.getTime();t.win="loading";t.error=false;t.baseURL="";t.template="";t.lang={};t.load_syntax={};t.syntax={};t.loadedFiles=[];t.waiting_loading={};t.scripts_to_load=[];t.sub_scripts_to_load=[];t.resize=[];t.hidden={};t.default_settings={debug:false,smooth_selection:true,font_size:"10",font_family:"monospace",start_highlight:false,toolbar:"search,go_to_line,fullscreen,|,undo,redo,|,select_font,|,change_smooth_selection,highlight,reset_highlight,word_wrap,|,help",begin_toolbar:"",end_toolbar:"",is_multi_files:false,allow_resize:"both",show_line_colors:false,min_width:400,min_height:125,replace_tab_by_spaces:false,allow_toggle:true,language:"en",syntax:"",syntax_selection_allow:"basic,brainfuck,c,coldfusion,cpp,css,html,java,js,pas,perl,php,python,ruby,robotstxt,sql,tsql,vb,xml",display:"onload",max_undo:30,browsers:"known",plugins:"",gecko_spellcheck:false,fullscreen:false,is_editable:true,cursor_position:"begin",word_wrap:false,autocompletion:false,load_callback:"",save_callback:"",change_callback:"",submit_callback:"",EA_init_callback:"",EA_delete_callback:"",EA_load_callback:"",EA_unload_callback:"",EA_toggle_on_callback:"",EA_toggle_off_callback:"",EA_file_switch_on_callback:"",EA_file_switch_off_callback:"",EA_file_close_callback:""};t.advanced_buttons=[ ['new_document','newdocument.gif','new_document',false],['search','search.gif','show_search',false],['go_to_line','go_to_line.gif','go_to_line',false],['undo','undo.gif','undo',true],['redo','redo.gif','redo',true],['change_smooth_selection','smooth_selection.gif','change_smooth_selection_mode',true],['reset_highlight','reset_highlight.gif','resync_highlight',true],['highlight','highlight.gif','change_highlight',true],['help','help.gif','show_help',false],['save','save.gif','save',false],['load','load.gif','load',false],['fullscreen','fullscreen.gif','toggle_full_screen',false],['word_wrap','word_wrap.gif','toggle_word_wrap',true],['autocompletion','autocompletion.gif','toggle_autocompletion',true] ];t.set_browser_infos(t);if(t.isIE>=6||t.isGecko||(t.isWebKit&&!t.isSafari<3)||t.isOpera>=9||t.isCamino)t.isValidBrowser=true;
-else t.isValidBrowser=false;t.set_base_url();for(var i=0;i<t.scripts_to_load.length;i++){setTimeout("eAL.load_script('"+t.baseURL+t.scripts_to_load[i]+".js');",1);t.waiting_loading[t.scripts_to_load[i]+".js"]=false;}t.add_event(window,"load",EAL.prototype.window_loaded);};EAL.prototype={has_error:function(){this.error=true;for(var i in EAL.prototype){EAL.prototype[i]=function(){};}},set_browser_infos:function(o){ua=navigator.userAgent;o.isWebKit=/WebKit/.test(ua);o.isGecko=!o.isWebKit&&/Gecko/.test(ua);o.isMac=/Mac/.test(ua);o.isIE=(navigator.appName=="Microsoft Internet Explorer");if(o.isIE){o.isIE=ua.replace(/^.*?MSIE\s+([0-9\.]+).*$/,"$1");if(o.isIE<6)o.has_error();}if(o.isOpera=(ua.indexOf('Opera')!=-1)){o.isOpera=ua.replace(/^.*?Opera.*?([0-9\.]+).*$/i,"$1");if(o.isOpera<9)o.has_error();o.isIE=false;}if(o.isFirefox=(ua.indexOf('Firefox')!=-1))o.isFirefox=ua.replace(/^.*?Firefox.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('Iceweasel')!=-1)o.isFirefox=ua.replace(/^.*?Iceweasel.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('GranParadiso')!=-1)o.isFirefox=ua.replace(/^.*?GranParadiso.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('BonEcho')!=-1)o.isFirefox=ua.replace(/^.*?BonEcho.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('SeaMonkey')!=-1)o.isFirefox=(ua.replace(/^.*?SeaMonkey.*?([0-9\.]+).*$/i,"$1"))+1;if(o.isCamino=(ua.indexOf('Camino')!=-1))o.isCamino=ua.replace(/^.*?Camino.*?([0-9\.]+).*$/i,"$1");if(o.isSafari=(ua.indexOf('Safari')!=-1))o.isSafari=ua.replace(/^.*?Version\/([0-9]+\.[0-9]+).*$/i,"$1");if(o.isChrome=(ua.indexOf('Chrome')!=-1)){o.isChrome=ua.replace(/^.*?Chrome.*?([0-9\.]+).*$/i,"$1");o.isSafari=false;}},window_loaded:function(){eAL.win="loaded";if(document.forms){for(var i=0;i<document.forms.length;i++){var form=document.forms[i];form.edit_area_replaced_submit=null;try{form.edit_area_replaced_submit=form.onsubmit;form.onsubmit="";}catch(e){}eAL.add_event(form,"submit",EAL.prototype.submit);eAL.add_event(form,"reset",EAL.prototype.reset);}}eAL.add_event(window,"unload",function(){for(var i in eAs){eAL.delete_instance(i);}});},init_ie_textarea:function(id){var a=document.getElementById(id);try{if(a&&typeof(a.focused)=="undefined"){a.focus();a.focused=true;a.selectionStart=a.selectionEnd=0;get_IE_selection(a);eAL.add_event(a,"focus",IE_textarea_focus);eAL.add_event(a,"blur",IE_textarea_blur);}}catch(ex){}},init:function(settings){var t=this,s=settings,i;if(!s["id"])t.has_error();if(t.error)return;if(eAs[s["id"]])t.delete_instance(s["id"]);for(i in t.default_settings){if(typeof(s[i])=="undefined")s[i]=t.default_settings[i];}if(s["browsers"]=="known"&&t.isValidBrowser==false){return;}if(s["begin_toolbar"].length>0)s["toolbar"]=s["begin_toolbar"]+","+s["toolbar"];if(s["end_toolbar"].length>0)s["toolbar"]=s["toolbar"]+","+s["end_toolbar"];s["tab_toolbar"]=s["toolbar"].replace(/ /g,"").split(",");s["plugins"]=s["plugins"].replace(/ /g,"").split(",");for(i=0;i<s["plugins"].length;i++){if(s["plugins"][i].length==0)s["plugins"].splice(i,1);}t.get_template();t.load_script(t.baseURL+"langs/"+s["language"]+".js");if(s["syntax"].length>0){s["syntax"]=s["syntax"].toLowerCase();t.load_script(t.baseURL+"reg_syntax/"+s["syntax"]+".js");}eAs[s["id"]]={"settings":s};eAs[s["id"]]["displayed"]=false;eAs[s["id"]]["hidden"]=false;t.start(s["id"]);},delete_instance:function(id){var d=document,fs=window.frames,span,iframe;eAL.execCommand(id,"EA_delete");if(fs["frame_"+id]&&fs["frame_"+id].editArea){if(eAs[id]["displayed"])eAL.toggle(id,"off");fs["frame_"+id].editArea.execCommand("EA_unload");}span=d.getElementById("EditAreaArroundInfos_"+id);if(span)span.parentNode.removeChild(span);iframe=d.getElementById("frame_"+id);if(iframe){iframe.parentNode.removeChild(iframe);try{delete fs["frame_"+id];}catch(e){}}delete eAs[id];},start:function(id){var t=this,d=document,f,span,father,next,html='',html_toolbar_content='',template,content,i;if(t.win!="loaded"){setTimeout("eAL.start('"+id+"');",50);return;}for(i in t.waiting_loading){if(t.waiting_loading[i]!="loaded"&&typeof(t.waiting_loading[i])!="function"){setTimeout("eAL.start('"+id+"');",50);return;}}if(!t.lang[eAs[id]["settings"]["language"]]||(eAs[id]["settings"]["syntax"].length>0&&!t.load_syntax[eAs[id]["settings"]["syntax"]])){setTimeout("eAL.start('"+id+"');",50);return;}if(eAs[id]["settings"]["syntax"].length>0)t.init_syntax_regexp();if(!d.getElementById("EditAreaArroundInfos_"+id)&&(eAs[id]["settings"]["debug"]||eAs[id]["settings"]["allow_toggle"])){span=d.createElement("span");span.id="EditAreaArroundInfos_"+id;if(eAs[id]["settings"]["allow_toggle"]){checked=(eAs[id]["settings"]["display"]=="onload")?"checked='checked'":"";html+="<div id='edit_area_toggle_"+i+"'>";html+="<input id='edit_area_toggle_checkbox_"+id+"' class='toggle_"+id+"' type='checkbox' onclick='eAL.toggle(\""+id+"\");' accesskey='e' "+checked+" />";html+="<label for='edit_area_toggle_checkbox_"+id+"'>{$toggle}</label></div>";}if(eAs[id]["settings"]["debug"])html+="<textarea id='edit_area_debug_"+id+"' spellcheck='off' style='z-index:20;width:100%;height:120px;overflow:auto;border:solid black 1px;'></textarea><br />";html=t.translate(html,eAs[id]["settings"]["language"]);span.innerHTML=html;father=d.getElementById(id).parentNode;next=d.getElementById(id).nextSibling;if(next==null)father.appendChild(span);
-else father.insertBefore(span,next);}if(!eAs[id]["initialized"]){t.execCommand(id,"EA_init");if(eAs[id]["settings"]["display"]=="later"){eAs[id]["initialized"]=true;return;}}if(t.isIE){t.init_ie_textarea(id);}area=eAs[id];for(i=0;i<area["settings"]["tab_toolbar"].length;i++){html_toolbar_content+=t.get_control_html(area["settings"]["tab_toolbar"][i],area["settings"]["language"]);}html_toolbar_content=t.translate(html_toolbar_content,area["settings"]["language"],"template");if(!t.iframe_script){t.iframe_script="";for(i=0;i<t.sub_scripts_to_load.length;i++)t.iframe_script+='<script language="javascript" type="text/javascript" src="'+t.baseURL+t.sub_scripts_to_load[i]+'.js"></script>';}for(i=0;i<area["settings"]["plugins"].length;i++){if(!t.all_plugins_loaded)t.iframe_script+='<script language="javascript" type="text/javascript" src="'+t.baseURL+'plugins/'+area["settings"]["plugins"][i]+'/'+area["settings"]["plugins"][i]+'.js"></script>';t.iframe_script+='<script language="javascript" type="text/javascript" src="'+t.baseURL+'plugins/'+area["settings"]["plugins"][i]+'/langs/'+area["settings"]["language"]+'.js"></script>';}if(!t.iframe_css){t.iframe_css="<link href='"+t.baseURL+"edit_area.css' rel='stylesheet' type='text/css' />";}template=t.template.replace(/\[__BASEURL__\]/g,t.baseURL);template=template.replace("[__TOOLBAR__]",html_toolbar_content);template=t.translate(template,area["settings"]["language"],"template");template=template.replace("[__CSSRULES__]",t.iframe_css);template=template.replace("[__JSCODE__]",t.iframe_script);template=template.replace("[__EA_VERSION__]",t.version);area.textarea=d.getElementById(area["settings"]["id"]);eAs[area["settings"]["id"]]["textarea"]=area.textarea;if(typeof(window.frames["frame_"+area["settings"]["id"]])!='undefined')delete window.frames["frame_"+area["settings"]["id"]];father=area.textarea.parentNode;content=d.createElement("iframe");content.name="frame_"+area["settings"]["id"];content.id="frame_"+area["settings"]["id"];content.style.borderWidth="0px";setAttribute(content,"frameBorder","0");content.style.overflow="hidden";content.style.display="none";next=area.textarea.nextSibling;if(next==null)father.appendChild(content);
-else father.insertBefore(content,next);f=window.frames["frame_"+area["settings"]["id"]];f.document.open();f.eAs=eAs;f.area_id=area["settings"]["id"];f.document.area_id=area["settings"]["id"];f.document.write(template);f.document.close();},toggle:function(id,toggle_to){if(!toggle_to)toggle_to=(eAs[id]["displayed"]==true)?"off":"on";if(eAs[id]["displayed"]==true&&toggle_to=="off"){this.toggle_off(id);}
-else if(eAs[id]["displayed"]==false&&toggle_to=="on"){this.toggle_on(id);}return false;},toggle_off:function(id){var fs=window.frames,f,t,parNod,nxtSib,selStart,selEnd,scrollTop,scrollLeft;if(fs["frame_"+id]){f=fs["frame_"+id];t=eAs[id]["textarea"];if(f.editArea.fullscreen['isFull'])f.editArea.toggle_full_screen(false);eAs[id]["displayed"]=false;t.wrap="off";setAttribute(t,"wrap","off");parNod=t.parentNode;nxtSib=t.nextSibling;parNod.removeChild(t);parNod.insertBefore(t,nxtSib);t.value=f.editArea.textarea.value;selStart=f.editArea.last_selection["selectionStart"];selEnd=f.editArea.last_selection["selectionEnd"];scrollTop=f.document.getElementById("result").scrollTop;scrollLeft=f.document.getElementById("result").scrollLeft;document.getElementById("frame_"+id).style.display='none';t.style.display="inline";try{t.focus();}catch(e){};if(this.isIE){t.selectionStart=selStart;t.selectionEnd=selEnd;t.focused=true;set_IE_selection(t);}
-else{if(this.isOpera&&this.isOpera < 9.6){t.setSelectionRange(0,0);}try{t.setSelectionRange(selStart,selEnd);}catch(e){};}t.scrollTop=scrollTop;t.scrollLeft=scrollLeft;f.editArea.execCommand("toggle_off");}},toggle_on:function(id){var fs=window.frames,f,t,selStart=0,selEnd=0,scrollTop=0,scrollLeft=0,curPos,elem;if(fs["frame_"+id]){f=fs["frame_"+id];t=eAs[id]["textarea"];area=f.editArea;area.textarea.value=t.value;curPos=eAs[id]["settings"]["cursor_position"];if(t.use_last==true){selStart=t.last_selectionStart;selEnd=t.last_selectionEnd;scrollTop=t.last_scrollTop;scrollLeft=t.last_scrollLeft;t.use_last=false;}
-else if(curPos=="auto"){try{selStart=t.selectionStart;selEnd=t.selectionEnd;scrollTop=t.scrollTop;scrollLeft=t.scrollLeft;}catch(ex){}}this.set_editarea_size_from_textarea(id,document.getElementById("frame_"+id));t.style.display="none";document.getElementById("frame_"+id).style.display="inline";area.execCommand("focus");eAs[id]["displayed"]=true;area.execCommand("update_size");f.document.getElementById("result").scrollTop=scrollTop;f.document.getElementById("result").scrollLeft=scrollLeft;area.area_select(selStart,selEnd-selStart);area.execCommand("toggle_on");}
-else{elem=document.getElementById(id);elem.last_selectionStart=elem.selectionStart;elem.last_selectionEnd=elem.selectionEnd;elem.last_scrollTop=elem.scrollTop;elem.last_scrollLeft=elem.scrollLeft;elem.use_last=true;eAL.start(id);}},set_editarea_size_from_textarea:function(id,frame){var elem,width,height;elem=document.getElementById(id);width=Math.max(eAs[id]["settings"]["min_width"],elem.offsetWidth)+"px";height=Math.max(eAs[id]["settings"]["min_height"],elem.offsetHeight)+"px";if(elem.style.width.indexOf("%")!=-1)width=elem.style.width;if(elem.style.height.indexOf("%")!=-1)height=elem.style.height;frame.style.width=width;frame.style.height=height;},set_base_url:function(){var t=this,elems,i,docBasePath;if(!this.baseURL){elems=document.getElementsByTagName('script');for(i=0;i<elems.length;i++){if(elems[i].src&&elems[i].src.match(/edit_area_[^\\\/]*$/i)){var src=elems[i].src;src=src.substring(0,src.lastIndexOf('/'));this.baseURL=src;this.file_name=elems[i].src.substr(elems[i].src.lastIndexOf("/")+1);break;}}}docBasePath=document.location.href;if(docBasePath.indexOf('?')!=-1)docBasePath=docBasePath.substring(0,docBasePath.indexOf('?'));docBasePath=docBasePath.substring(0,docBasePath.lastIndexOf('/'));if(t.baseURL.indexOf('://')==-1&&t.baseURL.charAt(0)!='/'){t.baseURL=docBasePath+"/"+t.baseURL;}t.baseURL+="/";},get_button_html:function(id,img,exec,isFileSpecific,baseURL){var cmd,html;if(!baseURL)baseURL=this.baseURL;cmd='editArea.execCommand(\''+exec+'\')';html='<a id="a_'+id+'" href="javascript:'+cmd+'" onclick="'+cmd+';return false;" onmousedown="return false;" target="_self" fileSpecific="'+(isFileSpecific?'yes':'no')+'">';html+='<img id="'+id+'" src="'+baseURL+'images/'+img+'" title="{$'+id+'}" width="20" height="20" class="editAreaButtonNormal" onmouseover="editArea.switchClass(this,\'editAreaButtonOver\');" onmouseout="editArea.restoreClass(this);" onmousedown="editArea.restoreAndSwitchClass(this,\'editAreaButtonDown\');" /></a>';return html;},get_control_html:function(button_name,lang){var t=this,i,but,html,si;for(i=0;i<t.advanced_buttons.length;i++){but=t.advanced_buttons[i];if(but[0]==button_name){return t.get_button_html(but[0],but[1],but[2],but[3]);}}switch(button_name){case "*":case "return":return "<br />";case "|":case "separator":return '<img src="'+t.baseURL+'images/spacer.gif" width="1" height="15" class="editAreaSeparatorLine">';case "select_font":html="<select id='area_font_size' onchange='javascript:editArea.execCommand(\"change_font_size\")' fileSpecific='yes'>";html+="<option value='-1'>{$font_size}</option>";si=[8,9,10,11,12,14];for(i=0;i<si.length;i++){html+="<option value='"+si[i]+"'>"+si[i]+" pt</option>";}html+="</select>";return html;case "syntax_selection":html="<select id='syntax_selection' onchange='javascript:editArea.execCommand(\"change_syntax\",this.value)' fileSpecific='yes'>";html+="<option value='-1'>{$syntax_selection}</option>";html+="</select>";return html;}return "<span id='tmp_tool_"+button_name+"'>["+button_name+"]</span>";},get_template:function(){if(this.template==""){var xhr_object=null;if(window.XMLHttpRequest)xhr_object=new XMLHttpRequest();
-else if(window.ActiveXObject)xhr_object=new ActiveXObject("Microsoft.XMLHTTP");
-else{alert("XMLHTTPRequest not supported. EditArea not loaded");return;}xhr_object.open("GET",this.baseURL+"template.html",false);xhr_object.send(null);if(xhr_object.readyState==4)this.template=xhr_object.responseText;
-else this.has_error();}},translate:function(text,lang,mode){if(mode=="word")text=eAL.get_word_translation(text,lang);
-else if(mode="template"){eAL.current_language=lang;text=text.replace(/\{\$([^\}]+)\}/gm,eAL.translate_template);}return text;},translate_template:function(){return eAL.get_word_translation(EAL.prototype.translate_template.arguments[1],eAL.current_language);},get_word_translation:function(val,lang){var i;for(i in eAL.lang[lang]){if(i==val)return eAL.lang[lang][i];}return "_"+val;},load_script:function(url){var t=this,d=document,script,head;if(t.loadedFiles[url])return;try{script=d.createElement("script");script.type="text/javascript";script.src=url;script.charset="UTF-8";d.getElementsByTagName("head")[0].appendChild(script);}catch(e){d.write('<sc'+'ript language="javascript" type="text/javascript" src="'+url+'" charset="UTF-8"></sc'+'ript>');}t.loadedFiles[url]=true;},add_event:function(obj,name,handler){try{if(obj.attachEvent){obj.attachEvent("on"+name,handler);}
-else{obj.addEventListener(name,handler,false);}}catch(e){}},remove_event:function(obj,name,handler){try{if(obj.detachEvent)obj.detachEvent("on"+name,handler);
-else obj.removeEventListener(name,handler,false);}catch(e){}},reset:function(e){var formObj,is_child,i,x;formObj=eAL.isIE ? window.event.srcElement:e.target;if(formObj.tagName!='FORM')formObj=formObj.form;for(i in eAs){is_child=false;for(x=0;x<formObj.elements.length;x++){if(formObj.elements[x].id==i)is_child=true;}if(window.frames["frame_"+i]&&is_child&&eAs[i]["displayed"]==true){var exec='window.frames["frame_'+i+'"].editArea.textarea.value=document.getElementById("'+i+'").value;';exec+='window.frames["frame_'+i+'"].editArea.execCommand("focus");';exec+='window.frames["frame_'+i+'"].editArea.check_line_selection();';exec+='window.frames["frame_'+i+'"].editArea.execCommand("reset");';window.setTimeout(exec,10);}}return;},submit:function(e){var formObj,is_child,fs=window.frames,i,x;formObj=eAL.isIE ? window.event.srcElement:e.target;if(formObj.tagName!='FORM')formObj=formObj.form;for(i in eAs){is_child=false;for(x=0;x<formObj.elements.length;x++){if(formObj.elements[x].id==i)is_child=true;}if(is_child){if(fs["frame_"+i]&&eAs[i]["displayed"]==true)document.getElementById(i).value=fs["frame_"+i].editArea.textarea.value;eAL.execCommand(i,"EA_submit");}}if(typeof(formObj.edit_area_replaced_submit)=="function"){res=formObj.edit_area_replaced_submit();if(res==false){if(eAL.isIE)return false;
-else e.preventDefault();}}return;},getValue:function(id){if(window.frames["frame_"+id]&&eAs[id]["displayed"]==true){return window.frames["frame_"+id].editArea.textarea.value;}
-else if(elem=document.getElementById(id)){return elem.value;}return false;},setValue:function(id,new_val){var fs=window.frames;if((f=fs["frame_"+id])&&eAs[id]["displayed"]==true){f.editArea.textarea.value=new_val;f.editArea.execCommand("focus");f.editArea.check_line_selection(false);f.editArea.execCommand("onchange");}
-else if(elem=document.getElementById(id)){elem.value=new_val;}},getSelectionRange:function(id){var sel,eA,fs=window.frames;sel={"start":0,"end":0};if(fs["frame_"+id]&&eAs[id]["displayed"]==true){eA=fs["frame_"+id].editArea;sel["start"]=eA.textarea.selectionStart;sel["end"]=eA.textarea.selectionEnd;}
-else if(elem=document.getElementById(id)){sel=getSelectionRange(elem);}return sel;},setSelectionRange:function(id,new_start,new_end){var fs=window.frames;if(fs["frame_"+id]&&eAs[id]["displayed"]==true){fs["frame_"+id].editArea.area_select(new_start,new_end-new_start);if(!this.isIE){fs["frame_"+id].editArea.check_line_selection(false);fs["frame_"+id].editArea.scroll_to_view();}}
-else if(elem=document.getElementById(id)){setSelectionRange(elem,new_start,new_end);}},getSelectedText:function(id){var sel=this.getSelectionRange(id);return this.getValue(id).substring(sel["start"],sel["end"]);},setSelectedText:function(id,new_val){var fs=window.frames,d=document,sel,text,scrollTop,scrollLeft,new_sel_end;new_val=new_val.replace(/\r/g,"");sel=this.getSelectionRange(id);text=this.getValue(id);if(fs["frame_"+id]&&eAs[id]["displayed"]==true){scrollTop=fs["frame_"+id].document.getElementById("result").scrollTop;scrollLeft=fs["frame_"+id].document.getElementById("result").scrollLeft;}
-else{scrollTop=d.getElementById(id).scrollTop;scrollLeft=d.getElementById(id).scrollLeft;}text=text.substring(0,sel["start"])+new_val+text.substring(sel["end"]);this.setValue(id,text);new_sel_end=sel["start"]+new_val.length;this.setSelectionRange(id,sel["start"],new_sel_end);if(new_val !=this.getSelectedText(id).replace(/\r/g,"")){this.setSelectionRange(id,sel["start"],new_sel_end+new_val.split("\n").length-1);}if(fs["frame_"+id]&&eAs[id]["displayed"]==true){fs["frame_"+id].document.getElementById("result").scrollTop=scrollTop;fs["frame_"+id].document.getElementById("result").scrollLeft=scrollLeft;fs["frame_"+id].editArea.execCommand("onchange");}
-else{d.getElementById(id).scrollTop=scrollTop;d.getElementById(id).scrollLeft=scrollLeft;}},insertTags:function(id,open_tag,close_tag){var old_sel,new_sel;old_sel=this.getSelectionRange(id);text=open_tag+this.getSelectedText(id)+close_tag;eAL.setSelectedText(id,text);new_sel=this.getSelectionRange(id);if(old_sel["end"] > old_sel["start"])this.setSelectionRange(id,new_sel["end"],new_sel["end"]);
-else this.setSelectionRange(id,old_sel["start"]+open_tag.length,old_sel["start"]+open_tag.length);},hide:function(id){var fs=window.frames,d=document,t=this,scrollTop,scrollLeft,span;if(d.getElementById(id)&&!t.hidden[id]){t.hidden[id]={};t.hidden[id]["selectionRange"]=t.getSelectionRange(id);if(d.getElementById(id).style.display!="none"){t.hidden[id]["scrollTop"]=d.getElementById(id).scrollTop;t.hidden[id]["scrollLeft"]=d.getElementById(id).scrollLeft;}if(fs["frame_"+id]){t.hidden[id]["toggle"]=eAs[id]["displayed"];if(fs["frame_"+id]&&eAs[id]["displayed"]==true){scrollTop=fs["frame_"+id].document.getElementById("result").scrollTop;scrollLeft=fs["frame_"+id].document.getElementById("result").scrollLeft;}
-else{scrollTop=d.getElementById(id).scrollTop;scrollLeft=d.getElementById(id).scrollLeft;}t.hidden[id]["scrollTop"]=scrollTop;t.hidden[id]["scrollLeft"]=scrollLeft;if(eAs[id]["displayed"]==true)eAL.toggle_off(id);}span=d.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='none';}d.getElementById(id).style.display="none";}},show:function(id){var fs=window.frames,d=document,t=this,span;if((elem=d.getElementById(id))&&t.hidden[id]){elem.style.display="inline";elem.scrollTop=t.hidden[id]["scrollTop"];elem.scrollLeft=t.hidden[id]["scrollLeft"];span=d.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='inline';}if(fs["frame_"+id]){elem.style.display="inline";if(t.hidden[id]["toggle"]==true)eAL.toggle_on(id);scrollTop=t.hidden[id]["scrollTop"];scrollLeft=t.hidden[id]["scrollLeft"];if(fs["frame_"+id]&&eAs[id]["displayed"]==true){fs["frame_"+id].document.getElementById("result").scrollTop=scrollTop;fs["frame_"+id].document.getElementById("result").scrollLeft=scrollLeft;}
-else{elem.scrollTop=scrollTop;elem.scrollLeft=scrollLeft;}}sel=t.hidden[id]["selectionRange"];t.setSelectionRange(id,sel["start"],sel["end"]);delete t.hidden[id];}},getCurrentFile:function(id){return this.execCommand(id,'get_file',this.execCommand(id,'curr_file'));},getFile:function(id,file_id){return this.execCommand(id,'get_file',file_id);},getAllFiles:function(id){return this.execCommand(id,'get_all_files()');},openFile:function(id,file_infos){return this.execCommand(id,'open_file',file_infos);},closeFile:function(id,file_id){return this.execCommand(id,'close_file',file_id);},setFileEditedMode:function(id,file_id,to){var reg1,reg2;reg1=new RegExp('\\\\','g');reg2=new RegExp('"','g');return this.execCommand(id,'set_file_edited_mode("'+file_id.replace(reg1,'\\\\').replace(reg2,'\\"')+'",'+to+')');},execCommand:function(id,cmd,fct_param){switch(cmd){case "EA_init":if(eAs[id]['settings']["EA_init_callback"].length>0)eval(eAs[id]['settings']["EA_init_callback"]+"('"+id+"');");break;case "EA_delete":if(eAs[id]['settings']["EA_delete_callback"].length>0)eval(eAs[id]['settings']["EA_delete_callback"]+"('"+id+"');");break;case "EA_submit":if(eAs[id]['settings']["submit_callback"].length>0)eval(eAs[id]['settings']["submit_callback"]+"('"+id+"');");break;}if(window.frames["frame_"+id]&&window.frames["frame_"+id].editArea){if(fct_param!=undefined)return eval('window.frames["frame_'+id+'"].editArea.'+cmd+'(fct_param);');
-else return eval('window.frames["frame_'+id+'"].editArea.'+cmd+';');}return false;}};var eAL=new EAL();var eAs={}; function getAttribute(elm,aName){var aValue,taName,i;try{aValue=elm.getAttribute(aName);}catch(exept){}if(! aValue){for(i=0;i < elm.attributes.length;i++){taName=elm.attributes[i] .name.toLowerCase();if(taName==aName){aValue=elm.attributes[i] .value;return aValue;}}}return aValue;};function setAttribute(elm,attr,val){if(attr=="class"){elm.setAttribute("className",val);elm.setAttribute("class",val);}
-else{elm.setAttribute(attr,val);}};function getChildren(elem,elem_type,elem_attribute,elem_attribute_match,option,depth){if(!option)var option="single";if(!depth)var depth=-1;if(elem){var children=elem.childNodes;var result=null;var results=[];for(var x=0;x<children.length;x++){strTagName=new String(children[x].tagName);children_class="?";if(strTagName!="undefined"){child_attribute=getAttribute(children[x],elem_attribute);if((strTagName.toLowerCase()==elem_type.toLowerCase()||elem_type=="")&&(elem_attribute==""||child_attribute==elem_attribute_match)){if(option=="all"){results.push(children[x]);}
-else{return children[x];}}if(depth!=0){result=getChildren(children[x],elem_type,elem_attribute,elem_attribute_match,option,depth-1);if(option=="all"){if(result.length>0){results=results.concat(result);}}
-else if(result!=null){return result;}}}}if(option=="all")return results;}return null;};function isChildOf(elem,parent){if(elem){if(elem==parent)return true;while(elem.parentNode !='undefined'){return isChildOf(elem.parentNode,parent);}}return false;};function getMouseX(e){if(e!=null&&typeof(e.pageX)!="undefined"){return e.pageX;}
-else{return(e!=null?e.x:event.x)+document.documentElement.scrollLeft;}};function getMouseY(e){if(e!=null&&typeof(e.pageY)!="undefined"){return e.pageY;}
-else{return(e!=null?e.y:event.y)+document.documentElement.scrollTop;}};function calculeOffsetLeft(r){return calculeOffset(r,"offsetLeft")};function calculeOffsetTop(r){return calculeOffset(r,"offsetTop")};function calculeOffset(element,attr){var offset=0;while(element){offset+=element[attr];element=element.offsetParent}return offset;};function get_css_property(elem,prop){if(document.defaultView){return document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop);}
-else if(elem.currentStyle){var prop=prop.replace(/-\D/gi,function(sMatch){return sMatch.charAt(sMatch.length-1).toUpperCase();});return elem.currentStyle[prop];}
-else return null;}var _mCE;function start_move_element(e,id,frame){var elem_id=(e.target||e.srcElement).id;if(id)elem_id=id;if(!frame)frame=window;if(frame.event)e=frame.event;_mCE=frame.document.getElementById(elem_id);_mCE.frame=frame;frame.document.onmousemove=move_element;frame.document.onmouseup=end_move_element;mouse_x=getMouseX(e);mouse_y=getMouseY(e);_mCE.start_pos_x=mouse_x-(_mCE.style.left.replace("px","")||calculeOffsetLeft(_mCE));_mCE.start_pos_y=mouse_y-(_mCE.style.top.replace("px","")||calculeOffsetTop(_mCE));return false;};function end_move_element(e){_mCE.frame.document.onmousemove="";_mCE.frame.document.onmouseup="";_mCE=null;};function move_element(e){var newTop,newLeft,maxLeft;if(_mCE.frame&&_mCE.frame.event)e=_mCE.frame.event;newTop=getMouseY(e)-_mCE.start_pos_y;newLeft=getMouseX(e)-_mCE.start_pos_x;maxLeft=_mCE.frame.document.body.offsetWidth-_mCE.offsetWidth;max_top=_mCE.frame.document.body.offsetHeight-_mCE.offsetHeight;newTop=Math.min(Math.max(0,newTop),max_top);newLeft=Math.min(Math.max(0,newLeft),maxLeft);_mCE.style.top=newTop+"px";_mCE.style.left=newLeft+"px";return false;};var nav=eAL.nav;function getSelectionRange(textarea){return{"start":textarea.selectionStart,"end":textarea.selectionEnd};};function setSelectionRange(t,start,end){t.focus();start=Math.max(0,Math.min(t.value.length,start));end=Math.max(start,Math.min(t.value.length,end));if(this.isOpera&&this.isOpera < 9.6){t.selectionEnd=1;t.selectionStart=0;t.selectionEnd=1;t.selectionStart=0;}t.selectionStart=start;t.selectionEnd=end;if(isIE)set_IE_selection(t);};function get_IE_selection(t){var d=document,div,range,stored_range,elem,scrollTop,relative_top,line_start,line_nb,range_start,range_end,tab;if(t&&t.focused){if(!t.ea_line_height){div=d.createElement("div");div.style.fontFamily=get_css_property(t,"font-family");div.style.fontSize=get_css_property(t,"font-size");div.style.visibility="hidden";div.innerHTML="0";d.body.appendChild(div);t.ea_line_height=div.offsetHeight;d.body.removeChild(div);}range=d.selection.createRange();try{stored_range=range.duplicate();stored_range.moveToElementText(t);stored_range.setEndPoint('EndToEnd',range);if(stored_range.parentElement()==t){elem=t;scrollTop=0;while(elem.parentNode){scrollTop+=elem.scrollTop;elem=elem.parentNode;}relative_top=range.offsetTop-calculeOffsetTop(t)+scrollTop;line_start=Math.round((relative_top / t.ea_line_height)+1);line_nb=Math.round(range.boundingHeight / t.ea_line_height);range_start=stored_range.text.length-range.text.length;tab=t.value.substr(0,range_start).split("\n");range_start+=(line_start-tab.length)*2;t.selectionStart=range_start;range_end=t.selectionStart+range.text.length;tab=t.value.substr(0,range_start+range.text.length).split("\n");range_end+=(line_start+line_nb-1-tab.length)*2;t.selectionEnd=range_end;}}catch(e){}}setTimeout("get_IE_selection(document.getElementById('"+t.id+"'));",50);};function IE_textarea_focus(){event.srcElement.focused=true;}function IE_textarea_blur(){event.srcElement.focused=false;}function set_IE_selection(t){var nbLineStart,nbLineStart,nbLineEnd,range;if(!window.closed){nbLineStart=t.value.substr(0,t.selectionStart).split("\n").length-1;nbLineEnd=t.value.substr(0,t.selectionEnd).split("\n").length-1;try{range=document.selection.createRange();range.moveToElementText(t);range.setEndPoint('EndToStart',range);range.moveStart('character',t.selectionStart-nbLineStart);range.moveEnd('character',t.selectionEnd-nbLineEnd-(t.selectionStart-nbLineStart));range.select();}catch(e){}}};eAL.waiting_loading["elements_functions.js"]="loaded";
- EAL.prototype.start_resize_area=function(){var d=document,a,div,width,height,father;d.onmouseup=eAL.end_resize_area;d.onmousemove=eAL.resize_area;eAL.toggle(eAL.resize["id"]);a=eAs[eAL.resize["id"]]["textarea"];div=d.getElementById("edit_area_resize");if(!div){div=d.createElement("div");div.id="edit_area_resize";div.style.border="dashed #888888 1px";}width=a.offsetWidth-2;height=a.offsetHeight-2;div.style.display="block";div.style.width=width+"px";div.style.height=height+"px";father=a.parentNode;father.insertBefore(div,a);a.style.display="none";eAL.resize["start_top"]=calculeOffsetTop(div);eAL.resize["start_left"]=calculeOffsetLeft(div);};EAL.prototype.end_resize_area=function(e){var d=document,div,a,width,height;d.onmouseup="";d.onmousemove="";div=d.getElementById("edit_area_resize");a=eAs[eAL.resize["id"]]["textarea"];width=Math.max(eAs[eAL.resize["id"]]["settings"]["min_width"],div.offsetWidth-4);height=Math.max(eAs[eAL.resize["id"]]["settings"]["min_height"],div.offsetHeight-4);if(eAL.isIE==6){width-=2;height-=2;}a.style.width=width+"px";a.style.height=height+"px";div.style.display="none";a.style.display="inline";a.selectionStart=eAL.resize["selectionStart"];a.selectionEnd=eAL.resize["selectionEnd"];eAL.toggle(eAL.resize["id"]);return false;};EAL.prototype.resize_area=function(e){var allow,newHeight,newWidth;allow=eAs[eAL.resize["id"]]["settings"]["allow_resize"];if(allow=="both"||allow=="y"){newHeight=Math.max(20,getMouseY(e)-eAL.resize["start_top"]);document.getElementById("edit_area_resize").style.height=newHeight+"px";}if(allow=="both"||allow=="x"){newWidth=Math.max(20,getMouseX(e)-eAL.resize["start_left"]);document.getElementById("edit_area_resize").style.width=newWidth+"px";}return false;};eAL.waiting_loading["resize_area.js"]="loaded";
-       EAL.prototype.get_regexp=function(text_array){res="(\\b)(";for(i=0;i<text_array.length;i++){if(i>0)res+="|";res+=this.get_escaped_regexp(text_array[i]);}res+=")(\\b)";reg=new RegExp(res);return res;};EAL.prototype.get_escaped_regexp=function(str){return str.toString().replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\}|\{|\$|\^|\|)/g,"\\$1");};EAL.prototype.init_syntax_regexp=function(){var lang_style={};for(var lang in this.load_syntax){if(!this.syntax[lang]){this.syntax[lang]={};this.syntax[lang]["keywords_reg_exp"]={};this.keywords_reg_exp_nb=0;if(this.load_syntax[lang]['KEYWORDS']){param="g";if(this.load_syntax[lang]['KEYWORD_CASE_SENSITIVE']===false)param+="i";for(var i in this.load_syntax[lang]['KEYWORDS']){if(typeof(this.load_syntax[lang]['KEYWORDS'][i])=="function")continue;this.syntax[lang]["keywords_reg_exp"][i]=new RegExp(this.get_regexp(this.load_syntax[lang]['KEYWORDS'][i]),param);this.keywords_reg_exp_nb++;}}if(this.load_syntax[lang]['OPERATORS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['OPERATORS']){if(typeof(this.load_syntax[lang]['OPERATORS'][i])=="function")continue;if(nb>0)str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['OPERATORS'][i]);nb++;}if(str.length>0)this.syntax[lang]["operators_reg_exp"]=new RegExp("("+str+")","g");}if(this.load_syntax[lang]['DELIMITERS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['DELIMITERS']){if(typeof(this.load_syntax[lang]['DELIMITERS'][i])=="function")continue;if(nb>0)str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['DELIMITERS'][i]);nb++;}if(str.length>0)this.syntax[lang]["delimiters_reg_exp"]=new RegExp("("+str+")","g");}var syntax_trace=[];this.syntax[lang]["quotes"]={};var quote_tab=[];if(this.load_syntax[lang]['QUOTEMARKS']){for(var i in this.load_syntax[lang]['QUOTEMARKS']){if(typeof(this.load_syntax[lang]['QUOTEMARKS'][i])=="function")continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['QUOTEMARKS'][i]);this.syntax[lang]["quotes"][x]=x;quote_tab[quote_tab.length]="("+x+"(\\\\.|[^"+x+"])*(?:"+x+"|$))";syntax_trace.push(x);}}this.syntax[lang]["comments"]={};if(this.load_syntax[lang]['COMMENT_SINGLE']){for(var i in this.load_syntax[lang]['COMMENT_SINGLE']){if(typeof(this.load_syntax[lang]['COMMENT_SINGLE'][i])=="function")continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_SINGLE'][i]);quote_tab[quote_tab.length]="("+x+"(.|\\r|\\t)*(\\n|$))";syntax_trace.push(x);this.syntax[lang]["comments"][x]="\n";}}if(this.load_syntax[lang]['COMMENT_MULTI']){for(var i in this.load_syntax[lang]['COMMENT_MULTI']){if(typeof(this.load_syntax[lang]['COMMENT_MULTI'][i])=="function")continue;var start=this.get_escaped_regexp(i);var end=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_MULTI'][i]);quote_tab[quote_tab.length]="("+start+"(.|\\n|\\r)*?("+end+"|$))";syntax_trace.push(start);syntax_trace.push(end);this.syntax[lang]["comments"][i]=this.load_syntax[lang]['COMMENT_MULTI'][i];}}if(quote_tab.length>0)this.syntax[lang]["comment_or_quote_reg_exp"]=new RegExp("("+quote_tab.join("|")+")","gi");if(syntax_trace.length>0)this.syntax[lang]["syntax_trace_regexp"]=new RegExp("((.|\n)*?)(\\\\*("+syntax_trace.join("|")+"|$))","gmi");if(this.load_syntax[lang]['SCRIPT_DELIMITERS']){this.syntax[lang]["script_delimiters"]={};for(var i in this.load_syntax[lang]['SCRIPT_DELIMITERS']){if(typeof(this.load_syntax[lang]['SCRIPT_DELIMITERS'][i])=="function")continue;this.syntax[lang]["script_delimiters"][i]=this.load_syntax[lang]['SCRIPT_DELIMITERS'];}}this.syntax[lang]["custom_regexp"]={};if(this.load_syntax[lang]['REGEXPS']){for(var i in this.load_syntax[lang]['REGEXPS']){if(typeof(this.load_syntax[lang]['REGEXPS'][i])=="function")continue;var val=this.load_syntax[lang]['REGEXPS'][i];if(!this.syntax[lang]["custom_regexp"][val['execute']])this.syntax[lang]["custom_regexp"][val['execute']]={};this.syntax[lang]["custom_regexp"][val['execute']][i]={'regexp':new RegExp(val['search'],val['modifiers']),'class':val['class']};}}if(this.load_syntax[lang]['STYLES']){lang_style[lang]={};for(var i in this.load_syntax[lang]['STYLES']){if(typeof(this.load_syntax[lang]['STYLES'][i])=="function")continue;if(typeof(this.load_syntax[lang]['STYLES'][i])!="string"){for(var j in this.load_syntax[lang]['STYLES'][i]){lang_style[lang][j]=this.load_syntax[lang]['STYLES'][i][j];}}
-else{lang_style[lang][i]=this.load_syntax[lang]['STYLES'][i];}}}var style="";for(var i in lang_style[lang]){if(lang_style[lang][i].length>0){style+="."+lang+" ."+i.toLowerCase()+" span{"+lang_style[lang][i]+"}\n";style+="."+lang+" ."+i.toLowerCase()+"{"+lang_style[lang][i]+"}\n";}}this.syntax[lang]["styles"]=style;}}};eAL.waiting_loading["reg_syntax.js"]="loaded";
-var editAreaLoader= eAL;var editAreas=eAs;EditAreaLoader=EAL;editAreaLoader.iframe_script= "<script type='text/javascript'> Ã EA(){var t=Á;t.error=Ì;t.inlinePopup=[{popup_id:\"area_search_replace\",icon_id:\"search\"},{popup_id:\"edit_area_help\",icon_id:\"help\"}];t.plugins={};t.line_number=0;È.eAL.set_browser_infos(t);if(t.isIE >=8)t.isIE=7;t.É={};t.last_text_to_highlight=\"\";t.last_hightlighted_text=\"\";t.syntax_list=[];t.allready_used_syntax={};t.check_line_selection_timer=50;t.ÂFocused=Ì;t.highlight_selection_line=null;t.previous=[];t.next=[];t.last_undo=\"\";t.files={};t.filesIdAssoc={};t.curr_file='';t.assocBracket={};t.revertAssocBracket={};t.assocBracket[\"(\"]=\")\";t.assocBracket[\"{\"]=\"}\";t.assocBracket[\"[\"]=\"]\";for(var index in t.assocBracket){t.revertAssocBracket[t.assocBracket[index]]=index;}t.is_editable=Ë;t.lineHeight=16;t.tab_nb_char=8;if(t.isOpera)t.tab_nb_char=6;t.is_tabbing=Ì;t.fullscreen={'isFull':Ì};t.isResizing=Ì;t.id=area_id;t.Å=eAs[t.id][\"Å\"];if((\"\"+t.Å['replace_tab_by_spaces']).match(/^[0-9]+$/)){t.tab_nb_char=t.Å['replace_tab_by_spaces'];t.tabulation=\"\";for(var i=0;i<t.tab_nb_char;i++)t.tabulation+=\" \";}\nelse{t.tabulation=\"\t\";}if(t.Å[\"syntax_selection_allow\"]&&t.Å[\"syntax_selection_allow\"].Æ>0)t.syntax_list=t.Å[\"syntax_selection_allow\"].replace(/ /g,\"\").split(\",\");if(t.Å['syntax'])t.allready_used_syntax[t.Å['syntax']]=Ë;};EA.Ä.init=Ã(){var t=Á,a,s=t.Å;t.Â=_$(\"Â\");t.container=_$(\"container\");t.result=_$(\"result\");t.content_highlight=_$(\"content_highlight\");t.selection_field=_$(\"selection_field\");t.selection_field_text=_$(\"selection_field_text\");t.processing_screen=_$(\"processing\");t.editor_area=_$(\"editor\");t.tab_browsing_area=_$(\"tab_browsing_area\");t.test_font_size=_$(\"test_font_size\");a=t.Â;if(!s['is_editable'])t.set_editable(Ì);t.set_show_line_colors(s['show_line_colors']);if(syntax_selec=_$(\"syntax_selection\")){for(var i=0;i<t.syntax_list.Æ;i++){var syntax=t.syntax_list[i];var option=document.createElement(\"option\");option.Ê=syntax;if(syntax==s['syntax'])option.selected=\"selected\";option.innerHTML=t.get_translation(\"syntax_\"+syntax,\"word\");syntax_selec.appendChild(option);}}spans=È.getChildren(_$(\"toolbar_1\"),\"span\",\"\",\"\",\"all\",-1);for(var i=0;i<spans.Æ;i++){id=spans[i].id.replace(/tmp_tool_(.*)/,\"$1\");if(id!=spans[i].id){for(var j in t.plugins){if(typeof(t.plugins[j].get_control_html)==\"Ã\"){html=t.plugins[j].get_control_html(id);if(html!=Ì){html=t.get_translation(html,\"template\");var new_span=document.createElement(\"span\");new_span.innerHTML=html;var father=spans[i].ÈNode;spans[i].ÈNode.replaceChild(new_span,spans[i]);break;}}}}}if(s[\"debug\"]){t.debug=È.document.getElementById(\"edit_area_debug_\"+t.id);}if(_$(\"redo\")!=null)t.switchClassSticky(_$(\"redo\"),'editAreaButtonDisabled',Ë);if(typeof(È.eAL.syntax[s[\"syntax\"]])!=\"undefined\"){for(var i in È.eAL.syntax){if(typeof(È.eAL.syntax[i][\"Çs\"])!=\"undefined\"){t.add_Ç(È.eAL.syntax[i][\"Çs\"]);}}}if(t.isOpera)_$(\"editor\").onkeypress=keyDown;\nelse _$(\"editor\").onkeydown=keyDown;for(var i=0;i<t.inlinePopup.Æ;i++){if(t.isOpera)_$(t.inlinePopup[i][\"popup_id\"]).onkeypress=keyDown;\nelse _$(t.inlinePopup[i][\"popup_id\"]).onkeydown=keyDown;}if(s[\"allow_resize\"]==\"both\"||s[\"allow_resize\"]==\"x\"||s[\"allow_resize\"]==\"y\")t.allow_resize(Ë);È.eAL.toggle(t.id,\"on\");t.change_smooth_selection_mode(eA.smooth_selection);t.execCommand(\"change_highlight\",s[\"start_highlight\"]);t.set_font(eA.Å[\"font_family\"],eA.Å[\"font_size\"]);children=È.getChildren(document.body,\"\",\"selec\",\"none\",\"all\",-1);for(var i=0;i<children.Æ;i++){if(t.isIE)children[i].unselectable=Ë;\nelse children[i].onmousedown=Ã(){return Ì};}a.spellcheck=s[\"gecko_spellcheck\"];if(t.isFirefox >='3'){t.content_highlight.Ç.paddingLeft=\"1px\";t.selection_field.Ç.paddingLeft=\"1px\";t.selection_field_text.Ç.paddingLeft=\"1px\";}if(t.isIE&&t.isIE < 8){a.Ç.marginTop=\"-1px\";}if(t.isSafari){t.editor_area.Ç.position=\"absolute\";a.Ç.marginLeft=\"-3px\";if(t.isSafari < 3.2)a.Ç.marginTop=\"1px\";}È.eAL.add_event(t.result,\"click\",Ã(e){if((e.target||e.srcElement)==eA.result){eA.area_select(eA.Â.Ê.Æ,0);}});if(s['is_multi_files']!=Ì)t.open_file({'id':t.curr_file,'text':''});t.set_word_wrap(s['word_wrap']);setTimeout(\"eA.focus();eA.manage_size();eA.execCommand('EA_load');\",10);t.check_undo();t.check_line_selection(Ë);t.scroll_to_view();for(var i in t.plugins){if(typeof(t.plugins[i].onload)==\"Ã\")t.plugins[i].onload();}if(s['fullscreen']==Ë)t.toggle_full_screen(Ë);È.eAL.add_event(window,\"resize\",eA.update_size);È.eAL.add_event(È.window,\"resize\",eA.update_size);È.eAL.add_event(top.window,\"resize\",eA.update_size);È.eAL.add_event(window,\"unload\",Ã(){if(È.eAL){È.eAL.remove_event(È.window,\"resize\",eA.update_size);È.eAL.remove_event(top.window,\"resize\",eA.update_size);}if(eAs[eA.id]&&eAs[eA.id][\"displayed\"]){eA.execCommand(\"EA_unload\");}});};EA.Ä.update_size=Ã(){var d=document,pd=È.document,height,width,popup,maxLeft,maxTop;if(typeof eAs !='undefined'&&eAs[eA.id]&&eAs[eA.id][\"displayed\"]==Ë){if(eA.fullscreen['isFull']){pd.getElementById(\"frame_\"+eA.id).Ç.width=pd.getElementsByTagName(\"html\")[0].clientWidth+\"px\";pd.getElementById(\"frame_\"+eA.id).Ç.height=pd.getElementsByTagName(\"html\")[0].clientHeight+\"px\";}if(eA.tab_browsing_area.Ç.display=='block'&&(!eA.isIE||eA.isIE >=8)){eA.tab_browsing_area.Ç.height=\"0px\";eA.tab_browsing_area.Ç.height=(eA.result.offsetTop-eA.tab_browsing_area.offsetTop-1)+\"px\";}height=d.body.offsetHeight-eA.get_all_toolbar_height()-4;eA.result.Ç.height=height+\"px\";width=d.body.offsetWidth-2;eA.result.Ç.width=width+\"px\";for(i=0;i < eA.inlinePopup.Æ;i++){popup=_$(eA.inlinePopup[i][\"popup_id\"]);maxLeft=d.body.offsetWidth-popup.offsetWidth;maxTop=d.body.offsetHeight-popup.offsetHeight;if(popup.offsetTop > maxTop)popup.Ç.top=maxTop+\"px\";if(popup.offsetLeft > maxLeft)popup.Ç.left=maxLeft+\"px\";}eA.manage_size(Ë);eA.fixLinesHeight(eA.Â.Ê,0,-1);}};EA.Ä.manage_size=Ã(onlyOneTime){if(!eAs[Á.id])return Ì;if(eAs[Á.id][\"displayed\"]==Ë&&Á.ÂFocused){var area_height,resized=Ì;if(!Á.Å['word_wrap']){var area_width=Á.Â.scrollWidth;area_height=Á.Â.scrollHeight;if(Á.isOpera&&Á.isOpera < 9.6){area_width=10000;}if(Á.Â.previous_scrollWidth!=area_width){Á.container.Ç.width=area_width+\"px\";Á.Â.Ç.width=area_width+\"px\";Á.content_highlight.Ç.width=area_width+\"px\";Á.Â.previous_scrollWidth=area_width;resized=Ë;}}if(Á.Å['word_wrap']){newW=Á.Â.offsetWidth;if(Á.isFirefox||Á.isIE)newW-=2;if(Á.isSafari)newW-=6;Á.content_highlight.Ç.width=Á.selection_field_text.Ç.width=Á.selection_field.Ç.width=Á.test_font_size.Ç.width=newW+\"px\";}if(Á.isOpera||Á.isFirefox||Á.isSafari){area_height=Á.getLinePosTop(Á.É[\"nb_line\"]+1);}\nelse{area_height=Á.Â.scrollHeight;}if(Á.Â.previous_scrollHeight!=area_height){Á.container.Ç.height=(area_height+2)+\"px\";Á.Â.Ç.height=area_height+\"px\";Á.content_highlight.Ç.height=area_height+\"px\";Á.Â.previous_scrollHeight=area_height;resized=Ë;}if(Á.É[\"nb_line\"] >=Á.line_number){var newLines='',destDiv=_$(\"line_number\"),start=Á.line_number,end=Á.É[\"nb_line\"]+100;for(i=start+1;i < end;i++){newLines+='<div id=\"line_'+i+'\">'+i+\"</div>\";Á.line_number++;}destDiv.innerHTML=destDiv.innerHTML+newLines;Á.fixLinesHeight(Á.Â.Ê,start,-1);}Á.Â.scrollTop=\"0px\";Á.Â.scrollLeft=\"0px\";if(resized==Ë){Á.scroll_to_view();}}if(!onlyOneTime)setTimeout(\"eA.manage_size();\",100);};EA.Ä.execCommand=Ã(cmd,param){for(var i in Á.plugins){if(typeof(Á.plugins[i].execCommand)==\"Ã\"){if(!Á.plugins[i].execCommand(cmd,param))return;}}switch(cmd){case \"save\":if(Á.Å[\"save_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"save_callback\"]+\"('\"+Á.id+\"',eA.Â.Ê);\");break;case \"load\":if(Á.Å[\"load_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"load_callback\"]+\"('\"+Á.id+\"');\");break;case \"onchange\":if(Á.Å[\"change_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"change_callback\"]+\"('\"+Á.id+\"');\");break;case \"EA_load\":if(Á.Å[\"EA_load_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_load_callback\"]+\"('\"+Á.id+\"');\");break;case \"EA_unload\":if(Á.Å[\"EA_unload_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_unload_callback\"]+\"('\"+Á.id+\"');\");break;case \"toggle_on\":if(Á.Å[\"EA_toggle_on_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_toggle_on_callback\"]+\"('\"+Á.id+\"');\");break;case \"toggle_off\":if(Á.Å[\"EA_toggle_off_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_toggle_off_callback\"]+\"('\"+Á.id+\"');\");break;case \"re_sync\":if(!Á.do_highlight)break;case \"file_switch_on\":if(Á.Å[\"EA_file_switch_on_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_file_switch_on_callback\"]+\"(param);\");break;case \"file_switch_off\":if(Á.Å[\"EA_file_switch_off_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_file_switch_off_callback\"]+\"(param);\");break;case \"file_close\":if(Á.Å[\"EA_file_close_callback\"].Æ>0)return eval(\"È.\"+Á.Å[\"EA_file_close_callback\"]+\"(param);\");break;default:if(typeof(eval(\"eA.\"+cmd))==\"Ã\"){if(Á.Å[\"debug\"])eval(\"eA.\"+cmd+\"(param);\");\nelse try{eval(\"eA.\"+cmd+\"(param);\");}catch(e){};}}};EA.Ä.get_translation=Ã(word,mode){if(mode==\"template\")return È.eAL.translate(word,Á.Å[\"language\"],mode);\nelse return È.eAL.get_word_translation(word,Á.Å[\"language\"]);};EA.Ä.add_plugin=Ã(plug_name,plug_obj){for(var i=0;i<Á.Å[\"plugins\"].Æ;i++){if(Á.Å[\"plugins\"][i]==plug_name){Á.plugins[plug_name]=plug_obj;plug_obj.baseURL=È.eAL.baseURL+\"plugins/\"+plug_name+\"/\";if(typeof(plug_obj.init)==\"Ã\")plug_obj.init();}}};EA.Ä.load_css=Ã(url){try{link=document.createElement(\"link\");link.type=\"text/css\";link.rel=\"Çsheet\";link.media=\"all\";link.href=url;head=document.getElementsByTagName(\"head\");head[0].appendChild(link);}catch(e){document.write(\"<link href='\"+url+\"' rel='Çsheet' type='text/css' />\");}};EA.Ä.load_script=Ã(url){try{script=document.createElement(\"script\");script.type=\"text/javascript\";script.src=url;script.charset=\"UTF-8\";head=document.getElementsByTagName(\"head\");head[0].appendChild(script);}catch(e){document.write(\"<script type='text/javascript' src='\"+url+\"' charset=\\\"UTF-8\\\"><\"+\"/script>\");}};EA.Ä.add_lang=Ã(language,Ês){if(!È.eAL.lang[language])È.eAL.lang[language]={};for(var i in Ês)È.eAL.lang[language][i]=Ês[i];};à_$(id){return document.getElementById(id);};var eA=new EA();È.eAL.add_event(window,\"load\",init);àinit(){setTimeout(\"eA.init();\",10);};    EA.Ä.focus=Ã(){Á.Â.focus();Á.ÂFocused=Ë;};EA.Ä.check_line_selection=Ã(timer_checkup){var changes,infos,new_top,new_width,i;var t1=t2=t2_1=t3=tLines=tend=new Date().getTime();if(!eAs[Á.id])return Ì;if(!Á.smooth_selection&&!Á.do_highlight){}\nelse if(Á.ÂFocused&&eAs[Á.id][\"displayed\"]==Ë&&Á.isResizing==Ì){infos=Á.get_selection_infos();changes=Á.checkTextEvolution(typeof(Á.É['full_text'])=='undefined' ? '':Á.É['full_text'],infos['full_text']);t2=new Date().getTime();if(Á.É[\"line_start\"] !=infos[\"line_start\"]||Á.É[\"line_nb\"] !=infos[\"line_nb\"]||infos[\"full_text\"] !=Á.É[\"full_text\"]||Á.reload_highlight||Á.É[\"selectionStart\"] !=infos[\"selectionStart\"]||Á.É[\"selectionEnd\"] !=infos[\"selectionEnd\"]||!timer_checkup){new_top=Á.getLinePosTop(infos[\"line_start\"]);new_width=Math.max(Á.Â.scrollWidth,Á.container.clientWidth-50);Á.selection_field.Ç.top=Á.selection_field_text.Ç.top=new_top+\"px\";if(!Á.Å['word_wrap']){Á.selection_field.Ç.width=Á.selection_field_text.Ç.width=Á.test_font_size.Ç.width=new_width+\"px\";}if(Á.do_highlight==Ë){var curr_text=infos[\"full_text\"].split(\"\\n\");var content=\"\";var start=Math.max(0,infos[\"line_start\"]-1);var end=Math.min(curr_text.Æ,infos[\"line_start\"]+infos[\"line_nb\"]-1);for(i=start;i< end;i++){content+=curr_text[i]+\"\\n\";}selLength=infos['selectionEnd']-infos['selectionStart'];content=content.substr(0,infos[\"curr_pos\"]-1)+\"\\r\\r\"+content.substr(infos[\"curr_pos\"]-1,selLength)+\"\\r\\r\"+content.substr(infos[\"curr_pos\"]-1+selLength);content='<span>'+content.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(\"\\r\\r\",'</span><strong>').replace(\"\\r\\r\",'</strong><span>')+'</span>';if(Á.isIE||(Á.isOpera&&Á.isOpera < 9.6)){Á.selection_field.innerHTML=\"<pre>\"+content.replace(/^\\r?\\n/,\"<br>\")+\"</pre>\";}\nelse{Á.selection_field.innerHTML=content;}Á.selection_field_text.innerHTML=Á.selection_field.innerHTML;t2_1=new Date().getTime();if(Á.reload_highlight||(infos[\"full_text\"] !=Á.last_text_to_highlight&&(Á.É[\"line_start\"]!=infos[\"line_start\"]||Á.show_line_colors||Á.Å['word_wrap']||Á.É[\"line_nb\"]!=infos[\"line_nb\"]||Á.É[\"nb_line\"]!=infos[\"nb_line\"]))){Á.maj_highlight(infos);}}}t3=new Date().getTime();if(Á.Å['word_wrap']&&infos[\"full_text\"] !=Á.É[\"full_text\"]){if(changes.newText.split(\"\\n\").Æ==1&&Á.É['nb_line']&&infos['nb_line']==Á.É['nb_line']){Á.fixLinesHeight(infos['full_text'],changes.lineStart,changes.lineStart);}\nelse{Á.fixLinesHeight(infos['full_text'],changes.lineStart,-1);}}tLines=new Date().getTime();if(infos[\"line_start\"] !=Á.É[\"line_start\"]||infos[\"curr_pos\"] !=Á.É[\"curr_pos\"]||infos[\"full_text\"].Æ!=Á.É[\"full_text\"].Æ||Á.reload_highlight||!timer_checkup){var selec_char=infos[\"curr_line\"].charAt(infos[\"curr_pos\"]-1);var no_real_move=Ë;if(infos[\"line_nb\"]==1&&(Á.assocBracket[selec_char]||Á.revertAssocBracket[selec_char])){no_real_move=Ì;if(Á.findEndBracket(infos,selec_char)===Ë){_$(\"end_bracket\").Ç.visibility=\"visible\";_$(\"cursor_pos\").Ç.visibility=\"visible\";_$(\"cursor_pos\").innerHTML=selec_char;_$(\"end_bracket\").innerHTML=(Á.assocBracket[selec_char]||Á.revertAssocBracket[selec_char]);}\nelse{_$(\"end_bracket\").Ç.visibility=\"hidden\";_$(\"cursor_pos\").Ç.visibility=\"hidden\";}}\nelse{_$(\"cursor_pos\").Ç.visibility=\"hidden\";_$(\"end_bracket\").Ç.visibility=\"hidden\";}Á.displayToCursorPosition(\"cursor_pos\",infos[\"line_start\"],infos[\"curr_pos\"]-1,infos[\"curr_line\"],no_real_move);if(infos[\"line_nb\"]==1&&infos[\"line_start\"]!=Á.É[\"line_start\"])Á.scroll_to_view();}Á.É=infos;}tend=new Date().getTime();if(timer_checkup){setTimeout(\"eA.check_line_selection(Ë)\",Á.check_line_selection_timer);}};EA.Ä.get_selection_infos=Ã(){var sel={},start,end,len,str;Á.getIESelection();start=Á.Â.selectionStart;end=Á.Â.selectionEnd;if(Á.É[\"selectionStart\"]==start&&Á.É[\"selectionEnd\"]==end&&Á.É[\"full_text\"]==Á.Â.Ê){return Á.É;}if(Á.tabulation!=\"\t\"&&Á.Â.Ê.indexOf(\"\t\")!=-1){len=Á.Â.Ê.Æ;Á.Â.Ê=Á.replace_tab(Á.Â.Ê);start=end=start+(Á.Â.Ê.Æ-len);Á.area_select(start,0);}sel[\"selectionStart\"]=start;sel[\"selectionEnd\"]=end;sel[\"full_text\"]=Á.Â.Ê;sel[\"line_start\"]=1;sel[\"line_nb\"]=1;sel[\"curr_pos\"]=0;sel[\"curr_line\"]=\"\";sel[\"indexOfCursor\"]=0;sel[\"selec_direction\"]=Á.É[\"selec_direction\"];var splitTab=sel[\"full_text\"].split(\"\\n\");var nbLine=Math.max(0,splitTab.Æ);var nbChar=Math.max(0,sel[\"full_text\"].Æ-(nbLine-1));if(sel[\"full_text\"].indexOf(\"\\r\")!=-1)nbChar=nbChar-(nbLine-1);sel[\"nb_line\"]=nbLine;sel[\"nb_char\"]=nbChar;if(start>0){str=sel[\"full_text\"].substr(0,start);sel[\"curr_pos\"]=start-str.lastIndexOf(\"\\n\");sel[\"line_start\"]=Math.max(1,str.split(\"\\n\").Æ);}\nelse{sel[\"curr_pos\"]=1;}if(end>start){sel[\"line_nb\"]=sel[\"full_text\"].substring(start,end).split(\"\\n\").Æ;}sel[\"indexOfCursor\"]=start;sel[\"curr_line\"]=splitTab[Math.max(0,sel[\"line_start\"]-1)];if(sel[\"selectionStart\"]==Á.É[\"selectionStart\"]){if(sel[\"selectionEnd\"]>Á.É[\"selectionEnd\"])sel[\"selec_direction\"]=\"down\";\nelse if(sel[\"selectionEnd\"]==Á.É[\"selectionStart\"])sel[\"selec_direction\"]=Á.É[\"selec_direction\"];}\nelse if(sel[\"selectionStart\"]==Á.É[\"selectionEnd\"]&&sel[\"selectionEnd\"]>Á.É[\"selectionEnd\"]){sel[\"selec_direction\"]=\"down\";}\nelse{sel[\"selec_direction\"]=\"up\";}_$(\"nbLine\").innerHTML=nbLine;_$(\"nbChar\").innerHTML=nbChar;_$(\"linePos\").innerHTML=sel[\"line_start\"];_$(\"currPos\").innerHTML=sel[\"curr_pos\"];return sel;};EA.Ä.getIESelection=Ã(){var selectionStart,selectionEnd,range,stored_range;if(!Á.isIE)return Ì;if(Á.Å['word_wrap'])Á.Â.wrap='off';try{range=document.selection.createRange();stored_range=range.duplicate();stored_range.moveToElementText(Á.Â);stored_range.setEndPoint('EndToEnd',range);if(stored_range.ÈElement()!=Á.Â)throw \"invalid focus\";var scrollTop=Á.result.scrollTop+document.body.scrollTop;var relative_top=range.offsetTop-È.calculeOffsetTop(Á.Â)+scrollTop;var line_start=Math.round((relative_top / Á.lineHeight)+1);var line_nb=Math.round(range.boundingHeight / Á.lineHeight);selectionStart=stored_range.text.Æ-range.text.Æ;selectionStart+=(line_start-Á.Â.Ê.substr(0,selectionStart).split(\"\\n\").Æ)*2;selectionStart-=(line_start-Á.Â.Ê.substr(0,selectionStart).split(\"\\n\").Æ)* 2;selectionEnd=selectionStart+range.text.Æ;selectionEnd+=(line_start+line_nb-1-Á.Â.Ê.substr(0,selectionEnd).split(\"\\n\").Æ)*2;Á.Â.selectionStart=selectionStart;Á.Â.selectionEnd=selectionEnd;}catch(e){}if(Á.Å['word_wrap'])Á.Â.wrap='soft';};EA.Ä.setIESelection=Ã(){var a=Á.Â,nbLineStart,nbLineEnd,range;if(!Á.isIE)return Ì;nbLineStart=a.Ê.substr(0,a.selectionStart).split(\"\\n\").Æ-1;nbLineEnd=a.Ê.substr(0,a.selectionEnd).split(\"\\n\").Æ-1;range=document.selection.createRange();range.moveToElementText(a);range.setEndPoint('EndToStart',range);range.moveStart('character',a.selectionStart-nbLineStart);range.moveEnd('character',a.selectionEnd-nbLineEnd-(a.selectionStart-nbLineStart));range.select();};EA.Ä.checkTextEvolution=Ã(lastText,newText){var ch={},baseStep=200,cpt=0,end,step,tStart=new Date().getTime();end=Math.min(newText.Æ,lastText.Æ);step=baseStep;while(cpt<end&&step>=1){if(lastText.substr(cpt,step)==newText.substr(cpt,step)){cpt+=step;}\nelse{step=Math.floor(step/2);}}ch.posStart=cpt;ch.lineStart=newText.substr(0,ch.posStart).split(\"\\n\").Æ-1;cpt_last=lastText.Æ;cpt=newText.Æ;step=baseStep;while(cpt>=0&&cpt_last>=0&&step>=1){if(lastText.substr(cpt_last-step,step)==newText.substr(cpt-step,step)){cpt-=step;cpt_last-=step;}\nelse{step=Math.floor(step/2);}}ch.posNewEnd=cpt;ch.posLastEnd=cpt_last;if(ch.posNewEnd<=ch.posStart){if(lastText.Æ < newText.Æ){ch.posNewEnd=ch.posStart+newText.Æ-lastText.Æ;ch.posLastEnd=ch.posStart;}\nelse{ch.posLastEnd=ch.posStart+lastText.Æ-newText.Æ;ch.posNewEnd=ch.posStart;}}ch.newText=newText.substring(ch.posStart,ch.posNewEnd);ch.lastText=lastText.substring(ch.posStart,ch.posLastEnd);ch.lineNewEnd=newText.substr(0,ch.posNewEnd).split(\"\\n\").Æ-1;ch.lineLastEnd=lastText.substr(0,ch.posLastEnd).split(\"\\n\").Æ-1;ch.newTextLine=newText.split(\"\\n\").slice(ch.lineStart,ch.lineNewEnd+1).join(\"\\n\");ch.lastTextLine=lastText.split(\"\\n\").slice(ch.lineStart,ch.lineLastEnd+1).join(\"\\n\");return ch;};EA.Ä.tab_selection=Ã(){if(Á.is_tabbing)return;Á.is_tabbing=Ë;Á.getIESelection();var start=Á.Â.selectionStart;var end=Á.Â.selectionEnd;var insText=Á.Â.Ê.substring(start,end);var pos_start=start;var pos_end=end;if(insText.Æ==0){Á.Â.Ê=Á.Â.Ê.substr(0,start)+Á.tabulation+Á.Â.Ê.substr(end);pos_start=start+Á.tabulation.Æ;pos_end=pos_start;}\nelse{start=Math.max(0,Á.Â.Ê.substr(0,start).lastIndexOf(\"\\n\")+1);endText=Á.Â.Ê.substr(end);startText=Á.Â.Ê.substr(0,start);tmp=Á.Â.Ê.substring(start,end).split(\"\\n\");insText=Á.tabulation+tmp.join(\"\\n\"+Á.tabulation);Á.Â.Ê=startText+insText+endText;pos_start=start;pos_end=Á.Â.Ê.indexOf(\"\\n\",startText.Æ+insText.Æ);if(pos_end==-1)pos_end=Á.Â.Ê.Æ;}Á.Â.selectionStart=pos_start;Á.Â.selectionEnd=pos_end;if(Á.isIE){Á.setIESelection();setTimeout(\"eA.is_tabbing=Ì;\",100);}\nelse{Á.is_tabbing=Ì;}};EA.Ä.invert_tab_selection=Ã(){var t=Á,a=Á.Â;if(t.is_tabbing)return;t.is_tabbing=Ë;t.getIESelection();var start=a.selectionStart;var end=a.selectionEnd;var insText=a.Ê.substring(start,end);var pos_start=start;var pos_end=end;if(insText.Æ==0){if(a.Ê.substring(start-t.tabulation.Æ,start)==t.tabulation){a.Ê=a.Ê.substr(0,start-t.tabulation.Æ)+a.Ê.substr(end);pos_start=Math.max(0,start-t.tabulation.Æ);pos_end=pos_start;}}\nelse{start=a.Ê.substr(0,start).lastIndexOf(\"\\n\")+1;endText=a.Ê.substr(end);startText=a.Ê.substr(0,start);tmp=a.Ê.substring(start,end).split(\"\\n\");insText=\"\";for(i=0;i<tmp.Æ;i++){for(j=0;j<t.tab_nb_char;j++){if(tmp[i].charAt(0)==\"\t\"){tmp[i]=tmp[i].substr(1);j=t.tab_nb_char;}\nelse if(tmp[i].charAt(0)==\" \")tmp[i]=tmp[i].substr(1);}insText+=tmp[i];if(i<tmp.Æ-1)insText+=\"\\n\";}a.Ê=startText+insText+endText;pos_start=start;pos_end=a.Ê.indexOf(\"\\n\",startText.Æ+insText.Æ);if(pos_end==-1)pos_end=a.Ê.Æ;}a.selectionStart=pos_start;a.selectionEnd=pos_end;if(t.isIE){t.setIESelection();setTimeout(\"eA.is_tabbing=Ì;\",100);}\nelse t.is_tabbing=Ì;};EA.Ä.press_enter=Ã(){if(!Á.smooth_selection)return Ì;Á.getIESelection();var scrollTop=Á.result.scrollTop;var scrollLeft=Á.result.scrollLeft;var start=Á.Â.selectionStart;var end=Á.Â.selectionEnd;var start_last_line=Math.max(0,Á.Â.Ê.substring(0,start).lastIndexOf(\"\\n\")+1);var begin_line=Á.Â.Ê.substring(start_last_line,start).replace(/^([ \t]*).*/gm,\"$1\");var lineStart=Á.Â.Ê.substring(0,start).split(\"\\n\").Æ;if(begin_line==\"\\n\"||begin_line==\"\\r\"||begin_line.Æ==0){return Ì;}if(Á.isIE||(Á.isOpera&&Á.isOpera < 9.6)){begin_line=\"\\r\\n\"+begin_line;}\nelse{begin_line=\"\\n\"+begin_line;}Á.Â.Ê=Á.Â.Ê.substring(0,start)+begin_line+Á.Â.Ê.substring(end);Á.area_select(start+begin_line.Æ,0);if(Á.isIE){Á.result.scrollTop=scrollTop;Á.result.scrollLeft=scrollLeft;}return Ë;};EA.Ä.findEndBracket=Ã(infos,bracket){var start=infos[\"indexOfCursor\"];var normal_order=Ë;if(Á.assocBracket[bracket])endBracket=Á.assocBracket[bracket];\nelse if(Á.revertAssocBracket[bracket]){endBracket=Á.revertAssocBracket[bracket];normal_order=Ì;}var end=-1;var nbBracketOpen=0;for(var i=start;i<infos[\"full_text\"].Æ&&i>=0;){if(infos[\"full_text\"].charAt(i)==endBracket){nbBracketOpen--;if(nbBracketOpen<=0){end=i;break;}}\nelse if(infos[\"full_text\"].charAt(i)==bracket)nbBracketOpen++;if(normal_order)i++;\nelse i--;}if(end==-1)return Ì;var endLastLine=infos[\"full_text\"].substr(0,end).lastIndexOf(\"\\n\");if(endLastLine==-1)line=1;\nelse line=infos[\"full_text\"].substr(0,endLastLine).split(\"\\n\").Æ+1;var curPos=end-endLastLine-1;var endLineLength=infos[\"full_text\"].substring(end).split(\"\\n\")[0].Æ;Á.displayToCursorPosition(\"end_bracket\",line,curPos,infos[\"full_text\"].substring(endLastLine+1,end+endLineLength));return Ë;};EA.Ä.displayToCursorPosition=Ã(id,start_line,cur_pos,lineContent,no_real_move){var elem,dest,content,posLeft=0,posTop,fixPadding,topOffset,endElem;elem=Á.test_font_size;dest=_$(id);content=\"<span id='test_font_size_inner'>\"+lineContent.substr(0,cur_pos).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\")+\"</span><span id='endTestFont'>\"+lineContent.substr(cur_pos).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\")+\"</span>\";if(Á.isIE||(Á.isOpera&&Á.isOpera < 9.6)){elem.innerHTML=\"<pre>\"+content.replace(/^\\r?\\n/,\"<br>\")+\"</pre>\";}\nelse{elem.innerHTML=content;}endElem=_$('endTestFont');topOffset=endElem.offsetTop;fixPadding=parseInt(Á.content_highlight.Ç.paddingLeft.replace(\"px\",\"\"));posLeft=45+endElem.offsetLeft+(!isNaN(fixPadding)&&topOffset > 0 ? fixPadding:0);posTop=Á.getLinePosTop(start_line)+topOffset;if(Á.isIE&&cur_pos > 0&&endElem.offsetLeft==0){posTop+=Á.lineHeight;}if(no_real_move!=Ë){dest.Ç.top=posTop+\"px\";dest.Ç.left=posLeft+\"px\";}dest.cursor_top=posTop;dest.cursor_left=posLeft;};EA.Ä.getLinePosTop=Ã(start_line){var elem=_$('line_'+start_line),posTop=0;if(elem)posTop=elem.offsetTop;\nelse posTop=Á.lineHeight *(start_line-1);return posTop;};EA.Ä.getTextHeight=Ã(text){var t=Á,elem,height;elem=t.test_font_size;content=text.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\");if(t.isIE||(Á.isOpera&&Á.isOpera < 9.6)){elem.innerHTML=\"<pre>\"+content.replace(/^\\r?\\n/,\"<br>\")+\"</pre>\";}\nelse{elem.innerHTML=content;}height=elem.offsetHeight;height=Math.max(1,Math.floor(elem.offsetHeight / Á.lineHeight))* Á.lineHeight;return height;};EA.Ä.fixLinesHeight=Ã(textValue,lineStart,lineEnd){var aText=textValue.split(\"\\n\");if(lineEnd==-1)lineEnd=aText.Æ-1;for(var i=Math.max(0,lineStart);i <=lineEnd;i++){if(elem=_$('line_'+(i+1))){elem.Ç.height=typeof(aText[i])!=\"undefined\" ? Á.getTextHeight(aText[i])+\"px\":Á.lineHeight;}}};EA.Ä.area_select=Ã(start,Æ){Á.Â.focus();start=Math.max(0,Math.min(Á.Â.Ê.Æ,start));end=Math.max(start,Math.min(Á.Â.Ê.Æ,start+Æ));if(Á.isIE){Á.Â.selectionStart=start;Á.Â.selectionEnd=end;Á.setIESelection();}\nelse{if(Á.isOpera&&Á.isOpera < 9.6){Á.Â.setSelectionRange(0,0);}Á.Â.setSelectionRange(start,end);}Á.check_line_selection();};EA.Ä.area_get_selection=Ã(){var text=\"\";if(document.selection){var range=document.selection.createRange();text=range.text;}\nelse{text=Á.Â.Ê.substring(Á.Â.selectionStart,Á.Â.selectionEnd);}return text;}; EA.Ä.replace_tab=Ã(text){return text.replace(/((\\n?)([^\t\\n]*)\t)/gi,eA.smartTab);};EA.Ä.smartTab=Ã(){val=\"                   \";return EA.Ä.smartTab.arguments[2]+EA.Ä.smartTab.arguments[3]+val.substr(0,eA.tab_nb_char-(EA.Ä.smartTab.arguments[3].Æ)%eA.tab_nb_char);};EA.Ä.show_waiting_screen=Ã(){width=Á.editor_area.offsetWidth;height=Á.editor_area.offsetHeight;if(!(Á.isIE&&Á.isIE<6)){width-=2;height-=2;}Á.processing_screen.Ç.display=\"block\";Á.processing_screen.Ç.width=width+\"px\";Á.processing_screen.Ç.height=height+\"px\";Á.waiting_screen_displayed=Ë;};EA.Ä.hide_waiting_screen=Ã(){Á.processing_screen.Ç.display=\"none\";Á.waiting_screen_displayed=Ì;};EA.Ä.add_Ç=Ã(Çs){if(Çs.Æ>0){newcss=document.createElement(\"Ç\");newcss.type=\"text/css\";newcss.media=\"all\";if(newcss.ÇSheet){newcss.ÇSheet.cssText=Çs;}\nelse{newcss.appendChild(document.createTextNode(Çs));}document.getElementsByTagName(\"head\")[0].appendChild(newcss);}};EA.Ä.set_font=Ã(family,size){var t=Á,a=Á.Â,s=Á.Å,elem_font,i,elem;var elems=[\"Â\",\"content_highlight\",\"cursor_pos\",\"end_bracket\",\"selection_field\",\"selection_field_text\",\"line_number\"];if(family&&family!=\"\")s[\"font_family\"]=family;if(size&&size>0)s[\"font_size\"]=size;if(t.isOpera&&t.isOpera < 9.6)s['font_family']=\"monospace\";if(elem_font=_$(\"area_font_size\")){for(i=0;i < elem_font.Æ;i++){if(elem_font.options[i].Ê&&elem_font.options[i].Ê==s[\"font_size\"])elem_font.options[i].selected=Ë;}}if(t.isFirefox){var nbTry=3;do{var div1=document.createElement('div'),text1=document.createElement('Â');var Çs={width:'40px',overflow:'scroll',zIndex:50,visibility:'hidden',fontFamily:s[\"font_family\"],fontSize:s[\"font_size\"]+\"pt\",lineHeight:t.lineHeight+\"px\",padding:'0',margin:'0',border:'none',whiteSpace:'nowrap'};var diff,changed=Ì;for(i in Çs){div1.Ç[ i ]=Çs[i];text1.Ç[ i ]=Çs[i];}text1.wrap='off';text1.setAttribute('wrap','off');t.container.appendChild(div1);t.container.appendChild(text1);div1.innerHTML=text1.Ê='azertyuiopqsdfghjklm';div1.innerHTML=text1.Ê=text1.Ê+'wxcvbn^p*ù$!:;,,';diff=text1.scrollWidth-div1.scrollWidth;if(Math.abs(diff)>=2){s[\"font_size\"]++;changed=Ë;}t.container.removeChild(div1);t.container.removeChild(text1);nbTry--;}while(changed&&nbTry > 0);}elem=t.test_font_size;elem.Ç.fontFamily=\"\"+s[\"font_family\"];elem.Ç.fontSize=s[\"font_size\"]+\"pt\";elem.innerHTML=\"0\";t.lineHeight=elem.offsetHeight;for(i=0;i<elems.Æ;i++){elem=_$(elems[i]);elem.Ç.fontFamily=s[\"font_family\"];elem.Ç.fontSize=s[\"font_size\"]+\"pt\";elem.Ç.lineHeight=t.lineHeight+\"px\";}t.add_Ç(\"pre{font-family:\"+s[\"font_family\"]+\"}\");if((t.isOpera&&t.isOpera < 9.6)||t.isIE >=8){var parNod=a.ÈNode,nxtSib=a.nextSibling,start=a.selectionStart,end=a.selectionEnd;parNod.removeChild(a);parNod.insertBefore(a,nxtSib);t.area_select(start,end-start);}Á.focus();Á.update_size();Á.check_line_selection();};EA.Ä.change_font_size=Ã(){var size=_$(\"area_font_size\").Ê;if(size>0)Á.set_font(\"\",size);};EA.Ä.open_inline_popup=Ã(popup_id){Á.close_all_inline_popup();var popup=_$(popup_id);var editor=_$(\"editor\");for(var i=0;i<Á.inlinePopup.Æ;i++){if(Á.inlinePopup[i][\"popup_id\"]==popup_id){var icon=_$(Á.inlinePopup[i][\"icon_id\"]);if(icon){Á.switchClassSticky(icon,'editAreaButtonSelected',Ë);break;}}}popup.Ç.height=\"auto\";popup.Ç.overflow=\"visible\";if(document.body.offsetHeight< popup.offsetHeight){popup.Ç.height=(document.body.offsetHeight-10)+\"px\";popup.Ç.overflow=\"auto\";}if(!popup.positionned){var new_left=editor.offsetWidth /2-popup.offsetWidth /2;var new_top=editor.offsetHeight /2-popup.offsetHeight /2;popup.Ç.left=new_left+\"px\";popup.Ç.top=new_top+\"px\";popup.positionned=Ë;}popup.Ç.visibility=\"visible\";};EA.Ä.close_inline_popup=Ã(popup_id){var popup=_$(popup_id);for(var i=0;i<Á.inlinePopup.Æ;i++){if(Á.inlinePopup[i][\"popup_id\"]==popup_id){var icon=_$(Á.inlinePopup[i][\"icon_id\"]);if(icon){Á.switchClassSticky(icon,'editAreaButtonNormal',Ì);break;}}}popup.Ç.visibility=\"hidden\";};EA.Ä.close_all_inline_popup=Ã(e){for(var i=0;i<Á.inlinePopup.Æ;i++){Á.close_inline_popup(Á.inlinePopup[i][\"popup_id\"]);}Á.Â.focus();};EA.Ä.show_help=Ã(){Á.open_inline_popup(\"edit_area_help\");};EA.Ä.new_document=Ã(){Á.Â.Ê=\"\";Á.area_select(0,0);};EA.Ä.get_all_toolbar_height=Ã(){var area=_$(\"editor\");var results=È.getChildren(area,\"div\",\"class\",\"area_toolbar\",\"all\",\"0\");var height=0;for(var i=0;i<results.Æ;i++){height+=results[i].offsetHeight;}return height;};EA.Ä.go_to_line=Ã(line){if(!line){var icon=_$(\"go_to_line\");if(icon !=null){Á.restoreClass(icon);Á.switchClassSticky(icon,'editAreaButtonSelected',Ë);}line=prompt(Á.get_translation(\"go_to_line_prompt\"));if(icon !=null)Á.switchClassSticky(icon,'editAreaButtonNormal',Ì);}if(line&&line!=null&&line.search(/^[0-9]+$/)!=-1){var start=0;var lines=Á.Â.Ê.split(\"\\n\");if(line > lines.Æ)start=Á.Â.Ê.Æ;\nelse{for(var i=0;i<Math.min(line-1,lines.Æ);i++)start+=lines[i].Æ+1;}Á.area_select(start,0);}};EA.Ä.change_smooth_selection_mode=Ã(setTo){if(Á.do_highlight)return;if(setTo !=null){if(setTo===Ì)Á.smooth_selection=Ë;\nelse Á.smooth_selection=Ì;}var icon=_$(\"change_smooth_selection\");Á.Â.focus();if(Á.smooth_selection===Ë){Á.switchClassSticky(icon,'editAreaButtonNormal',Ì);Á.smooth_selection=Ì;Á.selection_field.Ç.display=\"none\";_$(\"cursor_pos\").Ç.display=\"none\";_$(\"end_bracket\").Ç.display=\"none\";}\nelse{Á.switchClassSticky(icon,'editAreaButtonSelected',Ì);Á.smooth_selection=Ë;Á.selection_field.Ç.display=\"block\";_$(\"cursor_pos\").Ç.display=\"block\";_$(\"end_bracket\").Ç.display=\"block\";}};EA.Ä.scroll_to_view=Ã(show){var zone,lineElem;if(!Á.smooth_selection)return;zone=_$(\"result\");var cursor_pos_top=_$(\"cursor_pos\").cursor_top;if(show==\"bottom\"){cursor_pos_top+=Á.getLinePosTop(Á.É['line_start']+Á.É['line_nb']-1);}var max_height_visible=zone.clientHeight+zone.scrollTop;var miss_top=cursor_pos_top+Á.lineHeight-max_height_visible;if(miss_top>0){zone.scrollTop=zone.scrollTop+miss_top;}\nelse if(zone.scrollTop > cursor_pos_top){zone.scrollTop=cursor_pos_top;}var cursor_pos_left=_$(\"cursor_pos\").cursor_left;var max_width_visible=zone.clientWidth+zone.scrollLeft;var miss_left=cursor_pos_left+10-max_width_visible;if(miss_left>0){zone.scrollLeft=zone.scrollLeft+miss_left+50;}\nelse if(zone.scrollLeft > cursor_pos_left){zone.scrollLeft=cursor_pos_left;}\nelse if(zone.scrollLeft==45){zone.scrollLeft=0;}};EA.Ä.check_undo=Ã(only_once){if(!eAs[Á.id])return Ì;if(Á.ÂFocused&&eAs[Á.id][\"displayed\"]==Ë){var text=Á.Â.Ê;if(Á.previous.Æ<=1)Á.switchClassSticky(_$(\"undo\"),'editAreaButtonDisabled',Ë);if(!Á.previous[Á.previous.Æ-1]||Á.previous[Á.previous.Æ-1][\"text\"] !=text){Á.previous.push({\"text\":text,\"selStart\":Á.Â.selectionStart,\"selEnd\":Á.Â.selectionEnd});if(Á.previous.Æ > Á.Å[\"max_undo\"]+1)Á.previous.shift();}if(Á.previous.Æ >=2)Á.switchClassSticky(_$(\"undo\"),'editAreaButtonNormal',Ì);}if(!only_once)setTimeout(\"eA.check_undo()\",3000);};EA.Ä.undo=Ã(){if(Á.previous.Æ > 0){Á.getIESelection();Á.next.push({\"text\":Á.Â.Ê,\"selStart\":Á.Â.selectionStart,\"selEnd\":Á.Â.selectionEnd});var prev=Á.previous.pop();if(prev[\"text\"]==Á.Â.Ê&&Á.previous.Æ > 0)prev=Á.previous.pop();Á.Â.Ê=prev[\"text\"];Á.last_undo=prev[\"text\"];Á.area_select(prev[\"selStart\"],prev[\"selEnd\"]-prev[\"selStart\"]);Á.switchClassSticky(_$(\"redo\"),'editAreaButtonNormal',Ì);Á.resync_highlight(Ë);Á.check_file_changes();}};EA.Ä.redo=Ã(){if(Á.next.Æ > 0){var next=Á.next.pop();Á.previous.push(next);Á.Â.Ê=next[\"text\"];Á.last_undo=next[\"text\"];Á.area_select(next[\"selStart\"],next[\"selEnd\"]-next[\"selStart\"]);Á.switchClassSticky(_$(\"undo\"),'editAreaButtonNormal',Ì);Á.resync_highlight(Ë);Á.check_file_changes();}if(Á.next.Æ==0)Á.switchClassSticky(_$(\"redo\"),'editAreaButtonDisabled',Ë);};EA.Ä.check_redo=Ã(){if(eA.next.Æ==0||eA.Â.Ê!=eA.last_undo){eA.next=[];eA.switchClassSticky(_$(\"redo\"),'editAreaButtonDisabled',Ë);}\nelse{Á.switchClassSticky(_$(\"redo\"),'editAreaButtonNormal',Ì);}};EA.Ä.switchClass=Ã(element,class_name,lock_state){var lockChanged=Ì;if(typeof(lock_state)!=\"undefined\"&&element !=null){element.classLock=lock_state;lockChanged=Ë;}if(element !=null&&(lockChanged||!element.classLock)){element.oldClassName=element.className;element.className=class_name;}};EA.Ä.restoreAndSwitchClass=Ã(element,class_name){if(element !=null&&!element.classLock){Á.restoreClass(element);Á.switchClass(element,class_name);}};EA.Ä.restoreClass=Ã(element){if(element !=null&&element.oldClassName&&!element.classLock){element.className=element.oldClassName;element.oldClassName=null;}};EA.Ä.setClassLock=Ã(element,lock_state){if(element !=null)element.classLock=lock_state;};EA.Ä.switchClassSticky=Ã(element,class_name,lock_state){var lockChanged=Ì;if(typeof(lock_state)!=\"undefined\"&&element !=null){element.classLock=lock_state;lockChanged=Ë;}if(element !=null&&(lockChanged||!element.classLock)){element.className=class_name;element.oldClassName=class_name;}};EA.Ä.scroll_page=Ã(params){var dir=params[\"dir\"],shift_pressed=params[\"shift\"];var lines=Á.Â.Ê.split(\"\\n\");var new_pos=0,Æ=0,char_left=0,line_nb=0,curLine=0;var toScrollAmount=_$(\"result\").clientHeight-30;var nbLineToScroll=0,diff=0;if(dir==\"up\"){nbLineToScroll=Math.ceil(toScrollAmount / Á.lineHeight);for(i=Á.É[\"line_start\"];i-diff > Á.É[\"line_start\"]-nbLineToScroll;i--){if(elem=_$('line_'+i)){diff+=Math.floor((elem.offsetHeight-1)/ Á.lineHeight);}}nbLineToScroll-=diff;if(Á.É[\"selec_direction\"]==\"up\"){for(line_nb=0;line_nb< Math.min(Á.É[\"line_start\"]-nbLineToScroll,lines.Æ);line_nb++){new_pos+=lines[line_nb].Æ+1;}char_left=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É[\"curr_pos\"]-1);if(shift_pressed)Æ=Á.É[\"selectionEnd\"]-new_pos-char_left;Á.area_select(new_pos+char_left,Æ);view=\"top\";}\nelse{view=\"bottom\";for(line_nb=0;line_nb< Math.min(Á.É[\"line_start\"]+Á.É[\"line_nb\"]-1-nbLineToScroll,lines.Æ);line_nb++){new_pos+=lines[line_nb].Æ+1;}char_left=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É[\"curr_pos\"]-1);if(shift_pressed){start=Math.min(Á.É[\"selectionStart\"],new_pos+char_left);Æ=Math.max(new_pos+char_left,Á.É[\"selectionStart\"])-start;if(new_pos+char_left < Á.É[\"selectionStart\"])view=\"top\";}\nelse start=new_pos+char_left;Á.area_select(start,Æ);}}\nelse{var nbLineToScroll=Math.floor(toScrollAmount / Á.lineHeight);for(i=Á.É[\"line_start\"];i+diff < Á.É[\"line_start\"]+nbLineToScroll;i++){if(elem=_$('line_'+i)){diff+=Math.floor((elem.offsetHeight-1)/ Á.lineHeight);}}nbLineToScroll-=diff;if(Á.É[\"selec_direction\"]==\"down\"){view=\"bottom\";for(line_nb=0;line_nb< Math.min(Á.É[\"line_start\"]+Á.É[\"line_nb\"]-2+nbLineToScroll,lines.Æ);line_nb++){if(line_nb==Á.É[\"line_start\"]-1)char_left=Á.É[\"selectionStart\"]-new_pos;new_pos+=lines[line_nb].Æ+1;}if(shift_pressed){Æ=Math.abs(Á.É[\"selectionStart\"]-new_pos);Æ+=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É[\"curr_pos\"]);Á.area_select(Math.min(Á.É[\"selectionStart\"],new_pos),Æ);}\nelse{Á.area_select(new_pos+char_left,0);}}\nelse{view=\"top\";for(line_nb=0;line_nb< Math.min(Á.É[\"line_start\"]+nbLineToScroll-1,lines.Æ,lines.Æ);line_nb++){if(line_nb==Á.É[\"line_start\"]-1)char_left=Á.É[\"selectionStart\"]-new_pos;new_pos+=lines[line_nb].Æ+1;}if(shift_pressed){Æ=Math.abs(Á.É[\"selectionEnd\"]-new_pos-char_left);Æ+=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É[\"curr_pos\"])-char_left-1;Á.area_select(Math.min(Á.É[\"selectionEnd\"],new_pos+char_left),Æ);if(new_pos+char_left > Á.É[\"selectionEnd\"])view=\"bottom\";}\nelse{Á.area_select(new_pos+char_left,0);}}}Á.check_line_selection();Á.scroll_to_view(view);};EA.Ä.start_resize=Ã(e){È.eAL.resize[\"id\"]=eA.id;È.eAL.resize[\"start_x\"]=(e)? e.pageX:event.x+document.body.scrollLeft;È.eAL.resize[\"start_y\"]=(e)? e.pageY:event.y+document.body.scrollTop;if(eA.isIE){eA.Â.focus();eA.getIESelection();}È.eAL.resize[\"selectionStart\"]=eA.Â.selectionStart;È.eAL.resize[\"selectionEnd\"]=eA.Â.selectionEnd;È.eAL.start_resize_area();};EA.Ä.toggle_full_screen=Ã(to){var t=Á,p=È,a=t.Â,html,frame,selStart,selEnd,old,icon;if(typeof(to)==\"undefined\")to=!t.fullscreen['isFull'];old=t.fullscreen['isFull'];t.fullscreen['isFull']=to;icon=_$(\"fullscreen\");selStart=t.Â.selectionStart;selEnd=t.Â.selectionEnd;html=p.document.getElementsByTagName(\"html\")[0];frame=p.document.getElementById(\"frame_\"+t.id);if(to&&to!=old){t.fullscreen['old_overflow']=p.get_css_property(html,\"overflow\");t.fullscreen['old_height']=p.get_css_property(html,\"height\");t.fullscreen['old_width']=p.get_css_property(html,\"width\");t.fullscreen['old_scrollTop']=html.scrollTop;t.fullscreen['old_scrollLeft']=html.scrollLeft;t.fullscreen['old_zIndex']=p.get_css_property(frame,\"z-index\");if(t.isOpera){html.Ç.height=\"100%\";html.Ç.width=\"100%\";}html.Ç.overflow=\"hidden\";html.scrollTop=0;html.scrollLeft=0;frame.Ç.position=\"absolute\";frame.Ç.width=html.clientWidth+\"px\";frame.Ç.height=html.clientHeight+\"px\";frame.Ç.display=\"block\";frame.Ç.zIndex=\"999999\";frame.Ç.top=\"0px\";frame.Ç.left=\"0px\";frame.Ç.top=\"-\"+p.calculeOffsetTop(frame)+\"px\";frame.Ç.left=\"-\"+p.calculeOffsetLeft(frame)+\"px\";t.switchClassSticky(icon,'editAreaButtonSelected',Ì);t.fullscreen['allow_resize']=t.resize_allowed;t.allow_resize(Ì);if(t.isFirefox){p.eAL.execCommand(t.id,\"update_size();\");t.area_select(selStart,selEnd-selStart);t.scroll_to_view();t.focus();}\nelse{setTimeout(\"p.eAL.execCommand('\"+t.id+\"','update_size();');eA.focus();\",10);}}\nelse if(to!=old){frame.Ç.position=\"static\";frame.Ç.zIndex=t.fullscreen['old_zIndex'];if(t.isOpera){html.Ç.height=\"auto\";html.Ç.width=\"auto\";html.Ç.overflow=\"auto\";}\nelse if(t.isIE&&p!=top){html.Ç.overflow=\"auto\";}\nelse{html.Ç.overflow=t.fullscreen['old_overflow'];}html.scrollTop=t.fullscreen['old_scrollTop'];html.scrollLeft=t.fullscreen['old_scrollLeft'];p.eAL.hide(t.id);p.eAL.show(t.id);t.switchClassSticky(icon,'editAreaButtonNormal',Ì);if(t.fullscreen['allow_resize'])t.allow_resize(t.fullscreen['allow_resize']);if(t.isFirefox){t.area_select(selStart,selEnd-selStart);setTimeout(\"eA.scroll_to_view();\",10);}}};EA.Ä.allow_resize=Ã(allow){var resize=_$(\"resize_area\");if(allow){resize.Ç.visibility=\"visible\";È.eAL.add_event(resize,\"mouseup\",eA.start_resize);}\nelse{resize.Ç.visibility=\"hidden\";È.eAL.remove_event(resize,\"mouseup\",eA.start_resize);}Á.resize_allowed=allow;};EA.Ä.change_syntax=Ã(new_syntax,is_waiting){if(new_syntax==Á.Å['syntax'])return Ë;var founded=Ì;for(var i=0;i<Á.syntax_list.Æ;i++){if(Á.syntax_list[i]==new_syntax)founded=Ë;}if(founded==Ë){if(!È.eAL.load_syntax[new_syntax]){if(!is_waiting)È.eAL.load_script(È.eAL.baseURL+\"reg_syntax/\"+new_syntax+\".js\");setTimeout(\"eA.change_syntax('\"+new_syntax+\"',Ë);\",100);Á.show_waiting_screen();}\nelse{if(!Á.allready_used_syntax[new_syntax]){È.eAL.init_syntax_regexp();Á.add_Ç(È.eAL.syntax[new_syntax][\"Çs\"]);Á.allready_used_syntax[new_syntax]=Ë;}var sel=_$(\"syntax_selection\");if(sel&&sel.Ê!=new_syntax){for(var i=0;i<sel.Æ;i++){if(sel.options[i].Ê&&sel.options[i].Ê==new_syntax)sel.options[i].selected=Ë;}}Á.Å['syntax']=new_syntax;Á.resync_highlight(Ë);Á.hide_waiting_screen();return Ë;}}return Ì;};EA.Ä.set_editable=Ã(is_editable){if(is_editable){document.body.className=\"\";Á.Â.readOnly=Ì;Á.is_editable=Ë;}\nelse{document.body.className=\"non_editable\";Á.Â.readOnly=Ë;Á.is_editable=Ì;}if(eAs[Á.id][\"displayed\"]==Ë)Á.update_size();};EA.Ä.toggle_word_wrap=Ã(){Á.set_word_wrap(!Á.Å['word_wrap']);};EA.Ä.set_word_wrap=Ã(to){var t=Á,a=t.Â;if(t.isOpera){Á.Å['word_wrap']=Ì;t.switchClassSticky(_$(\"word_wrap\"),'editAreaButtonDisabled',Ë);return Ì;}if(to){wrap_mode='soft';Á.container.className+=' word_wrap';Á.container.Ç.width=\"\";Á.content_highlight.Ç.width=\"\";a.Ç.width=\"100%\";if(t.isIE&&t.isIE < 7){a.Ç.width=(a.offsetWidth-5)+\"px\";}t.switchClassSticky(_$(\"word_wrap\"),'editAreaButtonSelected',Ì);}\nelse{wrap_mode='off';Á.container.className=Á.container.className.replace(/word_wrap/g,'');t.switchClassSticky(_$(\"word_wrap\"),'editAreaButtonNormal',Ë);}Á.Â.previous_scrollWidth='';Á.Â.previous_scrollHeight='';a.wrap=wrap_mode;a.setAttribute('wrap',wrap_mode);if(!Á.isIE){var start=a.selectionStart,end=a.selectionEnd;var parNod=a.ÈNode,nxtSib=a.nextSibling;parNod.removeChild(a);parNod.insertBefore(a,nxtSib);Á.area_select(start,end-start);}Á.Å['word_wrap']=to;Á.focus();Á.update_size();Á.check_line_selection();};EA.Ä.open_file=Ã(Å){if(Å['id']!=\"undefined\"){var id=Å['id'];var new_file={};new_file['id']=id;new_file['title']=id;new_file['text']=\"\";new_file['É']=\"\";new_file['last_text_to_highlight']=\"\";new_file['last_hightlighted_text']=\"\";new_file['previous']=[];new_file['next']=[];new_file['last_undo']=\"\";new_file['smooth_selection']=Á.Å['smooth_selection'];new_file['do_highlight']=Á.Å['start_highlight'];new_file['syntax']=Á.Å['syntax'];new_file['scroll_top']=0;new_file['scroll_left']=0;new_file['selection_start']=0;new_file['selection_end']=0;new_file['edited']=Ì;new_file['font_size']=Á.Å[\"font_size\"];new_file['font_family']=Á.Å[\"font_family\"];new_file['word_wrap']=Á.Å[\"word_wrap\"];new_file['toolbar']={'links':{},'selects':{}};new_file['compare_edited_text']=new_file['text'];Á.files[id]=new_file;Á.update_file(id,Å);Á.files[id]['compare_edited_text']=Á.files[id]['text'];var html_id='tab_file_'+encodeURIComponent(id);Á.filesIdAssoc[html_id]=id;Á.files[id]['html_id']=html_id;if(!_$(Á.files[id]['html_id'])&&id!=\"\"){Á.tab_browsing_area.Ç.display=\"block\";var elem=document.createElement('li');elem.id=Á.files[id]['html_id'];var close=\"<img src=\\\"\"+È.eAL.baseURL+\"images/close.gif\\\" title=\\\"\"+Á.get_translation('close_tab','word')+\"\\\" onclick=\\\"eA.execCommand('close_file',eA.filesIdAssoc['\"+html_id+\"']);return Ì;\\\" class=\\\"hidden\\\" onmouseover=\\\"Á.className=''\\\" onmouseout=\\\"Á.className='hidden'\\\" />\";elem.innerHTML=\"<a onclick=\\\"javascript:eA.execCommand('switch_to_file',eA.filesIdAssoc['\"+html_id+\"']);\\\" selec=\\\"none\\\"><b><span><strong class=\\\"edited\\\">*</strong>\"+Á.files[id]['title']+close+\"</span></b></a>\";_$('tab_browsing_list').appendChild(elem);var elem=document.createElement('text');Á.update_size();}if(id!=\"\")Á.execCommand('file_open',Á.files[id]);Á.switch_to_file(id,Ë);return Ë;}\nelse return Ì;};EA.Ä.close_file=Ã(id){if(Á.files[id]){Á.save_file(id);if(Á.execCommand('file_close',Á.files[id])!==Ì){var li=_$(Á.files[id]['html_id']);li.ÈNode.removeChild(li);if(id==Á.curr_file){var next_file=\"\";var is_next=Ì;for(var i in Á.files){if(is_next){next_file=i;break;}\nelse if(i==id)is_next=Ë;\nelse next_file=i;}Á.switch_to_file(next_file);}delete(Á.files[id]);Á.update_size();}}};EA.Ä.save_file=Ã(id){var t=Á,save,a_links,a_selects,save_butt,img,i;if(t.files[id]){var save=t.files[id];save['É']=t.É;save['last_text_to_highlight']=t.last_text_to_highlight;save['last_hightlighted_text']=t.last_hightlighted_text;save['previous']=t.previous;save['next']=t.next;save['last_undo']=t.last_undo;save['smooth_selection']=t.smooth_selection;save['do_highlight']=t.do_highlight;save['syntax']=t.Å['syntax'];save['text']=t.Â.Ê;save['scroll_top']=t.result.scrollTop;save['scroll_left']=t.result.scrollLeft;save['selection_start']=t.É[\"selectionStart\"];save['selection_end']=t.É[\"selectionEnd\"];save['font_size']=t.Å[\"font_size\"];save['font_family']=t.Å[\"font_family\"];save['word_wrap']=t.Å[\"word_wrap\"];save['toolbar']={'links':{},'selects':{}};a_links=_$(\"toolbar_1\").getElementsByTagName(\"a\");for(i=0;i<a_links.Æ;i++){if(a_links[i].getAttribute('fileSpecific')=='yes'){save_butt={};img=a_links[i].getElementsByTagName('img')[0];save_butt['classLock']=img.classLock;save_butt['className']=img.className;save_butt['oldClassName']=img.oldClassName;save['toolbar']['links'][a_links[i].id]=save_butt;}}a_selects=_$(\"toolbar_1\").getElementsByTagName(\"select\");for(i=0;i<a_selects.Æ;i++){if(a_selects[i].getAttribute('fileSpecific')=='yes'){save['toolbar']['selects'][a_selects[i].id]=a_selects[i].Ê;}}t.files[id]=save;return save;}return Ì;};EA.Ä.update_file=Ã(id,new_Ês){for(var i in new_Ês){Á.files[id][i]=new_Ês[i];}};EA.Ä.display_file=Ã(id){var t=Á,a=t.Â,new_file,a_lis,a_selects,a_links,a_options,i,j;if(id==''){a.readOnly=Ë;t.tab_browsing_area.Ç.display=\"none\";_$(\"no_file_selected\").Ç.display=\"block\";t.result.className=\"empty\";if(!t.files['']){t.open_file({id:''});}}\nelse if(typeof(t.files[id])=='undefined'){return Ì;}\nelse{t.result.className=\"\";a.readOnly=!t.is_editable;_$(\"no_file_selected\").Ç.display=\"none\";t.tab_browsing_area.Ç.display=\"block\";}t.check_redo(Ë);t.check_undo(Ë);t.curr_file=id;a_lis=t.tab_browsing_area.getElementsByTagName('li');for(i=0;i<a_lis.Æ;i++){if(a_lis[i].id==t.files[id]['html_id'])a_lis[i].className='selected';\nelse a_lis[i].className='';}new_file=t.files[id];a.Ê=new_file['text'];t.set_font(new_file['font_family'],new_file['font_size']);t.area_select(new_file['É']['selection_start'],new_file['É']['selection_end']-new_file['É']['selection_start']);t.manage_size(Ë);t.result.scrollTop=new_file['scroll_top'];t.result.scrollLeft=new_file['scroll_left'];t.previous=new_file['previous'];t.next=new_file['next'];t.last_undo=new_file['last_undo'];t.check_redo(Ë);t.check_undo(Ë);t.execCommand(\"change_highlight\",new_file['do_highlight']);t.execCommand(\"change_syntax\",new_file['syntax']);t.execCommand(\"change_smooth_selection_mode\",new_file['smooth_selection']);t.execCommand(\"set_word_wrap\",new_file['word_wrap']);a_links=new_file['toolbar']['links'];for(i in a_links){if(img=_$(i).getElementsByTagName('img')[0]){img.classLock=a_links[i]['classLock'];img.className=a_links[i]['className'];img.oldClassName=a_links[i]['oldClassName'];}}a_selects=new_file['toolbar']['selects'];for(i in a_selects){a_options=_$(i).options;for(j=0;j<a_options.Æ;j++){if(a_options[j].Ê==a_selects[i])_$(i).options[j].selected=Ë;}}};EA.Ä.switch_to_file=Ã(file_to_show,force_refresh){if(file_to_show!=Á.curr_file||force_refresh){Á.save_file(Á.curr_file);if(Á.curr_file!='')Á.execCommand('file_switch_off',Á.files[Á.curr_file]);Á.display_file(file_to_show);if(file_to_show!='')Á.execCommand('file_switch_on',Á.files[file_to_show]);}};EA.Ä.get_file=Ã(id){if(id==Á.curr_file)Á.save_file(id);return Á.files[id];};EA.Ä.get_all_files=Ã(){tmp_files=Á.files;Á.save_file(Á.curr_file);if(tmp_files[''])delete(Á.files['']);return tmp_files;};EA.Ä.check_file_changes=Ã(){var id=Á.curr_file;if(Á.files[id]&&Á.files[id]['compare_edited_text']!=undefined){if(Á.files[id]['compare_edited_text'].Æ==Á.Â.Ê.Æ&&Á.files[id]['compare_edited_text']==Á.Â.Ê){if(Á.files[id]['edited']!=Ì)Á.set_file_edited_mode(id,Ì);}\nelse{if(Á.files[id]['edited']!=Ë)Á.set_file_edited_mode(id,Ë);}}};EA.Ä.set_file_edited_mode=Ã(id,to){if(Á.files[id]&&_$(Á.files[id]['html_id'])){var link=_$(Á.files[id]['html_id']).getElementsByTagName('a')[0];if(to==Ë){link.className='edited';}\nelse{link.className='';if(id==Á.curr_file)text=Á.Â.Ê;\nelse text=Á.files[id]['text'];Á.files[id]['compare_edited_text']=text;}Á.files[id]['edited']=to;}};EA.Ä.set_show_line_colors=Ã(new_Ê){Á.show_line_colors=new_Ê;if(new_Ê)Á.selection_field.className+=' show_colors';\nelse Á.selection_field.className=Á.selection_field.className.replace(/ show_colors/g,'');};var EA_keys={8:\"Retour arriere\",9:\"Tabulation\",12:\"Milieu(pave numerique)\",13:\"Entrer\",16:\"Shift\",17:\"Ctrl\",18:\"Alt\",19:\"Pause\",20:\"Verr Maj\",27:\"Esc\",32:\"Space\",33:\"Page up\",34:\"Page down\",35:\"End\",36:\"Begin\",37:\"Left\",38:\"Up\",39:\"Right\",40:\"Down\",44:\"Impr ecran\",45:\"Inser\",46:\"Suppr\",91:\"Menu Demarrer Windows / touche pomme Mac\",92:\"Menu Demarrer Windows\",93:\"Menu contextuel Windows\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"Verr Num\",145:\"Arret defil\"};àkeyDown(e){if(!e){e=event;}for(var i in eA.plugins){if(typeof(eA.plugins[i].onkeydown)==\"Ã\"){if(eA.plugins[i].onkeydown(e)===Ì){if(eA.isIE)e.keyCode=0;return Ì;}}}var target_id=(e.target||e.srcElement).id;var use=Ì;if(EA_keys[e.keyCode])letter=EA_keys[e.keyCode];\nelse letter=String.fromCharCode(e.keyCode);var low_letter=letter.toLowerCase();if(letter==\"Page up\"&&!eA.isOpera){eA.execCommand(\"scroll_page\",{\"dir\":\"up\",\"shift\":ShiftPressed(e)});use=Ë;}\nelse if(letter==\"Page down\"&&!eA.isOpera){eA.execCommand(\"scroll_page\",{\"dir\":\"down\",\"shift\":ShiftPressed(e)});use=Ë;}\nelse if(eA.is_editable==Ì){return Ë;}\nelse if(letter==\"Tabulation\"&&target_id==\"Â\"&&!CtrlPressed(e)&&!AltPressed(e)){if(ShiftPressed(e))eA.execCommand(\"invert_tab_selection\");\nelse eA.execCommand(\"tab_selection\");use=Ë;if(eA.isOpera||(eA.isFirefox&&eA.isMac))setTimeout(\"eA.execCommand('focus');\",1);}\nelse if(letter==\"Entrer\"&&target_id==\"Â\"){if(eA.press_enter())use=Ë;}\nelse if(letter==\"Entrer\"&&target_id==\"area_search\"){eA.execCommand(\"area_search\");use=Ë;}\nelse  if(letter==\"Esc\"){eA.execCommand(\"close_all_inline_popup\",e);use=Ë;}\nelse if(CtrlPressed(e)&&!AltPressed(e)&&!ShiftPressed(e)){switch(low_letter){case \"f\":eA.execCommand(\"area_search\");use=Ë;break;case \"r\":eA.execCommand(\"area_replace\");use=Ë;break;case \"q\":eA.execCommand(\"close_all_inline_popup\",e);use=Ë;break;case \"h\":eA.execCommand(\"change_highlight\");use=Ë;break;case \"g\":setTimeout(\"eA.execCommand('go_to_line');\",5);use=Ë;break;case \"e\":eA.execCommand(\"show_help\");use=Ë;break;case \"z\":use=Ë;eA.execCommand(\"undo\");break;case \"y\":use=Ë;eA.execCommand(\"redo\");break;default:break;}}if(eA.next.Æ > 0){setTimeout(\"eA.check_redo();\",10);}setTimeout(\"eA.check_file_changes();\",10);if(use){if(eA.isIE)e.keyCode=0;return Ì;}return Ë;};àAltPressed(e){if(window.event){return(window.event.altKey);}\nelse{if(e.modifiers)return(e.altKey||(e.modifiers % 2));\nelse return e.altKey;}};àCtrlPressed(e){if(window.event){return(window.event.ctrlKey);}\nelse{return(e.ctrlKey||(e.modifiers==2)||(e.modifiers==3)||(e.modifiers>5));}};àShiftPressed(e){if(window.event){return(window.event.shiftKey);}\nelse{return(e.shiftKey||(e.modifiers>3));}}; EA.Ä.show_search=Ã(){if(_$(\"area_search_replace\").Ç.visibility==\"visible\"){Á.hidden_search();}\nelse{Á.open_inline_popup(\"area_search_replace\");var text=Á.area_get_selection();var search=text.split(\"\\n\")[0];_$(\"area_search\").Ê=search;_$(\"area_search\").focus();}};EA.Ä.hidden_search=Ã(){Á.close_inline_popup(\"area_search_replace\");};EA.Ä.area_search=Ã(mode){if(!mode)mode=\"search\";_$(\"area_search_msg\").innerHTML=\"\";var search=_$(\"area_search\").Ê;Á.Â.focus();Á.Â.ÂFocused=Ë;var infos=Á.get_selection_infos();var start=infos[\"selectionStart\"];var pos=-1;var pos_begin=-1;var Æ=search.Æ;if(_$(\"area_search_replace\").Ç.visibility!=\"visible\"){Á.show_search();return;}if(search.Æ==0){_$(\"area_search_msg\").innerHTML=Á.get_translation(\"search_field_empty\");return;}if(mode!=\"replace\"){if(_$(\"area_search_reg_exp\").checked)start++;\nelse start+=search.Æ;}if(_$(\"area_search_reg_exp\").checked){var opt=\"m\";if(!_$(\"area_search_match_case\").checked)opt+=\"i\";var reg=new RegExp(search,opt);pos=infos[\"full_text\"].substr(start).search(reg);pos_begin=infos[\"full_text\"].search(reg);if(pos!=-1){pos+=start;Æ=infos[\"full_text\"].substr(start).match(reg)[0].Æ;}\nelse if(pos_begin!=-1){Æ=infos[\"full_text\"].match(reg)[0].Æ;}}\nelse{if(_$(\"area_search_match_case\").checked){pos=infos[\"full_text\"].indexOf(search,start);pos_begin=infos[\"full_text\"].indexOf(search);}\nelse{pos=infos[\"full_text\"].toLowerCase().indexOf(search.toLowerCase(),start);pos_begin=infos[\"full_text\"].toLowerCase().indexOf(search.toLowerCase());}}if(pos==-1&&pos_begin==-1){_$(\"area_search_msg\").innerHTML=\"<strong>\"+search+\"</strong> \"+Á.get_translation(\"not_found\");return;}\nelse if(pos==-1&&pos_begin !=-1){begin=pos_begin;_$(\"area_search_msg\").innerHTML=Á.get_translation(\"restart_search_at_begin\");}\nelse begin=pos;if(mode==\"replace\"&&pos==infos[\"indexOfCursor\"]){var replace=_$(\"area_replace\").Ê;var new_text=\"\";if(_$(\"area_search_reg_exp\").checked){var opt=\"m\";if(!_$(\"area_search_match_case\").checked)opt+=\"i\";var reg=new RegExp(search,opt);new_text=infos[\"full_text\"].substr(0,begin)+infos[\"full_text\"].substr(start).replace(reg,replace);}\nelse{new_text=infos[\"full_text\"].substr(0,begin)+replace+infos[\"full_text\"].substr(begin+Æ);}Á.Â.Ê=new_text;Á.area_select(begin,Æ);Á.area_search();}\nelse Á.area_select(begin,Æ);};EA.Ä.area_replace=Ã(){Á.area_search(\"replace\");};EA.Ä.area_replace_all=Ã(){var base_text=Á.Â.Ê;var search=_$(\"area_search\").Ê;var replace=_$(\"area_replace\").Ê;if(search.Æ==0){_$(\"area_search_msg\").innerHTML=Á.get_translation(\"search_field_empty\");return;}var new_text=\"\";var nb_change=0;if(_$(\"area_search_reg_exp\").checked){var opt=\"mg\";if(!_$(\"area_search_match_case\").checked)opt+=\"i\";var reg=new RegExp(search,opt);nb_change=infos[\"full_text\"].match(reg).Æ;new_text=infos[\"full_text\"].replace(reg,replace);}\nelse{if(_$(\"area_search_match_case\").checked){var tmp_tab=base_text.split(search);nb_change=tmp_tab.Æ-1;new_text=tmp_tab.join(replace);}\nelse{var lower_Ê=base_text.toLowerCase();var lower_search=search.toLowerCase();var start=0;var pos=lower_Ê.indexOf(lower_search);while(pos!=-1){nb_change++;new_text+=Á.Â.Ê.substring(start,pos)+replace;start=pos+search.Æ;pos=lower_Ê.indexOf(lower_search,pos+1);}new_text+=Á.Â.Ê.substring(start);}}if(new_text==base_text){_$(\"area_search_msg\").innerHTML=\"<strong>\"+search+\"</strong> \"+Á.get_translation(\"not_found\");}\nelse{Á.Â.Ê=new_text;_$(\"area_search_msg\").innerHTML=\"<strong>\"+nb_change+\"</strong> \"+Á.get_translation(\"occurrence_replaced\");setTimeout(\"eA.Â.focus();eA.Â.ÂFocused=Ë;\",100);}}; EA.Ä.change_highlight=Ã(change_to){if(Á.Å[\"syntax\"].Æ==0&&change_to==Ì){Á.switchClassSticky(_$(\"highlight\"),'editAreaButtonDisabled',Ë);Á.switchClassSticky(_$(\"reset_highlight\"),'editAreaButtonDisabled',Ë);return Ì;}if(Á.do_highlight==change_to)return Ì;Á.getIESelection();var pos_start=Á.Â.selectionStart;var pos_end=Á.Â.selectionEnd;if(Á.do_highlight===Ë||change_to==Ì)Á.disable_highlight();\nelse Á.enable_highlight();Á.Â.focus();Á.Â.selectionStart=pos_start;Á.Â.selectionEnd=pos_end;Á.setIESelection();};EA.Ä.disable_highlight=Ã(displayOnly){var t=Á,a=t.Â,new_Obj,old_class,new_class;t.selection_field.innerHTML=\"\";t.selection_field_text.innerHTML=\"\";t.content_highlight.Ç.visibility=\"hidden\";new_Obj=t.content_highlight.cloneNode(Ì);new_Obj.innerHTML=\"\";t.content_highlight.ÈNode.insertBefore(new_Obj,t.content_highlight);t.content_highlight.ÈNode.removeChild(t.content_highlight);t.content_highlight=new_Obj;old_class=È.getAttribute(a,\"class\");if(old_class){new_class=old_class.replace(\"hidden\",\"\");È.setAttribute(a,\"class\",new_class);}a.Ç.backgroundColor=\"transÈ\";t.switchClassSticky(_$(\"highlight\"),'editAreaButtonNormal',Ë);t.switchClassSticky(_$(\"reset_highlight\"),'editAreaButtonDisabled',Ë);t.do_highlight=Ì;t.switchClassSticky(_$(\"change_smooth_selection\"),'editAreaButtonSelected',Ë);if(typeof(t.smooth_selection_before_highlight)!=\"undefined\"&&t.smooth_selection_before_highlight===Ì){t.change_smooth_selection_mode(Ì);}};EA.Ä.enable_highlight=Ã(){var t=Á,a=t.Â,new_class;t.show_waiting_screen();t.content_highlight.Ç.visibility=\"visible\";new_class=È.getAttribute(a,\"class\")+\" hidden\";È.setAttribute(a,\"class\",new_class);if(t.isIE)a.Ç.backgroundColor=\"#FFFFFF\";t.switchClassSticky(_$(\"highlight\"),'editAreaButtonSelected',Ì);t.switchClassSticky(_$(\"reset_highlight\"),'editAreaButtonNormal',Ì);t.smooth_selection_before_highlight=t.smooth_selection;if(!t.smooth_selection)t.change_smooth_selection_mode(Ë);t.switchClassSticky(_$(\"change_smooth_selection\"),'editAreaButtonDisabled',Ë);t.do_highlight=Ë;t.resync_highlight();t.hide_waiting_screen();};EA.Ä.maj_highlight=Ã(infos){var debug_opti=\"\",tps_start=new Date().getTime(),tps_middle_opti=new Date().getTime();var t=Á,hightlighted_text,updated_highlight;var textToHighlight=infos[\"full_text\"],doSyntaxOpti=Ì,doHtmlOpti=Ì,stay_begin=\"\",stay_end=\"\",trace_new,trace_last;if(t.last_text_to_highlight==infos[\"full_text\"]&&t.resync_highlight!==Ë)return;if(t.reload_highlight===Ë){t.reload_highlight=Ì;}\nelse if(textToHighlight.Æ==0){textToHighlight=\"\\n \";}\nelse{changes=t.checkTextEvolution(t.last_text_to_highlight,textToHighlight);trace_new=t.get_syntax_trace(changes.newTextLine).replace(/\\r/g,'');trace_last=t.get_syntax_trace(changes.lastTextLine).replace(/\\r/g,'');doSyntaxOpti=(trace_new==trace_last);if(!doSyntaxOpti&&trace_new==\"\\n\"+trace_last&&/^[ \t\s]*\\n[ \t\s]*$/.test(changes.newText.replace(/\\r/g,''))&&changes.lastText==\"\"){doSyntaxOpti=Ë;}if(doSyntaxOpti){tps_middle_opti=new Date().getTime();stay_begin=t.last_hightlighted_text.split(\"\\n\").slice(0,changes.lineStart).join(\"\\n\");if(changes.lineStart>0)stay_begin+=\"\\n\";stay_end=t.last_hightlighted_text.split(\"\\n\").slice(changes.lineLastEnd+1).join(\"\\n\");if(stay_end.Æ>0)stay_end=\"\\n\"+stay_end;if(stay_begin.split('<span').Æ !=stay_begin.split('</span').Æ||stay_end.split('<span').Æ !=stay_end.split('</span').Æ){doSyntaxOpti=Ì;stay_end='';stay_begin='';}\nelse{if(stay_begin.Æ==0&&changes.posLastEnd==-1)changes.newTextLine+=\"\\n\";textToHighlight=changes.newTextLine;}}if(t.Å[\"debug\"]){var ch=changes;debug_opti=(doSyntaxOpti?\"Optimisation\":\"No optimisation\")+\" start:\"+ch.posStart+\"(\"+ch.lineStart+\")\"+\" end_new:\"+ch.posNewEnd+\"(\"+ch.lineNewEnd+\")\"+\" end_last:\"+ch.posLastEnd+\"(\"+ch.lineLastEnd+\")\"+\"\\nchanged_text:\"+ch.newText+\"=> trace:\"+trace_new+\"\\nchanged_last_text:\"+ch.lastText+\"=> trace:\"+trace_last+\"\\nchanged_line:\"+ch.newTextLine+\"\\nlast_changed_line:\"+ch.lastTextLine+\"\\nstay_begin:\"+stay_begin.slice(-100)+\"\\nstay_end:\"+stay_end.substr(0,100);+\"\\n\";}}tps_end_opti=new Date().getTime();updated_highlight=t.colorize_text(textToHighlight);tpsAfterReg=new Date().getTime();if(doSyntaxOpti){try{var replacedBloc,i,nbStart='',nbEnd='',newHtml,ÆOld,ÆNew;replacedBloc=t.last_hightlighted_text.substring(stay_begin.Æ,t.last_hightlighted_text.Æ-stay_end.Æ);ÆOld=replacedBloc.Æ;ÆNew=updated_highlight.Æ;for(i=0;i < ÆOld&&i < ÆNew&&replacedBloc.charAt(i)==updated_highlight.charAt(i);i++){}nbStart=i;for(i=0;i+nbStart < ÆOld&&i+nbStart < ÆNew&&replacedBloc.charAt(ÆOld-i-1)==updated_highlight.charAt(ÆNew-i-1);i++){}nbEnd=i;lastHtml=replacedBloc.substring(nbStart,ÆOld-nbEnd);newHtml=updated_highlight.substring(nbStart,ÆNew-nbEnd);if(newHtml.indexOf('<span')==-1&&newHtml.indexOf('</span')==-1&&lastHtml.indexOf('<span')==-1&&lastHtml.indexOf('</span')==-1){var beginStr,nbOpendedSpan,nbClosedSpan,nbUnchangedChars,span,textNode;doHtmlOpti=Ë;beginStr=t.last_hightlighted_text.substr(0,stay_begin.Æ+nbStart);nbOpendedSpan=beginStr.split('<span').Æ-1;nbClosedSpan=beginStr.split('</span').Æ-1;span=t.content_highlight.getElementsByTagName('span')[ nbOpendedSpan ];ÈSpan=span;maxStartOffset=maxEndOffset=0;if(nbOpendedSpan==nbClosedSpan){while(ÈSpan.ÈNode !=t.content_highlight&&ÈSpan.ÈNode.tagName !='PRE'){ÈSpan=ÈSpan.ÈNode;}}\nelse{maxStartOffset=maxEndOffset=beginStr.Æ+1;nbClosed=beginStr.substr(Math.max(0,beginStr.lastIndexOf('<span',maxStartOffset-1))).split('</span').Æ-1;while(nbClosed > 0){nbClosed--;ÈSpan=ÈSpan.ÈNode;}while(ÈSpan.ÈNode !=t.content_highlight&&ÈSpan.ÈNode.tagName !='PRE'&&(tmpMaxStartOffset=Math.max(0,beginStr.lastIndexOf('<span',maxStartOffset-1)))<(tmpMaxEndOffset=Math.max(0,beginStr.lastIndexOf('</span',maxEndOffset-1)))){maxStartOffset=tmpMaxStartOffset;maxEndOffset=tmpMaxEndOffset;}}if(ÈSpan.ÈNode==t.content_highlight||ÈSpan.ÈNode.tagName=='PRE'){maxStartOffset=Math.max(0,beginStr.indexOf('<span'));}if(maxStartOffset==beginStr.Æ){nbSubSpanBefore=0;}\nelse{lastEndPos=Math.max(0,beginStr.lastIndexOf('>',maxStartOffset));nbSubSpanBefore=beginStr.substr(lastEndPos).split('<span').Æ-1;}if(nbSubSpanBefore==0){textNode=ÈSpan.firstChild;}\nelse{lastSubSpan=ÈSpan.getElementsByTagName('span')[ nbSubSpanBefore-1 ];while(lastSubSpan.ÈNode !=ÈSpan){lastSubSpan=lastSubSpan.ÈNode;}if(lastSubSpan.nextSibling==null||lastSubSpan.nextSibling.nodeType !=3){textNode=document.createTextNode('');lastSubSpan.ÈNode.insertBefore(textNode,lastSubSpan.nextSibling);}\nelse{textNode=lastSubSpan.nextSibling;}}nbUnchangedChars=beginStr.Æ-Math.max(0,beginStr.lastIndexOf('>')+1);if(t.isIE){nbUnchangedChars-=(beginStr.substr(beginStr.Æ-nbUnchangedChars).split(\"\\n\").Æ-1);textNode.replaceData(nbUnchangedChars,lastHtml.replace(/\\n/g,'').Æ,newHtml.replace(/\\n/g,''));}\nelse{textNode.replaceData(nbUnchangedChars,lastHtml.Æ,newHtml);}}}catch(e){doHtmlOpti=Ì;}}tpsAfterOpti2=new Date().getTime();hightlighted_text=stay_begin+updated_highlight+stay_end;if(!doHtmlOpti){var new_Obj=t.content_highlight.cloneNode(Ì);if((t.isIE&&t.isIE < 8)||(t.isOpera&&t.isOpera < 9.6))new_Obj.innerHTML=\"<pre><span class='\"+t.Å[\"syntax\"]+\"'>\"+hightlighted_text+\"</span></pre>\";\nelse new_Obj.innerHTML=\"<span class='\"+t.Å[\"syntax\"]+\"'>\"+hightlighted_text+\"</span>\";t.content_highlight.ÈNode.replaceChild(new_Obj,t.content_highlight);t.content_highlight=new_Obj;}t.last_text_to_highlight=infos[\"full_text\"];t.last_hightlighted_text=hightlighted_text;tps3=new Date().getTime();if(t.Å[\"debug\"]){t.debug.Ê=\"Tps optimisation \"+(tps_end_opti-tps_start)+\" | tps reg exp:\"+(tpsAfterReg-tps_end_opti)+\" | tps opti HTML:\"+(tpsAfterOpti2-tpsAfterReg)+' '+(doHtmlOpti ? 'yes':'no')+\" | tps update highlight content:\"+(tps3-tpsAfterOpti2)+\" | tpsTotal:\"+(tps3-tps_start)+\"(\"+tps3+\")\\n\"+debug_opti;}};EA.Ä.resync_highlight=Ã(reload_now){Á.reload_highlight=Ë;Á.last_text_to_highlight=\"\";Á.focus();if(reload_now)Á.check_line_selection(Ì);}; EA.Ä.comment_or_quote=Ã(){var new_class=\"\",close_tag=\"\",sy,arg,i;sy=È.eAL.syntax[eA.current_code_lang];arg=EA.Ä.comment_or_quote.arguments[0];for(i in sy[\"quotes\"]){if(arg.indexOf(i)==0){new_class=\"quotesmarks\";close_tag=sy[\"quotes\"][i];}}if(new_class.Æ==0){for(var i in sy[\"comments\"]){if(arg.indexOf(i)==0){new_class=\"comments\";close_tag=sy[\"comments\"][i];}}}if(close_tag==\"\\n\"){return \"µ__\"+new_class+\"__µ\"+arg.replace(/(\\r?\\n)?$/m,\"µ_END_µ$1\");}\nelse{reg=new RegExp(È.eAL.get_escaped_regexp(close_tag)+\"$\",\"m\");if(arg.search(reg)!=-1)return \"µ__\"+new_class+\"__µ\"+arg+\"µ_END_µ\";\nelse return \"µ__\"+new_class+\"__µ\"+arg;}};EA.Ä.get_syntax_trace=Ã(text){if(Á.Å[\"syntax\"].Æ>0&&È.eAL.syntax[Á.Å[\"syntax\"]][\"syntax_trace_regexp\"])return text.replace(È.eAL.syntax[Á.Å[\"syntax\"]][\"syntax_trace_regexp\"],\"$3\");};EA.Ä.colorize_text=Ã(text){text=\" \"+text;if(Á.Å[\"syntax\"].Æ>0)text=Á.apply_syntax(text,Á.Å[\"syntax\"]);return text.substr(1).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/µ_END_µ/g,\"</span>\").replace(/µ__([a-zA-Z0-9]+)__µ/g,\"<span class='$1'>\");};EA.Ä.apply_syntax=Ã(text,lang){var sy;Á.current_code_lang=lang;if(!È.eAL.syntax[lang])return text;sy=È.eAL.syntax[lang];if(sy[\"custom_regexp\"]['before']){for(var i in sy[\"custom_regexp\"]['before']){var convert=\"$1µ__\"+sy[\"custom_regexp\"]['before'][i]['class']+\"__µ$2µ_END_µ$3\";text=text.replace(sy[\"custom_regexp\"]['before'][i]['regexp'],convert);}}if(sy[\"comment_or_quote_reg_exp\"]){text=text.replace(sy[\"comment_or_quote_reg_exp\"],Á.comment_or_quote);}if(sy[\"keywords_reg_exp\"]){for(var i in sy[\"keywords_reg_exp\"]){text=text.replace(sy[\"keywords_reg_exp\"][i],'µ__'+i+'__µ$2µ_END_µ');}}if(sy[\"delimiters_reg_exp\"]){text=text.replace(sy[\"delimiters_reg_exp\"],'µ__delimiters__µ$1µ_END_µ');}if(sy[\"operators_reg_exp\"]){text=text.replace(sy[\"operators_reg_exp\"],'µ__operators__µ$1µ_END_µ');}if(sy[\"custom_regexp\"]['after']){for(var i in sy[\"custom_regexp\"]['after']){var convert=\"$1µ__\"+sy[\"custom_regexp\"]['after'][i]['class']+\"__µ$2µ_END_µ$3\";text=text.replace(sy[\"custom_regexp\"]['after'][i]['regexp'],convert);}}return text;}; var EditArea_charmap={init:Ã(){Á.default_language=\"Arrows\";},get_control_html:Ã(ctrl_name){switch(ctrl_name){case \"charmap\":return È.eAL.get_button_html('charmap_but','charmap.gif','charmap_press',Ì,Á.baseURL);}return Ì;},onload:Ã(){if(eA.Å[\"charmap_default\"]&&eA.Å[\"charmap_default\"].Æ>0)Á.default_language=eA.Å[\"charmap_default\"];},onkeydown:Ã(e){},execCommand:Ã(cmd,param){switch(cmd){case \"charmap_press\":win=window.open(Á.baseURL+\"popup.html\",\"charmap\",\"width=500,height=270,scrollbars=yes,resizable=yes\");win.focus();return Ì;}return Ë;}};eA.add_plugin(\"charmap\",EditArea_charmap); var EditArea_test={init:Ã(){eA.load_css(Á.baseURL+\"css/test.css\");eA.load_script(Á.baseURL+\"test2.js\");},get_control_html:Ã(ctrl_name){switch(ctrl_name){case \"test_but\":return È.eAL.get_button_html('test_but','test.gif','test_cmd',Ì,Á.baseURL);case \"test_select\":html=\"<select id='test_select' onchange='javascript:eA.execCommand(\\\"test_select_change\\\")' fileSpecific='no'>\"+\"                   <option Ê='-1'>{$test_select}</option>\"+\"                    <option Ê='h1'>h1</option>\"+\"                        <option Ê='h2'>h2</option>\"+\"                        <option Ê='h3'>h3</option>\"+\"                        <option Ê='h4'>h4</option>\"+\"                        <option Ê='h5'>h5</option>\"+\"                        <option Ê='h6'>h6</option>\"+\"                </select>\";return html;}return Ì;},onload:Ã(){alert(\"test load\");},onkeydown:Ã(e){var str=String.fromCharCode(e.keyCode);if(str.toLowerCase()==\"f\"){return Ë;}return Ì;},execCommand:Ã(cmd,param){switch(cmd){case \"test_select_change\":var val=document.getElementById(\"test_select\").Ê;if(val!=-1)È.eAL.insertTags(eA.id,\"<\"+val+\">\",\"</\"+val+\">\");document.getElementById(\"test_select\").options[0].selected=Ë;return Ì;case \"test_cmd\":alert(\"user clicked on test_cmd\");return Ì;}return Ë;},_someInternalFunction:Ã(a,b){return a+b;}};eA.add_plugin(\"test\",EditArea_test);var editArea= eA;EditArea=EA;</script>".replace(/Á/g,'this').replace(/Â/g,'textarea').replace(/Ã/g,'function').replace(/Ä/g,'prototype').replace(/Å/g,'settings').replace(/Æ/g,'length').replace(/Ç/g,'style').replace(/È/g,'parent').replace(/É/g,'last_selection').replace(/Ê/g,'value').replace(/Ë/g,'true').replace(/Ì/g,'false');
-editAreaLoader.all_plugins_loaded=true;
-editAreaLoader.template= "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"> <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" > <head> <title>EditArea</title> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /> <meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\"/> [__CSSRULES__] [__JSCODE__] </head> <body> <div id='editor'> <div class='area_toolbar' id='toolbar_1'>[__TOOLBAR__]</div> <div class='area_toolbar' id='tab_browsing_area'><ul id='tab_browsing_list' class='menu'> <li> </li> </ul></div> <div id='result'> <div id='no_file_selected'></div> <div id='container'> <div id='cursor_pos' class='edit_area_cursor'>&nbsp;</div> <div id='end_bracket' class='edit_area_cursor'>&nbsp;</div> <div id='selection_field'></div> <div id='line_number' selec='none'></div> <div id='content_highlight'></div> <div id='test_font_size'></div> <div id='selection_field_text'></div> <textarea id='textarea' wrap='off' onchange='editArea.execCommand(\"onchange\");' onfocus='javascript:editArea.textareaFocused=true;' onblur='javascript:editArea.textareaFocused=false;'> </textarea> </div> </div> <div class='area_toolbar' id='toolbar_2'> <table class='statusbar' cellspacing='0' cellpadding='0'> <tr> <td class='total' selec='none'>{$position}:</td> <td class='infos' selec='none'> {$line_abbr} <span  id='linePos'>0</span>, {$char_abbr} <span id='currPos'>0</span> </td> <td class='total' selec='none'>{$total}:</td> <td class='infos' selec='none'> {$line_abbr} <span id='nbLine'>0</span>, {$char_abbr} <span id='nbChar'>0</span> </td> <td class='resize'> <span id='resize_area'><img src='[__BASEURL__]images/statusbar_resize.gif' alt='resize' selec='none'></span> </td> </tr> </table> </div> </div> <div id='processing'> <div id='processing_text'> {$processing} </div> </div> <div id='area_search_replace' class='editarea_popup'> <table cellspacing='2' cellpadding='0' style='width: 100%'> <tr> <td selec='none'>{$search}</td> <td><input type='text' id='area_search' /></td> <td id='close_area_search_replace'> <a onclick='Javascript:editArea.execCommand(\"hidden_search\")'><img selec='none' src='[__BASEURL__]images/close.gif' alt='{$close_popup}' title='{$close_popup}' /></a><br /> </tr><tr> <td selec='none'>{$replace}</td> <td><input type='text' id='area_replace' /></td> <td><img id='move_area_search_replace' onmousedown='return parent.start_move_element(event,\"area_search_replace\", parent.frames[\"frame_\"+editArea.id]);'  src='[__BASEURL__]images/move.gif' alt='{$move_popup}' title='{$move_popup}' /></td> </tr> </table> <div class='button'> <input type='checkbox' id='area_search_match_case' /><label for='area_search_match_case' selec='none'>{$match_case}</label> <input type='checkbox' id='area_search_reg_exp' /><label for='area_search_reg_exp' selec='none'>{$reg_exp}</label> <br /> <a onclick='Javascript:editArea.execCommand(\"area_search\")' selec='none'>{$find_next}</a> <a onclick='Javascript:editArea.execCommand(\"area_replace\")' selec='none'>{$replace}</a> <a onclick='Javascript:editArea.execCommand(\"area_replace_all\")' selec='none'>{$replace_all}</a><br /> </div> <div id='area_search_msg' selec='none'></div> </div> <div id='edit_area_help' class='editarea_popup'> <div class='close_popup'> <a onclick='Javascript:editArea.execCommand(\"close_all_inline_popup\")'><img src='[__BASEURL__]images/close.gif' alt='{$close_popup}' title='{$close_popup}' /></a> </div> <div><h2>Editarea [__EA_VERSION__]</h2><br /> <h3>{$shortcuts}:</h3> {$tab}: {$add_tab}<br /> {$shift}+{$tab}: {$remove_tab}<br /> {$ctrl}+f: {$search_command}<br /> {$ctrl}+r: {$replace_command}<br /> {$ctrl}+h: {$highlight}<br /> {$ctrl}+g: {$go_to_line}<br /> {$ctrl}+z: {$undo}<br /> {$ctrl}+y: {$redo}<br /> {$ctrl}+e: {$help}<br /> {$ctrl}+q, {$esc}: {$close_popup}<br /> {$accesskey} E: {$toggle}<br /> <br /> <em>{$about_notice}</em> <br /><div class='copyright'>&copy; Christophe Dolivet 2007-2009</div> </div> </div> </body> </html> ";
-editAreaLoader.iframe_css= "<style>body,html{margin:0;padding:0;height:100%;border:none;overflow:hidden;background-color:#FFF;}body,html,table,form,textarea{font:12px monospace,sans-serif;}#editor{border:solid #888 1px;overflow:hidden;}#result{z-index:4;overflow-x:auto;overflow-y:scroll;border-top:solid #888 1px;border-bottom:solid #888 1px;position:relative;clear:both;}#result.empty{overflow:hidden;}#container{overflow:hidden;border:solid blue 0;position:relative;z-index:10;padding:0 5px 0 45px;}#textarea{position:relative;top:0;left:0;margin:0;padding:0;width:100%;height:100%;overflow:hidden;z-index:7;border-width:0;background-color:transparent;resize:none;}#textarea,#textarea:hover{outline:none;}#content_highlight{white-space:pre;margin:0;padding:0;position:absolute;z-index:4;overflow:visible;}#selection_field,#selection_field_text{margin:0;background-color:#E1F2F9;position:absolute;z-index:5;top:-100px;padding:0;white-space:pre;overflow:hidden;}#selection_field.show_colors {z-index:3;background-color:#EDF9FC;}#selection_field strong{font-weight:normal;}#selection_field.show_colors *,#selection_field_text * {visibility:hidden;}#selection_field_text{background-color:transparent;}#selection_field_text strong{font-weight:normal;background-color:#3399FE;color:#FFF;visibility:visible;}#container.word_wrap #content_highlight,#container.word_wrap #selection_field,#container.word_wrap #selection_field_text,#container.word_wrap #test_font_size{white-space:pre-wrap;white-space:-moz-pre-wrap !important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;width:99%;}#line_number{position:absolute;overflow:hidden;border-right:solid black 1px;z-index:8;width:38px;padding:0 5px 0 0;margin:0 0 0 -45px;text-align:right;color:#AAAAAA;}#test_font_size{padding:0;margin:0;visibility:hidden;position:absolute;white-space:pre;}pre{margin:0;padding:0;}.hidden{opacity:0.2;filter:alpha(opacity=20);}#result .edit_area_cursor{position:absolute;z-index:6;background-color:#FF6633;top:-100px;margin:0;}#result .edit_area_selection_field .overline{background-color:#996600;}.editarea_popup{border:solid 1px #888888;background-color:#ECE9D8;width:250px;padding:4px;position:absolute;visibility:hidden;z-index:15;top:-500px;}.editarea_popup,.editarea_popup table{font-family:sans-serif;font-size:10pt;}.editarea_popup img{border:0;}.editarea_popup .close_popup{float:right;line-height:16px;border:0;padding:0;}.editarea_popup h1,.editarea_popup h2,.editarea_popup h3,.editarea_popup h4,.editarea_popup h5,.editarea_popup h6{margin:0;padding:0;}.editarea_popup .copyright{text-align:right;}div#area_search_replace{}div#area_search_replace img{border:0;}div#area_search_replace div.button{text-align:center;line-height:1.7em;}div#area_search_replace .button a{cursor:pointer;border:solid 1px #888888;background-color:#DEDEDE;text-decoration:none;padding:0 2px;color:#000000;white-space:nowrap;}div#area_search_replace a:hover{background-color:#EDEDED;}div#area_search_replace  #move_area_search_replace{cursor:move;border:solid 1px #888;}div#area_search_replace  #close_area_search_replace{text-align:right;vertical-align:top;white-space:nowrap;}div#area_search_replace  #area_search_msg{height:18px;overflow:hidden;border-top:solid 1px #888;margin-top:3px;}#edit_area_help{width:350px;}#edit_area_help div.close_popup{float:right;}.area_toolbar{width:100%;margin:0;padding:0;background-color:#ECE9D8;text-align:center;}.area_toolbar,.area_toolbar table{font:11px sans-serif;}.area_toolbar img{border:0;vertical-align:middle;}.area_toolbar input{margin:0;padding:0;}.area_toolbar select{font-family:'MS Sans Serif',sans-serif,Verdana,Arial;font-size:7pt;font-weight:normal;margin:2px 0 0 0 ;padding:0;vertical-align:top;background-color:#F0F0EE;}table.statusbar{width:100%;}.area_toolbar td.infos{text-align:center;width:130px;border-right:solid 1px #888;border-width:0 1px 0 0;padding:0;}.area_toolbar td.total{text-align:right;width:50px;padding:0;}.area_toolbar td.resize{text-align:right;}.area_toolbar span#resize_area{cursor:nw-resize;visibility:hidden;}.editAreaButtonNormal,.editAreaButtonOver,.editAreaButtonDown,.editAreaSeparator,.editAreaSeparatorLine,.editAreaButtonDisabled,.editAreaButtonSelected {border:0; margin:0; padding:0; background:transparent;margin-top:0;margin-left:1px;padding:0;}.editAreaButtonNormal {border:1px solid #ECE9D8 !important;cursor:pointer;}.editAreaButtonOver {border:1px solid #0A246A !important;cursor:pointer;background-color:#B6BDD2;}.editAreaButtonDown {cursor:pointer;border:1px solid #0A246A !important;background-color:#8592B5;}.editAreaButtonSelected {border:1px solid #C0C0BB !important;cursor:pointer;background-color:#F4F2E8;}.editAreaButtonDisabled {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);-moz-opacity:0.3;opacity:0.3;border:1px solid #F0F0EE !important;cursor:pointer;}.editAreaSeparatorLine {margin:1px 2px;background-color:#C0C0BB;width:2px;height:18px;}#processing{display:none;background-color:#ECE9D8;border:solid #888 1px;position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;text-align:center;}#processing_text{position:absolute;left:50%;top:50%;width:200px;height:20px;margin-left:-100px;margin-top:-10px;text-align:center;}#tab_browsing_area{display:none;background-color:#CCC9A8;border-top:1px solid #888;text-align:left;margin:0;}#tab_browsing_list {padding:0;margin:0;list-style-type:none;white-space:nowrap;}#tab_browsing_list li {float:left;margin:-1px;}#tab_browsing_list a {position:relative;display:block;text-decoration:none;float:left;cursor:pointer;line-height:14px;}#tab_browsing_list a span {display:block;color:#000;background:#ECE9D8;border:1px solid #888;border-width:1px 1px 0;text-align:center;padding:2px 2px 1px 4px;position:relative;}#tab_browsing_list a b {display:block;border-bottom:2px solid #617994;}#tab_browsing_list a .edited {display:none;}#tab_browsing_list a.edited .edited {display:inline;}#tab_browsing_list a img{margin-left:7px;}#tab_browsing_list a.edited img{margin-left:3px;}#tab_browsing_list a:hover span {background:#F4F2E8;border-color:#0A246A;}#tab_browsing_list .selected a span{background:#046380;color:#FFF;}#no_file_selected{height:100%;width:150%;background:#CCC;display:none;z-index:20;position:absolute;}.non_editable #editor{border-width:0 1px;}.non_editable .area_toolbar{display:none;}#auto_completion_area{background:#FFF;border:solid 1px #888;position:absolute;z-index:15;width:280px;height:180px;overflow:auto;display:none;}#auto_completion_area a,#auto_completion_area a:visited{display:block;padding:0 2px 1px;color:#000;text-decoration:none;}#auto_completion_area a:hover,#auto_completion_area a:focus,#auto_completion_area a.focus{background:#D6E1FE;text-decoration:none;}#auto_completion_area ul{margin:0;padding:0;list-style:none inside;}#auto_completion_area li{padding:0;}#auto_completion_area .prefix{font-style:italic;padding:0 3px;}</style>";
diff --git a/project/static/js/edit_area_functions.js b/project/static/js/edit_area_functions.js
deleted file mode 100755 (executable)
index 984d4c6..0000000
+++ /dev/null
@@ -1,1203 +0,0 @@
-       //replace tabulation by the good number of white spaces\r
-       EditArea.prototype.replace_tab= function(text){\r
-               return text.replace(/((\n?)([^\t\n]*)\t)/gi, editArea.smartTab);                // slower than simple replace...        \r
-       };\r
-       \r
-       // call by the replace_tab function\r
-       EditArea.prototype.smartTab= function(){\r
-               val="                   ";\r
-               return EditArea.prototype.smartTab.arguments[2] + EditArea.prototype.smartTab.arguments[3] + val.substr(0, editArea.tab_nb_char - (EditArea.prototype.smartTab.arguments[3].length)%editArea.tab_nb_char);\r
-       };\r
-       \r
-       EditArea.prototype.show_waiting_screen= function(){\r
-               width   = this.editor_area.offsetWidth;\r
-               height  = this.editor_area.offsetHeight;\r
-               if( !(this.isIE && this.isIE<6) )\r
-               {\r
-                       width   -= 2;\r
-                       height  -= 2;\r
-               }\r
-               this.processing_screen.style.display= "block";\r
-               this.processing_screen.style.width      = width+"px";\r
-               this.processing_screen.style.height     = height+"px";\r
-               this.waiting_screen_displayed           = true;\r
-       };\r
-       \r
-       EditArea.prototype.hide_waiting_screen= function(){\r
-               this.processing_screen.style.display="none";\r
-               this.waiting_screen_displayed= false;\r
-       };\r
-       \r
-       EditArea.prototype.add_style= function(styles){\r
-               if(styles.length>0){\r
-                       newcss = document.createElement("style");\r
-                       newcss.type="text/css";\r
-                       newcss.media="all";\r
-                       if(newcss.styleSheet){ // IE\r
-                               newcss.styleSheet.cssText = styles;\r
-                       } else { // W3C\r
-                               newcss.appendChild(document.createTextNode(styles));\r
-                       }\r
-                       document.getElementsByTagName("head")[0].appendChild(newcss);\r
-               }\r
-       };\r
-       \r
-       EditArea.prototype.set_font= function(family, size){\r
-               var t=this, a=this.textarea, s=this.settings, elem_font, i, elem;\r
-               // list all elements concerned by font changes\r
-               var elems= ["textarea", "content_highlight", "cursor_pos", "end_bracket", "selection_field", "selection_field_text", "line_number"];\r
-               \r
-               if(family && family!="")\r
-                       s["font_family"]= family;\r
-               if(size && size>0)\r
-                       s["font_size"]  = size;\r
-               if( t.isOpera && t.isOpera < 9.6 )      // opera<9.6 can't manage non monospace font\r
-                       s['font_family']="monospace";\r
-                       \r
-               // update the select tag\r
-               if( elem_font = _$("area_font_size") )\r
-               {       \r
-                       for( i = 0; i < elem_font.length; i++ )\r
-                       {\r
-                               if( elem_font.options[i].value && elem_font.options[i].value == s["font_size"] )\r
-                                       elem_font.options[i].selected=true;\r
-                       }\r
-               }\r
-               \r
-               /*\r
-                * somethimes firefox has rendering mistake with non-monospace font for text width in textarea vs in div for changing font size (eg: verdana change between 11pt to 12pt)\r
-                * => looks like a browser internal random bug as text width can change while content_highlight is updated\r
-                * we'll check if the font-size produce the same text width inside textarea and div and if not, we'll increment the font-size\r
-                * \r
-                * This is an ugly fix \r
-                */ \r
-               if( t.isFirefox )\r
-               {\r
-                       var nbTry = 3;\r
-                       do {\r
-                               var div1 = document.createElement( 'div' ), text1 = document.createElement( 'textarea' );\r
-                               var styles = {\r
-                                       width:          '40px',\r
-                                       overflow:       'scroll',\r
-                                       zIndex:         50,\r
-                                       visibility:     'hidden',\r
-                                       fontFamily:     s["font_family"],\r
-                                       fontSize:       s["font_size"]+"pt",\r
-                                       lineHeight:     t.lineHeight+"px",\r
-                                       padding:        '0',\r
-                                       margin:         '0',\r
-                                       border:         'none',\r
-                                       whiteSpace:     'nowrap'\r
-                               };\r
-                               var diff, changed = false;\r
-                               for( i in styles )\r
-                               {\r
-                                       div1.style[ i ]         = styles[i];\r
-                                       text1.style[ i ]        = styles[i];\r
-                               }\r
-                               // no wrap for this text\r
-                               text1.wrap = 'off';\r
-                               text1.setAttribute('wrap', 'off');\r
-                               t.container.appendChild( div1 );\r
-                               t.container.appendChild( text1 );\r
-                               // try to make FF to bug\r
-                               div1.innerHTML          = text1.value   = 'azertyuiopqsdfghjklm';\r
-                               div1.innerHTML          = text1.value   = text1.value+'wxcvbn^p*ù$!:;,,';\r
-                               diff    =  text1.scrollWidth - div1.scrollWidth;
-                               \r
-                               // firefox return here a diff of 1 px between equals scrollWidth (can't explain)\r
-                               if( Math.abs( diff ) >= 2 )\r
-                               {\r
-                                       s["font_size"]++;\r
-                                       changed = true;\r
-                               }\r
-                               t.container.removeChild( div1 );\r
-                               t.container.removeChild( text1 );\r
-                               nbTry--;\r
-                       }while( changed && nbTry > 0 );\r
-               }\r
-               \r
-               \r
-               // calc line height\r
-               elem                                    = t.test_font_size;\r
-               elem.style.fontFamily   = ""+s["font_family"];\r
-               elem.style.fontSize             = s["font_size"]+"pt";                          \r
-               elem.innerHTML                  = "0";          \r
-               t.lineHeight                    = elem.offsetHeight;\r
-\r
-               // update font for all concerned elements\r
-               for( i=0; i<elems.length; i++)\r
-               {\r
-                       elem    = _$(elems[i]); \r
-                       elem.style.fontFamily   = s["font_family"];\r
-                       elem.style.fontSize             = s["font_size"]+"pt";\r
-                       elem.style.lineHeight   = t.lineHeight+"px";\r
-               }\r
-               // define a css for <pre> tags\r
-               t.add_style("pre{font-family:"+s["font_family"]+"}");\r
-               \r
-               // old opera and IE>=8 doesn't update font changes to the textarea\r
-               if( ( t.isOpera && t.isOpera < 9.6 ) || t.isIE >= 8 )\r
-               {\r
-                       var parNod = a.parentNode, nxtSib = a.nextSibling, start= a.selectionStart, end= a.selectionEnd;\r
-                       parNod.removeChild(a);\r
-                       parNod.insertBefore(a, nxtSib);\r
-                       t.area_select(start, end-start);\r
-               }\r
-               \r
-               // force update of selection field\r
-               this.focus();\r
-               this.update_size();\r
-               this.check_line_selection();\r
-       };\r
-       \r
-       EditArea.prototype.change_font_size= function(){\r
-               var size=_$("area_font_size").value;\r
-               if(size>0)\r
-                       this.set_font("", size);                        \r
-       };\r
-       \r
-       \r
-       EditArea.prototype.open_inline_popup= function(popup_id){\r
-               this.close_all_inline_popup();\r
-               var popup= _$(popup_id);                \r
-               var editor= _$("editor");\r
-               \r
-               // search matching icon\r
-               for(var i=0; i<this.inlinePopup.length; i++){\r
-                       if(this.inlinePopup[i]["popup_id"]==popup_id){\r
-                               var icon= _$(this.inlinePopup[i]["icon_id"]);\r
-                               if(icon){\r
-                                       this.switchClassSticky(icon, 'editAreaButtonSelected', true);                   \r
-                                       break;\r
-                               }\r
-                       }\r
-               }\r
-               // check size\r
-               popup.style.height="auto";\r
-               popup.style.overflow= "visible";\r
-                       \r
-               if(document.body.offsetHeight< popup.offsetHeight){\r
-                       popup.style.height= (document.body.offsetHeight-10)+"px";\r
-                       popup.style.overflow= "auto";\r
-               }\r
-               \r
-               if(!popup.positionned){\r
-                       var new_left= editor.offsetWidth /2 - popup.offsetWidth /2;\r
-                       var new_top= editor.offsetHeight /2 - popup.offsetHeight /2;\r
-                       //var new_top= area.offsetHeight /2 - popup.offsetHeight /2;\r
-                       //var new_left= area.offsetWidth /2 - popup.offsetWidth /2;\r
-                       //alert("new_top: ("+new_top+") = calculeOffsetTop(area) ("+calculeOffsetTop(area)+") + area.offsetHeight /2("+ area.offsetHeight /2+") - popup.offsetHeight /2("+popup.offsetHeight /2+") - scrollTop: "+document.body.scrollTop);\r
-                       popup.style.left= new_left+"px";\r
-                       popup.style.top= new_top+"px";\r
-                       popup.positionned=true;\r
-               }\r
-               popup.style.visibility="visible";\r
-               \r
-               //popup.style.display="block";\r
-       };\r
-\r
-       EditArea.prototype.close_inline_popup= function(popup_id){\r
-               var popup= _$(popup_id);                \r
-               // search matching icon\r
-               for(var i=0; i<this.inlinePopup.length; i++){\r
-                       if(this.inlinePopup[i]["popup_id"]==popup_id){\r
-                               var icon= _$(this.inlinePopup[i]["icon_id"]);\r
-                               if(icon){\r
-                                       this.switchClassSticky(icon, 'editAreaButtonNormal', false);                    \r
-                                       break;\r
-                               }\r
-                       }\r
-               }\r
-               \r
-               popup.style.visibility="hidden";        \r
-       };\r
-       \r
-       EditArea.prototype.close_all_inline_popup= function(e){\r
-               for(var i=0; i<this.inlinePopup.length; i++){\r
-                       this.close_inline_popup(this.inlinePopup[i]["popup_id"]);               \r
-               }\r
-               this.textarea.focus();\r
-       };\r
-       \r
-       EditArea.prototype.show_help= function(){\r
-               \r
-               this.open_inline_popup("edit_area_help");\r
-               \r
-       };\r
-                       \r
-       EditArea.prototype.new_document= function(){\r
-               this.textarea.value="";\r
-               this.area_select(0,0);\r
-       };\r
-       \r
-       EditArea.prototype.get_all_toolbar_height= function(){\r
-               var area= _$("editor");\r
-               var results= parent.getChildren(area, "div", "class", "area_toolbar", "all", "0");      // search only direct children\r
-               //results= results.concat(getChildren(area, "table", "class", "area_toolbar", "all", "0"));\r
-               var height=0;\r
-               for(var i=0; i<results.length; i++){                    \r
-                       height+= results[i].offsetHeight;\r
-               }\r
-               //alert("toolbar height: "+height);\r
-               return height;\r
-       };\r
-       \r
-       EditArea.prototype.go_to_line= function(line){  \r
-               if(!line)\r
-               {       \r
-                       var icon= _$("go_to_line");\r
-                       if(icon != null){\r
-                               this.restoreClass(icon);\r
-                               this.switchClassSticky(icon, 'editAreaButtonSelected', true);\r
-                       }\r
-                       \r
-                       line= prompt(this.get_translation("go_to_line_prompt"));\r
-                       if(icon != null)\r
-                               this.switchClassSticky(icon, 'editAreaButtonNormal', false);\r
-               }\r
-               if(line && line!=null && line.search(/^[0-9]+$/)!=-1){\r
-                       var start=0;\r
-                       var lines= this.textarea.value.split("\n");\r
-                       if(line > lines.length)\r
-                               start= this.textarea.value.length;\r
-                       else{\r
-                               for(var i=0; i<Math.min(line-1, lines.length); i++)\r
-                                       start+= lines[i].length + 1;\r
-                       }\r
-                       this.area_select(start, 0);\r
-               }\r
-               \r
-               \r
-       };\r
-       \r
-       \r
-       EditArea.prototype.change_smooth_selection_mode= function(setTo){\r
-               //alert("setTo: "+setTo);\r
-               if(this.do_highlight)\r
-                       return;\r
-                       \r
-               if(setTo != null){\r
-                       if(setTo === false)\r
-                               this.smooth_selection=true;\r
-                       else\r
-                               this.smooth_selection=false;\r
-               }\r
-               var icon= _$("change_smooth_selection");\r
-               this.textarea.focus();\r
-               if(this.smooth_selection===true){\r
-                       //setAttribute(icon, "class", getAttribute(icon, "class").replace(/ selected/g, "") );\r
-                       /*setAttribute(icon, "oldClassName", "editAreaButtonNormal" );\r
-                       setAttribute(icon, "className", "editAreaButtonNormal" );*/\r
-                       //this.restoreClass(icon);\r
-                       //this.restoreAndSwitchClass(icon,'editAreaButtonNormal');\r
-                       this.switchClassSticky(icon, 'editAreaButtonNormal', false);\r
-                       \r
-                       this.smooth_selection=false;\r
-                       this.selection_field.style.display= "none";\r
-                       _$("cursor_pos").style.display= "none";\r
-                       _$("end_bracket").style.display= "none";\r
-               }else{\r
-                       //setAttribute(icon, "class", getAttribute(icon, "class") + " selected");\r
-                       //this.switchClass(icon,'editAreaButtonSelected');\r
-                       this.switchClassSticky(icon, 'editAreaButtonSelected', false);\r
-                       this.smooth_selection=true;\r
-                       this.selection_field.style.display= "block";\r
-                       _$("cursor_pos").style.display= "block";\r
-                       _$("end_bracket").style.display= "block";\r
-               }       \r
-       };\r
-       \r
-       // the auto scroll of the textarea has some lacks when it have to show cursor in the visible area when the textarea size change\r
-       // show specifiy whereas it is the "top" or "bottom" of the selection that is showned\r
-       EditArea.prototype.scroll_to_view= function(show){\r
-               var zone, lineElem;\r
-               if(!this.smooth_selection)\r
-                       return;\r
-               zone= _$("result");\r
-               \r
-               // manage height scroll\r
-               var cursor_pos_top= _$("cursor_pos").cursor_top;\r
-               if(show=="bottom")\r
-               {\r
-                       //cursor_pos_top+=  (this.last_selection["line_nb"]-1)* this.lineHeight;\r
-                       cursor_pos_top+= this.getLinePosTop( this.last_selection['line_start'] + this.last_selection['line_nb'] - 1 );\r
-               }\r
-                       \r
-               var max_height_visible= zone.clientHeight + zone.scrollTop;\r
-               var miss_top    = cursor_pos_top + this.lineHeight - max_height_visible;\r
-               if(miss_top>0){\r
-                       //alert(miss_top);\r
-                       zone.scrollTop=  zone.scrollTop + miss_top;\r
-               }else if( zone.scrollTop > cursor_pos_top){\r
-                       // when erase all the content -> does'nt scroll back to the top\r
-                       //alert("else: "+cursor_pos_top);\r
-                       zone.scrollTop= cursor_pos_top;  \r
-               }\r
-               \r
-               // manage left scroll\r
-               //var cursor_pos_left= parseInt(_$("cursor_pos").style.left.replace("px",""));\r
-               var cursor_pos_left= _$("cursor_pos").cursor_left;\r
-               var max_width_visible= zone.clientWidth + zone.scrollLeft;\r
-               var miss_left= cursor_pos_left + 10 - max_width_visible;\r
-               if(miss_left>0){                        \r
-                       zone.scrollLeft= zone.scrollLeft + miss_left + 50;\r
-               }else if( zone.scrollLeft > cursor_pos_left){\r
-                       zone.scrollLeft= cursor_pos_left ;\r
-               }else if( zone.scrollLeft == 45){\r
-                       // show the line numbers if textarea align to it's left\r
-                       zone.scrollLeft=0;\r
-               }\r
-       };\r
-       \r
-       EditArea.prototype.check_undo= function(only_once){\r
-               if(!editAreas[this.id])\r
-                       return false;\r
-               if(this.textareaFocused && editAreas[this.id]["displayed"]==true){\r
-                       var text=this.textarea.value;\r
-                       if(this.previous.length<=1)\r
-                               this.switchClassSticky(_$("undo"), 'editAreaButtonDisabled', true);\r
-               \r
-                       if(!this.previous[this.previous.length-1] || this.previous[this.previous.length-1]["text"] != text){\r
-                               this.previous.push({"text": text, "selStart": this.textarea.selectionStart, "selEnd": this.textarea.selectionEnd});\r
-                               if(this.previous.length > this.settings["max_undo"]+1)\r
-                                       this.previous.shift();\r
-                               \r
-                       }\r
-                       if(this.previous.length >= 2)\r
-                               this.switchClassSticky(_$("undo"), 'editAreaButtonNormal', false);              \r
-               }\r
-\r
-               if(!only_once)\r
-                       setTimeout("editArea.check_undo()", 3000);\r
-       };\r
-       \r
-       EditArea.prototype.undo= function(){\r
-               //alert("undo"+this.previous.length);\r
-               if(this.previous.length > 0)\r
-               {\r
-                       this.getIESelection();\r
-               //      var pos_cursor=this.textarea.selectionStart;\r
-                       this.next.push( { "text": this.textarea.value, "selStart": this.textarea.selectionStart, "selEnd": this.textarea.selectionEnd } );\r
-                       var prev= this.previous.pop();\r
-                       if( prev["text"] == this.textarea.value && this.previous.length > 0 )\r
-                               prev    =this.previous.pop();                                           \r
-                       this.textarea.value     = prev["text"];\r
-                       this.last_undo          = prev["text"];\r
-                       this.area_select(prev["selStart"], prev["selEnd"]-prev["selStart"]);\r
-                       this.switchClassSticky(_$("redo"), 'editAreaButtonNormal', false);\r
-                       this.resync_highlight(true);\r
-                       //alert("undo"+this.previous.length);\r
-                       this.check_file_changes();\r
-               }\r
-       };\r
-       \r
-       EditArea.prototype.redo= function(){\r
-               if(this.next.length > 0)\r
-               {\r
-                       /*this.getIESelection();*/\r
-                       //var pos_cursor=this.textarea.selectionStart;\r
-                       var next= this.next.pop();\r
-                       this.previous.push(next);\r
-                       this.textarea.value= next["text"];\r
-                       this.last_undo= next["text"];\r
-                       this.area_select(next["selStart"], next["selEnd"]-next["selStart"]);\r
-                       this.switchClassSticky(_$("undo"), 'editAreaButtonNormal', false);\r
-                       this.resync_highlight(true);\r
-                       this.check_file_changes();\r
-               }\r
-               if(     this.next.length == 0)\r
-                       this.switchClassSticky(_$("redo"), 'editAreaButtonDisabled', true);\r
-       };\r
-       \r
-       EditArea.prototype.check_redo= function(){\r
-               if(editArea.next.length == 0 || editArea.textarea.value!=editArea.last_undo){\r
-                       editArea.next= [];      // undo the ability to use "redo" button\r
-                       editArea.switchClassSticky(_$("redo"), 'editAreaButtonDisabled', true);\r
-               }\r
-               else\r
-               {\r
-                       this.switchClassSticky(_$("redo"), 'editAreaButtonNormal', false);\r
-               }\r
-       };\r
-       \r
-       \r
-       // functions that manage icons roll over, disabled, etc...\r
-       EditArea.prototype.switchClass = function(element, class_name, lock_state) {\r
-               var lockChanged = false;\r
-       \r
-               if (typeof(lock_state) != "undefined" && element != null) {\r
-                       element.classLock = lock_state;\r
-                       lockChanged = true;\r
-               }\r
-       \r
-               if (element != null && (lockChanged || !element.classLock)) {\r
-                       element.oldClassName = element.className;\r
-                       element.className = class_name;\r
-               }\r
-       };\r
-       \r
-       EditArea.prototype.restoreAndSwitchClass = function(element, class_name) {\r
-               if (element != null && !element.classLock) {\r
-                       this.restoreClass(element);\r
-                       this.switchClass(element, class_name);\r
-               }\r
-       };\r
-       \r
-       EditArea.prototype.restoreClass = function(element) {\r
-               if (element != null && element.oldClassName && !element.classLock) {\r
-                       element.className = element.oldClassName;\r
-                       element.oldClassName = null;\r
-               }\r
-       };\r
-       \r
-       EditArea.prototype.setClassLock = function(element, lock_state) {\r
-               if (element != null)\r
-                       element.classLock = lock_state;\r
-       };\r
-       \r
-       EditArea.prototype.switchClassSticky = function(element, class_name, lock_state) {\r
-               var lockChanged = false;\r
-               if (typeof(lock_state) != "undefined" && element != null) {\r
-                       element.classLock = lock_state;\r
-                       lockChanged = true;\r
-               }\r
-       \r
-               if (element != null && (lockChanged || !element.classLock)) {\r
-                       element.className = class_name;\r
-                       element.oldClassName = class_name;\r
-               }\r
-       };\r
-       \r
-       //make the "page up" and "page down" buttons works correctly\r
-       EditArea.prototype.scroll_page= function(params){\r
-               var dir= params["dir"], shift_pressed= params["shift"];\r
-               var lines= this.textarea.value.split("\n");             \r
-               var new_pos=0, length=0, char_left=0, line_nb=0, curLine=0;\r
-               var toScrollAmount      = _$("result").clientHeight -30;\r
-               var nbLineToScroll      = 0, diff= 0;\r
-               \r
-               if(dir=="up"){\r
-                       nbLineToScroll  = Math.ceil( toScrollAmount / this.lineHeight );\r
-                       \r
-                       // fix number of line to scroll\r
-                       for( i = this.last_selection["line_start"]; i - diff > this.last_selection["line_start"] - nbLineToScroll ; i-- )\r
-                       {\r
-                               if( elem = _$('line_'+ i) )\r
-                               {\r
-                                       diff +=  Math.floor( ( elem.offsetHeight - 1 ) / this.lineHeight );\r
-                               }\r
-                       }\r
-                       nbLineToScroll  -= diff;\r
-                       \r
-                       if(this.last_selection["selec_direction"]=="up"){\r
-                               for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]-nbLineToScroll, lines.length); line_nb++){\r
-                                       new_pos+= lines[line_nb].length + 1;\r
-                               }\r
-                               char_left=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"]-1);\r
-                               if(shift_pressed)\r
-                                       length=this.last_selection["selectionEnd"]-new_pos-char_left;   \r
-                               this.area_select(new_pos+char_left, length);\r
-                               view="top";\r
-                       }else{                  \r
-                               view="bottom";\r
-                               for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]+this.last_selection["line_nb"]-1-nbLineToScroll, lines.length); line_nb++){\r
-                                       new_pos+= lines[line_nb].length + 1;\r
-                               }\r
-                               char_left=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"]-1);\r
-                               if(shift_pressed){\r
-                                       //length=this.last_selection["selectionEnd"]-new_pos-char_left; \r
-                                       start= Math.min(this.last_selection["selectionStart"], new_pos+char_left);\r
-                                       length= Math.max(new_pos+char_left, this.last_selection["selectionStart"] )- start ;\r
-                                       if(new_pos+char_left < this.last_selection["selectionStart"])\r
-                                               view="top";\r
-                               }else\r
-                                       start=new_pos+char_left;\r
-                               this.area_select(start, length);\r
-                               \r
-                       }\r
-               }\r
-               else\r
-               {\r
-                       var nbLineToScroll= Math.floor( toScrollAmount / this.lineHeight );\r
-                       // fix number of line to scroll\r
-                       for( i = this.last_selection["line_start"]; i + diff < this.last_selection["line_start"] + nbLineToScroll ; i++ )\r
-                       {\r
-                               if( elem = _$('line_'+ i) )\r
-                               {\r
-                                       diff +=  Math.floor( ( elem.offsetHeight - 1 ) / this.lineHeight );\r
-                               }\r
-                       }\r
-                       nbLineToScroll  -= diff;\r
-                               \r
-                       if(this.last_selection["selec_direction"]=="down"){\r
-                               view="bottom";\r
-                               for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]+this.last_selection["line_nb"]-2+nbLineToScroll, lines.length); line_nb++){\r
-                                       if(line_nb==this.last_selection["line_start"]-1)\r
-                                               char_left= this.last_selection["selectionStart"] -new_pos;\r
-                                       new_pos+= lines[line_nb].length + 1;\r
-                                                                       \r
-                               }\r
-                               if(shift_pressed){\r
-                                       length=Math.abs(this.last_selection["selectionStart"]-new_pos); \r
-                                       length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"]);\r
-                                       //length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, char_left);\r
-                                       this.area_select(Math.min(this.last_selection["selectionStart"], new_pos), length);\r
-                               }else{\r
-                                       this.area_select(new_pos+char_left, 0);\r
-                               }\r
-                               \r
-                       }else{\r
-                               view="top";\r
-                               for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]+nbLineToScroll-1, lines.length, lines.length); line_nb++){\r
-                                       if(line_nb==this.last_selection["line_start"]-1)\r
-                                               char_left= this.last_selection["selectionStart"] -new_pos;\r
-                                       new_pos+= lines[line_nb].length + 1;                                                                    \r
-                               }\r
-                               if(shift_pressed){\r
-                                       length=Math.abs(this.last_selection["selectionEnd"]-new_pos-char_left); \r
-                                       length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"])- char_left-1;\r
-                                       //length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, char_left);\r
-                                       this.area_select(Math.min(this.last_selection["selectionEnd"], new_pos+char_left), length);\r
-                                       if(new_pos+char_left > this.last_selection["selectionEnd"])\r
-                                               view="bottom";\r
-                               }else{\r
-                                       this.area_select(new_pos+char_left, 0);\r
-                               }\r
-                               \r
-                       }\r
-               }\r
-               //console.log( new_pos, char_left, length, nbLineToScroll, toScrollAmount, _$("result").clientHeigh );\r
-               this.check_line_selection();\r
-               this.scroll_to_view(view);\r
-       };\r
-       \r
-       EditArea.prototype.start_resize= function(e){\r
-               parent.editAreaLoader.resize["id"]              = editArea.id;          \r
-               parent.editAreaLoader.resize["start_x"] = (e)? e.pageX : event.x + document.body.scrollLeft;            \r
-               parent.editAreaLoader.resize["start_y"] = (e)? e.pageY : event.y + document.body.scrollTop;\r
-               if(editArea.isIE)\r
-               {\r
-                       editArea.textarea.focus();\r
-                       editArea.getIESelection();\r
-               }\r
-               parent.editAreaLoader.resize["selectionStart"]  = editArea.textarea.selectionStart;\r
-               parent.editAreaLoader.resize["selectionEnd"]    = editArea.textarea.selectionEnd;\r
-               parent.editAreaLoader.start_resize_area();\r
-       };\r
-       \r
-       EditArea.prototype.toggle_full_screen= function(to){\r
-               var t=this, p=parent, a=t.textarea, html, frame, selStart, selEnd, old, icon;\r
-               if(typeof(to)=="undefined")\r
-                       to= !t.fullscreen['isFull'];\r
-               old                     = t.fullscreen['isFull'];\r
-               t.fullscreen['isFull']= to;\r
-               icon            = _$("fullscreen");\r
-               selStart        = t.textarea.selectionStart;\r
-               selEnd          = t.textarea.selectionEnd;\r
-               html            = p.document.getElementsByTagName("html")[0];\r
-               frame           = p.document.getElementById("frame_"+t.id);\r
-               \r
-               if(to && to!=old)\r
-               {       // toogle on fullscreen         \r
-                       \r
-                       t.fullscreen['old_overflow']    = p.get_css_property(html, "overflow");\r
-                       t.fullscreen['old_height']              = p.get_css_property(html, "height");\r
-                       t.fullscreen['old_width']               = p.get_css_property(html, "width");\r
-                       t.fullscreen['old_scrollTop']   = html.scrollTop;\r
-                       t.fullscreen['old_scrollLeft']  = html.scrollLeft;\r
-                       t.fullscreen['old_zIndex']              = p.get_css_property(frame, "z-index");\r
-                       if(t.isOpera){\r
-                               html.style.height       = "100%";\r
-                               html.style.width        = "100%";       \r
-                       }\r
-                       html.style.overflow     = "hidden";\r
-                       html.scrollTop          = 0;\r
-                       html.scrollLeft         = 0;\r
-                       \r
-                       frame.style.position    = "absolute";\r
-                       frame.style.width               = html.clientWidth+"px";\r
-                       frame.style.height              = html.clientHeight+"px";\r
-                       frame.style.display             = "block";\r
-                       frame.style.zIndex              = "999999";\r
-                       frame.style.top                 = "0px";\r
-                       frame.style.left                = "0px";\r
-                       \r
-                       // if the iframe was in a div with position absolute, the top and left are the one of the div, \r
-                       // so I fix it by seeing at witch position the iframe start and correcting it\r
-                       frame.style.top                 = "-"+p.calculeOffsetTop(frame)+"px";\r
-                       frame.style.left                = "-"+p.calculeOffsetLeft(frame)+"px";\r
-                       \r
-               //      parent.editAreaLoader.execCommand(t.id, "update_size();");\r
-               //      var body=parent.document.getElementsByTagName("body")[0];\r
-               //      body.appendChild(frame);\r
-                       \r
-                       t.switchClassSticky(icon, 'editAreaButtonSelected', false);\r
-                       t.fullscreen['allow_resize']= t.resize_allowed;\r
-                       t.allow_resize(false);\r
-       \r
-                       //t.area_select(selStart, selEnd-selStart);\r
-                       \r
-               \r
-                       // opera can't manage to do a direct size update\r
-                       if(t.isFirefox){\r
-                               p.editAreaLoader.execCommand(t.id, "update_size();");\r
-                               t.area_select(selStart, selEnd-selStart);\r
-                               t.scroll_to_view();\r
-                               t.focus();\r
-                       }else{\r
-                               setTimeout("p.editAreaLoader.execCommand('"+ t.id +"', 'update_size();');editArea.focus();", 10);\r
-                       }       \r
-                       \r
-       \r
-               }\r
-               else if(to!=old)\r
-               {       // toogle off fullscreen\r
-                       frame.style.position="static";\r
-                       frame.style.zIndex= t.fullscreen['old_zIndex'];\r
-               \r
-                       if(t.isOpera)\r
-                       {\r
-                               html.style.height       = "auto"; \r
-                               html.style.width        = "auto";\r
-                               html.style.overflow     = "auto";\r
-                       }\r
-                       else if(t.isIE && p!=top)\r
-                       {       // IE doesn't manage html overflow in frames like in normal page... \r
-                               html.style.overflow     = "auto";\r
-                       }\r
-                       else\r
-                       {\r
-                               html.style.overflow     = t.fullscreen['old_overflow'];\r
-                       }\r
-                       html.scrollTop  = t.fullscreen['old_scrollTop'];\r
-                       html.scrollLeft = t.fullscreen['old_scrollLeft'];\r
-               \r
-                       p.editAreaLoader.hide(t.id);\r
-                       p.editAreaLoader.show(t.id);\r
-                       \r
-                       t.switchClassSticky(icon, 'editAreaButtonNormal', false);\r
-                       if(t.fullscreen['allow_resize'])\r
-                               t.allow_resize(t.fullscreen['allow_resize']);\r
-                       if(t.isFirefox){\r
-                               t.area_select(selStart, selEnd-selStart);\r
-                               setTimeout("editArea.scroll_to_view();", 10);\r
-                       }                       \r
-                       \r
-                       //p.editAreaLoader.remove_event(p.window, "resize", editArea.update_size);\r
-               }\r
-               \r
-       };\r
-       \r
-       EditArea.prototype.allow_resize= function(allow){\r
-               var resize= _$("resize_area");\r
-               if(allow){\r
-                       \r
-                       resize.style.visibility="visible";\r
-                       parent.editAreaLoader.add_event(resize, "mouseup", editArea.start_resize);\r
-               }else{\r
-                       resize.style.visibility="hidden";\r
-                       parent.editAreaLoader.remove_event(resize, "mouseup", editArea.start_resize);\r
-               }\r
-               this.resize_allowed= allow;\r
-       };\r
-       \r
-       \r
-       EditArea.prototype.change_syntax= function(new_syntax, is_waiting){\r
-       //      alert("cahnge to "+new_syntax);\r
-               // the syntax is the same\r
-               if(new_syntax==this.settings['syntax'])\r
-                       return true;\r
-               \r
-               // check that the syntax is one allowed\r
-               var founded= false;\r
-               for(var i=0; i<this.syntax_list.length; i++)\r
-               {\r
-                       if(this.syntax_list[i]==new_syntax)\r
-                               founded= true;\r
-               }\r
-               \r
-               if(founded==true)\r
-               {\r
-                       // the reg syntax file is not loaded\r
-                       if(!parent.editAreaLoader.load_syntax[new_syntax])\r
-                       {\r
-                               // load the syntax file and wait for file loading\r
-                               if(!is_waiting)\r
-                                       parent.editAreaLoader.load_script(parent.editAreaLoader.baseURL + "reg_syntax/" + new_syntax + ".js");\r
-                               setTimeout("editArea.change_syntax('"+ new_syntax +"', true);", 100);\r
-                               this.show_waiting_screen();\r
-                       }\r
-                       else\r
-                       {\r
-                               if(!this.allready_used_syntax[new_syntax])\r
-                               {       // the syntax has still not been used\r
-                                       // rebuild syntax definition for new languages\r
-                                       parent.editAreaLoader.init_syntax_regexp();\r
-                                       // add style to the new list\r
-                                       this.add_style(parent.editAreaLoader.syntax[new_syntax]["styles"]);\r
-                                       this.allready_used_syntax[new_syntax]=true;\r
-                               }\r
-                               // be sure that the select option is correctly updated\r
-                               var sel= _$("syntax_selection");\r
-                               if(sel && sel.value!=new_syntax)\r
-                               {\r
-                                       for(var i=0; i<sel.length; i++){\r
-                                               if(sel.options[i].value && sel.options[i].value == new_syntax)\r
-                                                       sel.options[i].selected=true;\r
-                                       }\r
-                               }\r
-                               \r
-                       /*      if(this.settings['syntax'].length==0)\r
-                               {\r
-                                       this.switchClassSticky(_$("highlight"), 'editAreaButtonNormal', false);\r
-                                       this.switchClassSticky(_$("reset_highlight"), 'editAreaButtonNormal', false);\r
-                                       this.change_highlight(true);\r
-                               }\r
-                               */\r
-                               this.settings['syntax']= new_syntax;\r
-                               this.resync_highlight(true);\r
-                               this.hide_waiting_screen();\r
-                               return true;\r
-                       }\r
-               }\r
-               return false;\r
-       };\r
-       \r
-       \r
-       // check if the file has changed\r
-       EditArea.prototype.set_editable= function(is_editable){\r
-               if(is_editable)\r
-               {\r
-                       document.body.className= "";\r
-                       this.textarea.readOnly= false;\r
-                       this.is_editable= true;\r
-               }\r
-               else\r
-               {\r
-                       document.body.className= "non_editable";\r
-                       this.textarea.readOnly= true;\r
-                       this.is_editable= false;\r
-               }\r
-               \r
-               if(editAreas[this.id]["displayed"]==true)\r
-                       this.update_size();\r
-       };\r
-       \r
-       /***** Wrap mode *****/\r
-       \r
-       // toggling function for set_wrap_mode\r
-       EditArea.prototype.toggle_word_wrap= function(){\r
-               this.set_word_wrap( !this.settings['word_wrap'] );\r
-       };\r
-       \r
-       \r
-       // open a new tab for the given file\r
-       EditArea.prototype.set_word_wrap= function(to){\r
-               var t=this, a= t.textarea;\r
-               \r
-               if( t.isOpera )\r
-               {\r
-                       this.settings['word_wrap']= false;\r
-                       t.switchClassSticky( _$("word_wrap"), 'editAreaButtonDisabled', true );\r
-                       return false;\r
-               }\r
-               \r
-               if( to )\r
-               {\r
-                       wrap_mode = 'soft';\r
-                       this.container.className+= ' word_wrap';\r
-                       this.container.style.width="";\r
-                       this.content_highlight.style.width="";\r
-                       a.style.width="100%";\r
-                       if( t.isIE && t.isIE < 7 )      // IE 6 count 50 px too much\r
-                       {\r
-                               a.style.width   = ( a.offsetWidth-5 )+"px";\r
-                       }\r
-                       \r
-                       t.switchClassSticky( _$("word_wrap"), 'editAreaButtonSelected', false );\r
-               }\r
-               else\r
-               {\r
-                       wrap_mode = 'off';\r
-                       this.container.className        = this.container.className.replace(/word_wrap/g, '');\r
-                       t.switchClassSticky( _$("word_wrap"), 'editAreaButtonNormal', true );\r
-               }\r
-               this.textarea.previous_scrollWidth = '';\r
-               this.textarea.previous_scrollHeight = '';\r
-               \r
-               a.wrap= wrap_mode;\r
-               a.setAttribute('wrap', wrap_mode);\r
-               // only IE can change wrap mode on the fly without element reloading\r
-               if(!this.isIE)\r
-               {\r
-                       var start=a.selectionStart, end= a.selectionEnd;\r
-                       var parNod = a.parentNode, nxtSib = a.nextSibling;\r
-                       parNod.removeChild(a);\r
-                       parNod.insertBefore(a, nxtSib);\r
-                       this.area_select(start, end-start);\r
-               }\r
-               // reset some optimisation\r
-               this.settings['word_wrap']      = to;\r
-               this.focus();\r
-               this.update_size();\r
-               this.check_line_selection();\r
-       };      \r
-       /***** tabbed files managing functions *****/\r
-       \r
-       // open a new tab for the given file\r
-       EditArea.prototype.open_file= function(settings){\r
-               \r
-               if(settings['id']!="undefined")\r
-               {\r
-                       var id= settings['id'];\r
-                       // create a new file object with defautl values\r
-                       var new_file= {};\r
-                       new_file['id']                  = id;\r
-                       new_file['title']               = id;\r
-                       new_file['text']                = "";\r
-                       new_file['last_selection']      = "";           \r
-                       new_file['last_text_to_highlight']      = "";\r
-                       new_file['last_hightlighted_text']      = "";\r
-                       new_file['previous']    = [];\r
-                       new_file['next']                = [];\r
-                       new_file['last_undo']   = "";\r
-                       new_file['smooth_selection']    = this.settings['smooth_selection'];\r
-                       new_file['do_highlight']= this.settings['start_highlight'];\r
-                       new_file['syntax']              = this.settings['syntax'];\r
-                       new_file['scroll_top']  = 0;\r
-                       new_file['scroll_left'] = 0;\r
-                       new_file['selection_start']= 0;\r
-                       new_file['selection_end']= 0;\r
-                       new_file['edited']              = false;\r
-                       new_file['font_size']   = this.settings["font_size"];\r
-                       new_file['font_family'] = this.settings["font_family"];\r
-                       new_file['word_wrap']   = this.settings["word_wrap"];\r
-                       new_file['toolbar']             = {'links':{}, 'selects': {}};\r
-                       new_file['compare_edited_text']= new_file['text'];\r
-                       \r
-                       \r
-                       this.files[id]= new_file;\r
-                       this.update_file(id, settings);\r
-                       this.files[id]['compare_edited_text']= this.files[id]['text'];\r
-                       \r
-                       \r
-                       var html_id= 'tab_file_'+encodeURIComponent(id);\r
-                       this.filesIdAssoc[html_id]= id;\r
-                       this.files[id]['html_id']= html_id;\r
-               \r
-                       if(!_$(this.files[id]['html_id']) && id!="")\r
-                       {\r
-                               // be sure the tab browsing area is displayed\r
-                               this.tab_browsing_area.style.display= "block";\r
-                               var elem= document.createElement('li');\r
-                               elem.id= this.files[id]['html_id'];\r
-                               var close= "<img src=\""+ parent.editAreaLoader.baseURL +"images/close.gif\" title=\""+ this.get_translation('close_tab', 'word') +"\" onclick=\"editArea.execCommand('close_file', editArea.filesIdAssoc['"+ html_id +"']);return false;\" class=\"hidden\" onmouseover=\"this.className=''\" onmouseout=\"this.className='hidden'\" />";\r
-                               elem.innerHTML= "<a onclick=\"javascript:editArea.execCommand('switch_to_file', editArea.filesIdAssoc['"+ html_id +"']);\" selec=\"none\"><b><span><strong class=\"edited\">*</strong>"+ this.files[id]['title'] + close +"</span></b></a>";\r
-                               _$('tab_browsing_list').appendChild(elem);\r
-                               var elem= document.createElement('text');\r
-                               this.update_size();\r
-                       }\r
-                       \r
-                       // open file callback (for plugin)\r
-                       if(id!="")\r
-                               this.execCommand('file_open', this.files[id]);\r
-                       \r
-                       this.switch_to_file(id, true);\r
-                       return true;\r
-               }\r
-               else\r
-                       return false;\r
-       };\r
-       \r
-       // close the given file\r
-       EditArea.prototype.close_file= function(id){\r
-               if(this.files[id])\r
-               {\r
-                       this.save_file(id);\r
-                       \r
-                       // close file callback\r
-                       if(this.execCommand('file_close', this.files[id])!==false)\r
-                       {\r
-                               // remove the tab in the toolbar\r
-                               var li= _$(this.files[id]['html_id']);\r
-                               li.parentNode.removeChild(li);\r
-                               // select a new file\r
-                               if(id== this.curr_file)\r
-                               {\r
-                                       var next_file= "";\r
-                                       var is_next= false;\r
-                                       for(var i in this.files)\r
-                                       {\r
-                                               if( is_next )\r
-                                               {\r
-                                                       next_file       = i;\r
-                                                       break;\r
-                                               }\r
-                                               else if( i == id )\r
-                                                       is_next         = true;\r
-                                               else\r
-                                                       next_file       = i;\r
-                                       }\r
-                                       // display the next file\r
-                                       this.switch_to_file(next_file);\r
-                               }\r
-                               // clear datas\r
-                               delete (this.files[id]);\r
-                               this.update_size();\r
-                       }       \r
-               }\r
-       };\r
-       \r
-       // backup current file datas\r
-       EditArea.prototype.save_file= function(id){\r
-               var t= this, save, a_links, a_selects, save_butt, img, i;\r
-               if(t.files[id])\r
-               {\r
-                       var save= t.files[id];\r
-                       save['last_selection']                  = t.last_selection;             \r
-                       save['last_text_to_highlight']  = t.last_text_to_highlight;\r
-                       save['last_hightlighted_text']  = t.last_hightlighted_text;\r
-                       save['previous']                                = t.previous;\r
-                       save['next']                                    = t.next;\r
-                       save['last_undo']                               = t.last_undo;\r
-                       save['smooth_selection']                = t.smooth_selection;\r
-                       save['do_highlight']                    = t.do_highlight;\r
-                       save['syntax']                                  = t.settings['syntax'];\r
-                       save['text']                                    = t.textarea.value;\r
-                       save['scroll_top']                              = t.result.scrollTop;\r
-                       save['scroll_left']                             = t.result.scrollLeft;\r
-                       save['selection_start']                 = t.last_selection["selectionStart"];\r
-                       save['selection_end']                   = t.last_selection["selectionEnd"];\r
-                       save['font_size']                               = t.settings["font_size"];\r
-                       save['font_family']                             = t.settings["font_family"];\r
-                       save['word_wrap']                               = t.settings["word_wrap"];\r
-                       save['toolbar']                                 = {'links':{}, 'selects': {}};\r
-                       \r
-                       // save toolbar buttons state for fileSpecific buttons\r
-                       a_links= _$("toolbar_1").getElementsByTagName("a");\r
-                       for( i=0; i<a_links.length; i++ )\r
-                       {\r
-                               if( a_links[i].getAttribute('fileSpecific') == 'yes' )\r
-                               {\r
-                                       save_butt       = {};\r
-                                       img                     = a_links[i].getElementsByTagName('img')[0];\r
-                                       save_butt['classLock']          = img.classLock;\r
-                                       save_butt['className']          = img.className;\r
-                                       save_butt['oldClassName']       = img.oldClassName;\r
-                                       \r
-                                       save['toolbar']['links'][a_links[i].id]= save_butt;\r
-                               }\r
-                       }\r
-                       \r
-                       // save toolbar select state for fileSpecific buttons\r
-                       a_selects= _$("toolbar_1").getElementsByTagName("select");\r
-                       for( i=0; i<a_selects.length; i++)\r
-                       {\r
-                               if(a_selects[i].getAttribute('fileSpecific')=='yes')\r
-                               {\r
-                                       save['toolbar']['selects'][a_selects[i].id]= a_selects[i].value;\r
-                               }\r
-                       }\r
-                               \r
-                       t.files[id]= save;\r
-                       \r
-                       return save;\r
-               }\r
-               \r
-               return false;\r
-       };\r
-       \r
-       // update file_datas\r
-       EditArea.prototype.update_file= function(id, new_values){\r
-               for(var i in new_values)\r
-               {\r
-                       this.files[id][i]= new_values[i];\r
-               }\r
-       };\r
-       \r
-       // display file datas\r
-       EditArea.prototype.display_file= function(id){\r
-               var t = this, a= t.textarea, new_file, a_lis, a_selects, a_links, a_options, i, j;\r
-               \r
-               // we're showing the empty file\r
-               if(id=='')\r
-               {\r
-                       a.readOnly= true;\r
-                       t.tab_browsing_area.style.display= "none";\r
-                       _$("no_file_selected").style.display= "block";\r
-                       t.result.className= "empty";\r
-                       // clear current datas\r
-                       if(!t.files[''])\r
-                       {\r
-                               t.open_file({id: ''});\r
-                       }\r
-               }\r
-               // we try to show a non existent file, so we left\r
-               else if( typeof( t.files[id] ) == 'undefined' )\r
-               {\r
-                       return false;\r
-               }\r
-               // display a normal file\r
-               else\r
-               {\r
-                       t.result.className= "";\r
-                       a.readOnly= !t.is_editable;\r
-                       _$("no_file_selected").style.display= "none";\r
-                       t.tab_browsing_area.style.display= "block";\r
-               }\r
-               \r
-               // ensure to have last state for undo/redo actions\r
-               t.check_redo(true);\r
-               t.check_undo(true);\r
-               t.curr_file= id;\r
-               \r
-               // replace selected tab file\r
-               a_lis= t.tab_browsing_area.getElementsByTagName('li');\r
-               for( i=0; i<a_lis.length; i++)\r
-               {\r
-                       if(a_lis[i].id == t.files[id]['html_id'])\r
-                               a_lis[i].className='selected';\r
-                       else\r
-                               a_lis[i].className='';\r
-               }\r
-               \r
-               // replace next files datas\r
-               new_file= t.files[id];\r
-       \r
-               // restore text content\r
-               a.value= new_file['text'];\r
-               \r
-               // restore font-size\r
-               t.set_font(new_file['font_family'], new_file['font_size']);\r
-               \r
-               // restore selection and scroll\r
-               t.area_select(new_file['last_selection']['selection_start'], new_file['last_selection']['selection_end'] - new_file['last_selection']['selection_start']);\r
-               t.manage_size(true);\r
-               t.result.scrollTop= new_file['scroll_top'];\r
-               t.result.scrollLeft= new_file['scroll_left'];\r
-               \r
-               // restore undo, redo\r
-               t.previous=     new_file['previous'];\r
-               t.next= new_file['next'];\r
-               t.last_undo=    new_file['last_undo'];\r
-               t.check_redo(true);\r
-               t.check_undo(true);\r
-               \r
-               // restore highlight\r
-               t.execCommand("change_highlight", new_file['do_highlight']);\r
-               t.execCommand("change_syntax", new_file['syntax']);\r
-               \r
-               // smooth mode\r
-               t.execCommand("change_smooth_selection_mode", new_file['smooth_selection']);\r
-               \r
-               // word_wrap\r
-               t.execCommand("set_word_wrap", new_file['word_wrap']);\r
-                       \r
-               // restore links state in toolbar\r
-               a_links= new_file['toolbar']['links'];\r
-               for( i in a_links)\r
-               {\r
-                       if( img =  _$(i).getElementsByTagName('img')[0] )\r
-                       {\r
-                               img.classLock   = a_links[i]['classLock'];\r
-                               img.className   = a_links[i]['className'];\r
-                               img.oldClassName= a_links[i]['oldClassName'];\r
-                       }\r
-               }\r
-               \r
-               // restore select state in toolbar\r
-               a_selects = new_file['toolbar']['selects'];\r
-               for( i in a_selects)\r
-               {\r
-                       a_options       = _$(i).options;\r
-                       for( j=0; j<a_options.length; j++)\r
-                       {\r
-                               if( a_options[j].value == a_selects[i] )\r
-                                       _$(i).options[j].selected=true;\r
-                       }\r
-               }\r
-       \r
-       };\r
-\r
-       // change tab for displaying a new one\r
-       EditArea.prototype.switch_to_file= function(file_to_show, force_refresh){\r
-               if(file_to_show!=this.curr_file || force_refresh)\r
-               {\r
-                       this.save_file(this.curr_file);\r
-                       if(this.curr_file!='')\r
-                               this.execCommand('file_switch_off', this.files[this.curr_file]);\r
-                       this.display_file(file_to_show);\r
-                       if(file_to_show!='')\r
-                               this.execCommand('file_switch_on', this.files[file_to_show]);\r
-               }\r
-       };\r
-\r
-       // get all infos for the given file\r
-       EditArea.prototype.get_file= function(id){\r
-               if(id==this.curr_file)\r
-                       this.save_file(id);\r
-               return this.files[id];\r
-       };\r
-       \r
-       // get all available files infos\r
-       EditArea.prototype.get_all_files= function(){\r
-               tmp_files= this.files;\r
-               this.save_file(this.curr_file);\r
-               if(tmp_files[''])\r
-                       delete(this.files['']);\r
-               return tmp_files;\r
-       };\r
-       \r
-       \r
-       // check if the file has changed\r
-       EditArea.prototype.check_file_changes= function(){\r
-       \r
-               var id= this.curr_file;\r
-               if(this.files[id] && this.files[id]['compare_edited_text']!=undefined)\r
-               {\r
-                       if(this.files[id]['compare_edited_text'].length==this.textarea.value.length && this.files[id]['compare_edited_text']==this.textarea.value)\r
-                       {\r
-                               if(this.files[id]['edited']!= false)\r
-                                       this.set_file_edited_mode(id, false);\r
-                       }\r
-                       else\r
-                       {\r
-                               if(this.files[id]['edited']!= true)\r
-                                       this.set_file_edited_mode(id, true);\r
-                       }\r
-               }\r
-       };\r
-       \r
-       // set if the file is edited or not\r
-       EditArea.prototype.set_file_edited_mode= function(id, to){\r
-               // change CSS for edited tab\r
-               if(this.files[id] && _$(this.files[id]['html_id']))\r
-               {\r
-                       var link= _$(this.files[id]['html_id']).getElementsByTagName('a')[0];\r
-                       if(to==true)\r
-                       {\r
-                               link.className= 'edited';\r
-                       }\r
-                       else\r
-                       {\r
-                               link.className= '';\r
-                               if(id==this.curr_file)\r
-                                       text= this.textarea.value;\r
-                               else\r
-                                       text= this.files[id]['text'];\r
-                               this.files[id]['compare_edited_text']= text;\r
-                       }\r
-                               \r
-                       this.files[id]['edited']= to;\r
-               }\r
-       };\r
-\r
-       EditArea.prototype.set_show_line_colors = function(new_value){\r
-               this.show_line_colors = new_value;\r
-               \r
-               if( new_value )\r
-                       this.selection_field.className  += ' show_colors';\r
-               else\r
-                       this.selection_field.className  = this.selection_field.className.replace( / show_colors/g, '' );\r
-       };
\ No newline at end of file
diff --git a/project/static/js/edit_area_loader.js b/project/static/js/edit_area_loader.js
deleted file mode 100755 (executable)
index 34a17dd..0000000
+++ /dev/null
@@ -1,1080 +0,0 @@
-/******\r
- *\r
- *     EditArea \r
- *     Developped by Christophe Dolivet\r
- *     Released under LGPL, Apache and BSD licenses (use the one you want)\r
- *\r
-******/\r
-\r
-function EditAreaLoader(){\r
-       var t=this;\r
-       t.version= "0.8.1.1";\r
-       date= new Date();\r
-       t.start_time=date.getTime();\r
-       t.win= "loading";       // window loading state\r
-       t.error= false; // to know if load is interrrupt\r
-       t.baseURL="";\r
-       //t.suffix="";\r
-       t.template="";\r
-       t.lang= {};     // array of loaded speech language\r
-       t.load_syntax= {};      // array of loaded syntax language for highlight mode\r
-       t.syntax= {};   // array of initilized syntax language for highlight mode\r
-       t.loadedFiles= [];\r
-       t.waiting_loading= {};  // files that must be loaded in order to allow the script to really start\r
-       // scripts that must be loaded in the iframe\r
-       t.scripts_to_load= ["elements_functions", "resize_area", "reg_syntax"];\r
-       t.sub_scripts_to_load= ["edit_area", "manage_area" ,"edit_area_functions", "keyboard", "search_replace", "highlight", "regexp"];\r
-       \r
-       t.resize= []; // contain resizing datas\r
-       t.hidden= {};   // store datas of the hidden textareas\r
-       \r
-       t.default_settings= {\r
-               //id: "src"     // id of the textarea to transform\r
-               debug: false\r
-               ,smooth_selection: true\r
-               ,font_size: "10"                // not for IE\r
-               ,font_family: "monospace"       // can be "verdana,monospace". Allow non monospace font but Firefox get smaller tabulation with non monospace fonts. IE doesn't change the tabulation width and Opera doesn't take this option into account... \r
-               ,start_highlight: false // if start with highlight\r
-               ,toolbar: "search, go_to_line, fullscreen, |, undo, redo, |, select_font,|, change_smooth_selection, highlight, reset_highlight, word_wrap, |, help"\r
-               ,begin_toolbar: ""              //  "new_document, save, load, |"\r
-               ,end_toolbar: ""                // or end_toolbar\r
-               ,is_multi_files: false          // enable the multi file mode (the textarea content is ignored)\r
-               ,allow_resize: "both"   // possible values: "no", "both", "x", "y"\r
-               ,show_line_colors: false        // if the highlight is disabled for the line currently beeing edited (if enabled => heavy CPU use)\r
-               ,min_width: 400\r
-               ,min_height: 125\r
-               ,replace_tab_by_spaces: false\r
-               ,allow_toggle: true             // true or false\r
-               ,language: "en"\r
-               ,syntax: ""\r
-               ,syntax_selection_allow: "basic,brainfuck,c,coldfusion,cpp,css,html,java,js,pas,perl,php,python,ruby,robotstxt,sql,tsql,vb,xml"\r
-               ,display: "onload"              // onload or later\r
-               ,max_undo: 30\r
-               ,browsers: "known"      // all or known\r
-               ,plugins: "" // comma separated plugin list\r
-               ,gecko_spellcheck: false        // enable/disable by default the gecko_spellcheck\r
-               ,fullscreen: false\r
-               ,is_editable: true\r
-               ,cursor_position: "begin"\r
-               ,word_wrap: false               // define if the text is wrapped of not in the textarea\r
-               ,autocompletion: false  // NOT IMPLEMENTED                      \r
-               ,load_callback: ""              // click on load button (function name)\r
-               ,save_callback: ""              // click on save button (function name)\r
-               ,change_callback: ""    // textarea onchange trigger (function name)\r
-               ,submit_callback: ""    // form submited (function name)\r
-               ,EA_init_callback: ""   // EditArea initiliazed (function name)\r
-               ,EA_delete_callback: "" // EditArea deleted (function name)\r
-               ,EA_load_callback: ""   // EditArea fully loaded and displayed (function name)\r
-               ,EA_unload_callback: "" // EditArea delete while being displayed (function name)\r
-               ,EA_toggle_on_callback: ""      // EditArea toggled on (function name)\r
-               ,EA_toggle_off_callback: ""     // EditArea toggled off (function name)\r
-               ,EA_file_switch_on_callback: "" // a new tab is selected (called for the newly selected file)\r
-               ,EA_file_switch_off_callback: ""        // a new tab is selected (called for the previously selected file)\r
-               ,EA_file_close_callback: ""             // close a tab\r
-       };\r
-       \r
-       t.advanced_buttons = [\r
-                       // id, button img, command (it will try to find the translation of "id"), is_file_specific\r
-                       ['new_document', 'newdocument.gif', 'new_document', false],\r
-                       ['search', 'search.gif', 'show_search', false],\r
-                       ['go_to_line', 'go_to_line.gif', 'go_to_line', false],\r
-                       ['undo', 'undo.gif', 'undo', true],\r
-                       ['redo', 'redo.gif', 'redo', true],\r
-                       ['change_smooth_selection', 'smooth_selection.gif', 'change_smooth_selection_mode', true],\r
-                       ['reset_highlight', 'reset_highlight.gif', 'resync_highlight', true],\r
-                       ['highlight', 'highlight.gif','change_highlight', true],\r
-                       ['help', 'help.gif', 'show_help', false],\r
-                       ['save', 'save.gif', 'save', false],\r
-                       ['load', 'load.gif', 'load', false],\r
-                       ['fullscreen', 'fullscreen.gif', 'toggle_full_screen', false],\r
-                       ['word_wrap', 'word_wrap.gif', 'toggle_word_wrap', true],\r
-                       ['autocompletion', 'autocompletion.gif', 'toggle_autocompletion', true]\r
-               ];\r
-                       \r
-       // navigator identification\r
-       t.set_browser_infos(t);\r
-\r
-       if(t.isIE>=6 || t.isGecko || ( t.isWebKit && !t.isSafari<3 ) || t.isOpera>=9  || t.isCamino )\r
-               t.isValidBrowser=true;\r
-       else\r
-               t.isValidBrowser=false;\r
-\r
-       t.set_base_url();               \r
-       \r
-       for(var i=0; i<t.scripts_to_load.length; i++){\r
-               setTimeout("editAreaLoader.load_script('"+t.baseURL + t.scripts_to_load[i]+ ".js');", 1);       // let the time to Object editAreaLoader to be created before loading additionnal scripts\r
-               t.waiting_loading[t.scripts_to_load[i]+ ".js"]= false;\r
-       }\r
-       t.add_event(window, "load", EditAreaLoader.prototype.window_loaded);\r
-};\r
-       \r
-EditAreaLoader.prototype ={\r
-       has_error : function(){\r
-               this.error= true;\r
-               // set to empty all EditAreaLoader functions\r
-               for(var i in EditAreaLoader.prototype){\r
-                       EditAreaLoader.prototype[i]=function(){};               \r
-               }\r
-       },\r
-       \r
-       // add browser informations to the object passed in parameter\r
-       set_browser_infos : function(o){\r
-               ua= navigator.userAgent;\r
-               \r
-               // general detection\r
-               o.isWebKit      = /WebKit/.test(ua);\r
-               o.isGecko       = !o.isWebKit && /Gecko/.test(ua);\r
-               o.isMac         = /Mac/.test(ua);\r
-               \r
-               o.isIE  = (navigator.appName == "Microsoft Internet Explorer");\r
-               if(o.isIE){\r
-                       o.isIE = ua.replace(/^.*?MSIE\s+([0-9\.]+).*$/, "$1");\r
-                       if(o.isIE<6)\r
-                               o.has_error();\r
-               }\r
-\r
-               if(o.isOpera = (ua.indexOf('Opera') != -1)){    \r
-                       o.isOpera= ua.replace(/^.*?Opera.*?([0-9\.]+).*$/i, "$1");\r
-                       if(o.isOpera<9)\r
-                               o.has_error();\r
-                       o.isIE=false;                   \r
-               }\r
-\r
-               if(o.isFirefox =(ua.indexOf('Firefox') != -1))\r
-                       o.isFirefox = ua.replace(/^.*?Firefox.*?([0-9\.]+).*$/i, "$1");\r
-               // Firefox clones       \r
-               if( ua.indexOf('Iceweasel') != -1 )\r
-                       o.isFirefox     = ua.replace(/^.*?Iceweasel.*?([0-9\.]+).*$/i, "$1");\r
-               if( ua.indexOf('GranParadiso') != -1 )\r
-                       o.isFirefox     = ua.replace(/^.*?GranParadiso.*?([0-9\.]+).*$/i, "$1");\r
-               if( ua.indexOf('BonEcho') != -1 )\r
-                       o.isFirefox     = ua.replace(/^.*?BonEcho.*?([0-9\.]+).*$/i, "$1");\r
-               if( ua.indexOf('SeaMonkey') != -1)\r
-                       o.isFirefox = (ua.replace(/^.*?SeaMonkey.*?([0-9\.]+).*$/i, "$1") ) + 1;\r
-                       \r
-               if(o.isCamino =(ua.indexOf('Camino') != -1))\r
-                       o.isCamino = ua.replace(/^.*?Camino.*?([0-9\.]+).*$/i, "$1");\r
-                       \r
-               if(o.isSafari =(ua.indexOf('Safari') != -1))\r
-                       o.isSafari= ua.replace(/^.*?Version\/([0-9]+\.[0-9]+).*$/i, "$1");\r
-       \r
-               if(o.isChrome =(ua.indexOf('Chrome') != -1)) {\r
-                       o.isChrome = ua.replace(/^.*?Chrome.*?([0-9\.]+).*$/i, "$1");\r
-                       o.isSafari      = false;\r
-               }\r
-               \r
-       },\r
-       \r
-       window_loaded : function(){\r
-               editAreaLoader.win="loaded";\r
-               \r
-               // add events on forms\r
-               if (document.forms) {\r
-                       for (var i=0; i<document.forms.length; i++) {\r
-                               var form = document.forms[i];\r
-                               form.edit_area_replaced_submit=null;\r
-                               try {\r
-                                       \r
-                                       form.edit_area_replaced_submit = form.onsubmit;\r
-                                       form.onsubmit="";\r
-                               } catch (e) {// Do nothing\r
-                               }\r
-                               editAreaLoader.add_event(form, "submit", EditAreaLoader.prototype.submit);\r
-                               editAreaLoader.add_event(form, "reset", EditAreaLoader.prototype.reset);\r
-                       }\r
-               }\r
-               editAreaLoader.add_event(window, "unload", function(){for(var i in editAreas){editAreaLoader.delete_instance(i);}});    // ini callback\r
-       },\r
-       \r
-       // init the checkup of the selection of the IE textarea\r
-       init_ie_textarea : function(id){\r
-               var a=document.getElementById(id);\r
-               try{\r
-                       if(a && typeof(a.focused)=="undefined"){\r
-                               a.focus();\r
-                               a.focused=true;\r
-                               a.selectionStart= a.selectionEnd= 0;                    \r
-                               get_IE_selection(a);\r
-                               editAreaLoader.add_event(a, "focus", IE_textarea_focus);\r
-                               editAreaLoader.add_event(a, "blur", IE_textarea_blur);\r
-                               \r
-                       }\r
-               }catch(ex){}\r
-       },\r
-               \r
-       init : function(settings){\r
-               var t=this,s=settings,i;\r
-               \r
-               if(!s["id"])\r
-                       t.has_error();\r
-               if(t.error)\r
-                       return;\r
-               // if an instance of the editor already exists for this textarea => delete the previous one\r
-               if(editAreas[s["id"]])\r
-                       t.delete_instance(s["id"]);\r
-       \r
-               // init settings\r
-               for(i in t.default_settings){\r
-                       if(typeof(s[i])=="undefined")\r
-                               s[i]=t.default_settings[i];\r
-               }\r
-               \r
-               if(s["browsers"]=="known" && t.isValidBrowser==false){\r
-                       return;\r
-               }\r
-               \r
-               if(s["begin_toolbar"].length>0)\r
-                       s["toolbar"]= s["begin_toolbar"] +","+ s["toolbar"];\r
-               if(s["end_toolbar"].length>0)\r
-                       s["toolbar"]= s["toolbar"] +","+ s["end_toolbar"];\r
-               s["tab_toolbar"]= s["toolbar"].replace(/ /g,"").split(",");\r
-               \r
-               s["plugins"]= s["plugins"].replace(/ /g,"").split(",");\r
-               for(i=0; i<s["plugins"].length; i++){\r
-                       if(s["plugins"][i].length==0)\r
-                               s["plugins"].splice(i,1);\r
-               }\r
-       //      alert(settings["plugins"].length+": "+ settings["plugins"].join(","));\r
-               t.get_template();\r
-               t.load_script(t.baseURL + "langs/"+ s["language"] + ".js");\r
-               \r
-               if(s["syntax"].length>0){\r
-                       s["syntax"]=s["syntax"].toLowerCase();\r
-                       t.load_script(t.baseURL + "reg_syntax/"+ s["syntax"] + ".js");\r
-               }\r
-               //alert(this.template);\r
-               \r
-               editAreas[s["id"]]= {"settings": s};\r
-               editAreas[s["id"]]["displayed"]=false;\r
-               editAreas[s["id"]]["hidden"]=false;\r
-               \r
-               //if(settings["display"]=="onload")\r
-               t.start(s["id"]);\r
-       },\r
-       \r
-       // delete an instance of an EditArea\r
-       delete_instance : function(id){\r
-               var d=document,fs=window.frames,span,iframe;\r
-               editAreaLoader.execCommand(id, "EA_delete");\r
-               if(fs["frame_"+id] && fs["frame_"+id].editArea)\r
-               {\r
-                       if(editAreas[id]["displayed"])\r
-                               editAreaLoader.toggle(id, "off");\r
-                       fs["frame_"+id].editArea.execCommand("EA_unload");\r
-               }\r
-\r
-               // remove toggle infos and debug textarea\r
-               span= d.getElementById("EditAreaArroundInfos_"+id);\r
-               if(span)\r
-                       span.parentNode.removeChild(span);\r
-\r
-               // remove the iframe\r
-               iframe= d.getElementById("frame_"+id);\r
-               if(iframe){\r
-                       iframe.parentNode.removeChild(iframe);\r
-                       //delete iframe;\r
-                       try {\r
-                               delete fs["frame_"+id];\r
-                       } catch (e) {// Do nothing\r
-                       }\r
-               }       \r
-\r
-               delete editAreas[id];\r
-       },\r
-\r
-       \r
-       start : function(id){\r
-               var t=this,d=document,f,span,father,next,html='',html_toolbar_content='',template,content,i;\r
-               \r
-               // check that the window is loaded\r
-               if(t.win!="loaded"){\r
-                       setTimeout("editAreaLoader.start('"+id+"');", 50);\r
-                       return;\r
-               }\r
-               \r
-               // check that all needed scripts are loaded\r
-               for( i in t.waiting_loading){\r
-                       if(t.waiting_loading[i]!="loaded" && typeof(t.waiting_loading[i])!="function"){\r
-                               setTimeout("editAreaLoader.start('"+id+"');", 50);\r
-                               return;\r
-                       }\r
-               }\r
-               \r
-               // wait until language and syntax files are loaded\r
-               if(!t.lang[editAreas[id]["settings"]["language"]] || (editAreas[id]["settings"]["syntax"].length>0 && !t.load_syntax[editAreas[id]["settings"]["syntax"]]) ){\r
-                       setTimeout("editAreaLoader.start('"+id+"');", 50);\r
-                       return;\r
-               }\r
-               // init the regexp for syntax highlight\r
-               if(editAreas[id]["settings"]["syntax"].length>0)\r
-                       t.init_syntax_regexp();\r
-               \r
-                       \r
-               // display toggle option and debug area\r
-               if(!d.getElementById("EditAreaArroundInfos_"+id) && (editAreas[id]["settings"]["debug"] || editAreas[id]["settings"]["allow_toggle"]))\r
-               {\r
-                       span= d.createElement("span");\r
-                       span.id= "EditAreaArroundInfos_"+id;\r
-                       if(editAreas[id]["settings"]["allow_toggle"]){\r
-                               checked=(editAreas[id]["settings"]["display"]=="onload")?"checked='checked'":"";\r
-                               html+="<div id='edit_area_toggle_"+i+"'>";\r
-                               html+="<input id='edit_area_toggle_checkbox_"+ id +"' class='toggle_"+ id +"' type='checkbox' onclick='editAreaLoader.toggle(\""+ id +"\");' accesskey='e' "+checked+" />";\r
-                               html+="<label for='edit_area_toggle_checkbox_"+ id +"'>{$toggle}</label></div>";        \r
-                       }\r
-                       if(editAreas[id]["settings"]["debug"])\r
-                               html+="<textarea id='edit_area_debug_"+ id +"' spellcheck='off' style='z-index: 20; width: 100%; height: 120px;overflow: auto; border: solid black 1px;'></textarea><br />";                            \r
-                       html= t.translate(html, editAreas[id]["settings"]["language"]);                         \r
-                       span.innerHTML= html;                           \r
-                       father= d.getElementById(id).parentNode;\r
-                       next= d.getElementById(id).nextSibling;\r
-                       if(next==null)\r
-                               father.appendChild(span);\r
-                       else\r
-                               father.insertBefore(span, next);\r
-               }\r
-               \r
-               if(!editAreas[id]["initialized"])\r
-               {\r
-                       t.execCommand(id, "EA_init");   // ini callback\r
-                       if(editAreas[id]["settings"]["display"]=="later"){\r
-                               editAreas[id]["initialized"]= true;\r
-                               return;\r
-                       }\r
-               }\r
-               \r
-               if(t.isIE){     // launch IE selection checkup\r
-                       t.init_ie_textarea(id);\r
-               }\r
-                               \r
-               // get toolbar content\r
-               area=editAreas[id];\r
-               \r
-               for(i=0; i<area["settings"]["tab_toolbar"].length; i++){\r
-               //      alert(this.tab_toolbar[i]+"\n"+ this.get_control_html(this.tab_toolbar[i]));\r
-                       html_toolbar_content+= t.get_control_html(area["settings"]["tab_toolbar"][i], area["settings"]["language"]);\r
-               }\r
-               // translate toolbar text here for chrome 2\r
-               html_toolbar_content = t.translate(html_toolbar_content, area["settings"]["language"], "template"); \r
-               \r
-               \r
-               // create javascript import rules for the iframe if the javascript has not been already loaded by the compressor\r
-               if(!t.iframe_script){\r
-                       t.iframe_script="";\r
-                       for(i=0; i<t.sub_scripts_to_load.length; i++)\r
-                               t.iframe_script+='<script language="javascript" type="text/javascript" src="'+ t.baseURL + t.sub_scripts_to_load[i] +'.js"></script>';\r
-               }\r
-               \r
-               // add plugins scripts if not already loaded by the compressor (but need to load language in all the case)\r
-               for(i=0; i<area["settings"]["plugins"].length; i++){\r
-                       //if(typeof(area["settings"]["plugins"][i])=="function") continue;\r
-                       if(!t.all_plugins_loaded)\r
-                               t.iframe_script+='<script language="javascript" type="text/javascript" src="'+ t.baseURL + 'plugins/' + area["settings"]["plugins"][i] + '/' + area["settings"]["plugins"][i] +'.js"></script>';\r
-                       t.iframe_script+='<script language="javascript" type="text/javascript" src="'+ t.baseURL + 'plugins/' + area["settings"]["plugins"][i] + '/langs/' + area["settings"]["language"] +'.js"></script>';\r
-               }\r
-       \r
-               \r
-               // create css link for the iframe if the whole css text has not been already loaded by the compressor\r
-               if(!t.iframe_css){\r
-                       t.iframe_css="<link href='"+ t.baseURL +"edit_area.css' rel='stylesheet' type='text/css' />";\r
-               }\r
-               \r
-               \r
-               // create template\r
-               template= t.template.replace(/\[__BASEURL__\]/g, t.baseURL);\r
-               template= template.replace("[__TOOLBAR__]",html_toolbar_content);\r
-                       \r
-               \r
-               // fill template with good language sentences\r
-               template= t.translate(template, area["settings"]["language"], "template");\r
-               \r
-               // add css_code\r
-               template= template.replace("[__CSSRULES__]", t.iframe_css);                             \r
-               // add js_code\r
-               template= template.replace("[__JSCODE__]", t.iframe_script);\r
-               \r
-               // add version_code\r
-               template= template.replace("[__EA_VERSION__]", t.version);\r
-               //template=template.replace(/\{\$([^\}]+)\}/gm, this.traduc_template);\r
-               \r
-               //editAreas[area["settings"]["id"]]["template"]= template;\r
-               \r
-               area.textarea=d.getElementById(area["settings"]["id"]);\r
-               editAreas[area["settings"]["id"]]["textarea"]=area.textarea;\r
-       \r
-               // if removing previous instances from DOM before (fix from Marcin)\r
-               if(typeof(window.frames["frame_"+area["settings"]["id"]])!='undefined') \r
-                       delete window.frames["frame_"+area["settings"]["id"]];\r
-               \r
-               // insert template in the document after the textarea\r
-               father= area.textarea.parentNode;\r
-       /*      var container= document.createElement("div");\r
-               container.id= "EditArea_frame_container_"+area["settings"]["id"];\r
-       */      \r
-               content= d.createElement("iframe");\r
-               content.name= "frame_"+area["settings"]["id"];\r
-               content.id= "frame_"+area["settings"]["id"];\r
-               content.style.borderWidth= "0px";\r
-               setAttribute(content, "frameBorder", "0"); // IE\r
-               content.style.overflow="hidden";\r
-               content.style.display="none";\r
-\r
-               \r
-               next= area.textarea.nextSibling;\r
-               if(next==null)\r
-                       father.appendChild(content);\r
-               else\r
-                       father.insertBefore(content, next) ;            \r
-               f=window.frames["frame_"+area["settings"]["id"]];\r
-               f.document.open();\r
-               f.editAreas=editAreas;\r
-               f.area_id= area["settings"]["id"];      \r
-               f.document.area_id= area["settings"]["id"];     \r
-               f.document.write(template);\r
-               f.document.close();\r
-\r
-       //      frame.editAreaLoader=this;\r
-               //editAreas[area["settings"]["id"]]["displayed"]=true;\r
-               \r
-       },\r
-       \r
-       toggle : function(id, toggle_to){\r
-\r
-       /*      if((editAreas[id]["displayed"]==true  && toggle_to!="on") || toggle_to=="off"){\r
-                       this.toggle_off(id);\r
-               }else if((editAreas[id]["displayed"]==false  && toggle_to!="off") || toggle_to=="on"){\r
-                       this.toggle_on(id);\r
-               }*/\r
-               if(!toggle_to)\r
-                       toggle_to= (editAreas[id]["displayed"]==true)?"off":"on";\r
-               if(editAreas[id]["displayed"]==true  && toggle_to=="off"){\r
-                       this.toggle_off(id);\r
-               }else if(editAreas[id]["displayed"]==false  && toggle_to=="on"){\r
-                       this.toggle_on(id);\r
-               }\r
-       \r
-               return false;\r
-       },\r
-       \r
-       // static function\r
-       toggle_off : function(id){\r
-               var fs=window.frames,f,t,parNod,nxtSib,selStart,selEnd,scrollTop,scrollLeft;\r
-               if(fs["frame_"+id])\r
-               {       \r
-                       f       = fs["frame_"+id];\r
-                       t       = editAreas[id]["textarea"];\r
-                       if(f.editArea.fullscreen['isFull'])\r
-                               f.editArea.toggle_full_screen(false);\r
-                       editAreas[id]["displayed"]=false;\r
-                       \r
-                       // set wrap to off to keep same display mode (some browser get problem with this, so it need more complex operation             \r
-                       t.wrap = "off"; // for IE\r
-                       setAttribute(t, "wrap", "off"); // for Firefox  \r
-                       parNod = t.parentNode;\r
-                       nxtSib = t.nextSibling;\r
-                       parNod.removeChild(t); \r
-                       parNod.insertBefore(t, nxtSib);\r
-                       \r
-                       // restore values\r
-                       t.value= f.editArea.textarea.value;\r
-                       selStart        = f.editArea.last_selection["selectionStart"];\r
-                       selEnd          = f.editArea.last_selection["selectionEnd"];\r
-                       scrollTop       = f.document.getElementById("result").scrollTop;\r
-                       scrollLeft      = f.document.getElementById("result").scrollLeft;\r
-                       \r
-                       \r
-                       document.getElementById("frame_"+id).style.display='none';\r
-               \r
-                       t.style.display="inline";\r
-\r
-                       try{    // IE will give an error when trying to focus an invisible or disabled textarea\r
-                               t.focus();\r
-                       } catch(e){};\r
-                       if(this.isIE){\r
-                               t.selectionStart= selStart;\r
-                               t.selectionEnd  = selEnd;\r
-                               t.focused               = true;\r
-                               set_IE_selection(t);\r
-                       }else{\r
-                               if(this.isOpera && this.isOpera < 9.6 ){        // Opera bug when moving selection start and selection end\r
-                                       t.setSelectionRange(0, 0);\r
-                               }\r
-                               try{\r
-                                       t.setSelectionRange(selStart, selEnd);\r
-                               } catch(e) {};\r
-                       }\r
-                       t.scrollTop= scrollTop;\r
-                       t.scrollLeft= scrollLeft;\r
-                       f.editArea.execCommand("toggle_off");\r
-\r
-               }\r
-       },      \r
-       \r
-       // static function\r
-       toggle_on : function(id){\r
-               var fs=window.frames,f,t,selStart=0,selEnd=0,scrollTop=0,scrollLeft=0,curPos,elem;\r
-                       \r
-               if(fs["frame_"+id])\r
-               {\r
-                       f       = fs["frame_"+id];\r
-                       t       = editAreas[id]["textarea"];\r
-                       area= f.editArea;\r
-                       area.textarea.value= t.value;\r
-                       \r
-                       // store display values;\r
-                       curPos  = editAreas[id]["settings"]["cursor_position"];\r
-\r
-                       if(t.use_last==true)\r
-                       {\r
-                               selStart        = t.last_selectionStart;\r
-                               selEnd          = t.last_selectionEnd;\r
-                               scrollTop       = t.last_scrollTop;\r
-                               scrollLeft      = t.last_scrollLeft;\r
-                               t.use_last=false;\r
-                       }\r
-                       else if( curPos == "auto" )\r
-                       {\r
-                               try{\r
-                                       selStart        = t.selectionStart;\r
-                                       selEnd          = t.selectionEnd;\r
-                                       scrollTop       = t.scrollTop;\r
-                                       scrollLeft      = t.scrollLeft;\r
-                                       //alert(scrollTop);\r
-                               }catch(ex){}\r
-                       }\r
-                       \r
-                       // set to good size\r
-                       this.set_editarea_size_from_textarea(id, document.getElementById("frame_"+id));\r
-                       t.style.display="none";                 \r
-                       document.getElementById("frame_"+id).style.display="inline";\r
-                       area.execCommand("focus"); // without this focus opera doesn't manage well the iframe body height\r
-                       \r
-                       \r
-                       // restore display values\r
-                       editAreas[id]["displayed"]=true;\r
-                       area.execCommand("update_size");\r
-                       \r
-                       f.document.getElementById("result").scrollTop= scrollTop;\r
-                       f.document.getElementById("result").scrollLeft= scrollLeft;\r
-                       area.area_select(selStart, selEnd-selStart);\r
-                       area.execCommand("toggle_on");\r
-\r
-                       \r
-               }\r
-               else\r
-               {\r
-               /*      if(this.isIE)\r
-                               get_IE_selection(document.getElementById(id));  */      \r
-                       elem= document.getElementById(id);      \r
-                       elem.last_selectionStart= elem.selectionStart;\r
-                       elem.last_selectionEnd= elem.selectionEnd;\r
-                       elem.last_scrollTop= elem.scrollTop;\r
-                       elem.last_scrollLeft= elem.scrollLeft;\r
-                       elem.use_last=true;\r
-                       editAreaLoader.start(id);\r
-               }\r
-       },      \r
-       \r
-       set_editarea_size_from_textarea : function(id, frame){  \r
-               var elem,width,height;\r
-               elem    = document.getElementById(id);\r
-               \r
-               width   = Math.max(editAreas[id]["settings"]["min_width"], elem.offsetWidth)+"px";\r
-               height  = Math.max(editAreas[id]["settings"]["min_height"], elem.offsetHeight)+"px";\r
-               if(elem.style.width.indexOf("%")!=-1)\r
-                       width   = elem.style.width;\r
-               if(elem.style.height.indexOf("%")!=-1)\r
-                       height  = elem.style.height;\r
-               //alert("h: "+height+" w: "+width);\r
-       \r
-               frame.style.width= width;\r
-               frame.style.height= height;\r
-       },\r
-               \r
-       set_base_url : function(){\r
-               var t=this,elems,i,docBasePath;\r
-\r
-               if( !this.baseURL ){\r
-                       elems = document.getElementsByTagName('script');\r
-       \r
-                       for( i=0; i<elems.length; i++ ){\r
-                               if (elems[i].src && elems[i].src.match(/edit_area_[^\\\/]*$/i) ) {\r
-                                       var src = elems[i].src;\r
-                                       src = src.substring(0, src.lastIndexOf('/'));\r
-                                       this.baseURL = src;\r
-                                       this.file_name= elems[i].src.substr(elems[i].src.lastIndexOf("/")+1);\r
-                                       break;\r
-                               }\r
-                       }\r
-               }\r
-               \r
-               docBasePath     = document.location.href;\r
-               if (docBasePath.indexOf('?') != -1)\r
-                       docBasePath     = docBasePath.substring(0, docBasePath.indexOf('?'));\r
-               docBasePath     = docBasePath.substring(0, docBasePath.lastIndexOf('/'));\r
-       \r
-               // If not HTTP absolute\r
-               if (t.baseURL.indexOf('://') == -1 && t.baseURL.charAt(0) != '/') {\r
-                       // If site absolute\r
-                       t.baseURL = docBasePath + "/" + t.baseURL;\r
-               }\r
-               t.baseURL       +="/";  \r
-       },\r
-       \r
-       get_button_html : function(id, img, exec, isFileSpecific, baseURL) {\r
-               var cmd,html;\r
-               if(!baseURL)\r
-                       baseURL= this.baseURL;\r
-               cmd     = 'editArea.execCommand(\'' + exec + '\')';\r
-               html    = '<a id="a_'+ id +'" href="javascript:' + cmd + '" onclick="' + cmd + ';return false;" onmousedown="return false;" target="_self" fileSpecific="'+ (isFileSpecific?'yes':'no') +'">';\r
-               html    += '<img id="' + id + '" src="'+ baseURL +'images/' + img + '" title="{$' + id + '}" width="20" height="20" class="editAreaButtonNormal" onmouseover="editArea.switchClass(this,\'editAreaButtonOver\');" onmouseout="editArea.restoreClass(this);" onmousedown="editArea.restoreAndSwitchClass(this,\'editAreaButtonDown\');" /></a>';\r
-               return html;\r
-       },\r
-\r
-       get_control_html : function(button_name, lang) {                \r
-               var t=this,i,but,html,si;\r
-               for (i=0; i<t.advanced_buttons.length; i++)\r
-               {\r
-                       but = t.advanced_buttons[i];                    \r
-                       if (but[0] == button_name)\r
-                       {\r
-                               return t.get_button_html(but[0], but[1], but[2], but[3]);\r
-                       }       \r
-               }               \r
-                               \r
-               switch (button_name){\r
-                       case "*":\r
-                       case "return":\r
-                               return "<br />";\r
-                       case "|":\r
-                       case "separator":\r
-                               return '<img src="'+ t.baseURL +'images/spacer.gif" width="1" height="15" class="editAreaSeparatorLine">';\r
-                       case "select_font":\r
-                               html= "<select id='area_font_size' onchange='javascript:editArea.execCommand(\"change_font_size\")' fileSpecific='yes'>";\r
-                               html+="<option value='-1'>{$font_size}</option>";\r
-                               si=[8,9,10,11,12,14];\r
-                               for( i=0;i<si.length;i++){\r
-                                       html+="<option value='"+si[i]+"'>"+si[i]+" pt</option>";\r
-                               }\r
-                               html+="</select>";\r
-                               return html;\r
-                       case "syntax_selection":\r
-                               html= "<select id='syntax_selection' onchange='javascript:editArea.execCommand(\"change_syntax\", this.value)' fileSpecific='yes'>";\r
-                               html+="<option value='-1'>{$syntax_selection}</option>";\r
-                               html+="</select>";\r
-                               return html;\r
-               }\r
-               \r
-               return "<span id='tmp_tool_"+button_name+"'>["+button_name+"]</span>";          \r
-       },\r
-       \r
-       \r
-       get_template : function(){\r
-               if(this.template=="")\r
-               {\r
-                       var xhr_object = null; \r
-                       if(window.XMLHttpRequest) // Firefox \r
-                               xhr_object = new XMLHttpRequest(); \r
-                       else if(window.ActiveXObject) // Internet Explorer \r
-                               xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); \r
-                       else { // XMLHttpRequest not supported\r
-                               alert("XMLHTTPRequest not supported. EditArea not loaded"); \r
-                               return; \r
-                       } \r
-                        \r
-                       xhr_object.open("GET", this.baseURL+"template.html", false); \r
-                       xhr_object.send(null); \r
-                       if(xhr_object.readyState == 4) \r
-                               this.template=xhr_object.responseText;\r
-                       else\r
-                               this.has_error();\r
-               }\r
-       },\r
-       \r
-       // translate text\r
-       translate : function(text, lang, mode){\r
-               if(mode=="word")\r
-                       text=editAreaLoader.get_word_translation(text, lang);\r
-               else if(mode="template"){\r
-                       editAreaLoader.current_language= lang;\r
-                       text=text.replace(/\{\$([^\}]+)\}/gm, editAreaLoader.translate_template);\r
-               }\r
-               return text;\r
-       },\r
-       \r
-       translate_template : function(){\r
-               return editAreaLoader.get_word_translation(EditAreaLoader.prototype.translate_template.arguments[1], editAreaLoader.current_language);\r
-       },\r
-       \r
-       get_word_translation : function(val, lang){\r
-               var i;\r
-               \r
-               for( i in editAreaLoader.lang[lang]){\r
-                       if(i == val)\r
-                               return editAreaLoader.lang[lang][i];\r
-               }\r
-               return "_"+val;\r
-       },\r
-       \r
-       load_script : function(url){\r
-               var t=this,d=document,script,head;\r
-               \r
-               if( t.loadedFiles[url] )\r
-                       return; \r
-               //alert("load: "+url);\r
-               try{\r
-                       script= d.createElement("script");\r
-                       script.type= "text/javascript";\r
-                       script.src= url;\r
-                       script.charset= "UTF-8";\r
-                       d.getElementsByTagName("head")[0].appendChild(script);\r
-               }catch(e){\r
-                       d.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '" charset="UTF-8"></sc'+'ript>');\r
-               }\r
-               \r
-               t.loadedFiles[url] = true;\r
-       },\r
-       \r
-       add_event : function(obj, name, handler) {\r
-               try{\r
-                       if (obj.attachEvent) {\r
-                               obj.attachEvent("on" + name, handler);\r
-                       } else{\r
-                               obj.addEventListener(name, handler, false);\r
-                       }\r
-               }catch(e){}\r
-       },\r
-       \r
-       remove_event : function(obj, name, handler){\r
-               try{\r
-                       if (obj.detachEvent)\r
-                               obj.detachEvent("on" + name, handler);\r
-                       else\r
-                               obj.removeEventListener(name, handler, false);\r
-               }catch(e){}\r
-       },\r
-\r
-\r
-       // reset all the editareas in the form that have been reseted\r
-       reset : function(e){\r
-               var formObj,is_child,i,x;\r
-               \r
-               formObj = editAreaLoader.isIE ? window.event.srcElement : e.target;\r
-               if(formObj.tagName!='FORM')\r
-                       formObj= formObj.form;\r
-               \r
-               for( i in editAreas ){                  \r
-                       is_child= false;\r
-                       for( x=0;x<formObj.elements.length;x++ ) {\r
-                               if(formObj.elements[x].id == i)\r
-                                       is_child=true;\r
-                       }\r
-                       \r
-                       if(window.frames["frame_"+i] && is_child && editAreas[i]["displayed"]==true){\r
-                       \r
-                               var exec= 'window.frames["frame_'+ i +'"].editArea.textarea.value= document.getElementById("'+ i +'").value;';\r
-                               exec+= 'window.frames["frame_'+ i +'"].editArea.execCommand("focus");';\r
-                               exec+= 'window.frames["frame_'+ i +'"].editArea.check_line_selection();';\r
-                               exec+= 'window.frames["frame_'+ i +'"].editArea.execCommand("reset");';\r
-                               window.setTimeout(exec, 10);\r
-                       }\r
-               }               \r
-               return;\r
-       },\r
-       \r
-       \r
-       // prepare all the textarea replaced by an editarea to be submited\r
-       submit : function(e){           \r
-               var formObj,is_child,fs=window.frames,i,x;\r
-               formObj = editAreaLoader.isIE ? window.event.srcElement : e.target;\r
-               if(formObj.tagName!='FORM')\r
-                       formObj= formObj.form;\r
-               \r
-               for( i in editAreas){\r
-                       is_child= false;\r
-                       for( x=0;x<formObj.elements.length;x++ ) {\r
-                               if(formObj.elements[x].id == i)\r
-                                       is_child=true;\r
-                       }\r
-               \r
-                       if(is_child)\r
-                       {\r
-                               if(fs["frame_"+i] && editAreas[i]["displayed"]==true)\r
-                                       document.getElementById(i).value= fs["frame_"+ i].editArea.textarea.value;\r
-                               editAreaLoader.execCommand(i,"EA_submit");\r
-                       }\r
-               }                               \r
-               if( typeof(formObj.edit_area_replaced_submit) == "function" ){\r
-                       res= formObj.edit_area_replaced_submit();\r
-                       if(res==false){\r
-                               if(editAreaLoader.isIE)\r
-                                       return false;\r
-                               else\r
-                                       e.preventDefault();\r
-                       }\r
-               }\r
-               return;\r
-       },\r
-       \r
-       // allow to get the value of the editarea\r
-       getValue : function(id){\r
-        if(window.frames["frame_"+id] && editAreas[id]["displayed"]==true){\r
-            return window.frames["frame_"+ id].editArea.textarea.value;       \r
-        }else if(elem=document.getElementById(id)){\r
-               return elem.value;\r
-        }\r
-        return false;\r
-    },\r
-    \r
-    // allow to set the value of the editarea\r
-    setValue : function(id, new_val){\r
-       var fs=window.frames;\r
-       \r
-        if( ( f=fs["frame_"+id] ) && editAreas[id]["displayed"]==true){\r
-                       f.editArea.textarea.value= new_val;     \r
-                       f.editArea.execCommand("focus"); \r
-                       f.editArea.check_line_selection(false);  \r
-                       f.editArea.execCommand("onchange");\r
-        }else if(elem=document.getElementById(id)){\r
-               elem.value= new_val;\r
-        }\r
-    },\r
-           \r
-    // allow to get infos on the selection: array(start, end)\r
-    getSelectionRange : function(id){\r
-       var sel,eA,fs=window.frames;\r
-       \r
-       sel= {"start": 0, "end": 0};\r
-        if(fs["frame_"+id] && editAreas[id]["displayed"]==true){\r
-               eA= fs["frame_"+ id].editArea;\r
-\r
-                       sel["start"]    = eA.textarea.selectionStart;\r
-                       sel["end"]              = eA.textarea.selectionEnd;\r
-               \r
-        }else if( elem=document.getElementById(id) ){\r
-               sel= getSelectionRange(elem);\r
-        }\r
-        return sel;\r
-    },\r
-    \r
-    // allow to set the selection with the given start and end positions\r
-    setSelectionRange : function(id, new_start, new_end){\r
-       var fs=window.frames;\r
-       \r
-        if(fs["frame_"+id] && editAreas[id]["displayed"]==true){\r
-            fs["frame_"+ id].editArea.area_select(new_start, new_end-new_start);  \r
-                       // make an auto-scroll to the selection\r
-                       if(!this.isIE){\r
-                               fs["frame_"+ id].editArea.check_line_selection(false); \r
-                               fs["frame_"+ id].editArea.scroll_to_view();\r
-                       }   \r
-        }else if(elem=document.getElementById(id)){\r
-               setSelectionRange(elem, new_start, new_end);\r
-        }\r
-    },\r
-    \r
-    getSelectedText : function(id){\r
-       var sel= this.getSelectionRange(id);\r
-       \r
-        return this.getValue(id).substring(sel["start"], sel["end"]);\r
-    },\r
-       \r
-       setSelectedText : function(id, new_val){\r
-               var fs=window.frames,d=document,sel,text,scrollTop,scrollLeft,new_sel_end;\r
-               \r
-               new_val = new_val.replace(/\r/g, ""); \r
-               sel             = this.getSelectionRange(id);\r
-               text    = this.getValue(id);\r
-               if(fs["frame_"+id] && editAreas[id]["displayed"]==true){\r
-                       scrollTop       = fs["frame_"+ id].document.getElementById("result").scrollTop;\r
-                       scrollLeft      = fs["frame_"+ id].document.getElementById("result").scrollLeft;\r
-               }else{\r
-                       scrollTop       = d.getElementById(id).scrollTop;\r
-                       scrollLeft      = d.getElementById(id).scrollLeft;\r
-               }\r
-               \r
-               text    = text.substring(0, sel["start"])+ new_val +text.substring(sel["end"]);\r
-               this.setValue(id, text);\r
-               new_sel_end     = sel["start"]+ new_val.length;\r
-               this.setSelectionRange(id, sel["start"], new_sel_end);\r
-               \r
-               \r
-               // fix \r problem for selection length count on IE & Opera\r
-               if(new_val != this.getSelectedText(id).replace(/\r/g, "")){\r
-                       this.setSelectionRange(id, sel["start"], new_sel_end+ new_val.split("\n").length -1);\r
-               }\r
-               // restore scrolling position\r
-               if(fs["frame_"+id] && editAreas[id]["displayed"]==true){\r
-                       fs["frame_"+ id].document.getElementById("result").scrollTop= scrollTop;\r
-                       fs["frame_"+ id].document.getElementById("result").scrollLeft= scrollLeft;\r
-                       fs["frame_"+ id].editArea.execCommand("onchange");\r
-               }else{\r
-                       d.getElementById(id).scrollTop= scrollTop;\r
-                       d.getElementById(id).scrollLeft= scrollLeft;\r
-               }\r
-    },\r
-    \r
-    insertTags : function(id, open_tag, close_tag){\r
-       var old_sel,new_sel;\r
-       \r
-       old_sel = this.getSelectionRange(id);\r
-       text    = open_tag + this.getSelectedText(id) + close_tag;\r
-        \r
-               editAreaLoader.setSelectedText(id, text);\r
-               \r
-       new_sel = this.getSelectionRange(id);\r
-       if(old_sel["end"] > old_sel["start"])   // if text was selected, cursor at the end\r
-               this.setSelectionRange(id, new_sel["end"], new_sel["end"]);\r
-       else // cursor in the middle\r
-               this.setSelectionRange(id, old_sel["start"]+open_tag.length, old_sel["start"]+open_tag.length);\r
-    },\r
-    \r
-    // hide both EditArea and normal textarea\r
-       hide : function(id){\r
-               var fs= window.frames,d=document,t=this,scrollTop,scrollLeft,span;\r
-               if(d.getElementById(id) && !t.hidden[id])\r
-               {\r
-                       t.hidden[id]= {};\r
-                       t.hidden[id]["selectionRange"]= t.getSelectionRange(id);\r
-                       if(d.getElementById(id).style.display!="none")\r
-                       {\r
-                               t.hidden[id]["scrollTop"]= d.getElementById(id).scrollTop;\r
-                               t.hidden[id]["scrollLeft"]= d.getElementById(id).scrollLeft;\r
-                       }\r
-                                       \r
-                       if(fs["frame_"+id])\r
-                       {\r
-                               t.hidden[id]["toggle"]= editAreas[id]["displayed"];\r
-                               \r
-                               if(fs["frame_"+id] && editAreas[id]["displayed"]==true){\r
-                                       scrollTop       = fs["frame_"+ id].document.getElementById("result").scrollTop;\r
-                                       scrollLeft      = fs["frame_"+ id].document.getElementById("result").scrollLeft;\r
-                               }else{\r
-                                       scrollTop       = d.getElementById(id).scrollTop;\r
-                                       scrollLeft      = d.getElementById(id).scrollLeft;\r
-                               }\r
-                               t.hidden[id]["scrollTop"]= scrollTop;\r
-                               t.hidden[id]["scrollLeft"]= scrollLeft;\r
-                               \r
-                               if(editAreas[id]["displayed"]==true)\r
-                                       editAreaLoader.toggle_off(id);\r
-                       }\r
-                       \r
-                       // hide toggle button and debug box\r
-                       span= d.getElementById("EditAreaArroundInfos_"+id);\r
-                       if(span){\r
-                               span.style.display='none';\r
-                       }\r
-                       \r
-                       // hide textarea\r
-                       d.getElementById(id).style.display= "none";\r
-               }\r
-       },\r
-       \r
-       // restore hidden EditArea and normal textarea\r
-       show : function(id){\r
-               var fs= window.frames,d=document,t=this,span;\r
-               if((elem=d.getElementById(id)) && t.hidden[id])\r
-               {\r
-                       elem.style.display= "inline";\r
-                       elem.scrollTop= t.hidden[id]["scrollTop"];\r
-                       elem.scrollLeft= t.hidden[id]["scrollLeft"];\r
-                       span= d.getElementById("EditAreaArroundInfos_"+id);\r
-                       if(span){\r
-                               span.style.display='inline';\r
-                       }\r
-                       \r
-                       if(fs["frame_"+id])\r
-                       {\r
-                                                               \r
-                               // restore toggle button and debug box\r
-                       \r
-                               \r
-                               // restore textarea\r
-                               elem.style.display= "inline";\r
-                               \r
-                               // restore EditArea\r
-                               if(t.hidden[id]["toggle"]==true)\r
-                                       editAreaLoader.toggle_on(id);\r
-                               \r
-                               scrollTop       = t.hidden[id]["scrollTop"];\r
-                               scrollLeft      = t.hidden[id]["scrollLeft"];\r
-                               \r
-                               if(fs["frame_"+id] && editAreas[id]["displayed"]==true){\r
-                                       fs["frame_"+ id].document.getElementById("result").scrollTop    = scrollTop;\r
-                                       fs["frame_"+ id].document.getElementById("result").scrollLeft   = scrollLeft;\r
-                               }else{\r
-                                       elem.scrollTop  = scrollTop;\r
-                                       elem.scrollLeft = scrollLeft;\r
-                               }\r
-                       \r
-                       }\r
-                       // restore selection\r
-                       sel     = t.hidden[id]["selectionRange"];\r
-                       t.setSelectionRange(id, sel["start"], sel["end"]);\r
-                       delete t.hidden[id];    \r
-               }\r
-       },\r
-       \r
-       // get the current file datas (for multi file editing mode)\r
-       getCurrentFile : function(id){\r
-               return this.execCommand(id, 'get_file', this.execCommand(id, 'curr_file'));\r
-       },\r
-       \r
-       // get the given file datas (for multi file editing mode)\r
-       getFile : function(id, file_id){\r
-               return this.execCommand(id, 'get_file', file_id);\r
-       },\r
-       \r
-       // get all the openned files datas (for multi file editing mode)\r
-       getAllFiles : function(id){\r
-               return this.execCommand(id, 'get_all_files()');\r
-       },\r
-       \r
-       // open a file (for multi file editing mode)\r
-       openFile : function(id, file_infos){\r
-               return this.execCommand(id, 'open_file', file_infos);\r
-       },\r
-       \r
-       // close the given file (for multi file editing mode)\r
-       closeFile : function(id, file_id){\r
-               return this.execCommand(id, 'close_file', file_id);\r
-       },\r
-       \r
-       // close the given file (for multi file editing mode)\r
-       setFileEditedMode : function(id, file_id, to){\r
-               var reg1,reg2;\r
-               reg1    = new RegExp('\\\\', 'g');\r
-               reg2    = new RegExp('"', 'g');\r
-               return this.execCommand(id, 'set_file_edited_mode("'+ file_id.replace(reg1, '\\\\').replace(reg2, '\\"') +'", '+ to +')');\r
-       },\r
-       \r
-       \r
-       // allow to access to editarea functions and datas (for advanced users only)\r
-       execCommand : function(id, cmd, fct_param){\r
-               switch(cmd){\r
-                       case "EA_init":\r
-                               if(editAreas[id]['settings']["EA_init_callback"].length>0)\r
-                                       eval(editAreas[id]['settings']["EA_init_callback"]+"('"+ id +"');");\r
-                               break;\r
-                       case "EA_delete":\r
-                               if(editAreas[id]['settings']["EA_delete_callback"].length>0)\r
-                                       eval(editAreas[id]['settings']["EA_delete_callback"]+"('"+ id +"');");\r
-                               break;\r
-                       case "EA_submit":\r
-                               if(editAreas[id]['settings']["submit_callback"].length>0)\r
-                                       eval(editAreas[id]['settings']["submit_callback"]+"('"+ id +"');");\r
-                               break;\r
-               }\r
-        if(window.frames["frame_"+id] && window.frames["frame_"+ id].editArea){\r
-                       if(fct_param!=undefined)\r
-                               return eval('window.frames["frame_'+ id +'"].editArea.'+ cmd +'(fct_param);');\r
-                       else\r
-                               return eval('window.frames["frame_'+ id +'"].editArea.'+ cmd +';');       \r
-        }\r
-        return false;\r
-    }\r
-};\r
-       \r
-       var editAreaLoader= new EditAreaLoader();\r
-       var editAreas= {};\r
-\r
diff --git a/project/static/js/elements_functions.js b/project/static/js/elements_functions.js
deleted file mode 100755 (executable)
index 3426fd1..0000000
+++ /dev/null
@@ -1,333 +0,0 @@
-/****\r
- * This page contains some general usefull functions for javascript\r
- *\r
- ****/  \r
-       \r
-       \r
-       // need to redefine this functiondue to IE problem\r
-       function getAttribute( elm, aName ) {\r
-               var aValue,taName,i;\r
-               try{\r
-                       aValue = elm.getAttribute( aName );\r
-               }catch(exept){}\r
-               \r
-               if( ! aValue ){\r
-                       for( i = 0; i < elm.attributes.length; i ++ ) {\r
-                               taName = elm.attributes[i] .name.toLowerCase();\r
-                               if( taName == aName ) {\r
-                                       aValue = elm.attributes[i] .value;\r
-                                       return aValue;\r
-                               }\r
-                       }\r
-               }\r
-               return aValue;\r
-       };\r
-       \r
-       // need to redefine this function due to IE problem\r
-       function setAttribute( elm, attr, val ) {\r
-               if(attr=="class"){\r
-                       elm.setAttribute("className", val);\r
-                       elm.setAttribute("class", val);\r
-               }else{\r
-                       elm.setAttribute(attr, val);\r
-               }\r
-       };\r
-       \r
-       /* return a child element\r
-               elem: element we are searching in\r
-               elem_type: type of the eleemnt we are searching (DIV, A, etc...)\r
-               elem_attribute: attribute of the searched element that must match\r
-               elem_attribute_match: value that elem_attribute must match\r
-               option: "all" if must return an array of all children, otherwise return the first match element\r
-               depth: depth of search (-1 or no set => unlimited)\r
-       */\r
-       function getChildren(elem, elem_type, elem_attribute, elem_attribute_match, option, depth)\r
-       {           \r
-               if(!option)\r
-                       var option="single";\r
-               if(!depth)\r
-                       var depth=-1;\r
-               if(elem){\r
-                       var children= elem.childNodes;\r
-                       var result=null;\r
-                       var results= [];\r
-                       for (var x=0;x<children.length;x++) {\r
-                               strTagName = new String(children[x].tagName);\r
-                               children_class="?";\r
-                               if(strTagName!= "undefined"){\r
-                                       child_attribute= getAttribute(children[x],elem_attribute);\r
-                                       if((strTagName.toLowerCase()==elem_type.toLowerCase() || elem_type=="") && (elem_attribute=="" || child_attribute==elem_attribute_match)){\r
-                                               if(option=="all"){\r
-                                                       results.push(children[x]);\r
-                                               }else{\r
-                                                       return children[x];\r
-                                               }\r
-                                       }\r
-                                       if(depth!=0){\r
-                                               result=getChildren(children[x], elem_type, elem_attribute, elem_attribute_match, option, depth-1);\r
-                                               if(option=="all"){\r
-                                                       if(result.length>0){\r
-                                                               results= results.concat(result);\r
-                                                       }\r
-                                               }else if(result!=null){                                                                          \r
-                                                       return result;\r
-                                               }\r
-                                       }\r
-                               }\r
-                       }\r
-                       if(option=="all")\r
-                          return results;\r
-               }\r
-               return null;\r
-       };       \r
-       \r
-       function isChildOf(elem, parent){\r
-               if(elem){\r
-                       if(elem==parent)\r
-                               return true;\r
-                       while(elem.parentNode != 'undefined'){\r
-                               return isChildOf(elem.parentNode, parent);\r
-                       }\r
-               }\r
-               return false;\r
-       };\r
-       \r
-       function getMouseX(e){\r
-\r
-               if(e!=null && typeof(e.pageX)!="undefined"){\r
-                       return e.pageX;\r
-               }else{\r
-                       return (e!=null?e.x:event.x)+ document.documentElement.scrollLeft;\r
-               }\r
-       };\r
-       \r
-       function getMouseY(e){\r
-               if(e!=null && typeof(e.pageY)!="undefined"){\r
-                       return e.pageY;\r
-               }else{\r
-                       return (e!=null?e.y:event.y)+ document.documentElement.scrollTop;\r
-               }\r
-       };\r
-       \r
-       function calculeOffsetLeft(r){\r
-               return calculeOffset(r,"offsetLeft")\r
-       };\r
-       \r
-       function calculeOffsetTop(r){\r
-               return calculeOffset(r,"offsetTop")\r
-       };\r
-       \r
-       function calculeOffset(element,attr){\r
-               var offset=0;\r
-               while(element){\r
-                       offset+=element[attr];\r
-                       element=element.offsetParent\r
-               }\r
-               return offset;\r
-       };\r
-       \r
-       /** return the computed style\r
-        *      @param: elem: the reference to the element\r
-        *      @param: prop: the name of the css property       \r
-        */\r
-       function get_css_property(elem, prop)\r
-       {\r
-               if(document.defaultView)\r
-               {\r
-                       return document.defaultView.getComputedStyle(elem, null).getPropertyValue(prop);\r
-               }\r
-               else if(elem.currentStyle)\r
-               {\r
-                       var prop = prop.replace(/-\D/gi, function(sMatch)\r
-                       {\r
-                               return sMatch.charAt(sMatch.length - 1).toUpperCase();\r
-                       });\r
-                       return elem.currentStyle[prop];\r
-               }\r
-               else return null;\r
-       }\r
-       \r
-/****\r
- * Moving an element \r
- ***/  \r
-       \r
-       var _mCE;       // currently moving element\r
-       \r
-       /* allow to move an element in a window\r
-               e: the event\r
-               id: the id of the element\r
-               frame: the frame of the element \r
-               ex of use:\r
-                       in html:        <img id='move_area_search_replace' onmousedown='return parent.start_move_element(event,"area_search_replace", parent.frames["this_frame_id"]);' .../>  \r
-               or\r
-                       in javascript: document.getElementById("my_div").onmousedown= start_move_element\r
-       */\r
-       function start_move_element(e, id, frame){\r
-               var elem_id=(e.target || e.srcElement).id;\r
-               if(id)\r
-                       elem_id=id;             \r
-               if(!frame)\r
-                       frame=window;\r
-               if(frame.event)\r
-                       e=frame.event;\r
-                       \r
-               _mCE= frame.document.getElementById(elem_id);\r
-               _mCE.frame=frame;\r
-               frame.document.onmousemove= move_element;\r
-               frame.document.onmouseup= end_move_element;\r
-               /*_mCE.onmousemove= move_element;\r
-               _mCE.onmouseup= end_move_element;*/\r
-               \r
-               //alert(_mCE.frame.document.body.offsetHeight);\r
-               \r
-               mouse_x= getMouseX(e);\r
-               mouse_y= getMouseY(e);\r
-               //window.status=frame+ " elem: "+elem_id+" elem: "+ _mCE + " mouse_x: "+mouse_x;\r
-               _mCE.start_pos_x = mouse_x - (_mCE.style.left.replace("px","") || calculeOffsetLeft(_mCE));\r
-               _mCE.start_pos_y = mouse_y - (_mCE.style.top.replace("px","") || calculeOffsetTop(_mCE));\r
-               return false;\r
-       };\r
-       \r
-       function end_move_element(e){\r
-               _mCE.frame.document.onmousemove= "";\r
-               _mCE.frame.document.onmouseup= "";              \r
-               _mCE=null;\r
-       };\r
-       \r
-       function move_element(e){\r
-               var newTop,newLeft,maxLeft;\r
-\r
-               if( _mCE.frame && _mCE.frame.event )\r
-                       e=_mCE.frame.event;\r
-               newTop  = getMouseY(e) - _mCE.start_pos_y;\r
-               newLeft = getMouseX(e) - _mCE.start_pos_x;\r
-               \r
-               maxLeft = _mCE.frame.document.body.offsetWidth- _mCE.offsetWidth;\r
-               max_top = _mCE.frame.document.body.offsetHeight- _mCE.offsetHeight;\r
-               newTop  = Math.min(Math.max(0, newTop), max_top);\r
-               newLeft = Math.min(Math.max(0, newLeft), maxLeft);\r
-               \r
-               _mCE.style.top  = newTop+"px";\r
-               _mCE.style.left = newLeft+"px";         \r
-               return false;\r
-       };\r
-       \r
-/***\r
- * Managing a textarea (this part need the navigator infos from editAreaLoader\r
- ***/ \r
-       \r
-       var nav= editAreaLoader.nav;\r
-       \r
-       // allow to get infos on the selection: array(start, end)\r
-       function getSelectionRange(textarea){\r
-               return {"start": textarea.selectionStart, "end": textarea.selectionEnd};\r
-       };\r
-       \r
-       // allow to set the selection\r
-       function setSelectionRange(t, start, end){\r
-               t.focus();\r
-               \r
-               start   = Math.max(0, Math.min(t.value.length, start));\r
-               end             = Math.max(start, Math.min(t.value.length, end));\r
-       \r
-               if( this.isOpera && this.isOpera < 9.6 ){       // Opera bug when moving selection start and selection end\r
-                       t.selectionEnd = 1;     \r
-                       t.selectionStart = 0;                   \r
-                       t.selectionEnd = 1;     \r
-                       t.selectionStart = 0;           \r
-               }\r
-               t.selectionStart        = start;\r
-               t.selectionEnd          = end;          \r
-               //textarea.setSelectionRange(start, end);\r
-               \r
-               if(isIE)\r
-                       set_IE_selection(t);\r
-       };\r
-\r
-       \r
-       // set IE position in Firefox mode (textarea.selectionStart and textarea.selectionEnd). should work as a repeated task\r
-       function get_IE_selection(t){\r
-               var d=document,div,range,stored_range,elem,scrollTop,relative_top,line_start,line_nb,range_start,range_end,tab;\r
-               if(t && t.focused)\r
-               {       \r
-                       if(!t.ea_line_height)\r
-                       {       // calculate the lineHeight\r
-                               div= d.createElement("div");\r
-                               div.style.fontFamily= get_css_property(t, "font-family");\r
-                               div.style.fontSize= get_css_property(t, "font-size");\r
-                               div.style.visibility= "hidden";                 \r
-                               div.innerHTML="0";\r
-                               d.body.appendChild(div);\r
-                               t.ea_line_height= div.offsetHeight;\r
-                               d.body.removeChild(div);\r
-                       }\r
-                       //t.focus();\r
-                       range = d.selection.createRange();\r
-                       try\r
-                       {\r
-                               stored_range = range.duplicate();\r
-                               stored_range.moveToElementText( t );\r
-                               stored_range.setEndPoint( 'EndToEnd', range );\r
-                               if(stored_range.parentElement() == t){\r
-                                       // the range don't take care of empty lines in the end of the selection\r
-                                       elem            = t;\r
-                                       scrollTop       = 0;\r
-                                       while(elem.parentNode){\r
-                                               scrollTop+= elem.scrollTop;\r
-                                               elem    = elem.parentNode;\r
-                                       }\r
-                               \r
-                               //      var scrollTop= t.scrollTop + document.body.scrollTop;\r
-                                       \r
-                               //      var relative_top= range.offsetTop - calculeOffsetTop(t) + scrollTop;\r
-                                       relative_top= range.offsetTop - calculeOffsetTop(t)+ scrollTop;\r
-                               //      alert("rangeoffset: "+ range.offsetTop +"\ncalcoffsetTop: "+ calculeOffsetTop(t) +"\nrelativeTop: "+ relative_top);\r
-                                       line_start      = Math.round((relative_top / t.ea_line_height) +1);\r
-                                       \r
-                                       line_nb         = Math.round(range.boundingHeight / t.ea_line_height);\r
-                                       \r
-                                       range_start     = stored_range.text.length - range.text.length;\r
-                                       tab     = t.value.substr(0, range_start).split("\n");                   \r
-                                       range_start     += (line_start - tab.length)*2;         // add missing empty lines to the selection\r
-                                       t.selectionStart = range_start;\r
-                                       \r
-                                       range_end       = t.selectionStart + range.text.length;\r
-                                       tab     = t.value.substr(0, range_start + range.text.length).split("\n");                       \r
-                                       range_end       += (line_start + line_nb - 1 - tab.length)*2;\r
-                                       t.selectionEnd = range_end;\r
-                               }\r
-                       }\r
-                       catch(e){}\r
-               }\r
-               setTimeout("get_IE_selection(document.getElementById('"+ t.id +"'));", 50);\r
-       };\r
-       \r
-       function IE_textarea_focus(){\r
-               event.srcElement.focused= true;\r
-       }\r
-       \r
-       function IE_textarea_blur(){\r
-               event.srcElement.focused= false;\r
-       }\r
-       \r
-       // select the text for IE (take into account the \r difference)\r
-       function set_IE_selection( t ){\r
-               var nbLineStart,nbLineStart,nbLineEnd,range;\r
-               if(!window.closed){ \r
-                       nbLineStart=t.value.substr(0, t.selectionStart).split("\n").length - 1;\r
-                       nbLineEnd=t.value.substr(0, t.selectionEnd).split("\n").length - 1;\r
-                       try\r
-                       {\r
-                               range = document.selection.createRange();\r
-                               range.moveToElementText( t );\r
-                               range.setEndPoint( 'EndToStart', range );\r
-                               range.moveStart('character', t.selectionStart - nbLineStart);\r
-                               range.moveEnd('character', t.selectionEnd - nbLineEnd - (t.selectionStart - nbLineStart)  );\r
-                               range.select();\r
-                       }\r
-                       catch(e){}\r
-               }\r
-       };\r
-       \r
-       \r
-       editAreaLoader.waiting_loading["elements_functions.js"]= "loaded";\r
diff --git a/project/static/js/highlight.js b/project/static/js/highlight.js
deleted file mode 100755 (executable)
index fbfbc00..0000000
+++ /dev/null
@@ -1,391 +0,0 @@
-       // change_to: "on" or "off"\r
-       EditArea.prototype.change_highlight= function(change_to){\r
-               if(this.settings["syntax"].length==0 && change_to==false){\r
-                       this.switchClassSticky(_$("highlight"), 'editAreaButtonDisabled', true);\r
-                       this.switchClassSticky(_$("reset_highlight"), 'editAreaButtonDisabled', true);\r
-                       return false;\r
-               }\r
-               \r
-               if(this.do_highlight==change_to)\r
-                       return false;\r
-       \r
-                       \r
-               this.getIESelection();\r
-               var pos_start= this.textarea.selectionStart;\r
-               var pos_end= this.textarea.selectionEnd;\r
-               \r
-               if(this.do_highlight===true || change_to==false)\r
-                       this.disable_highlight();\r
-               else\r
-                       this.enable_highlight();\r
-               this.textarea.focus();\r
-               this.textarea.selectionStart = pos_start;\r
-               this.textarea.selectionEnd = pos_end;\r
-               this.setIESelection();\r
-                               \r
-       };\r
-       \r
-       EditArea.prototype.disable_highlight= function(displayOnly){\r
-               var t= this, a=t.textarea, new_Obj, old_class, new_class;\r
-                       \r
-               t.selection_field.innerHTML="";\r
-               t.selection_field_text.innerHTML="";\r
-               t.content_highlight.style.visibility="hidden";\r
-               // replacing the node is far more faster than deleting it's content in firefox\r
-               new_Obj= t.content_highlight.cloneNode(false);\r
-               new_Obj.innerHTML= "";                  \r
-               t.content_highlight.parentNode.insertBefore(new_Obj, t.content_highlight);\r
-               t.content_highlight.parentNode.removeChild(t.content_highlight);        \r
-               t.content_highlight= new_Obj;\r
-               old_class= parent.getAttribute( a,"class" );\r
-               if(old_class){\r
-                       new_class= old_class.replace( "hidden","" );\r
-                       parent.setAttribute( a, "class", new_class );\r
-               }\r
-       \r
-               a.style.backgroundColor="transparent";  // needed in order to see the bracket finders\r
-               \r
-               //var icon= document.getElementById("highlight");\r
-               //setAttribute(icon, "class", getAttribute(icon, "class").replace(/ selected/g, "") );\r
-               //t.restoreClass(icon);\r
-               //t.switchClass(icon,'editAreaButtonNormal');\r
-               t.switchClassSticky(_$("highlight"), 'editAreaButtonNormal', true);\r
-               t.switchClassSticky(_$("reset_highlight"), 'editAreaButtonDisabled', true);\r
-       \r
-               t.do_highlight=false;\r
-       \r
-               t.switchClassSticky(_$("change_smooth_selection"), 'editAreaButtonSelected', true);\r
-               if(typeof(t.smooth_selection_before_highlight)!="undefined" && t.smooth_selection_before_highlight===false){\r
-                       t.change_smooth_selection_mode(false);\r
-               }\r
-               \r
-       //      this.textarea.style.backgroundColor="#FFFFFF";\r
-       };\r
-\r
-       EditArea.prototype.enable_highlight= function(){\r
-               var t=this, a=t.textarea, new_class;\r
-               t.show_waiting_screen();\r
-                       \r
-               t.content_highlight.style.visibility="visible";\r
-               new_class       =parent.getAttribute(a,"class")+" hidden";\r
-               parent.setAttribute( a, "class", new_class );\r
-               \r
-               // IE can't manage mouse click outside text range without this\r
-               if( t.isIE )\r
-                       a.style.backgroundColor="#FFFFFF";      \r
-\r
-               t.switchClassSticky(_$("highlight"), 'editAreaButtonSelected', false);\r
-               t.switchClassSticky(_$("reset_highlight"), 'editAreaButtonNormal', false);\r
-               \r
-               t.smooth_selection_before_highlight=t.smooth_selection;\r
-               if(!t.smooth_selection)\r
-                       t.change_smooth_selection_mode(true);\r
-               t.switchClassSticky(_$("change_smooth_selection"), 'editAreaButtonDisabled', true);\r
-               \r
-               \r
-               t.do_highlight=true;\r
-               t.resync_highlight();\r
-                                       \r
-               t.hide_waiting_screen();        \r
-       };\r
-       \r
-       /**\r
-        * Ask to update highlighted text\r
-        * @param Array infos - Array of datas returned by EditArea.get_selection_infos()\r
-        */\r
-       EditArea.prototype.maj_highlight= function(infos){\r
-               // for speed mesure\r
-               var debug_opti="",tps_start= new Date().getTime(), tps_middle_opti=new Date().getTime();\r
-               var t=this, hightlighted_text, updated_highlight;       \r
-               var textToHighlight=infos["full_text"], doSyntaxOpti = false, doHtmlOpti = false, stay_begin="", stay_end="", trace_new , trace_last;\r
-               \r
-               if(t.last_text_to_highlight==infos["full_text"] && t.resync_highlight!==true)\r
-                       return;\r
-                                       \r
-               //  OPTIMISATION: will search to update only changed lines\r
-               if(t.reload_highlight===true){\r
-                       t.reload_highlight=false;\r
-               }else if(textToHighlight.length==0){\r
-                       textToHighlight="\n ";\r
-               }else{\r
-                       // get text change datas\r
-                       changes = t.checkTextEvolution(t.last_text_to_highlight,textToHighlight);\r
-                       \r
-                       // check if it can only reparse the changed text\r
-                       trace_new               = t.get_syntax_trace(changes.newTextLine).replace(/\r/g, '');\r
-                       trace_last              = t.get_syntax_trace(changes.lastTextLine).replace(/\r/g, '');\r
-                       doSyntaxOpti    = ( trace_new == trace_last );\r
-                       \r
-                       // check if the difference comes only from a new line created \r
-                       // => we have to remember that the editor can automaticaly add tabulation or space after the new line) \r
-                       if( !doSyntaxOpti && trace_new == "\n"+trace_last && /^[ \t\s]*\n[ \t\s]*$/.test( changes.newText.replace(/\r/g, '') ) && changes.lastText =="" )\r
-                       {\r
-                               doSyntaxOpti    = true;\r
-                       }\r
-                       \r
-                       // we do the syntax optimisation\r
-                       if( doSyntaxOpti ){\r
-                                               \r
-                               tps_middle_opti=new Date().getTime();   \r
-                       \r
-                               stay_begin= t.last_hightlighted_text.split("\n").slice(0, changes.lineStart).join("\n");\r
-                               if(changes.lineStart>0)\r
-                                       stay_begin+= "\n";\r
-                               stay_end= t.last_hightlighted_text.split("\n").slice(changes.lineLastEnd+1).join("\n");\r
-                               if(stay_end.length>0)\r
-                                       stay_end= "\n"+stay_end;\r
-                                       \r
-                               // Final check to see that we're not in the middle of span tags\r
-                               if( stay_begin.split('<span').length != stay_begin.split('</span').length \r
-                                       || stay_end.split('<span').length != stay_end.split('</span').length )\r
-                               {\r
-                                       doSyntaxOpti    = false;\r
-                                       stay_end                = '';\r
-                                       stay_begin              = '';\r
-                               }\r
-                               else\r
-                               {\r
-                                       if(stay_begin.length==0 && changes.posLastEnd==-1)\r
-                                               changes.newTextLine+="\n";\r
-                                       textToHighlight=changes.newTextLine;\r
-                               }\r
-                       }\r
-                       if(t.settings["debug"]){\r
-                               var ch =changes;\r
-                               debug_opti= ( doSyntaxOpti?"Optimisation": "No optimisation" )\r
-                                       +" start: "+ch.posStart +"("+ch.lineStart+")"\r
-                                       +" end_new: "+ ch.posNewEnd+"("+ch.lineNewEnd+")"\r
-                                       +" end_last: "+ ch.posLastEnd+"("+ch.lineLastEnd+")"\r
-                                       +"\nchanged_text: "+ch.newText+" => trace: "+trace_new\r
-                                       +"\nchanged_last_text: "+ch.lastText+" => trace: "+trace_last\r
-                                       //debug_opti+= "\nchanged: "+ infos["full_text"].substring(ch.posStart, ch.posNewEnd);\r
-                                       + "\nchanged_line: "+ch.newTextLine\r
-                                       + "\nlast_changed_line: "+ch.lastTextLine\r
-                                       +"\nstay_begin: "+ stay_begin.slice(-100)\r
-                                       +"\nstay_end: "+ stay_end.substr( 0, 100 );\r
-                                       //debug_opti="start: "+stay_begin_len+ "("+nb_line_start_unchanged+") end: "+ (stay_end_len)+ "("+(splited.length-nb_line_end_unchanged)+") ";\r
-                                       //debug_opti+="changed: "+ textToHighlight.substring(stay_begin_len, textToHighlight.length-stay_end_len)+" \n";\r
-                                       \r
-                                       //debug_opti+="changed: "+ stay_begin.substr(stay_begin.length-200)+ "----------"+ textToHighlight+"------------------"+ stay_end.substr(0,200) +"\n";\r
-                                       +"\n";\r
-                       }\r
-       \r
-                       \r
-                       // END OPTIMISATION\r
-               }\r
-\r
-               tps_end_opti    = new Date().getTime(); \r
-                               \r
-               // apply highlight\r
-               updated_highlight       = t.colorize_text(textToHighlight);\r
-               tpsAfterReg                     = new Date().getTime();\r
-               \r
-               /***\r
-                * see if we can optimize for updating only the required part of the HTML code\r
-                * \r
-                * The goal here will be to find the text node concerned by the modification and to update it\r
-                */\r
-               //-------------------------------------------\r
-               // \r
-               if( doSyntaxOpti )\r
-               {\r
-                       try\r
-                       {\r
-                               var replacedBloc, i, nbStart = '', nbEnd = '', newHtml, lengthOld, lengthNew;\r
-                               replacedBloc            = t.last_hightlighted_text.substring( stay_begin.length, t.last_hightlighted_text.length - stay_end.length );\r
-                               \r
-                               lengthOld       = replacedBloc.length;\r
-                               lengthNew       = updated_highlight.length;\r
-                               \r
-                               // find the identical caracters at the beginning\r
-                               for( i=0; i < lengthOld && i < lengthNew && replacedBloc.charAt(i) == updated_highlight.charAt(i) ; i++ )\r
-                               {\r
-                               }\r
-                               nbStart = i;\r
-                               // find the identical caracters at the end\r
-                               for( i=0; i + nbStart < lengthOld && i + nbStart < lengthNew && replacedBloc.charAt(lengthOld-i-1) == updated_highlight.charAt(lengthNew-i-1) ; i++ )\r
-                               {\r
-                               }\r
-                               nbEnd   = i;\r
-                               \r
-                               // get the changes\r
-                               lastHtml        = replacedBloc.substring( nbStart, lengthOld - nbEnd );\r
-                               newHtml         = updated_highlight.substring( nbStart, lengthNew - nbEnd );\r
-                               \r
-                               \r
-                               // We can do the optimisation only if we havn't touch to span elements\r
-                               if( newHtml.indexOf('<span') == -1 && newHtml.indexOf('</span') == -1 \r
-                                       && lastHtml.indexOf('<span') == -1 && lastHtml.indexOf('</span') == -1 )\r
-                               {\r
-                                       var beginStr, nbOpendedSpan, nbClosedSpan, nbUnchangedChars, span, textNode;\r
-                                       doHtmlOpti              = true;\r
-                                       beginStr                = t.last_hightlighted_text.substr( 0, stay_begin.length + nbStart );\r
-                       \r
-                                       nbOpendedSpan   = beginStr.split('<span').length - 1;\r
-                                       nbClosedSpan    = beginStr.split('</span').length - 1;\r
-                                       // retrieve the previously opened span (Add 1 for the first level span?)\r
-                                       span                    = t.content_highlight.getElementsByTagName('span')[ nbOpendedSpan ];\r
-                                       \r
-                                       //--------[\r
-                                       // get the textNode to update\r
-                                       \r
-                                       // if we're inside a span, we'll take the one that is opened (can be a parent of the current span)\r
-                                       parentSpan              = span;\r
-                                       maxStartOffset  = maxEndOffset = 0;\r
-                                       \r
-                                       // it will be in the child of the root node \r
-                                       if( nbOpendedSpan == nbClosedSpan )\r
-                                       {\r
-                                               while( parentSpan.parentNode != t.content_highlight && parentSpan.parentNode.tagName != 'PRE' )\r
-                                               {\r
-                                                       parentSpan      = parentSpan.parentNode;\r
-                                               }\r
-                                       }\r
-                                       // get the last opened span\r
-                                       else\r
-                                       {\r
-                                               maxStartOffset  = maxEndOffset = beginStr.length + 1;\r
-                                               // move to parent node for each closed span found after the lastest open span\r
-                                               nbClosed = beginStr.substr( Math.max( 0, beginStr.lastIndexOf( '<span', maxStartOffset - 1 ) ) ).split('</span').length - 1;\r
-                                               while( nbClosed > 0 )\r
-                                               {\r
-                                                       nbClosed--;\r
-                                                       parentSpan = parentSpan.parentNode;\r
-                                               }\r
-                                               \r
-                                               // find the position of the last opended tag\r
-                                               while( parentSpan.parentNode != t.content_highlight && parentSpan.parentNode.tagName != 'PRE' && ( tmpMaxStartOffset = Math.max( 0, beginStr.lastIndexOf( '<span', maxStartOffset - 1 ) ) ) < ( tmpMaxEndOffset = Math.max( 0, beginStr.lastIndexOf( '</span', maxEndOffset - 1 ) ) ) )\r
-                                               {\r
-                                                       maxStartOffset  = tmpMaxStartOffset;\r
-                                                       maxEndOffset    = tmpMaxEndOffset;\r
-                                               }\r
-                                       }\r
-                                       // Note: maxEndOffset is no more used but maxStartOffset will be used\r
-                                       \r
-                                       if( parentSpan.parentNode == t.content_highlight || parentSpan.parentNode.tagName == 'PRE' )\r
-                                       {\r
-                                               maxStartOffset  = Math.max( 0, beginStr.indexOf( '<span' ) );\r
-                                       }\r
-                                       \r
-                                       // find the matching text node (this will be one that will be at the end of the beginStr\r
-                                       if( maxStartOffset == beginStr.length )\r
-                                       {\r
-                                               nbSubSpanBefore = 0;\r
-                                       }\r
-                                       else\r
-                                       {\r
-                                               lastEndPos                              = Math.max( 0, beginStr.lastIndexOf( '>', maxStartOffset ) );\r
-               \r
-                                               // count the number of sub spans\r
-                                               nbSubSpanBefore                 = beginStr.substr( lastEndPos ).split('<span').length-1;\r
-                                       }\r
-                                       \r
-                                       // there is no sub-span before\r
-                                       if( nbSubSpanBefore == 0 )\r
-                                       {\r
-                                               textNode        = parentSpan.firstChild;\r
-                                       }\r
-                                       // we need to find where is the text node modified\r
-                                       else\r
-                                       {\r
-                                               // take the last direct child (no sub-child)\r
-                                               lastSubSpan     = parentSpan.getElementsByTagName('span')[ nbSubSpanBefore - 1 ];\r
-                                               while( lastSubSpan.parentNode != parentSpan )\r
-                                               {\r
-                                                       lastSubSpan     = lastSubSpan.parentNode;\r
-                                               }\r
-\r
-                                               // associate to next text node following the last sub span\r
-                                               if( lastSubSpan.nextSibling == null || lastSubSpan.nextSibling.nodeType != 3 )\r
-                                               {\r
-                                                       textNode        = document.createTextNode('');\r
-                                                       lastSubSpan.parentNode.insertBefore( textNode, lastSubSpan.nextSibling );\r
-                                               }\r
-                                               else\r
-                                               {\r
-                                                       textNode        = lastSubSpan.nextSibling;\r
-                                               }\r
-                                       }\r
-                                       //--------]\r
-                                       \r
-                                       \r
-                                       //--------[\r
-                                       // update the textNode content\r
-                                       \r
-                                       // number of caracters after the last opened of closed span\r
-                                       nbUnchangedChars = beginStr.length - Math.max( 0, beginStr.lastIndexOf( '>' ) + 1 );\r
-                                       \r
-                                       //      console.log( span, textNode, nbOpendedSpan,nbClosedSpan,  span.nextSibling, textNode.length, nbUnchangedChars, lastHtml, lastHtml.length, newHtml, newHtml.length );\r
-                                       //      alert( textNode.parentNode.className +'-'+ textNode.parentNode.tagName+"\n"+ textNode.data +"\n"+ nbUnchangedChars +"\n"+ lastHtml.length +"\n"+ newHtml +"\n"+ newHtml.length  );\r
-                                       \r
-                                       // IE only manage \r for cariage return in textNode and not \n or \r\n\r
-                                       if( t.isIE )\r
-                                       {\r
-                                               nbUnchangedChars        -= ( beginStr.substr( beginStr.length - nbUnchangedChars ).split("\n").length - 1 );\r
-                                               //alert( textNode.data.replace(/\r/g, '_r').replace(/\n/g, '_n')); \r
-                                               textNode.replaceData( nbUnchangedChars, lastHtml.replace(/\n/g, '').length, newHtml.replace(/\n/g, '') );\r
-                                       }\r
-                                       else\r
-                                       {\r
-                                               textNode.replaceData( nbUnchangedChars, lastHtml.length, newHtml );\r
-                                       }\r
-                                       //--------]\r
-                               }\r
-                       }\r
-                       // an exception shouldn't occured but if replaceData failed at least it won't break everything\r
-                       catch( e )\r
-                       {\r
-               //              throw e;\r
-               //              console.log( e );\r
-                               doHtmlOpti      = false;\r
-                       }\r
-                       \r
-               }\r
-               /*** END HTML update's optimisation ***/\r
-               // end test\r
-               \r
-       //                      console.log(  (TPS6-TPS5), (TPS5-TPS4), (TPS4-TPS3), (TPS3-TPS2), (TPS2-TPS1), _CPT );\r
-               // get the new highlight content\r
-               tpsAfterOpti2           = new Date().getTime();\r
-               hightlighted_text       = stay_begin + updated_highlight + stay_end;\r
-               if( !doHtmlOpti )\r
-               {\r
-                       // update the content of the highlight div by first updating a clone node (as there is no display in the same time for t node it's quite faster (5*))\r
-                       var new_Obj= t.content_highlight.cloneNode(false);\r
-                       if( ( t.isIE && t.isIE < 8 ) || ( t.isOpera && t.isOpera < 9.6 ) )\r
-                               new_Obj.innerHTML= "<pre><span class='"+ t.settings["syntax"] +"'>" + hightlighted_text + "</span></pre>";      \r
-                       else\r
-                               new_Obj.innerHTML= "<span class='"+ t.settings["syntax"] +"'>"+ hightlighted_text +"</span>";\r
-       \r
-                       t.content_highlight.parentNode.replaceChild(new_Obj, t.content_highlight);\r
-               \r
-                       t.content_highlight= new_Obj;\r
-               }\r
-               \r
-               t.last_text_to_highlight= infos["full_text"];\r
-               t.last_hightlighted_text= hightlighted_text;\r
-               \r
-               tps3=new Date().getTime();\r
-       \r
-               if(t.settings["debug"]){\r
-                       //lineNumber=tab_text.length;\r
-                       //t.debug.value+=" \nNB char: "+_$("src").value.length+" Nb line: "+ lineNumber;\r
-               \r
-                       t.debug.value= "Tps optimisation "+(tps_end_opti-tps_start)\r
-                               +" | tps reg exp: "+ (tpsAfterReg-tps_end_opti)\r
-                               +" | tps opti HTML : "+ (tpsAfterOpti2-tpsAfterReg) + ' '+ ( doHtmlOpti ? 'yes' : 'no' )\r
-                               +" | tps update highlight content: "+ (tps3-tpsAfterOpti2)\r
-                               +" | tpsTotal: "+ (tps3-tps_start)\r
-                               + "("+tps3+")\n"+ debug_opti;\r
-               //      t.debug.value+= "highlight\n"+hightlighted_text;*/\r
-               }\r
-               \r
-       };\r
-       \r
-       EditArea.prototype.resync_highlight= function(reload_now){\r
-               this.reload_highlight=true;\r
-               this.last_text_to_highlight="";\r
-               this.focus();           \r
-               if(reload_now)\r
-                       this.check_line_selection(false); \r
-       };      \r
diff --git a/project/static/js/images/autocompletion.gif b/project/static/js/images/autocompletion.gif
deleted file mode 100755 (executable)
index f3dfc2e..0000000
Binary files a/project/static/js/images/autocompletion.gif and /dev/null differ
diff --git a/project/static/js/images/close.gif b/project/static/js/images/close.gif
deleted file mode 100755 (executable)
index 679ca2a..0000000
Binary files a/project/static/js/images/close.gif and /dev/null differ
diff --git a/project/static/js/images/fullscreen.gif b/project/static/js/images/fullscreen.gif
deleted file mode 100755 (executable)
index 66fa6d9..0000000
Binary files a/project/static/js/images/fullscreen.gif and /dev/null differ
diff --git a/project/static/js/images/go_to_line.gif b/project/static/js/images/go_to_line.gif
deleted file mode 100755 (executable)
index 06042ec..0000000
Binary files a/project/static/js/images/go_to_line.gif and /dev/null differ
diff --git a/project/static/js/images/help.gif b/project/static/js/images/help.gif
deleted file mode 100755 (executable)
index 51a1ee4..0000000
Binary files a/project/static/js/images/help.gif and /dev/null differ
diff --git a/project/static/js/images/highlight.gif b/project/static/js/images/highlight.gif
deleted file mode 100755 (executable)
index 16491f6..0000000
Binary files a/project/static/js/images/highlight.gif and /dev/null differ
diff --git a/project/static/js/images/load.gif b/project/static/js/images/load.gif
deleted file mode 100755 (executable)
index 461698f..0000000
Binary files a/project/static/js/images/load.gif and /dev/null differ
diff --git a/project/static/js/images/move.gif b/project/static/js/images/move.gif
deleted file mode 100755 (executable)
index d15f9f5..0000000
Binary files a/project/static/js/images/move.gif and /dev/null differ
diff --git a/project/static/js/images/newdocument.gif b/project/static/js/images/newdocument.gif
deleted file mode 100755 (executable)
index a9d2938..0000000
Binary files a/project/static/js/images/newdocument.gif and /dev/null differ
diff --git a/project/static/js/images/opacity.png b/project/static/js/images/opacity.png
deleted file mode 100755 (executable)
index b4217cb..0000000
Binary files a/project/static/js/images/opacity.png and /dev/null differ
diff --git a/project/static/js/images/processing.gif b/project/static/js/images/processing.gif
deleted file mode 100755 (executable)
index cce32f2..0000000
Binary files a/project/static/js/images/processing.gif and /dev/null differ
diff --git a/project/static/js/images/redo.gif b/project/static/js/images/redo.gif
deleted file mode 100755 (executable)
index 3af9069..0000000
Binary files a/project/static/js/images/redo.gif and /dev/null differ
diff --git a/project/static/js/images/reset_highlight.gif b/project/static/js/images/reset_highlight.gif
deleted file mode 100755 (executable)
index 0fa3cb7..0000000
Binary files a/project/static/js/images/reset_highlight.gif and /dev/null differ
diff --git a/project/static/js/images/save.gif b/project/static/js/images/save.gif
deleted file mode 100755 (executable)
index 2777beb..0000000
Binary files a/project/static/js/images/save.gif and /dev/null differ
diff --git a/project/static/js/images/search.gif b/project/static/js/images/search.gif
deleted file mode 100755 (executable)
index cfe76b5..0000000
Binary files a/project/static/js/images/search.gif and /dev/null differ
diff --git a/project/static/js/images/smooth_selection.gif b/project/static/js/images/smooth_selection.gif
deleted file mode 100755 (executable)
index 8a532e5..0000000
Binary files a/project/static/js/images/smooth_selection.gif and /dev/null differ
diff --git a/project/static/js/images/spacer.gif b/project/static/js/images/spacer.gif
deleted file mode 100755 (executable)
index 3884865..0000000
Binary files a/project/static/js/images/spacer.gif and /dev/null differ
diff --git a/project/static/js/images/statusbar_resize.gif b/project/static/js/images/statusbar_resize.gif
deleted file mode 100755 (executable)
index af89d80..0000000
Binary files a/project/static/js/images/statusbar_resize.gif and /dev/null differ
diff --git a/project/static/js/images/undo.gif b/project/static/js/images/undo.gif
deleted file mode 100755 (executable)
index 520796d..0000000
Binary files a/project/static/js/images/undo.gif and /dev/null differ
diff --git a/project/static/js/images/word_wrap.gif b/project/static/js/images/word_wrap.gif
deleted file mode 100755 (executable)
index 8f256cc..0000000
Binary files a/project/static/js/images/word_wrap.gif and /dev/null differ
diff --git a/project/static/js/keyboard.js b/project/static/js/keyboard.js
deleted file mode 100755 (executable)
index 71b3a7c..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-var EA_keys = {8:"Retour arriere",9:"Tabulation",12:"Milieu (pave numerique)",13:"Entrer",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"Verr Maj",27:"Esc",32:"Space",33:"Page up",34:"Page down",35:"End",36:"Begin",37:"Left",38:"Up",39:"Right",40:"Down",44:"Impr ecran",45:"Inser",46:"Suppr",91:"Menu Demarrer Windows / touche pomme Mac",92:"Menu Demarrer Windows",93:"Menu contextuel Windows",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Verr Num",145:"Arret defil"};\r
-\r
-\r
-\r
-function keyDown(e){\r
-       if(!e){ // if IE\r
-               e=event;\r
-       }\r
-       \r
-       // send the event to the plugins\r
-       for(var i in editArea.plugins){\r
-               if(typeof(editArea.plugins[i].onkeydown)=="function"){\r
-                       if(editArea.plugins[i].onkeydown(e)===false){ // stop propaging\r
-                               if(editArea.isIE)\r
-                                       e.keyCode=0;\r
-                               return false;\r
-                       }\r
-               }\r
-       }\r
-\r
-       var target_id=(e.target || e.srcElement).id;\r
-       var use=false;\r
-       if (EA_keys[e.keyCode])\r
-               letter=EA_keys[e.keyCode];\r
-       else\r
-               letter=String.fromCharCode(e.keyCode);\r
-       \r
-       var low_letter= letter.toLowerCase();\r
-                       \r
-       if(letter=="Page up" && !editArea.isOpera){\r
-               editArea.execCommand("scroll_page", {"dir": "up", "shift": ShiftPressed(e)});\r
-               use=true;\r
-       }else if(letter=="Page down" && !editArea.isOpera){\r
-               editArea.execCommand("scroll_page", {"dir": "down", "shift": ShiftPressed(e)});\r
-               use=true;\r
-       }else if(editArea.is_editable==false){\r
-               // do nothing but also do nothing else (allow to navigate with page up and page down)\r
-               return true;\r
-       }else if(letter=="Tabulation" && target_id=="textarea" && !CtrlPressed(e) && !AltPressed(e)){   \r
-               if(ShiftPressed(e))\r
-                       editArea.execCommand("invert_tab_selection");\r
-               else\r
-                       editArea.execCommand("tab_selection");\r
-               \r
-               use=true;\r
-               if(editArea.isOpera || (editArea.isFirefox && editArea.isMac) ) // opera && firefox mac can't cancel tabulation events...\r
-                       setTimeout("editArea.execCommand('focus');", 1);\r
-       }else if(letter=="Entrer" && target_id=="textarea"){\r
-               if(editArea.press_enter())\r
-                       use=true;\r
-       }else if(letter=="Entrer" && target_id=="area_search"){\r
-               editArea.execCommand("area_search");\r
-               use=true;\r
-       }else  if(letter=="Esc"){\r
-               editArea.execCommand("close_all_inline_popup", e);\r
-               use=true;\r
-       }else if(CtrlPressed(e) && !AltPressed(e) && !ShiftPressed(e)){\r
-               switch(low_letter){\r
-                       case "f":                               \r
-                               editArea.execCommand("area_search");\r
-                               use=true;\r
-                               break;\r
-                       case "r":\r
-                               editArea.execCommand("area_replace");\r
-                               use=true;\r
-                               break;\r
-                       case "q":\r
-                               editArea.execCommand("close_all_inline_popup", e);\r
-                               use=true;\r
-                               break;\r
-                       case "h":\r
-                               editArea.execCommand("change_highlight");                       \r
-                               use=true;\r
-                               break;\r
-                       case "g":\r
-                               setTimeout("editArea.execCommand('go_to_line');", 5);   // the prompt stop the return false otherwise\r
-                               use=true;\r
-                               break;\r
-                       case "e":\r
-                               editArea.execCommand("show_help");\r
-                               use=true;\r
-                               break;\r
-                       case "z":\r
-                               use=true;\r
-                               editArea.execCommand("undo");\r
-                               break;\r
-                       case "y":\r
-                               use=true;\r
-                               editArea.execCommand("redo");\r
-                               break;\r
-                       default:\r
-                               break;                  \r
-               }               \r
-       }               \r
-       \r
-       // check to disable the redo possibility if the textarea content change\r
-       if(editArea.next.length > 0){\r
-               setTimeout("editArea.check_redo();", 10);\r
-       }\r
-       \r
-       setTimeout("editArea.check_file_changes();", 10);\r
-       \r
-       \r
-       if(use){\r
-               // in case of a control that sould'nt be used by IE but that is used => THROW a javascript error that will stop key action\r
-               if(editArea.isIE)\r
-                       e.keyCode=0;\r
-               return false;\r
-       }\r
-       //alert("Test: "+ letter + " ("+e.keyCode+") ALT: "+ AltPressed(e) + " CTRL "+ CtrlPressed(e) + " SHIFT "+ ShiftPressed(e));\r
-       \r
-       return true;\r
-       \r
-};\r
-\r
-\r
-// return true if Alt key is pressed\r
-function AltPressed(e) {\r
-       if (window.event) {\r
-               return (window.event.altKey);\r
-       } else {\r
-               if(e.modifiers)\r
-                       return (e.altKey || (e.modifiers % 2));\r
-               else\r
-                       return e.altKey;\r
-       }\r
-};\r
-\r
-// return true if Ctrl key is pressed\r
-function CtrlPressed(e) {\r
-       if (window.event) {\r
-               return (window.event.ctrlKey);\r
-       } else {\r
-               return (e.ctrlKey || (e.modifiers==2) || (e.modifiers==3) || (e.modifiers>5));\r
-       }\r
-};\r
-\r
-// return true if Shift key is pressed\r
-function ShiftPressed(e) {\r
-       if (window.event) {\r
-               return (window.event.shiftKey);\r
-       } else {\r
-               return (e.shiftKey || (e.modifiers>3));\r
-       }\r
-};\r
diff --git a/project/static/js/langs/bg.js b/project/static/js/langs/bg.js
deleted file mode 100755 (executable)
index d4cd77f..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*\r
- *     Bulgarian translation\r
- *     Author:         Valentin Hristov\r
- *     Company:        SOFTKIT Bulgarian\r
- *     Site:           http://www.softkit-bg.com\r
- */\r
-editAreaLoader.lang["bg"]={\r
-new_document: "нов документ",\r
-search_button: "търсене и замяна",\r
-search_command: "търси следващия / отвори прозорец с търсачка",\r
-search: "търсене",\r
-replace: "замяна",\r
-replace_command: "замяна / отвори прозорец с търсачка",\r
-find_next: "намери следващия",\r
-replace_all: "замени всички",\r
-reg_exp: "реголярни изрази",\r
-match_case: "чуствителен към регистъра",\r
-not_found: "няма резултат.",\r
-occurrence_replaced: "замяната е осъществена.",\r
-search_field_empty: "Полето за търсене е празно",\r
-restart_search_at_begin: "До края на документа. Почни с началото.",\r
-move_popup: "премести прозореца с търсачката",\r
-font_size: "--Размер на шрифта--",\r
-go_to_line: "премени към реда",\r
-go_to_line_prompt: "премени към номера на реда:",\r
-undo: "отмени",\r
-redo: "върни",\r
-change_smooth_selection: "включи/изключи някой от функциите за преглед (по красиво, но повече натоварва)",\r
-highlight: "превключване на оцветяване на синтаксиса включена/изключена",\r
-reset_highlight: "въстанови оцветяване на синтаксиса (ако не е синхронизиран с текста)",\r
-word_wrap: "режим на пренасяне на дълги редове",\r
-help: "за програмата",\r
-save: "съхрани",\r
-load: "зареди",\r
-line_abbr: "Стр",\r
-char_abbr: "Стлб",\r
-position: "Позиция",\r
-total: "Всичко",\r
-close_popup: "затвори прозореца",\r
-shortcuts: "Бързи клавиши",\r
-add_tab: "добави табулация в текста",\r
-remove_tab: "премахни табулацията в текста",\r
-about_notice: "Внимание: използвайте функцията оцветяване на синтаксиса само за малки текстове",\r
-toggle: "Превключи редактор",\r
-accesskey: "Бърз клавиш",\r
-tab: "Tab",\r
-shift: "Shift",\r
-ctrl: "Ctrl",\r
-esc: "Esc",\r
-processing: "Зареждане...",\r
-fullscreen: "на цял екран",\r
-syntax_selection: "--Синтаксис--",\r
-syntax_css: "CSS",\r
-syntax_html: "HTML",\r
-syntax_js: "Javascript",\r
-syntax_php: "PHP",\r
-syntax_python: "Python",\r
-syntax_vb: "Visual Basic",\r
-syntax_xml: "XML",\r
-syntax_c: "C",\r
-syntax_cpp: "C++",\r
-syntax_basic: "Basic",\r
-syntax_pas: "Pascal",\r
-syntax_brainfuck: "Brainfuck",\r
-syntax_sql: "SQL",\r
-syntax_ruby: "Ruby",\r
-syntax_robotstxt: "Robots txt",\r
-syntax_tsql: "T-SQL",\r
-syntax_perl: "Perl",\r
-syntax_coldfusion: "Coldfusion",\r
-syntax_java: "Java",\r
-close_tab: "Затвори файла"\r
-};\r
diff --git a/project/static/js/langs/cs.js b/project/static/js/langs/cs.js
deleted file mode 100755 (executable)
index d0dd55c..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-editAreaLoader.lang["cs"]={\r
-new_document: "Nový dokument",\r
-search_button: "Najdi a nahraď",\r
-search_command: "Hledej další / otevři vyhledávací pole",\r
-search: "Hledej",\r
-replace: "Nahraď",\r
-replace_command: "Nahraď / otevři vyhledávací pole",\r
-find_next: "Najdi další",\r
-replace_all: "Nahraď vše",\r
-reg_exp: "platné výrazy",\r
-match_case: "vyhodnocené výrazy",\r
-not_found: "nenalezené.",\r
-occurrence_replaced: "výskyty nahrazené.",\r
-search_field_empty: "Pole vyhledávání je prázdné",\r
-restart_search_at_begin: "Dosažen konec souboru, začínám od začátku.",\r
-move_popup: "Přesuň vyhledávací okno",\r
-font_size: "--Velikost textu--",\r
-go_to_line: "Přejdi na řádek",\r
-go_to_line_prompt: "Přejdi na řádek:",\r
-undo: "krok zpět",\r
-redo: "znovu",\r
-change_smooth_selection: "Povolit nebo zakázat některé ze zobrazených funkcí (účelnější zobrazení požaduje větší zatížení procesoru)",\r
-highlight: "Zvýrazňování syntaxe zap./vyp.",\r
-reset_highlight: "Obnovit zvýraznění (v případě nesrovnalostí)",\r
-word_wrap: "toggle word wrapping mode",\r
-help: "O programu",\r
-save: "Uložit",\r
-load: "Otevřít",\r
-line_abbr: "Ř.",\r
-char_abbr: "S.",\r
-position: "Pozice",\r
-total: "Celkem",\r
-close_popup: "Zavřít okno",\r
-shortcuts: "Zkratky",\r
-add_tab: "Přidat tabulování textu",\r
-remove_tab: "Odtsranit tabulování textu",\r
-about_notice: "Upozornění! Funkce zvýrazňování textu je k dispozici pouze pro malý text",\r
-toggle: "Přepnout editor",\r
-accesskey: "Přístupová klávesa",\r
-tab: "Záložka",\r
-shift: "Shift",\r
-ctrl: "Ctrl",\r
-esc: "Esc",\r
-processing: "Zpracovávám ...",\r
-fullscreen: "Celá obrazovka",\r
-syntax_selection: "--vyber zvýrazňovač--",\r
-syntax_css: "CSS",\r
-syntax_html: "HTML",\r
-syntax_js: "Javascript",\r
-syntax_php: "Php",\r
-syntax_python: "Python",\r
-syntax_vb: "Visual Basic",\r
-syntax_xml: "Xml",\r
-syntax_c: "C",\r
-syntax_cpp: "CPP",\r
-syntax_basic: "Basic",\r
-syntax_pas: "Pascal",\r
-syntax_brainfuck: "Brainfuck",\r
-syntax_sql: "SQL",\r
-syntax_ruby: "Ruby",\r
-syntax_robotstxt: "Robots txt",\r
-syntax_tsql: "T-SQL",\r
-syntax_perl: "Perl",\r
-syntax_coldfusion: "Coldfusion",\r
-syntax_java: "Java",\r
-close_tab: "Close file"\r
-};\r
diff --git a/project/static/js/langs/de.js b/project/static/js/langs/de.js
deleted file mode 100755 (executable)
index 251ac50..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-editAreaLoader.lang["de"]={\r
-new_document: "Neues Dokument",\r
-search_button: "Suchen und Ersetzen",\r
-search_command: "Weitersuchen / &ouml;ffne Suchfeld",\r
-search: "Suchen",\r
-replace: "Ersetzen",\r
-replace_command: "Ersetzen / &ouml;ffne Suchfeld",\r
-find_next: "Weitersuchen",\r
-replace_all: "Ersetze alle Treffer",\r
-reg_exp: "regul&auml;re Ausdr&uuml;cke",\r
-match_case: "passt auf den Begriff<br />",\r
-not_found: "Nicht gefunden.",\r
-occurrence_replaced: "Die Vorkommen wurden ersetzt.",\r
-search_field_empty: "Leeres Suchfeld",\r
-restart_search_at_begin: "Ende des zu durchsuchenden Bereiches erreicht. Es wird die Suche von Anfang an fortgesetzt.", //find a shorter translation\r
-move_popup: "Suchfenster bewegen",\r
-font_size: "--Schriftgr&ouml;&szlig;e--",\r
-go_to_line: "Gehe zu Zeile",\r
-go_to_line_prompt: "Gehe zu Zeilennummmer:",\r
-undo: "R&uuml;ckg&auml;ngig",\r
-redo: "Wiederherstellen",\r
-change_smooth_selection: "Aktiviere/Deaktiviere einige Features (weniger Bildschirmnutzung aber mehr CPU-Belastung)",\r
-highlight: "Syntax Highlighting an- und ausschalten",\r
-reset_highlight: "Highlighting zur&uuml;cksetzen (falls mit Text nicht konform)",\r
-word_wrap: "Toggle word wrapping mode",\r
-help: "Info",\r
-save: "Speichern",\r
-load: "&Ouml;ffnen",\r
-line_abbr: "Ln",\r
-char_abbr: "Ch",\r
-position: "Position",\r
-total: "Gesamt",\r
-close_popup: "Popup schlie&szlig;en",\r
-shortcuts: "Shortcuts",\r
-add_tab: "Tab zum Text hinzuf&uuml;gen",\r
-remove_tab: "Tab aus Text entfernen",\r
-about_notice: "Bemerkung: Syntax Highlighting ist nur f&uuml;r kurze Texte",\r
-toggle: "Editor an- und ausschalten",\r
-accesskey: "Accesskey",\r
-tab: "Tab",\r
-shift: "Shift",\r
-ctrl: "Ctrl",\r
-esc: "Esc",\r
-processing: "In Bearbeitung...",\r
-fullscreen: "Full-Screen",\r
-syntax_selection: "--Syntax--",\r
-syntax_css: "CSS",\r
-syntax_html: "HTML",\r
-syntax_js: "Javascript",\r
-syntax_php: "Php",\r
-syntax_python: "Python",\r
-syntax_vb: "Visual Basic",\r
-syntax_xml: "Xml",\r
-syntax_c: "C",\r
-syntax_cpp: "CPP",\r
-syntax_basic: "Basic",\r
-syntax_pas: "Pascal",\r
-syntax_brainfuck: "Brainfuck",\r
-syntax_sql: "SQL",\r
-syntax_ruby: "Ruby",\r
-syntax_robotstxt: "Robots txt",\r
-syntax_tsql: "T-SQL",\r
-syntax_perl: "Perl",\r
-syntax_coldfusion: "Coldfusion",\r
-syntax_java: "Java",\r
-close_tab: "Close file"\r
-};\r
diff --git a/project/static/js/langs/dk.js b/project/static/js/langs/dk.js
deleted file mode 100755 (executable)
index 8b3e7f6..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-editAreaLoader.lang["dk"]={\r
-new_document: "nyt tomt dokument",\r
-search_button: "s&oslash;g og erstat",\r
-search_command: "find n&aelig;ste / &aring;ben s&oslash;gefelt",\r
-search: "s&oslash;g",\r
-replace: "erstat",\r
-replace_command: "erstat / &aring;ben s&oslash;gefelt",\r
-find_next: "find n&aelig;ste",\r
-replace_all: "erstat alle",\r
-reg_exp: "regular expressions",\r
-match_case: "forskel på store/sm&aring; bogstaver<br />",\r
-not_found: "not found.",\r
-occurrence_replaced: "occurences replaced.",\r
-search_field_empty: "Search field empty",\r
-restart_search_at_begin: "End of area reached. Restart at begin.",\r
-move_popup: "flyt søgepopup",\r
-font_size: "--Skriftstørrelse--",\r
-go_to_line: "g&aring; til linie",\r
-go_to_line_prompt: "gå til linienummer:",\r
-undo: "fortryd",\r
-redo: "gentag",\r
-change_smooth_selection: "sl&aring; display funktioner til/fra (smartere display men mere CPU kr&aelig;vende)",\r
-highlight: "sl&aring; syntax highlight til/fra",\r
-reset_highlight: "nulstil highlight (hvis den er desynkroniseret fra teksten)",\r
-word_wrap: "toggle word wrapping mode",\r
-help: "om",\r
-save: "gem",\r
-load: "hent",\r
-line_abbr: "Ln",\r
-char_abbr: "Ch",\r
-position: "Position",\r
-total: "Total",\r
-close_popup: "luk popup",\r
-shortcuts: "Genveje",\r
-add_tab: "tilf&oslash;j tabulation til tekst",\r
-remove_tab: "fjern tabulation fra tekst",\r
-about_notice: "Husk: syntax highlight funktionen b&oslash;r kun bruge til sm&aring; tekster",\r
-toggle: "Sl&aring; editor til / fra",\r
-accesskey: "Accesskey",\r
-tab: "Tab",\r
-shift: "Skift",\r
-ctrl: "Ctrl",\r
-esc: "Esc",\r
-processing: "Processing...",\r
-fullscreen: "fullscreen",\r
-syntax_selection: "--Syntax--",\r
-syntax_css: "CSS",\r
-syntax_html: "HTML",\r
-syntax_js: "Javascript",\r
-syntax_php: "Php",\r
-syntax_python: "Python",\r
-syntax_vb: "Visual Basic",\r
-syntax_xml: "Xml",\r
-syntax_c: "C",\r
-syntax_cpp: "CPP",\r
-syntax_basic: "Basic",\r
-syntax_pas: "Pascal",\r
-syntax_brainfuck: "Brainfuck",\r
-syntax_sql: "SQL",\r
-syntax_ruby: "Ruby",\r
-syntax_robotstxt: "Robots txt",\r
-syntax_tsql: "T-SQL",\r
-syntax_perl: "Perl",\r
-syntax_coldfusion: "Coldfusion",\r
-syntax_java: "Java",\r
-close_tab: "Close file"\r
-};\r
diff --git a/project/static/js/langs/en.js b/project/static/js/langs/en.js
deleted file mode 100755 (executable)
index 1ec2561..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-editAreaLoader.lang["en"]={\r
-new_document: "new empty document",\r
-search_button: "search and replace",\r
-search_command: "search next / open search area",\r
-search: "search",\r
-replace: "replace",\r
-replace_command: "replace / open search area",\r
-find_next: "find next",\r
-replace_all: "replace all",\r
-reg_exp: "regular expressions",\r
-match_case: "match case",\r
-not_found: "not found.",\r
-occurrence_replaced: "occurences replaced.",\r
-search_field_empty: "Search field empty",\r
-restart_search_at_begin: "End of area reached. Restart at begin.",\r
-move_popup: "move search popup",\r
-font_size: "--Font size--",\r
-go_to_line: "go to line",\r
-go_to_line_prompt: "go to line number:",\r
-undo: "undo",\r
-redo: "redo",\r
-change_smooth_selection: "enable/disable some display features (smarter display but more CPU charge)",\r
-highlight: "toggle syntax highlight on/off",\r
-reset_highlight: "reset highlight (if desyncronized from text)",\r
-word_wrap: "toggle word wrapping mode",\r
-help: "about",\r
-save: "save",\r
-load: "load",\r
-line_abbr: "Ln",\r
-char_abbr: "Ch",\r
-position: "Position",\r
-total: "Total",\r
-close_popup: "close popup",\r
-shortcuts: "Shortcuts",\r
-add_tab: "add tabulation to text",\r
-remove_tab: "remove tabulation to text",\r
-about_notice: "Notice: syntax highlight function is only for small text",\r
-toggle: "Toggle editor",\r
-accesskey: "Accesskey",\r
-tab: "Tab",\r
-shift: "Shift",\r
-ctrl: "Ctrl",\r
-esc: "Esc",\r
-processing: "Processing...",\r
-fullscreen: "fullscreen",\r
-syntax_selection: "--Syntax--",\r
-syntax_css: "CSS",\r
-syntax_html: "HTML",\r
-syntax_js: "Javascript",\r
-syntax_php: "Php",\r
-syntax_python: "Python",\r
-syntax_vb: "Visual Basic",\r
-syntax_xml: "Xml",\r
-syntax_c: "C",\r
-syntax_cpp: "CPP",\r
-syntax_basic: "Basic",\r
-syntax_pas: "Pascal",\r
-syntax_brainfuck: "Brainfuck",\r
-syntax_sql: "SQL",\r
-syntax_ruby: "Ruby",\r
-syntax_robotstxt: "Robots txt",\r
-syntax_tsql: "T-SQL",\r
-syntax_perl: "Perl",\r
-syntax_coldfusion: "Coldfusion",\r
-syntax_java: "Java",\r
-close_tab: "Close file"\r
-};\r
diff --git a/project/static/js/langs/eo.js b/project/static/js/langs/eo.js
deleted file mode 100755 (executable)
index 317ec07..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-editAreaLoader.lang["eo"]={\r
-new_document: "nova dokumento (vakigas la enhavon)",\r
-search_button: "ser&#265;i / anstata&#365;igi",\r
-search_command: "pluser&#265;i / malfermi la ser&#265;o-fenestron",\r
-search: "ser&#265;i",\r
-replace: "anstata&#365;igi",\r
-replace_command: "anstata&#365;igi / malfermi la ser&#265;o-fenestron",\r
-find_next: "ser&#265;i",\r
-replace_all: "anstata&#365;igi &#265;ion",\r
-reg_exp: "regula esprimo",\r
-match_case: "respekti la usklecon",\r
-not_found: "ne trovita.",\r
-occurrence_replaced: "anstata&#365;igoj plenumitaj.",\r
-search_field_empty: "La kampo estas malplena.",\r
-restart_search_at_begin: "Fino de teksto &#285;isrirata, &#265;u da&#365;rigi el la komenco?",\r
-move_popup: "movi la ser&#265;o-fenestron",\r
-font_size: "--Tipara grando--",\r
-go_to_line: "iri al la linio",\r
-go_to_line_prompt: "iri al la linio numero:",\r
-undo: "rezigni",\r
-redo: "refari",\r
-change_smooth_selection: "ebligi/malebligi la funkcioj de vidigo (pli bona vidigo, sed pli da &#349;ar&#285;o de la &#265;eforgano)",\r
-highlight: "ebligi/malebligi la sintaksan kolorigon",\r
-reset_highlight: "repravalorizi la sintaksan kolorigon (se malsinkronigon de la teksto)",\r
-word_wrap: "toggle word wrapping mode",\r
-help: "pri",\r
-save: "registri",\r
-load: "&#349;ar&#285;i",\r
-line_abbr: "Ln",\r
-char_abbr: "Sg",\r
-position: "Pozicio",\r
-total: "Sumo",\r
-close_popup: "fermi la &#349;prucfenestron",\r
-shortcuts: "Fulmoklavo",\r
-add_tab: "aldoni tabon en la tekston",\r
-remove_tab: "forigi tablon el la teksto",\r
-about_notice: "Noto: la sintaksa kolorigo estas nur prikalkulita por mallongaj tekstoj.",\r
-toggle: "baskuligi la redaktilon",\r
-accesskey: "Fulmoklavo",\r
-tab: "Tab",\r
-shift: "Maj",\r
-ctrl: "Ktrl",\r
-esc: "Esk",\r
-processing: "&#349;argante...",\r
-fullscreen: "plenekrane",\r
-syntax_selection: "--Sintakso--",\r
-syntax_css: "CSS",\r
-syntax_html: "HTML",\r
-syntax_js: "Javascript",\r
-syntax_php: "Php",\r
-syntax_python: "Pitono",\r
-syntax_vb: "Visual Basic",\r
-syntax_xml: "Xml",\r
-syntax_c: "C",\r
-syntax_cpp: "CPP",\r
-syntax_basic: "Basic",\r
-syntax_pas: "Pascal",\r
-syntax_brainfuck: "Brainfuck",\r
-syntax_sql: "SQL",\r
-syntax_ruby: "Ruby",\r
-syntax_robotstxt: "Robots txt",\r
-syntax_tsql: "T-SQL",\r
-syntax_perl: "Perl",\r
-syntax_coldfusion: "Coldfusion",\r
-syntax_java: "Java",\r
-close_tab: "Fermi la dosieron"\r
-};
\ No newline at end of file
diff --git a/project/static/js/langs/es.js b/project/static/js/langs/es.js
deleted file mode 100755 (executable)
index 736afde..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-editAreaLoader.lang["es"]={\r
-new_document: "nuevo documento vacío",\r
-search_button: "buscar y reemplazar",\r
-search_command: "buscar siguiente / abrir área de búsqueda",\r
-search: "buscar",\r
-replace: "reemplazar",\r
-replace_command: "reemplazar / abrir área de búsqueda",\r
-find_next: "encontrar siguiente",\r
-replace_all: "reemplazar todos",\r
-reg_exp: "expresiones regulares",\r
-match_case: "coincidir capitalización",\r
-not_found: "no encontrado.",\r
-occurrence_replaced: "ocurrencias reemplazadas.",\r
-search_field_empty: "Campo de búsqueda vacío",\r
-restart_search_at_begin: "Se ha llegado al final del área. Se va a seguir desde el principio.",\r
-move_popup: "mover la ventana de búsqueda",\r
-font_size: "--Tamaño de la fuente--",\r
-go_to_line: "ir a la línea",\r
-go_to_line_prompt: "ir a la línea número:",\r
-undo: "deshacer",\r
-redo: "rehacer",\r
-change_smooth_selection: "activar/desactivar algunas características de visualización (visualización más inteligente pero más carga de CPU)",\r
-highlight: "intercambiar resaltado de sintaxis",\r
-reset_highlight: "reinicializar resaltado (si no esta sincronizado con el texto)",\r
-word_wrap: "toggle word wrapping mode",\r
-help: "acerca",\r
-save: "guardar",\r
-load: "cargar",\r
-line_abbr: "Ln",\r
-char_abbr: "Ch",\r
-position: "Posición",\r
-total: "Total",\r
-close_popup: "recuadro de cierre",\r
-shortcuts: "Atajos",\r
-add_tab: "añadir tabulado al texto",\r
-remove_tab: "borrar tabulado del texto",\r
-about_notice: "Aviso: el resaltado de sintaxis sólo funciona para texto pequeño",\r
-toggle: "Cambiar editor",\r
-accesskey: "Tecla de acceso",\r
-tab: "Tab",\r
-shift: "Mayúsc",\r
-ctrl: "Ctrl",\r
-esc: "Esc",\r
-processing: "Procesando...",\r
-fullscreen: "pantalla completa",\r
-syntax_selection: "--Syntax--",\r
-syntax_css: "CSS",\r
-syntax_html: "HTML",\r
-syntax_js: "Javascript",\r
-syntax_php: "Php",\r
-syntax_python: "Python",\r
-syntax_vb: "Visual Basic",\r
-syntax_xml: "Xml",\r
-syntax_c: "C",\r
-syntax_cpp: "CPP",\r
-syntax_basic: "Basic",\r
-syntax_pas: "Pascal",\r
-syntax_brainfuck: "Brainfuck",\r
-syntax_sql: "SQL",\r
-syntax_ruby: "Ruby",\r
-syntax_coldfusion: "Coldfusion",\r
-syntax_java: "Java",\r
-close_tab: "Close file"\r
-};\r
diff --git a/project/static/js/langs/fi.js b/project/static/js/langs/fi.js
deleted file mode 100755 (executable)
index 1ec4730..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-editAreaLoader.lang["fi"]={\r
-new_document: "uusi tyhjä dokumentti",\r
-search_button: "etsi ja korvaa",\r
-search_command: "etsi seuraava / avaa etsintävalikko",\r
-search: "etsi",\r
-replace: "korvaa",\r
-replace_command: "korvaa / avaa etsintävalikko",\r
-find_next: "etsi seuraava",\r
-replace_all: "korvaa kaikki",\r
-reg_exp: "säännölliset lausekkeet",\r
-match_case: "täsmää kirjainkokoon",\r
-not_found: "ei löytynyt.",\r
-occurrence_replaced: "esiintymää korvattu.",\r
-search_field_empty: "Haettava merkkijono on tyhjä",\r
-restart_search_at_begin: "Alueen loppu saavutettiin. Aloitetaan alusta.",\r
-move_popup: "siirrä etsintävalikkoa",\r
-font_size: "--Fontin koko--",\r
-go_to_line: "siirry riville",\r
-go_to_line_prompt: "mene riville:",\r
-undo: "peruuta",\r
-redo: "tee uudelleen",\r
-change_smooth_selection: "kytke/sammuta joitakin näyttötoimintoja (Älykkäämpi toiminta, mutta suurempi CPU kuormitus)",\r
-highlight: "kytke syntaksikorostus päälle/pois",\r
-reset_highlight: "resetoi syntaksikorostus (jos teksti ei ole synkassa korostuksen kanssa)",\r
-word_wrap: "toggle word wrapping mode",\r
-help: "tietoja",\r
-save: "tallenna",\r
-load: "lataa",\r
-line_abbr: "Rv",\r
-char_abbr: "Pos",\r
-position: "Paikka",\r
-total: "Yhteensä",\r
-close_popup: "sulje valikko",\r
-shortcuts: "Pikatoiminnot",\r
-add_tab: "lisää sisennys tekstiin",\r
-remove_tab: "poista sisennys tekstistä",\r
-about_notice: "Huomautus: syntaksinkorostus toimii vain pienelle tekstille",\r
-toggle: "Kytke editori",\r
-accesskey: "Pikanäppäin",\r
-tab: "Tab",\r
-shift: "Shift",\r
-ctrl: "Ctrl",\r
-esc: "Esc",\r
-processing: "Odota...",\r
-fullscreen: "koko ruutu",\r
-syntax_selection: "--Syntaksi--",\r
-syntax_css: "CSS",\r
-syntax_html: "HTML",\r
-syntax_js: "Javascript",\r
-syntax_php: "Php",\r
-syntax_python: "Python",\r
-syntax_vb: "Visual Basic",\r
-syntax_xml: "Xml",\r
-syntax_c: "C",\r
-syntax_cpp: "CPP",\r
-syntax_basic: "Basic",\r
-syntax_pas: "Pascal",\r
-syntax_brainfuck: "Brainfuck",\r
-syntax_sql: "SQL",\r
-syntax_ruby: "Ruby",\r
-syntax_robotstxt: "Robots txt",\r
-syntax_tsql: "T-SQL",\r
-syntax_perl: "Perl",\r
-syntax_coldfusion: "Coldfusion",\r
-syntax_java: "Java",\r
-close_tab: "Sulje tiedosto"\r
-};
\ No newline at end of file
diff --git a/project/static/js/langs/fr.js b/project/static/js/langs/fr.js
deleted file mode 100755 (executable)
index dcd6814..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-editAreaLoader.lang["fr"]={\r
-new_document: "nouveau document (efface le contenu)",\r
-search_button: "rechercher / remplacer",\r
-search_command: "rechercher suivant / ouvrir la fen&ecirc;tre de recherche",\r
-search: "rechercher",\r
-replace: "remplacer",\r
-replace_command: "remplacer / ouvrir la fen&ecirc;tre de recherche",\r
-find_next: "rechercher",\r
-replace_all: "tout remplacer",\r
-reg_exp: "expr. r&eacute;guli&egrave;re",\r
-match_case: "respecter la casse",\r
-not_found: "pas trouv&eacute;.",\r
-occurrence_replaced: "remplacements &eacute;ffectu&eacute;s.",\r
-search_field_empty: "Le champ de recherche est vide.",\r
-restart_search_at_begin: "Fin du texte atteint, poursuite au d&eacute;but.",\r
-move_popup: "d&eacute;placer la fen&ecirc;tre de recherche",\r
-font_size: "--Taille police--",\r
-go_to_line: "aller &agrave; la ligne",\r
-go_to_line_prompt: "aller a la ligne numero:",\r
-undo: "annuler",\r
-redo: "refaire",\r
-change_smooth_selection: "activer/d&eacute;sactiver des fonctions d'affichage (meilleur affichage mais plus de charge processeur)",\r
-highlight: "activer/d&eacute;sactiver la coloration syntaxique",\r
-reset_highlight: "r&eacute;initialiser la coloration syntaxique (si d&eacute;syncronis&eacute;e du texte)",\r
-word_wrap: "activer/d&eacute;sactiver les retours &agrave; la ligne automatiques",\r
-help: "&agrave; propos",\r
-save: "sauvegarder",\r
-load: "charger",\r
-line_abbr: "Ln",\r
-char_abbr: "Ch",\r
-position: "Position",\r
-total: "Total",\r
-close_popup: "fermer le popup",\r
-shortcuts: "Racourcis clavier",\r
-add_tab: "ajouter une tabulation dans le texte",\r
-remove_tab: "retirer une tabulation dans le texte",\r
-about_notice: "Note: la coloration syntaxique n'est pr&eacute;vue que pour de courts textes.",\r
-toggle: "basculer l'&eacute;diteur",\r
-accesskey: "Accesskey",\r
-tab: "Tab",\r
-shift: "Maj",\r
-ctrl: "Ctrl",\r
-esc: "Esc",\r
-processing: "chargement...",\r
-fullscreen: "plein &eacute;cran",\r
-syntax_selection: "--Syntaxe--",\r
-syntax_css: "CSS",\r
-syntax_html: "HTML",\r
-syntax_js: "Javascript",\r
-syntax_php: "Php",\r
-syntax_python: "Python",\r
-syntax_vb: "Visual Basic",\r
-syntax_xml: "Xml",\r
-syntax_c: "C",\r
-syntax_cpp: "CPP",\r
-syntax_basic: "Basic",\r
-syntax_pas: "Pascal",\r
-syntax_brainfuck: "Brainfuck",\r
-syntax_sql: "SQL",\r
-syntax_ruby: "Ruby",\r
-syntax_robotstxt: "Robots txt",\r
-syntax_tsql: "T-SQL",\r
-syntax_perl: "Perl",\r
-syntax_coldfusion: "Coldfusion",\r
-syntax_java: "Java",\r
-close_tab: "Fermer le fichier"\r
-};\r
diff --git a/project/static/js/langs/hr.js b/project/static/js/langs/hr.js
deleted file mode 100755 (executable)
index 7ee249f..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-editAreaLoader.lang["hr"]={
-new_document: "Novi dokument",
-search_button: "Traži i izmijeni",
-search_command: "Traži dalje / Otvori prozor za traženje",
-search: "Traži",
-replace: "Izmijeni",
-replace_command: "Izmijeni / Otvori prozor za traženje",
-find_next: "Traži dalje",
-replace_all: "Izmjeni sve",
-reg_exp: "Regularni izrazi",
-match_case: "Bitna vel. slova",
-not_found: "nije naðeno.",
-occurrence_replaced: "izmjenjenih.",
-search_field_empty: "Prazno polje za traženje!",
-restart_search_at_begin: "Došao do kraja. Poèeo od poèetka.",
-move_popup: "Pomakni prozor",
-font_size: "--Velièina teksta--",
-go_to_line: "Odi na redak",
-go_to_line_prompt: "Odi na redak:",
-undo: "Vrati natrag",
-redo: "Napravi ponovo",
-change_smooth_selection: "Ukljuèi/iskljuèi neke moguænosti prikaza (pametniji prikaz, ali zagušeniji CPU)",
-highlight: "Ukljuèi/iskljuèi bojanje sintakse",
-reset_highlight: "Ponovi kolorizaciju (ako je nesinkronizirana s tekstom)",
-word_wrap: "toggle word wrapping mode",
-help: "O edit_area",
-save: "Spremi",
-load: "Uèitaj",
-line_abbr: "Ln",
-char_abbr: "Zn",
-position: "Pozicija",
-total: "Ukupno",
-close_popup: "Zatvori prozor",
-shortcuts: "Kratice",
-add_tab: "Dodaj tabulaciju",
-remove_tab: "Makni tabulaciju",
-about_notice: "Napomena: koloriziranje sintakse je samo za kratke kodove",
-toggle: "Prebaci naèin ureðivanja",
-accesskey: "Accesskey",
-tab: "Tab",
-shift: "Shift",
-ctrl: "Ctrl",
-esc: "Esc",
-processing: "Procesiram...",
-fullscreen: "Cijeli prozor",
-syntax_selection: "--Syntax--",
-syntax_css: "CSS",
-syntax_html: "HTML",
-syntax_js: "Javascript",
-syntax_php: "Php",
-syntax_python: "Python",
-syntax_vb: "Visual Basic",
-syntax_xml: "Xml",
-syntax_c: "C",
-syntax_cpp: "CPP",
-syntax_basic: "Basic",
-syntax_pas: "Pascal",
-syntax_brainfuck: "Brainfuck",
-syntax_sql: "SQL",
-syntax_ruby: "Ruby",
-syntax_robotstxt: "Robots txt",
-syntax_tsql: "T-SQL",
-syntax_perl: "Perl",
-syntax_coldfusion: "Coldfusion",
-syntax_java: "Java",
-close_tab: "Close file"
-};
diff --git a/project/static/js/langs/it.js b/project/static/js/langs/it.js
deleted file mode 100755 (executable)
index 1fad6ae..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-editAreaLoader.lang["it"]={\r
-new_document: "nuovo documento vuoto",\r
-search_button: "cerca e sostituisci",\r
-search_command: "trova successivo / apri finestra di ricerca",\r
-search: "cerca",\r
-replace: "sostituisci",\r
-replace_command: "sostituisci / apri finestra di ricerca",\r
-find_next: "trova successivo",\r
-replace_all: "sostituisci tutti",\r
-reg_exp: "espressioni regolari",\r
-match_case: "confronta maiuscole/minuscole<br />",\r
-not_found: "non trovato.",\r
-occurrence_replaced: "occorrenze sostituite.",\r
-search_field_empty: "Campo ricerca vuoto",\r
-restart_search_at_begin: "Fine del testo raggiunta. Ricomincio dall'inizio.",\r
-move_popup: "sposta popup di ricerca",\r
-font_size: "-- Dimensione --",\r
-go_to_line: "vai alla linea",\r
-go_to_line_prompt: "vai alla linea numero:",\r
-undo: "annulla",\r
-redo: "ripeti",\r
-change_smooth_selection: "abilita/disabilita alcune caratteristiche della visualizzazione",\r
-highlight: "abilita/disabilita colorazione della sintassi",\r
-reset_highlight: "aggiorna colorazione (se non sincronizzata)",\r
-word_wrap: "toggle word wrapping mode",\r
-help: "informazioni su...",\r
-save: "salva",\r
-load: "carica",\r
-line_abbr: "Ln",\r
-char_abbr: "Ch",\r
-position: "Posizione",\r
-total: "Totale",\r
-close_popup: "chiudi popup",\r
-shortcuts: "Scorciatoie",\r
-add_tab: "aggiungi tabulazione",\r
-remove_tab: "rimuovi tabulazione",\r
-about_notice: "Avviso: la colorazione della sintassi vale solo con testo piccolo",\r
-toggle: "Abilita/disabilita editor",\r
-accesskey: "Accesskey",\r
-tab: "Tab",\r
-shift: "Shift",\r
-ctrl: "Ctrl",\r
-esc: "Esc",\r
-processing: "In corso...",\r
-fullscreen: "fullscreen",\r
-syntax_selection: "--Syntax--",\r
-syntax_css: "CSS",\r
-syntax_html: "HTML",\r
-syntax_js: "Javascript",\r
-syntax_php: "Php",\r
-syntax_python: "Python",\r
-syntax_vb: "Visual Basic",\r
-syntax_xml: "Xml",\r
-syntax_c: "C",\r
-syntax_cpp: "CPP",\r
-syntax_basic: "Basic",\r
-syntax_pas: "Pascal",\r
-syntax_brainfuck: "Brainfuck",\r
-syntax_sql: "SQL",\r
-syntax_ruby: "Ruby",\r
-syntax_robotstxt: "Robots txt",\r
-syntax_tsql: "T-SQL",\r
-syntax_perl: "Perl",\r
-syntax_coldfusion: "Coldfusion",\r
-syntax_java: "Java",\r
-close_tab: "Close file"\r
-};\r
diff --git a/project/static/js/langs/ja.js b/project/static/js/langs/ja.js
deleted file mode 100755 (executable)
index e47521b..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-editAreaLoader.lang["ja"]={\r
-new_document: "新規作成",\r
-search_button: "検索・置換",\r
-search_command: "次を検索 / 検索窓を表示",\r
-search: "検索",\r
-replace: "置換",\r
-replace_command: "置換 / 置換窓を表示",\r
-find_next: "次を検索",\r
-replace_all: "全置換",\r
-reg_exp: "正規表現",\r
-match_case: "大文字小文字の区別",\r
-not_found: "見つかりません。",\r
-occurrence_replaced: "置換しました。",\r
-search_field_empty: "検索対象文字列が空です。",\r
-restart_search_at_begin: "終端に達しました、始めに戻ります",\r
-move_popup: "検索窓を移動",\r
-font_size: "--フォントサイズ--",\r
-go_to_line: "指定行へ移動",\r
-go_to_line_prompt: "指定行へ移動します:",\r
-undo: "元に戻す",\r
-redo: "やり直し",\r
-change_smooth_selection: "スムース表示の切り替え(CPUを使います)",\r
-highlight: "構文強調表示の切り替え",\r
-reset_highlight: "構文強調表示のリセット",\r
-word_wrap: "toggle word wrapping mode",\r
-help: "ヘルプを表示",\r
-save: "保存",\r
-load: "読み込み",\r
-line_abbr: "行",\r
-char_abbr: "文字",\r
-position: "位置",\r
-total: "合計",\r
-close_popup: "ポップアップを閉じる",\r
-shortcuts: "ショートカット",\r
-add_tab: "タブを挿入する",\r
-remove_tab: "タブを削除する",\r
-about_notice: "注意:構文強調表示は短いテキストでしか有効に機能しません。",\r
-toggle: "テキストエリアとeditAreaの切り替え",\r
-accesskey: "アクセスキー",\r
-tab: "Tab",\r
-shift: "Shift",\r
-ctrl: "Ctrl",\r
-esc: "Esc",\r
-processing: "処理中です...",\r
-fullscreen: "fullscreen",\r
-syntax_selection: "--Syntax--",\r
-syntax_css: "CSS",\r
-syntax_html: "HTML",\r
-syntax_js: "Javascript",\r
-syntax_php: "Php",\r
-syntax_python: "Python",\r
-syntax_vb: "Visual Basic",\r
-syntax_xml: "Xml",\r
-syntax_c: "C",\r
-syntax_cpp: "CPP",\r
-syntax_basic: "Basic",\r
-syntax_pas: "Pascal",\r
-syntax_brainfuck: "Brainfuck",\r
-syntax_sql: "SQL",\r
-syntax_ruby: "Ruby",\r
-syntax_robotstxt: "Robots txt",\r
-syntax_tsql: "T-SQL",\r
-syntax_perl: "Perl",\r
-syntax_coldfusion: "Coldfusion",\r
-syntax_java: "Java",\r
-close_tab: "Close file"\r
-};\r
diff --git a/project/static/js/langs/mk.js b/project/static/js/langs/mk.js
deleted file mode 100755 (executable)
index a2d9d21..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-editAreaLoader.lang["mk"]={
-new_document: "Нов документ",
-search_button: "Најди и замени",
-search_command: "Барај следно / Отвори нов прозорец за пребарување",
-search: "Барај",
-replace: "Замени",
-replace_command: "Замени / Отвори прозорец за пребарување",
-find_next: "најди следно",
-replace_all: "Замени ги сите",
-reg_exp: "Регуларни изрази",
-match_case: "Битна е големината на буквите",
-not_found: "не е пронајдено.",
-occurrence_replaced: "замени.",
-search_field_empty: "Полето за пребарување е празно",
-restart_search_at_begin: "Крај на областа. Стартувај од почеток.",
-move_popup: "Помести го прозорецот",
-font_size: "--Големина на текстот--",
-go_to_line: "Оди на линија",
-go_to_line_prompt: "Оди на линија со број:",
-undo: "Врати",
-redo: "Повтори",
-change_smooth_selection: "Вклучи/исклучи некои карактеристики за приказ (попаметен приказ, но поголемо оптеретување за процесорот)",
-highlight: "Вклучи/исклучи осветлување на синтакса",
-reset_highlight: "Ресетирај го осветлувањето на синтакса (доколку е десинхронизиранo со текстот)",
-word_wrap: "toggle word wrapping mode",
-help: "За",
-save: "Зачувај",
-load: "Вчитај",
-line_abbr: "Лн",
-char_abbr: "Зн",
-position: "Позиција",
-total: "Вкупно",
-close_popup: "Затвори го прозорецот",
-shortcuts: "Кратенки",
-add_tab: "Додај табулација на текстот",
-remove_tab: "Отстрани ја табулацијата",
-about_notice: "Напомена: Осветлувањето на синтанса е само за краток текст",
-toggle: "Смени начин на уредување",
-accesskey: "Accesskey",
-tab: "Tab",
-shift: "Shift",
-ctrl: "Ctrl",
-esc: "Esc",
-processing: "Обработувам...",
-fullscreen: "Цел прозорец",
-syntax_selection: "--Синтакса--",
-syntax_css: "CSS",
-syntax_html: "HTML",
-syntax_js: "Javascript",
-syntax_php: "Php",
-syntax_python: "Python",
-syntax_vb: "Visual Basic",
-syntax_xml: "Xml",
-syntax_c: "C",
-syntax_cpp: "CPP",
-syntax_basic: "Basic",
-syntax_pas: "Pascal",
-syntax_brainfuck: "Brainfuck",
-syntax_sql: "SQL",
-syntax_ruby: "Ruby",
-syntax_robotstxt: "Robots txt",
-syntax_tsql: "T-SQL",
-syntax_perl: "Perl",
-syntax_coldfusion: "Coldfusion",
-syntax_java: "Java",
-close_tab: "Избери датотека"
-};
diff --git a/project/static/js/langs/nl.js b/project/static/js/langs/nl.js
deleted file mode 100755 (executable)
index 59baed1..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-editAreaLoader.lang["nl"]={\r
-new_document: "nieuw leeg document",\r
-search_button: "zoek en vervang",\r
-search_command: "zoek volgende / zoekscherm openen",\r
-search: "zoek",\r
-replace: "vervang",\r
-replace_command: "vervang / zoekscherm openen",\r
-find_next: "volgende vinden",\r
-replace_all: "alles vervangen",\r
-reg_exp: "reguliere expressies",\r
-match_case: "hoofdletter gevoelig",\r
-not_found: "niet gevonden.",\r
-occurrence_replaced: "object vervangen.",\r
-search_field_empty: "Zoek veld leeg",\r
-restart_search_at_begin: "Niet meer instanties gevonden, begin opnieuw",\r
-move_popup: "versleep zoek scherm",\r
-font_size: "--Letter grootte--",\r
-go_to_line: "Ga naar regel",\r
-go_to_line_prompt: "Ga naar regel nummer:",\r
-undo: "Ongedaan maken",\r
-redo: "Opnieuw doen",\r
-change_smooth_selection: "zet wat schermopties aan/uit (kan langzamer zijn)",\r
-highlight: "zet syntax highlight aan/uit",\r
-reset_highlight: "reset highlight (indien gedesynchronizeerd)",\r
-word_wrap: "toggle word wrapping mode",\r
-help: "informatie",\r
-save: "opslaan",\r
-load: "laden",\r
-line_abbr: "Ln",\r
-char_abbr: "Ch",\r
-position: "Positie",\r
-total: "Totaal",\r
-close_popup: "Popup sluiten",\r
-shortcuts: "Snelkoppelingen",\r
-add_tab: "voeg tabs toe in tekst",\r
-remove_tab: "verwijder tabs uit tekst",\r
-about_notice: "Notitie: syntax highlight functie is alleen voor kleine tekst",\r
-toggle: "geavanceerde bewerkingsopties",\r
-accesskey: "Accessknop",\r
-tab: "Tab",\r
-shift: "Shift",\r
-ctrl: "Ctrl",\r
-esc: "Esc",\r
-processing: "Verwerken...",\r
-fullscreen: "fullscreen",\r
-syntax_selection: "--Syntax--",\r
-syntax_css: "CSS",\r
-syntax_html: "HTML",\r
-syntax_js: "Javascript",\r
-syntax_php: "Php",\r
-syntax_python: "Python",\r
-syntax_vb: "Visual Basic",\r
-syntax_xml: "Xml",\r
-syntax_c: "C",\r
-syntax_cpp: "CPP",\r
-syntax_basic: "Basic",\r
-syntax_pas: "Pascal",\r
-syntax_brainfuck: "Brainfuck",\r
-syntax_sql: "SQL",\r
-syntax_ruby: "Ruby",\r
-syntax_robotstxt: "Robots txt",\r
-syntax_tsql: "T-SQL",\r
-syntax_perl: "Perl",\r
-syntax_coldfusion: "Coldfusion",\r
-syntax_java: "Java",\r
-close_tab: "Close file"\r
-};\r
diff --git a/project/static/js/langs/pl.js b/project/static/js/langs/pl.js
deleted file mode 100755 (executable)
index d9c2fbf..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-editAreaLoader.lang["pl"]={\r
-new_document: "nowy dokument",\r
-search_button: "znajdź i zamień",\r
-search_command: "znajdź następny",\r
-search: "znajdź",\r
-replace: "zamień",\r
-replace_command: "zamień",\r
-find_next: "następny",\r
-replace_all: "zamień wszystko",\r
-reg_exp: "wyrażenie regularne",\r
-match_case: "uwzględnij wielkość liter<br />",\r
-not_found: "nie znaleziono.",\r
-occurrence_replaced: "wystąpień zamieniono.",\r
-search_field_empty: "Nie wprowadzono tekstu",\r
-restart_search_at_begin: "Koniec dokumentu. Wyszukiwanie od początku.",\r
-move_popup: "przesuń okienko wyszukiwania",\r
-font_size: "Rozmiar",\r
-go_to_line: "idź do linii",\r
-go_to_line_prompt: "numer linii:",\r
-undo: "cofnij",\r
-redo: "przywróć",\r
-change_smooth_selection: "włącz/wyłącz niektóre opcje wyglądu (zaawansowane opcje wyglądu obciążają procesor)",\r
-highlight: "włącz/wyłącz podświetlanie składni",\r
-reset_highlight: "odśwież podświetlanie składni (jeśli rozsynchronizowało się z tekstem)",\r
-word_wrap: "toggle word wrapping mode",\r
-help: "o programie",\r
-save: "zapisz",\r
-load: "otwórz",\r
-line_abbr: "Ln",\r
-char_abbr: "Zn",\r
-position: "Pozycja",\r
-total: "W sumie",\r
-close_popup: "zamknij okienko",\r
-shortcuts: "Skróty klawiaturowe",\r
-add_tab: "dodaj wcięcie do zaznaczonego tekstu",\r
-remove_tab: "usuń wcięcie",\r
-about_notice: "Uwaga: podświetlanie składni nie jest zalecane dla długich tekstów",\r
-toggle: "Włącz/wyłącz edytor",\r
-accesskey: "Alt+",\r
-tab: "Tab",\r
-shift: "Shift",\r
-ctrl: "Ctrl",\r
-esc: "Esc",\r
-processing: "Przetwarzanie...",\r
-fullscreen: "fullscreen",\r
-syntax_selection: "--Syntax--",\r
-syntax_css: "CSS",\r
-syntax_html: "HTML",\r
-syntax_js: "Javascript",\r
-syntax_php: "Php",\r
-syntax_python: "Python",\r
-syntax_vb: "Visual Basic",\r
-syntax_xml: "Xml",\r
-syntax_c: "C",\r
-syntax_cpp: "CPP",\r
-syntax_basic: "Basic",\r
-syntax_pas: "Pascal",\r
-syntax_brainfuck: "Brainfuck",\r
-syntax_sql: "SQL",\r
-syntax_ruby: "Ruby",\r
-syntax_robotstxt: "Robots txt",\r
-syntax_tsql: "T-SQL",\r
-syntax_perl: "Perl",\r
-syntax_coldfusion: "Coldfusion",\r
-syntax_java: "Java",\r
-close_tab: "Close file"\r
-};\r
diff --git a/project/static/js/langs/pt.js b/project/static/js/langs/pt.js
deleted file mode 100755 (executable)
index ba762a1..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-editAreaLoader.lang["pt"]={\r
-new_document: "Novo documento",\r
-search_button: "Localizar e substituir",\r
-search_command: "Localizar próximo",\r
-search: "Localizar",\r
-replace: "Substituir",\r
-replace_command: "Substituir",\r
-find_next: "Localizar",\r
-replace_all: "Subst. tudo",\r
-reg_exp: "Expressões regulares",\r
-match_case: "Diferenciar maiúsculas e minúsculas",\r
-not_found: "Não encontrado.",\r
-occurrence_replaced: "Ocorrências substituidas",\r
-search_field_empty: "Campo localizar vazio.",\r
-restart_search_at_begin: "Fim das ocorrências. Recomeçar do inicio.",\r
-move_popup: "Mover janela",\r
-font_size: "--Tamanho da fonte--",\r
-go_to_line: "Ir para linha",\r
-go_to_line_prompt: "Ir para a linha:",\r
-undo: "Desfazer",\r
-redo: "Refazer",\r
-change_smooth_selection: "Opções visuais",\r
-highlight: "Cores de sintaxe",\r
-reset_highlight: "Resetar cores (se não sincronizado)",\r
-word_wrap: "toggle word wrapping mode",\r
-help: "Sobre",\r
-save: "Salvar",\r
-load: "Carregar",\r
-line_abbr: "Ln",\r
-char_abbr: "Ch",\r
-position: "Posição",\r
-total: "Total",\r
-close_popup: "Fechar",\r
-shortcuts: "Shortcuts",\r
-add_tab: "Adicionar tabulação",\r
-remove_tab: "Remover tabulação",\r
-about_notice: "Atenção: Cores de sintaxe são indicados somente para textos pequenos",\r
-toggle: "Exibir editor",\r
-accesskey: "Accesskey",\r
-tab: "Tab",\r
-shift: "Shift",\r
-ctrl: "Ctrl",\r
-esc: "Esc",\r
-processing: "Processando...",\r
-fullscreen: "fullscreen",\r
-syntax_selection: "--Syntax--",\r
-syntax_css: "CSS",\r
-syntax_html: "HTML",\r
-syntax_js: "Javascript",\r
-syntax_php: "Php",\r
-syntax_python: "Python",\r
-syntax_vb: "Visual Basic",\r
-syntax_xml: "Xml",\r
-syntax_c: "C",\r
-syntax_cpp: "CPP",\r
-syntax_basic: "Basic",\r
-syntax_pas: "Pascal",\r
-syntax_brainfuck: "Brainfuck",\r
-syntax_sql: "SQL",\r
-syntax_ruby: "Ruby",\r
-syntax_robotstxt: "Robots txt",\r
-syntax_tsql: "T-SQL",\r
-syntax_perl: "Perl",\r
-syntax_coldfusion: "Coldfusion",\r
-syntax_java: "Java",\r
-close_tab: "Close file"\r
-};\r
diff --git a/project/static/js/langs/ru.js b/project/static/js/langs/ru.js
deleted file mode 100755 (executable)
index bcb33e4..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-editAreaLoader.lang["ru"]={\r
-new_document: "новый пустой документ",\r
-search_button: "поиск и замена",\r
-search_command: "искать следующий / открыть панель поиска",\r
-search: "поиск",\r
-replace: "замена",\r
-replace_command: "заменить / открыть панель поиска",\r
-find_next: "найти следующее",\r
-replace_all: "заменить все",\r
-reg_exp: "регулярное выражение",\r
-match_case: "учитывать регистр",\r
-not_found: "не найдено.",\r
-occurrence_replaced: "вхождение заменено.",\r
-search_field_empty: "Поле поиска пустое",\r
-restart_search_at_begin: "Достигнут конец документа. Начинаю с начала.",\r
-move_popup: "переместить окно поиска",\r
-font_size: "--Размер шрифта--",\r
-go_to_line: "перейти к строке",\r
-go_to_line_prompt: "перейти к строке номер:",\r
-undo: "отменить",\r
-redo: "вернуть",\r
-change_smooth_selection: "включить/отключить некоторые функции просмотра (более красиво, но больше использует процессор)",\r
-highlight: "переключить подсветку синтаксиса включена/выключена",\r
-reset_highlight: "восстановить подсветку (если разсинхронизирована от текста)",\r
-word_wrap: "toggle word wrapping mode",\r
-help: "о программе",\r
-save: "сохранить",\r
-load: "загрузить",\r
-line_abbr: "Стр",\r
-char_abbr: "Стлб",\r
-position: "Позиция",\r
-total: "Всего",\r
-close_popup: "закрыть всплывающее окно",\r
-shortcuts: "Горячие клавиши",\r
-add_tab: "добавить табуляцию в текст",\r
-remove_tab: "убрать табуляцию из текста",\r
-about_notice: "Внимание: функция подсветки синтаксиса только для небольших текстов",\r
-toggle: "Переключить редактор",\r
-accesskey: "Горячая клавиша",\r
-tab: "Tab",\r
-shift: "Shift",\r
-ctrl: "Ctrl",\r
-esc: "Esc",\r
-processing: "Обработка...",\r
-fullscreen: "полный экран",\r
-syntax_selection: "--Синтакс--",\r
-syntax_css: "CSS",\r
-syntax_html: "HTML",\r
-syntax_js: "Javascript",\r
-syntax_php: "Php",\r
-syntax_python: "Python",\r
-syntax_vb: "Visual Basic",\r
-syntax_xml: "Xml",\r
-syntax_c: "C",\r
-syntax_cpp: "CPP",\r
-syntax_basic: "Basic",\r
-syntax_pas: "Pascal",\r
-syntax_brainfuck: "Brainfuck",\r
-syntax_sql: "SQL",\r
-syntax_ruby: "Ruby",\r
-syntax_robotstxt: "Robots txt",\r
-syntax_tsql: "T-SQL",\r
-syntax_perl: "Perl",\r
-syntax_coldfusion: "Coldfusion",\r
-syntax_java: "Java",\r
-close_tab: "Закрыть файл"\r
-};\r
diff --git a/project/static/js/langs/sk.js b/project/static/js/langs/sk.js
deleted file mode 100755 (executable)
index 93a3c16..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-editAreaLoader.lang["sk"]={\r
-new_document: "nový prázdy dokument",\r
-search_button: "vyhľadaj a nahraď",\r
-search_command: "hľadaj ďalsšie / otvor vyhľadávacie pole",\r
-search: "hľadaj",\r
-replace: "nahraď",\r
-replace_command: "nahraď / otvor vyhľadávacie pole",\r
-find_next: "nájdi ďalšie",\r
-replace_all: "nahraď všetko",\r
-reg_exp: "platné výrazy",\r
-match_case: "zhodujúce sa výrazy",\r
-not_found: "nenájdené.",\r
-occurrence_replaced: "výskyty nahradené.",\r
-search_field_empty: "Pole vyhľadávanie je prádzne",\r
-restart_search_at_begin: "End of area reached. Restart at begin.",\r
-move_popup: "presuň vyhľadávacie okno",\r
-font_size: "--Veľkosť textu--",\r
-go_to_line: "prejdi na riadok",\r
-go_to_line_prompt: "prejdi na riadok:",\r
-undo: "krok späť",\r
-redo: "prepracovať",\r
-change_smooth_selection: "povoliť/zamietnúť niektoré zo zobrazených funkcií (účelnejšie zobrazenie vyžaduje  väčšie zaťaženie procesora CPU)",\r
-highlight: "prepnúť zvýrazňovanie syntaxe zap/vyp",\r
-reset_highlight: "zrušiť zvýrazňovanie (ak je nesynchronizované s textom)",\r
-word_wrap: "toggle word wrapping mode",\r
-help: "o programe",\r
-save: "uložiť",\r
-load: "načítať",\r
-line_abbr: "Ln",\r
-char_abbr: "Ch",\r
-position: "Pozícia",\r
-total: "Spolu",\r
-close_popup: "zavrieť okno",\r
-shortcuts: "Skratky",\r
-add_tab: "pridať tabulovanie textu",\r
-remove_tab: "odstrániť tabulovanie textu",\r
-about_notice: "Upozornenie: funkcia zvýrazňovania syntaxe je dostupná iba pre malý text",\r
-toggle: "Prepnúť editor",\r
-accesskey: "Accesskey",\r
-tab: "Záložka",\r
-shift: "Shift",\r
-ctrl: "Ctrl",\r
-esc: "Esc",\r
-processing: "Spracúvam...",\r
-fullscreen: "cel=a obrazovka",\r
-syntax_selection: "--Vyber Syntax--",\r
-syntax_css: "CSS",\r
-syntax_html: "HTML",\r
-syntax_js: "Javascript",\r
-syntax_php: "Php",\r
-syntax_python: "Python",\r
-syntax_vb: "Visual Basic",\r
-syntax_xml: "Xml",\r
-syntax_c: "C",\r
-syntax_cpp: "CPP",\r
-syntax_basic: "Basic",\r
-syntax_pas: "Pascal",\r
-syntax_brainfuck: "Brainfuck",\r
-syntax_sql: "SQL",\r
-syntax_ruby: "Ruby",\r
-syntax_robotstxt: "Robots txt",\r
-syntax_tsql: "T-SQL",\r
-syntax_perl: "Perl",\r
-syntax_coldfusion: "Coldfusion",\r
-syntax_java: "Java",\r
-close_tab: "Close file"\r
-};\r
diff --git a/project/static/js/langs/zh.js b/project/static/js/langs/zh.js
deleted file mode 100755 (executable)
index 48a6f9a..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-editAreaLoader.lang["zh"]={\r
-new_document: "新建空白文档",\r
-search_button: "查找与替换",\r
-search_command: "查找下一个 / 打开查找框",\r
-search: "查找",\r
-replace: "替换",\r
-replace_command: "替换 / 打开查找框",\r
-find_next: "查找下一个",\r
-replace_all: "全部替换",\r
-reg_exp: "正则表达式",\r
-match_case: "匹配大小写",\r
-not_found: "未找到.",\r
-occurrence_replaced: "处被替换.",\r
-search_field_empty: "查找框没有内容",\r
-restart_search_at_begin: "已到到文档末尾. 从头重新查找.",\r
-move_popup: "移动查找对话框",\r
-font_size: "--字体大小--",\r
-go_to_line: "转到行",\r
-go_to_line_prompt: "转到行:",\r
-undo: "恢复",\r
-redo: "重做",\r
-change_smooth_selection: "启用/禁止一些显示特性(更好看但更耗费资源)",\r
-highlight: "启用/禁止语法高亮",\r
-reset_highlight: "重置语法高亮(当文本显示不同步时)",\r
-word_wrap: "toggle word wrapping mode",\r
-help: "关于",\r
-save: "保存",\r
-load: "加载",\r
-line_abbr: "行",\r
-char_abbr: "字符",\r
-position: "位置",\r
-total: "总计",\r
-close_popup: "关闭对话框",\r
-shortcuts: "快捷键",\r
-add_tab: "添加制表符(Tab)",\r
-remove_tab: "移除制表符(Tab)",\r
-about_notice: "注意:语法高亮功能仅用于较少内容的文本(文件内容太大会导致浏览器反应慢)",\r
-toggle: "切换编辑器",\r
-accesskey: "快捷键",\r
-tab: "Tab",\r
-shift: "Shift",\r
-ctrl: "Ctrl",\r
-esc: "Esc",\r
-processing: "正在处理中...",\r
-fullscreen: "全屏编辑",\r
-syntax_selection: "--语法--",\r
-syntax_css: "CSS",\r
-syntax_html: "HTML",\r
-syntax_js: "Javascript",\r
-syntax_php: "Php",\r
-syntax_python: "Python",\r
-syntax_vb: "Visual Basic",\r
-syntax_xml: "Xml",\r
-syntax_c: "C",\r
-syntax_cpp: "CPP",\r
-syntax_basic: "Basic",\r
-syntax_pas: "Pascal",\r
-syntax_brainfuck: "Brainfuck",\r
-syntax_sql: "SQL",\r
-syntax_ruby: "Ruby",\r
-syntax_robotstxt: "Robots txt",\r
-syntax_tsql: "T-SQL",\r
-syntax_perl: "Perl",\r
-syntax_coldfusion: "Coldfusion",\r
-syntax_java: "Java",\r
-close_tab: "关闭文件"\r
-};\r
diff --git a/project/static/js/license_apache.txt b/project/static/js/license_apache.txt
deleted file mode 100755 (executable)
index c7ef5e6..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Copyright 2008 Christophe Dolivet\r
-\r
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\r
-\r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
\ No newline at end of file
diff --git a/project/static/js/license_bsd.txt b/project/static/js/license_bsd.txt
deleted file mode 100755 (executable)
index f36bbe4..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Copyright (c) 2008, Christophe Dolivet\r
-All rights reserved.\r
-\r
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\r
-\r
-    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\r
-    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\r
-    * Neither the name of EditArea nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\r
-\r
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/project/static/js/license_lgpl.txt b/project/static/js/license_lgpl.txt
deleted file mode 100755 (executable)
index 8c177f8..0000000
+++ /dev/null
@@ -1,458 +0,0 @@
-                 GNU LESSER GENERAL PUBLIC LICENSE
-                      Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-                           Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-                 GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-                           NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-                    END OF TERMS AND CONDITIONS
diff --git a/project/static/js/manage_area.js b/project/static/js/manage_area.js
deleted file mode 100755 (executable)
index e10c5e9..0000000
+++ /dev/null
@@ -1,623 +0,0 @@
-       EditArea.prototype.focus = function() {\r
-               this.textarea.focus();\r
-               this.textareaFocused=true;\r
-       };\r
-\r
-\r
-       EditArea.prototype.check_line_selection= function(timer_checkup){\r
-               var changes, infos, new_top, new_width,i;\r
-               \r
-               var t1=t2=t2_1=t3=tLines=tend= new Date().getTime();\r
-               // l'editeur n'existe plus => on quitte\r
-               if(!editAreas[this.id])\r
-                       return false;\r
-               \r
-               if(!this.smooth_selection && !this.do_highlight)\r
-               {\r
-                       //do nothing\r
-               }\r
-               else if(this.textareaFocused && editAreas[this.id]["displayed"]==true && this.isResizing==false)\r
-               {\r
-                       infos   = this.get_selection_infos();\r
-                       changes = this.checkTextEvolution( typeof( this.last_selection['full_text'] ) == 'undefined' ? '' : this.last_selection['full_text'], infos['full_text'] );\r
-               \r
-                       t2= new Date().getTime();\r
-                       \r
-                       // if selection change\r
-                       if(this.last_selection["line_start"] != infos["line_start"] || this.last_selection["line_nb"] != infos["line_nb"] || infos["full_text"] != this.last_selection["full_text"] || this.reload_highlight || this.last_selection["selectionStart"] != infos["selectionStart"] || this.last_selection["selectionEnd"] != infos["selectionEnd"] || !timer_checkup )\r
-                       {\r
-                               // move and adjust text selection elements\r
-                               new_top         = this.getLinePosTop( infos["line_start"] );\r
-                               new_width       = Math.max(this.textarea.scrollWidth, this.container.clientWidth -50);\r
-                               this.selection_field.style.top=this.selection_field_text.style.top=new_top+"px";\r
-                               if(!this.settings['word_wrap']){        \r
-                                       this.selection_field.style.width=this.selection_field_text.style.width=this.test_font_size.style.width=new_width+"px";\r
-                               }\r
-                               \r
-                               // usefull? => _$("cursor_pos").style.top=new_top+"px"; \r
-               \r
-                               if(this.do_highlight==true)\r
-                               {\r
-                                       // fill selection elements\r
-                                       var curr_text   = infos["full_text"].split("\n");\r
-                                       var content             = "";\r
-                                       //alert("length: "+curr_text.length+ " i: "+ Math.max(0,infos["line_start"]-1)+ " end: "+Math.min(curr_text.length, infos["line_start"]+infos["line_nb"]-1)+ " line: "+infos["line_start"]+" [0]: "+curr_text[0]+" [1]: "+curr_text[1]);\r
-                                       var start               = Math.max(0,infos["line_start"]-1);\r
-                                       var end                 = Math.min(curr_text.length, infos["line_start"]+infos["line_nb"]-1);\r
-                                       \r
-                                       //curr_text[start]= curr_text[start].substr(0,infos["curr_pos"]-1) +"¤_overline_¤"+ curr_text[start].substr(infos["curr_pos"]-1);\r
-                                       for(i=start; i< end; i++){\r
-                                               content+= curr_text[i]+"\n";    \r
-                                       }\r
-                                       \r
-                                       // add special chars arround selected characters\r
-                                       selLength       = infos['selectionEnd'] - infos['selectionStart'];\r
-                                       content         = content.substr( 0, infos["curr_pos"] - 1 ) + "\r\r" + content.substr( infos["curr_pos"] - 1, selLength ) + "\r\r" + content.substr( infos["curr_pos"] - 1 + selLength );\r
-                                       content         = '<span>'+ content.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace("\r\r", '</span><strong>').replace("\r\r", '</strong><span>') +'</span>';\r
-                                       \r
-                                       if( this.isIE || ( this.isOpera && this.isOpera < 9.6 ) ) {\r
-                                               this.selection_field.innerHTML= "<pre>" + content.replace(/^\r?\n/, "<br>") + "</pre>";\r
-                                       } else {\r
-                                               this.selection_field.innerHTML= content;\r
-                                       }\r
-                                       this.selection_field_text.innerHTML = this.selection_field.innerHTML;\r
-                                       t2_1 = new Date().getTime();\r
-                                       // check if we need to update the highlighted background \r
-                                       if(this.reload_highlight || (infos["full_text"] != this.last_text_to_highlight && (this.last_selection["line_start"]!=infos["line_start"] || this.show_line_colors || this.settings['word_wrap'] || this.last_selection["line_nb"]!=infos["line_nb"] || this.last_selection["nb_line"]!=infos["nb_line"]) ) )\r
-                                       {\r
-                                               this.maj_highlight(infos);\r
-                                       }\r
-                               }               \r
-                       }\r
-                       t3= new Date().getTime();\r
-                       \r
-                       // manage line heights\r
-                       if( this.settings['word_wrap'] && infos["full_text"] != this.last_selection["full_text"])\r
-                       {\r
-                               // refresh only 1 line if text change concern only one line and that the total line number has not changed\r
-                               if( changes.newText.split("\n").length == 1 && this.last_selection['nb_line'] && infos['nb_line'] == this.last_selection['nb_line'] )\r
-                               {\r
-                                       this.fixLinesHeight( infos['full_text'], changes.lineStart, changes.lineStart );\r
-                               }\r
-                               else\r
-                               {\r
-                                       this.fixLinesHeight( infos['full_text'], changes.lineStart, -1 );\r
-                               }\r
-                       }\r
-               \r
-                       tLines= new Date().getTime();\r
-                       // manage bracket finding\r
-                       if( infos["line_start"] != this.last_selection["line_start"] || infos["curr_pos"] != this.last_selection["curr_pos"] || infos["full_text"].length!=this.last_selection["full_text"].length || this.reload_highlight || !timer_checkup )\r
-                       {\r
-                               // move _cursor_pos\r
-                               var selec_char= infos["curr_line"].charAt(infos["curr_pos"]-1);\r
-                               var no_real_move=true;\r
-                               if(infos["line_nb"]==1 && (this.assocBracket[selec_char] || this.revertAssocBracket[selec_char]) ){\r
-                                       \r
-                                       no_real_move=false;                                     \r
-                                       //findEndBracket(infos["line_start"], infos["curr_pos"], selec_char);\r
-                                       if(this.findEndBracket(infos, selec_char) === true){\r
-                                               _$("end_bracket").style.visibility      ="visible";\r
-                                               _$("cursor_pos").style.visibility       ="visible";\r
-                                               _$("cursor_pos").innerHTML                      = selec_char;\r
-                                               _$("end_bracket").innerHTML                     = (this.assocBracket[selec_char] || this.revertAssocBracket[selec_char]);\r
-                                       }else{\r
-                                               _$("end_bracket").style.visibility      ="hidden";\r
-                                               _$("cursor_pos").style.visibility       ="hidden";\r
-                                       }\r
-                               }else{\r
-                                       _$("cursor_pos").style.visibility       ="hidden";\r
-                                       _$("end_bracket").style.visibility      ="hidden";\r
-                               }\r
-                               //alert("move cursor");\r
-                               this.displayToCursorPosition("cursor_pos", infos["line_start"], infos["curr_pos"]-1, infos["curr_line"], no_real_move);\r
-                               if(infos["line_nb"]==1 && infos["line_start"]!=this.last_selection["line_start"])\r
-                                       this.scroll_to_view();\r
-                       }\r
-                       this.last_selection=infos;\r
-               }\r
-               \r
-               tend= new Date().getTime();\r
-               //if( (tend-t1) > 7 )\r
-               //      console.log( "tps total: "+ (tend-t1) + " tps get_infos: "+ (t2-t1)+ " tps selec: "+ (t2_1-t2)+ " tps highlight: "+ (t3-t2_1) +" tps lines: "+ (tLines-t3) +" tps cursor+lines: "+ (tend-tLines)+" \n" );\r
-               \r
-               \r
-               if(timer_checkup){\r
-                       setTimeout("editArea.check_line_selection(true)", this.check_line_selection_timer);\r
-               }\r
-       };\r
-\r
-\r
-       EditArea.prototype.get_selection_infos= function(){\r
-               var sel={}, start, end, len, str;\r
-       \r
-               this.getIESelection();\r
-               start   = this.textarea.selectionStart;\r
-               end             = this.textarea.selectionEnd;           \r
-               \r
-               if( this.last_selection["selectionStart"] == start && this.last_selection["selectionEnd"] == end && this.last_selection["full_text"] == this.textarea.value )\r
-               {       \r
-                       return this.last_selection;\r
-               }\r
-                       \r
-               if(this.tabulation!="\t" && this.textarea.value.indexOf("\t")!=-1) \r
-               {       // can append only after copy/paste \r
-                       len             = this.textarea.value.length;\r
-                       this.textarea.value     = this.replace_tab(this.textarea.value);\r
-                       start   = end   = start+(this.textarea.value.length-len);\r
-                       this.area_select( start, 0 );\r
-               }\r
-               \r
-               sel["selectionStart"]   = start;\r
-               sel["selectionEnd"]             = end;          \r
-               sel["full_text"]                = this.textarea.value;\r
-               sel["line_start"]               = 1;\r
-               sel["line_nb"]                  = 1;\r
-               sel["curr_pos"]                 = 0;\r
-               sel["curr_line"]                = "";\r
-               sel["indexOfCursor"]    = 0;\r
-               sel["selec_direction"]  = this.last_selection["selec_direction"];\r
-\r
-               //return sel;   \r
-               var splitTab= sel["full_text"].split("\n");\r
-               var nbLine      = Math.max(0, splitTab.length);         \r
-               var nbChar      = Math.max(0, sel["full_text"].length - (nbLine - 1));  // (remove \n caracters from the count)\r
-               if( sel["full_text"].indexOf("\r") != -1 )\r
-                       nbChar  = nbChar - ( nbLine - 1 );              // (remove \r caracters from the count)\r
-               sel["nb_line"]  = nbLine;               \r
-               sel["nb_char"]  = nbChar;\r
-       \r
-               if(start>0){\r
-                       str                                     = sel["full_text"].substr(0,start);\r
-                       sel["curr_pos"]         = start - str.lastIndexOf("\n");\r
-                       sel["line_start"]       = Math.max(1, str.split("\n").length);\r
-               }else{\r
-                       sel["curr_pos"]=1;\r
-               }\r
-               if(end>start){\r
-                       sel["line_nb"]=sel["full_text"].substring(start,end).split("\n").length;\r
-               }\r
-               sel["indexOfCursor"]=start;             \r
-               sel["curr_line"]=splitTab[Math.max(0,sel["line_start"]-1)];\r
-       \r
-               // determine in which direction the selection grow\r
-               if(sel["selectionStart"] == this.last_selection["selectionStart"]){\r
-                       if(sel["selectionEnd"]>this.last_selection["selectionEnd"])\r
-                               sel["selec_direction"]= "down";\r
-                       else if(sel["selectionEnd"] == this.last_selection["selectionStart"])\r
-                               sel["selec_direction"]= this.last_selection["selec_direction"];\r
-               }else if(sel["selectionStart"] == this.last_selection["selectionEnd"] && sel["selectionEnd"]>this.last_selection["selectionEnd"]){\r
-                       sel["selec_direction"]= "down";\r
-               }else{\r
-                       sel["selec_direction"]= "up";\r
-               }\r
-               \r
-               _$("nbLine").innerHTML  = nbLine;               \r
-               _$("nbChar").innerHTML  = nbChar;               \r
-               _$("linePos").innerHTML = sel["line_start"];\r
-               _$("currPos").innerHTML = sel["curr_pos"];\r
-\r
-               return sel;             \r
-       };\r
-       \r
-       // set IE position in Firefox mode (textarea.selectionStart and textarea.selectionEnd)\r
-       EditArea.prototype.getIESelection= function(){\r
-               var selectionStart, selectionEnd, range, stored_range;\r
-               \r
-               if( !this.isIE )\r
-                       return false;\r
-                       \r
-               // make it work as nowrap mode (easier for range manipulation with lineHeight)\r
-               if( this.settings['word_wrap'] )\r
-                       this.textarea.wrap='off';\r
-                       \r
-               try{\r
-                       range                   = document.selection.createRange();\r
-                       stored_range    = range.duplicate();\r
-                       stored_range.moveToElementText( this.textarea );\r
-                       stored_range.setEndPoint( 'EndToEnd', range );\r
-                       if( stored_range.parentElement() != this.textarea )\r
-                               throw "invalid focus";\r
-                               \r
-                       // the range don't take care of empty lines in the end of the selection\r
-                       var scrollTop   = this.result.scrollTop + document.body.scrollTop;\r
-                       var relative_top= range.offsetTop - parent.calculeOffsetTop(this.textarea) + scrollTop;\r
-                       var line_start  = Math.round((relative_top / this.lineHeight) +1);\r
-                       var line_nb             = Math.round( range.boundingHeight / this.lineHeight );\r
-                                               \r
-                       selectionStart  = stored_range.text.length - range.text.length;         \r
-                       selectionStart  += ( line_start - this.textarea.value.substr(0, selectionStart).split("\n").length)*2;          // count missing empty \r to the selection\r
-                       selectionStart  -= ( line_start - this.textarea.value.substr(0, selectionStart).split("\n").length ) * 2;\r
-                       \r
-                       selectionEnd    = selectionStart + range.text.length;           \r
-                       selectionEnd    += (line_start + line_nb - 1 - this.textarea.value.substr(0, selectionEnd ).split("\n").length)*2;                      \r
-               \r
-                       this.textarea.selectionStart    = selectionStart;\r
-                       this.textarea.selectionEnd              = selectionEnd;\r
-               }\r
-               catch(e){}\r
-               \r
-               // restore wrap mode\r
-               if( this.settings['word_wrap'] )\r
-                       this.textarea.wrap='soft';\r
-       };\r
-       \r
-       // select the text for IE (and take care of \r caracters)\r
-       EditArea.prototype.setIESelection= function(){\r
-               var a = this.textarea, nbLineStart, nbLineEnd, range;\r
-               \r
-               if( !this.isIE )\r
-                       return false;\r
-               \r
-               nbLineStart     = a.value.substr(0, a.selectionStart).split("\n").length - 1;\r
-               nbLineEnd       = a.value.substr(0, a.selectionEnd).split("\n").length - 1;\r
-               range           = document.selection.createRange();\r
-               range.moveToElementText( a );\r
-               range.setEndPoint( 'EndToStart', range );\r
-               \r
-               range.moveStart('character', a.selectionStart - nbLineStart);\r
-               range.moveEnd('character', a.selectionEnd - nbLineEnd - (a.selectionStart - nbLineStart)  );\r
-               range.select();\r
-       };\r
-       \r
-       \r
-       \r
-       EditArea.prototype.checkTextEvolution=function(lastText,newText){\r
-               // ch will contain changes datas\r
-               var ch={},baseStep=200, cpt=0, end, step,tStart=new Date().getTime();\r
-       \r
-               end             = Math.min(newText.length, lastText.length);\r
-        step   = baseStep;\r
-        // find how many chars are similar at the begin of the text                                            \r
-               while( cpt<end && step>=1 ){\r
-            if(lastText.substr(cpt, step) == newText.substr(cpt, step)){\r
-                cpt+= step;\r
-            }else{\r
-                step= Math.floor(step/2);\r
-            }\r
-               }\r
-               \r
-               ch.posStart     = cpt;\r
-               ch.lineStart= newText.substr(0, ch.posStart).split("\n").length -1;                                             \r
-               \r
-               cpt_last        = lastText.length;\r
-        cpt                    = newText.length;\r
-        step           = baseStep;                     \r
-        // find how many chars are similar at the end of the text                                              \r
-               while( cpt>=0 && cpt_last>=0 && step>=1 ){\r
-            if(lastText.substr(cpt_last-step, step) == newText.substr(cpt-step, step)){\r
-                cpt-= step;\r
-                cpt_last-= step;\r
-            }else{\r
-                step= Math.floor(step/2);\r
-            }\r
-               }\r
-               \r
-               ch.posNewEnd    = cpt;\r
-               ch.posLastEnd   = cpt_last;\r
-               if(ch.posNewEnd<=ch.posStart){\r
-                       if(lastText.length < newText.length){\r
-                               ch.posNewEnd= ch.posStart + newText.length - lastText.length;\r
-                               ch.posLastEnd= ch.posStart;\r
-                       }else{\r
-                               ch.posLastEnd= ch.posStart + lastText.length - newText.length;\r
-                               ch.posNewEnd= ch.posStart;\r
-                       }\r
-               } \r
-               ch.newText              = newText.substring(ch.posStart, ch.posNewEnd);\r
-               ch.lastText             = lastText.substring(ch.posStart, ch.posLastEnd);                                   \r
-               \r
-               ch.lineNewEnd   = newText.substr(0, ch.posNewEnd).split("\n").length -1;\r
-               ch.lineLastEnd  = lastText.substr(0, ch.posLastEnd).split("\n").length -1;\r
-               \r
-               ch.newTextLine  = newText.split("\n").slice(ch.lineStart, ch.lineNewEnd+1).join("\n");\r
-               ch.lastTextLine = lastText.split("\n").slice(ch.lineStart, ch.lineLastEnd+1).join("\n");\r
-               //console.log( ch );\r
-               return ch;      \r
-       };\r
-       \r
-       EditArea.prototype.tab_selection= function(){\r
-               if(this.is_tabbing)\r
-                       return;\r
-               this.is_tabbing=true;\r
-               //infos=getSelectionInfos();\r
-               //if( document.selection ){\r
-               this.getIESelection();\r
-               /* Insertion du code de formatage */\r
-               var start = this.textarea.selectionStart;\r
-               var end = this.textarea.selectionEnd;\r
-               var insText = this.textarea.value.substring(start, end);\r
-               \r
-               /* Insert tabulation and ajust cursor position */\r
-               var pos_start=start;\r
-               var pos_end=end;\r
-               if (insText.length == 0) {\r
-                       // if only one line selected\r
-                       this.textarea.value = this.textarea.value.substr(0, start) + this.tabulation + this.textarea.value.substr(end);\r
-                       pos_start = start + this.tabulation.length;\r
-                       pos_end=pos_start;\r
-               } else {\r
-                       start= Math.max(0, this.textarea.value.substr(0, start).lastIndexOf("\n")+1);\r
-                       endText=this.textarea.value.substr(end);\r
-                       startText=this.textarea.value.substr(0, start);\r
-                       tmp= this.textarea.value.substring(start, end).split("\n");\r
-                       insText= this.tabulation+tmp.join("\n"+this.tabulation);\r
-                       this.textarea.value = startText + insText + endText;\r
-                       pos_start = start;\r
-                       pos_end= this.textarea.value.indexOf("\n", startText.length + insText.length);\r
-                       if(pos_end==-1)\r
-                               pos_end=this.textarea.value.length;\r
-                       //pos = start + repdeb.length + insText.length + ;\r
-               }\r
-               this.textarea.selectionStart = pos_start;\r
-               this.textarea.selectionEnd = pos_end;\r
-               \r
-               //if( document.selection ){\r
-               if(this.isIE)\r
-               {\r
-                       this.setIESelection();\r
-                       setTimeout("editArea.is_tabbing=false;", 100);  // IE can't accept to make 2 tabulation without a little break between both\r
-               }\r
-               else\r
-               { \r
-                       this.is_tabbing=false;\r
-               }       \r
-               \r
-       };\r
-       \r
-       EditArea.prototype.invert_tab_selection= function(){\r
-               var t=this, a=this.textarea;\r
-               if(t.is_tabbing)\r
-                       return;\r
-               t.is_tabbing=true;\r
-               //infos=getSelectionInfos();\r
-               //if( document.selection ){\r
-               t.getIESelection();\r
-               \r
-               var start       = a.selectionStart;\r
-               var end         = a.selectionEnd;\r
-               var insText     = a.value.substring(start, end);\r
-               \r
-               /* Tab remove and cursor seleciton adjust */\r
-               var pos_start=start;\r
-               var pos_end=end;\r
-               if (insText.length == 0) {\r
-                       if(a.value.substring(start-t.tabulation.length, start)==t.tabulation)\r
-                       {\r
-                               a.value         = a.value.substr(0, start-t.tabulation.length) + a.value.substr(end);\r
-                               pos_start       = Math.max(0, start-t.tabulation.length);\r
-                               pos_end         = pos_start;\r
-                       }       \r
-                       /*\r
-                       a.value = a.value.substr(0, start) + t.tabulation + insText + a.value.substr(end);\r
-                       pos_start = start + t.tabulation.length;\r
-                       pos_end=pos_start;*/\r
-               } else {\r
-                       start           = a.value.substr(0, start).lastIndexOf("\n")+1;\r
-                       endText         = a.value.substr(end);\r
-                       startText       = a.value.substr(0, start);\r
-                       tmp                     = a.value.substring(start, end).split("\n");\r
-                       insText         = "";\r
-                       for(i=0; i<tmp.length; i++){                            \r
-                               for(j=0; j<t.tab_nb_char; j++){\r
-                                       if(tmp[i].charAt(0)=="\t"){\r
-                                               tmp[i]=tmp[i].substr(1);\r
-                                               j=t.tab_nb_char;\r
-                                       }else if(tmp[i].charAt(0)==" ")\r
-                                               tmp[i]=tmp[i].substr(1);\r
-                               }               \r
-                               insText+=tmp[i];\r
-                               if(i<tmp.length-1)\r
-                                       insText+="\n";\r
-                       }\r
-                       //insText+="_";\r
-                       a.value         = startText + insText + endText;\r
-                       pos_start       = start;\r
-                       pos_end         = a.value.indexOf("\n", startText.length + insText.length);\r
-                       if(pos_end==-1)\r
-                               pos_end=a.value.length;\r
-                       //pos = start + repdeb.length + insText.length + ;\r
-               }\r
-               a.selectionStart = pos_start;\r
-               a.selectionEnd = pos_end;\r
-               \r
-               //if( document.selection ){\r
-               if(t.isIE){\r
-                       // select the text for IE\r
-                       t.setIESelection();\r
-                       setTimeout("editArea.is_tabbing=false;", 100);  // IE can accept to make 2 tabulation without a little break between both\r
-               }else\r
-                       t.is_tabbing=false;\r
-       };\r
-       \r
-       EditArea.prototype.press_enter= function(){             \r
-               if(!this.smooth_selection)\r
-                       return false;\r
-               this.getIESelection();\r
-               var scrollTop= this.result.scrollTop;\r
-               var scrollLeft= this.result.scrollLeft;\r
-               var start=this.textarea.selectionStart;\r
-               var end= this.textarea.selectionEnd;\r
-               var start_last_line= Math.max(0 , this.textarea.value.substring(0, start).lastIndexOf("\n") + 1 );\r
-               var begin_line= this.textarea.value.substring(start_last_line, start).replace(/^([ \t]*).*/gm, "$1");\r
-               var lineStart = this.textarea.value.substring(0, start).split("\n").length;\r
-               if(begin_line=="\n" || begin_line=="\r" || begin_line.length==0)\r
-               {\r
-                       return false;\r
-               }\r
-                       \r
-               if(this.isIE || ( this.isOpera && this.isOpera < 9.6 ) ){\r
-                       begin_line="\r\n"+ begin_line;\r
-               }else{\r
-                       begin_line="\n"+ begin_line;\r
-               }       \r
-               //alert(start_last_line+" strat: "+start +"\n"+this.textarea.value.substring(start_last_line, start)+"\n_"+begin_line+"_")\r
-               this.textarea.value= this.textarea.value.substring(0, start) + begin_line + this.textarea.value.substring(end);\r
-               \r
-               this.area_select(start+ begin_line.length ,0);\r
-               // during this process IE scroll back to the top of the textarea\r
-               if(this.isIE){\r
-                       this.result.scrollTop   = scrollTop;\r
-                       this.result.scrollLeft  = scrollLeft;\r
-               }\r
-               return true;\r
-               \r
-       };\r
-       \r
-       EditArea.prototype.findEndBracket= function(infos, bracket){\r
-                       \r
-               var start=infos["indexOfCursor"];\r
-               var normal_order=true;\r
-               //curr_text=infos["full_text"].split("\n");\r
-               if(this.assocBracket[bracket])\r
-                       endBracket=this.assocBracket[bracket];\r
-               else if(this.revertAssocBracket[bracket]){\r
-                       endBracket=this.revertAssocBracket[bracket];\r
-                       normal_order=false;\r
-               }       \r
-               var end=-1;\r
-               var nbBracketOpen=0;\r
-               \r
-               for(var i=start; i<infos["full_text"].length && i>=0; ){\r
-                       if(infos["full_text"].charAt(i)==endBracket){                           \r
-                               nbBracketOpen--;\r
-                               if(nbBracketOpen<=0){\r
-                                       //i=infos["full_text"].length;\r
-                                       end=i;\r
-                                       break;\r
-                               }\r
-                       }else if(infos["full_text"].charAt(i)==bracket)\r
-                               nbBracketOpen++;\r
-                       if(normal_order)\r
-                               i++;\r
-                       else\r
-                               i--;\r
-               }\r
-               \r
-               //end=infos["full_text"].indexOf("}", start);\r
-               if(end==-1)\r
-                       return false;   \r
-               var endLastLine=infos["full_text"].substr(0, end).lastIndexOf("\n");                    \r
-               if(endLastLine==-1)\r
-                       line=1;\r
-               else\r
-                       line= infos["full_text"].substr(0, endLastLine).split("\n").length + 1;\r
-                                       \r
-               var curPos= end - endLastLine - 1;\r
-               var endLineLength       = infos["full_text"].substring(end).split("\n")[0].length;\r
-               this.displayToCursorPosition("end_bracket", line, curPos, infos["full_text"].substring(endLastLine +1, end + endLineLength));\r
-               return true;\r
-       };\r
-       \r
-       EditArea.prototype.displayToCursorPosition= function(id, start_line, cur_pos, lineContent, no_real_move){\r
-               var elem,dest,content,posLeft=0,posTop,fixPadding,topOffset,endElem;    \r
-\r
-               elem            = this.test_font_size;\r
-               dest            = _$(id);\r
-               content         = "<span id='test_font_size_inner'>"+lineContent.substr(0, cur_pos).replace(/&/g,"&amp;").replace(/</g,"&lt;")+"</span><span id='endTestFont'>"+lineContent.substr(cur_pos).replace(/&/g,"&amp;").replace(/</g,"&lt;")+"</span>";\r
-               if( this.isIE || ( this.isOpera && this.isOpera < 9.6 ) ) {\r
-                       elem.innerHTML= "<pre>" + content.replace(/^\r?\n/, "<br>") + "</pre>";\r
-               } else {\r
-                       elem.innerHTML= content;\r
-               }\r
-               \r
-\r
-               endElem         = _$('endTestFont');\r
-               topOffset       = endElem.offsetTop;\r
-               fixPadding      = parseInt( this.content_highlight.style.paddingLeft.replace("px", "") );\r
-               posLeft         = 45 + endElem.offsetLeft + ( !isNaN( fixPadding ) && topOffset > 0 ? fixPadding : 0 );\r
-               posTop          = this.getLinePosTop( start_line ) + topOffset;// + Math.floor( ( endElem.offsetHeight - 1 ) / this.lineHeight ) * this.lineHeight;\r
-       \r
-               // detect the case where the span start on a line but has no display on it\r
-               if( this.isIE && cur_pos > 0 && endElem.offsetLeft == 0 )\r
-               {\r
-                       posTop  +=      this.lineHeight;\r
-               }\r
-               if(no_real_move!=true){ // when the cursor is hidden no need to move him\r
-                       dest.style.top=posTop+"px";\r
-                       dest.style.left=posLeft+"px";   \r
-               }\r
-               // usefull for smarter scroll\r
-               dest.cursor_top=posTop;\r
-               dest.cursor_left=posLeft;       \r
-       //      _$(id).style.marginLeft=posLeft+"px";\r
-       };\r
-       \r
-       EditArea.prototype.getLinePosTop= function(start_line){\r
-               var elem= _$('line_'+ start_line), posTop=0;\r
-               if( elem )\r
-                       posTop  = elem.offsetTop;\r
-               else\r
-                       posTop  = this.lineHeight * (start_line-1);\r
-               return posTop;\r
-       };\r
-       \r
-       \r
-       // return the dislpayed height of a text (take word-wrap into account)\r
-       EditArea.prototype.getTextHeight= function(text){\r
-               var t=this,elem,height;\r
-               elem            = t.test_font_size;\r
-               content         = text.replace(/&/g,"&amp;").replace(/</g,"&lt;");\r
-               if( t.isIE || ( this.isOpera && this.isOpera < 9.6 ) ) {\r
-                       elem.innerHTML= "<pre>" + content.replace(/^\r?\n/, "<br>") + "</pre>";\r
-               } else {\r
-                       elem.innerHTML= content;\r
-               }\r
-               height  = elem.offsetHeight;\r
-               height  = Math.max( 1, Math.floor( elem.offsetHeight / this.lineHeight ) ) * this.lineHeight;\r
-               return height;\r
-       };\r
-\r
-       /**\r
-        * Fix line height for the given lines\r
-        * @param Integer linestart\r
-        * @param Integer lineEnd End line or -1 to cover all lines\r
-        */\r
-       EditArea.prototype.fixLinesHeight= function( textValue, lineStart,lineEnd ){\r
-               var aText = textValue.split("\n");\r
-               if( lineEnd == -1 )\r
-                       lineEnd = aText.length-1;\r
-               for( var i = Math.max(0, lineStart); i <= lineEnd; i++ )\r
-               {\r
-                       if( elem = _$('line_'+ ( i+1 ) ) )\r
-                       {\r
-                               elem.style.height= typeof( aText[i] ) != "undefined" ? this.getTextHeight( aText[i] )+"px" : this.lineHeight;\r
-                       }\r
-               }\r
-       };\r
-       \r
-       EditArea.prototype.area_select= function(start, length){\r
-               this.textarea.focus();\r
-               \r
-               start   = Math.max(0, Math.min(this.textarea.value.length, start));\r
-               end             = Math.max(start, Math.min(this.textarea.value.length, start+length));\r
-\r
-               if(this.isIE)\r
-               {\r
-                       this.textarea.selectionStart    = start;\r
-                       this.textarea.selectionEnd              = end;          \r
-                       this.setIESelection();\r
-               }\r
-               else\r
-               {\r
-                       // Opera bug when moving selection start and selection end\r
-                       if(this.isOpera && this.isOpera < 9.6 )\r
-                       {       \r
-                               this.textarea.setSelectionRange(0, 0);\r
-                       }\r
-                       this.textarea.setSelectionRange(start, end);\r
-               }\r
-               this.check_line_selection();\r
-       };\r
-       \r
-       \r
-       EditArea.prototype.area_get_selection= function(){\r
-               var text="";\r
-               if( document.selection ){\r
-                       var range = document.selection.createRange();\r
-                       text=range.text;\r
-               }else{\r
-                       text= this.textarea.value.substring(this.textarea.selectionStart, this.textarea.selectionEnd);\r
-               }\r
-               return text;                    \r
-       };
\ No newline at end of file
diff --git a/project/static/js/plugins/charmap/charmap.js b/project/static/js/plugins/charmap/charmap.js
deleted file mode 100755 (executable)
index df42822..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/**\r
- * Charmap plugin\r
- * by Christophe Dolivet\r
- * v0.1 (2006/09/22)\r
- * \r
- *    \r
- * This plugin allow to use a visual keyboard allowing to insert any UTF-8 characters in the text.\r
- * \r
- * - plugin name to add to the plugin list: "charmap"\r
- * - plugin name to add to the toolbar list: "charmap" \r
- * - possible parameters to add to EditAreaLoader.init(): \r
- *             "charmap_default": (String) define the name of the default character range displayed on popup display\r
- *                                                     (default: "arrows")\r
- * \r
- * \r
- */\r
-   \r
-var EditArea_charmap= {\r
-       /**\r
-        * Get called once this file is loaded (editArea still not initialized)\r
-        *\r
-        * @return nothing       \r
-        */                     \r
-       init: function(){       \r
-               this.default_language="Arrows";\r
-       }\r
-       \r
-       /**\r
-        * Returns the HTML code for a specific control string or false if this plugin doesn't have that control.\r
-        * A control can be a button, select list or any other HTML item to present in the EditArea user interface.\r
-        * Language variables such as {$lang_somekey} will also be replaced with contents from\r
-        * the language packs.\r
-        * \r
-        * @param {string} ctrl_name: the name of the control to add      \r
-        * @return HTML code for a specific control or false.\r
-        * @type string or boolean\r
-        */     \r
-       ,get_control_html: function(ctrl_name){\r
-               switch(ctrl_name){\r
-                       case "charmap":\r
-                               // Control id, button img, command\r
-                               return parent.editAreaLoader.get_button_html('charmap_but', 'charmap.gif', 'charmap_press', false, this.baseURL);\r
-               }\r
-               return false;\r
-       }\r
-       /**\r
-        * Get called once EditArea is fully loaded and initialised\r
-        *       \r
-        * @return nothing\r
-        */                     \r
-       ,onload: function(){ \r
-               if(editArea.settings["charmap_default"] && editArea.settings["charmap_default"].length>0)\r
-                       this.default_language= editArea.settings["charmap_default"];\r
-       }\r
-       \r
-       /**\r
-        * Is called each time the user touch a keyboard key.\r
-        *       \r
-        * @param (event) e: the keydown event\r
-        * @return true - pass to next handler in chain, false - stop chain execution\r
-        * @type boolean         \r
-        */\r
-       ,onkeydown: function(e){\r
-               \r
-       }\r
-       \r
-       /**\r
-        * Executes a specific command, this function handles plugin commands.\r
-        *\r
-        * @param {string} cmd: the name of the command being executed\r
-        * @param {unknown} param: the parameter of the command  \r
-        * @return true - pass to next handler in chain, false - stop chain execution\r
-        * @type boolean        \r
-        */\r
-       ,execCommand: function(cmd, param){\r
-               // Handle commands\r
-               switch(cmd){\r
-                       case "charmap_press":\r
-                               win= window.open(this.baseURL+"popup.html", "charmap", "width=500,height=270,scrollbars=yes,resizable=yes");\r
-                               win.focus();\r
-                               return false;\r
-               }\r
-               // Pass to next handler in chain\r
-               return true;\r
-       }\r
-       \r
-};\r
-\r
-// Adds the plugin class to the list of available EditArea plugins\r
-editArea.add_plugin("charmap", EditArea_charmap);\r
diff --git a/project/static/js/plugins/charmap/css/charmap.css b/project/static/js/plugins/charmap/css/charmap.css
deleted file mode 100755 (executable)
index fc8d666..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-body{\r
-       background-color: #F0F0EE; \r
-       font: 12px monospace, sans-serif;\r
-}\r
-\r
-select{\r
-       background-color: #F9F9F9;\r
-       border: solid 1px #888888;\r
-}\r
-\r
-h1, h2, h3, h4, h5, h6{\r
-       margin: 0;\r
-       padding: 0;\r
-       color: #2B6FB6;\r
-}\r
-\r
-h1{\r
-       font-size: 1.5em;\r
-}\r
-\r
-div#char_list{\r
-       height: 200px;\r
-       overflow: auto;\r
-       padding: 1px;\r
-       border: 1px solid #0A246A;\r
-       background-color: #F9F9F9;\r
-       clear: both;\r
-       margin-top: 5px;\r
-}\r
-\r
-a.char{\r
-       display: block;\r
-       float: left;\r
-       width: 20px;\r
-       height: 20px;\r
-       line-height: 20px;\r
-       margin: 1px;\r
-       border: solid 1px #888888;\r
-       text-align: center;\r
-       cursor: pointer;\r
-}\r
-\r
-a.char:hover{\r
-       background-color: #CCCCCC;\r
-}\r
-\r
-.preview{\r
-       border: solid 1px #888888;\r
-       width: 50px;\r
-       padding: 2px 5px;\r
-       height: 35px;\r
-       line-height: 35px;\r
-       text-align:center;       \r
-       background-color: #CCCCCC;\r
-       font-size: 2em;\r
-       float: right;\r
-       font-weight: bold;\r
-       margin: 0 0 5px 5px;\r
-}\r
-\r
-#preview_code{\r
-       font-size: 1.1em;\r
-       width: 70px;\r
-}\r
diff --git a/project/static/js/plugins/charmap/images/charmap.gif b/project/static/js/plugins/charmap/images/charmap.gif
deleted file mode 100755 (executable)
index 3cdc4ac..0000000
Binary files a/project/static/js/plugins/charmap/images/charmap.gif and /dev/null differ
diff --git a/project/static/js/plugins/charmap/jscripts/map.js b/project/static/js/plugins/charmap/jscripts/map.js
deleted file mode 100755 (executable)
index 6c194a4..0000000
+++ /dev/null
@@ -1,373 +0,0 @@
-var editArea;\r
-\r
-\r
-/**\r
- *  UTF-8 list taken from http://www.utf8-chartable.de/unicode-utf8-table.pl?utf8=dec \r
- */  \r
\r
-\r
-/*\r
-var char_range_list={\r
-"Basic Latin":"0021,007F",\r
-"Latin-1 Supplement":"0080,00FF",\r
-"Latin Extended-A":"0100,017F",\r
-"Latin Extended-B":"0180,024F",\r
-"IPA Extensions":"0250,02AF",\r
-"Spacing Modifier Letters":"02B0,02FF",\r
-\r
-"Combining Diacritical Marks":"0300,036F",\r
-"Greek and Coptic":"0370,03FF",\r
-"Cyrillic":"0400,04FF",\r
-"Cyrillic Supplement":"0500,052F",\r
-"Armenian":"0530,058F",\r
-"Hebrew":"0590,05FF",\r
-"Arabic":"0600,06FF",\r
-"Syriac":"0700,074F",\r
-"Arabic Supplement":"0750,077F",\r
-\r
-"Thaana":"0780,07BF",\r
-"Devanagari":"0900,097F",\r
-"Bengali":"0980,09FF",\r
-"Gurmukhi":"0A00,0A7F",\r
-"Gujarati":"0A80,0AFF",\r
-"Oriya":"0B00,0B7F",\r
-"Tamil":"0B80,0BFF",\r
-"Telugu":"0C00,0C7F",\r
-"Kannada":"0C80,0CFF",\r
-\r
-"Malayalam":"0D00,0D7F",\r
-"Sinhala":"0D80,0DFF",\r
-"Thai":"0E00,0E7F",\r
-"Lao":"0E80,0EFF",\r
-"Tibetan":"0F00,0FFF",\r
-"Myanmar":"1000,109F",\r
-"Georgian":"10A0,10FF",\r
-"Hangul Jamo":"1100,11FF",\r
-"Ethiopic":"1200,137F",\r
-\r
-"Ethiopic Supplement":"1380,139F",\r
-"Cherokee":"13A0,13FF",\r
-"Unified Canadian Aboriginal Syllabics":"1400,167F",\r
-"Ogham":"1680,169F",\r
-"Runic":"16A0,16FF",\r
-"Tagalog":"1700,171F",\r
-"Hanunoo":"1720,173F",\r
-"Buhid":"1740,175F",\r
-"Tagbanwa":"1760,177F",\r
-\r
-"Khmer":"1780,17FF",\r
-"Mongolian":"1800,18AF",\r
-"Limbu":"1900,194F",\r
-"Tai Le":"1950,197F",\r
-"New Tai Lue":"1980,19DF",\r
-"Khmer Symbols":"19E0,19FF",\r
-"Buginese":"1A00,1A1F",\r
-"Phonetic Extensions":"1D00,1D7F",\r
-"Phonetic Extensions Supplement":"1D80,1DBF",\r
-\r
-"Combining Diacritical Marks Supplement":"1DC0,1DFF",\r
-"Latin Extended Additional":"1E00,1EFF",\r
-"Greek Extended":"1F00,1FFF",\r
-"General Punctuation":"2000,206F",\r
-"Superscripts and Subscripts":"2070,209F",\r
-"Currency Symbols":"20A0,20CF",\r
-"Combining Diacritical Marks for Symbols":"20D0,20FF",\r
-"Letterlike Symbols":"2100,214F",\r
-"Number Forms":"2150,218F",\r
-\r
-"Arrows":"2190,21FF",\r
-"Mathematical Operators":"2200,22FF",\r
-"Miscellaneous Technical":"2300,23FF",\r
-"Control Pictures":"2400,243F",\r
-"Optical Character Recognition":"2440,245F",\r
-"Enclosed Alphanumerics":"2460,24FF",\r
-"Box Drawing":"2500,257F",\r
-"Block Elements":"2580,259F",\r
-"Geometric Shapes":"25A0,25FF",\r
-\r
-"Miscellaneous Symbols":"2600,26FF",\r
-"Dingbats":"2700,27BF",\r
-"Miscellaneous Mathematical Symbols-A":"27C0,27EF",\r
-"Supplemental Arrows-A":"27F0,27FF",\r
-"Braille Patterns":"2800,28FF",\r
-"Supplemental Arrows-B":"2900,297F",\r
-"Miscellaneous Mathematical Symbols-B":"2980,29FF",\r
-"Supplemental Mathematical Operators":"2A00,2AFF",\r
-"Miscellaneous Symbols and Arrows":"2B00,2BFF",\r
-\r
-"Glagolitic":"2C00,2C5F",\r
-"Coptic":"2C80,2CFF",\r
-"Georgian Supplement":"2D00,2D2F",\r
-"Tifinagh":"2D30,2D7F",\r
-"Ethiopic Extended":"2D80,2DDF",\r
-"Supplemental Punctuation":"2E00,2E7F",\r
-"CJK Radicals Supplement":"2E80,2EFF",\r
-"Kangxi Radicals":"2F00,2FDF",\r
-"Ideographic Description Characters":"2FF0,2FFF",\r
-\r
-"CJK Symbols and Punctuation":"3000,303F",\r
-"Hiragana":"3040,309F",\r
-"Katakana":"30A0,30FF",\r
-"Bopomofo":"3100,312F",\r
-"Hangul Compatibility Jamo":"3130,318F",\r
-"Kanbun":"3190,319F",\r
-"Bopomofo Extended":"31A0,31BF",\r
-"CJK Strokes":"31C0,31EF",\r
-"Katakana Phonetic Extensions":"31F0,31FF",\r
-\r
-"Enclosed CJK Letters and Months":"3200,32FF",\r
-"CJK Compatibility":"3300,33FF",\r
-"CJK Unified Ideographs Extension A":"3400,4DBF",\r
-"Yijing Hexagram Symbols":"4DC0,4DFF",\r
-"CJK Unified Ideographs":"4E00,9FFF",\r
-"Yi Syllables":"A000,A48F",\r
-"Yi Radicals":"A490,A4CF",\r
-"Modifier Tone Letters":"A700,A71F",\r
-"Syloti Nagri":"A800,A82F",\r
-\r
-"Hangul Syllables":"AC00,D7AF",\r
-"High Surrogates":"D800,DB7F",\r
-"High Private Use Surrogates":"DB80,DBFF",\r
-"Low Surrogates":"DC00,DFFF",\r
-"Private Use Area":"E000,F8FF",\r
-"CJK Compatibility Ideographs":"F900,FAFF",\r
-"Alphabetic Presentation Forms":"FB00,FB4F",\r
-"Arabic Presentation Forms-A":"FB50,FDFF",\r
-"Variation Selectors":"FE00,FE0F",\r
-\r
-"Vertical Forms":"FE10,FE1F",\r
-"Combining Half Marks":"FE20,FE2F",\r
-"CJK Compatibility Forms":"FE30,FE4F",\r
-"Small Form Variants":"FE50,FE6F",\r
-"Arabic Presentation Forms-B":"FE70,FEFF",\r
-"Halfwidth and Fullwidth Forms":"FF00,FFEF",\r
-"Specials":"FFF0,FFFF",\r
-"Linear B Syllabary":"10000,1007F",\r
-"Linear B Ideograms":"10080,100FF",\r
-\r
-"Aegean Numbers":"10100,1013F",\r
-"Ancient Greek Numbers":"10140,1018F",\r
-"Old Italic":"10300,1032F",\r
-"Gothic":"10330,1034F",\r
-"Ugaritic":"10380,1039F",\r
-"Old Persian":"103A0,103DF",\r
-"Deseret":"10400,1044F",\r
-"Shavian":"10450,1047F",\r
-"Osmanya":"10480,104AF",\r
-\r
-"Cypriot Syllabary":"10800,1083F",\r
-"Kharoshthi":"10A00,10A5F",\r
-"Byzantine Musical Symbols":"1D000,1D0FF",\r
-"Musical Symbols":"1D100,1D1FF",\r
-"Ancient Greek Musical Notation":"1D200,1D24F",\r
-"Tai Xuan Jing Symbols":"1D300,1D35F",\r
-"Mathematical Alphanumeric Symbols":"1D400,1D7FF",\r
-"CJK Unified Ideographs Extension B":"20000,2A6DF",\r
-"CJK Compatibility Ideographs Supplement":"2F800,2FA1F",\r
-"Tags":"E0000,E007F",\r
-"Variation Selectors Supplement":"E0100,E01EF"\r
-};\r
-*/\r
-var char_range_list={\r
-"Aegean Numbers":"10100,1013F",\r
-"Alphabetic Presentation Forms":"FB00,FB4F",\r
-"Ancient Greek Musical Notation":"1D200,1D24F",\r
-"Ancient Greek Numbers":"10140,1018F",\r
-"Arabic":"0600,06FF",\r
-"Arabic Presentation Forms-A":"FB50,FDFF",\r
-"Arabic Presentation Forms-B":"FE70,FEFF",\r
-"Arabic Supplement":"0750,077F",\r
-"Armenian":"0530,058F",\r
-"Arrows":"2190,21FF",\r
-"Basic Latin":"0020,007F",\r
-"Bengali":"0980,09FF",\r
-"Block Elements":"2580,259F",\r
-"Bopomofo Extended":"31A0,31BF",\r
-"Bopomofo":"3100,312F",\r
-"Box Drawing":"2500,257F",\r
-"Braille Patterns":"2800,28FF",\r
-"Buginese":"1A00,1A1F",\r
-"Buhid":"1740,175F",\r
-"Byzantine Musical Symbols":"1D000,1D0FF",\r
-"CJK Compatibility Forms":"FE30,FE4F",\r
-"CJK Compatibility Ideographs Supplement":"2F800,2FA1F",\r
-"CJK Compatibility Ideographs":"F900,FAFF",\r
-"CJK Compatibility":"3300,33FF",\r
-"CJK Radicals Supplement":"2E80,2EFF",\r
-"CJK Strokes":"31C0,31EF",\r
-"CJK Symbols and Punctuation":"3000,303F",\r
-"CJK Unified Ideographs Extension A":"3400,4DBF",\r
-"CJK Unified Ideographs Extension B":"20000,2A6DF",\r
-"CJK Unified Ideographs":"4E00,9FFF",\r
-"Cherokee":"13A0,13FF",\r
-"Combining Diacritical Marks Supplement":"1DC0,1DFF",\r
-"Combining Diacritical Marks for Symbols":"20D0,20FF",\r
-"Combining Diacritical Marks":"0300,036F",\r
-"Combining Half Marks":"FE20,FE2F",\r
-"Control Pictures":"2400,243F",\r
-"Coptic":"2C80,2CFF",\r
-"Currency Symbols":"20A0,20CF",\r
-"Cypriot Syllabary":"10800,1083F",\r
-"Cyrillic Supplement":"0500,052F",\r
-"Cyrillic":"0400,04FF",\r
-"Deseret":"10400,1044F",\r
-"Devanagari":"0900,097F",\r
-"Dingbats":"2700,27BF",\r
-"Enclosed Alphanumerics":"2460,24FF",\r
-"Enclosed CJK Letters and Months":"3200,32FF",\r
-"Ethiopic Extended":"2D80,2DDF",\r
-"Ethiopic Supplement":"1380,139F",\r
-"Ethiopic":"1200,137F",\r
-"General Punctuation":"2000,206F",\r
-"Geometric Shapes":"25A0,25FF",\r
-"Georgian Supplement":"2D00,2D2F",\r
-"Georgian":"10A0,10FF",\r
-"Glagolitic":"2C00,2C5F",\r
-"Gothic":"10330,1034F",\r
-"Greek Extended":"1F00,1FFF",\r
-"Greek and Coptic":"0370,03FF",\r
-"Gujarati":"0A80,0AFF",\r
-"Gurmukhi":"0A00,0A7F",\r
-"Halfwidth and Fullwidth Forms":"FF00,FFEF",\r
-"Hangul Compatibility Jamo":"3130,318F",\r
-"Hangul Jamo":"1100,11FF",\r
-"Hangul Syllables":"AC00,D7AF",\r
-"Hanunoo":"1720,173F",\r
-"Hebrew":"0590,05FF",\r
-"High Private Use Surrogates":"DB80,DBFF",\r
-"High Surrogates":"D800,DB7F",\r
-"Hiragana":"3040,309F",\r
-"IPA Extensions":"0250,02AF",\r
-"Ideographic Description Characters":"2FF0,2FFF",\r
-"Kanbun":"3190,319F",\r
-"Kangxi Radicals":"2F00,2FDF",\r
-"Kannada":"0C80,0CFF",\r
-"Katakana Phonetic Extensions":"31F0,31FF",\r
-"Katakana":"30A0,30FF",\r
-"Kharoshthi":"10A00,10A5F",\r
-"Khmer Symbols":"19E0,19FF",\r
-"Khmer":"1780,17FF",\r
-"Lao":"0E80,0EFF",\r
-"Latin Extended Additional":"1E00,1EFF",\r
-"Latin Extended-A":"0100,017F",\r
-"Latin Extended-B":"0180,024F",\r
-"Latin-1 Supplement":"0080,00FF",\r
-"Letterlike Symbols":"2100,214F",\r
-"Limbu":"1900,194F",\r
-"Linear B Ideograms":"10080,100FF",\r
-"Linear B Syllabary":"10000,1007F",\r
-"Low Surrogates":"DC00,DFFF",\r
-"Malayalam":"0D00,0D7F",\r
-"Mathematical Alphanumeric Symbols":"1D400,1D7FF",\r
-"Mathematical Operators":"2200,22FF",\r
-"Miscellaneous Mathematical Symbols-A":"27C0,27EF",\r
-"Miscellaneous Mathematical Symbols-B":"2980,29FF",\r
-"Miscellaneous Symbols and Arrows":"2B00,2BFF",\r
-"Miscellaneous Symbols":"2600,26FF",\r
-"Miscellaneous Technical":"2300,23FF",\r
-"Modifier Tone Letters":"A700,A71F",\r
-"Mongolian":"1800,18AF",\r
-"Musical Symbols":"1D100,1D1FF",\r
-"Myanmar":"1000,109F",\r
-"New Tai Lue":"1980,19DF",\r
-"Number Forms":"2150,218F",\r
-"Ogham":"1680,169F",\r
-"Old Italic":"10300,1032F",\r
-"Old Persian":"103A0,103DF",\r
-"Optical Character Recognition":"2440,245F",\r
-"Oriya":"0B00,0B7F",\r
-"Osmanya":"10480,104AF",\r
-"Phonetic Extensions Supplement":"1D80,1DBF",\r
-"Phonetic Extensions":"1D00,1D7F",\r
-"Private Use Area":"E000,F8FF",\r
-"Runic":"16A0,16FF",\r
-"Shavian":"10450,1047F",\r
-"Sinhala":"0D80,0DFF",\r
-"Small Form Variants":"FE50,FE6F",\r
-"Spacing Modifier Letters":"02B0,02FF",\r
-"Specials":"FFF0,FFFF",\r
-"Superscripts and Subscripts":"2070,209F",\r
-"Supplemental Arrows-A":"27F0,27FF",\r
-"Supplemental Arrows-B":"2900,297F",\r
-"Supplemental Mathematical Operators":"2A00,2AFF",\r
-"Supplemental Punctuation":"2E00,2E7F",\r
-"Syloti Nagri":"A800,A82F",\r
-"Syriac":"0700,074F",\r
-"Tagalog":"1700,171F",\r
-"Tagbanwa":"1760,177F",\r
-"Tags":"E0000,E007F",\r
-"Tai Le":"1950,197F",\r
-"Tai Xuan Jing Symbols":"1D300,1D35F",\r
-"Tamil":"0B80,0BFF",\r
-"Telugu":"0C00,0C7F",\r
-"Thaana":"0780,07BF",\r
-"Thai":"0E00,0E7F",\r
-"Tibetan":"0F00,0FFF",\r
-"Tifinagh":"2D30,2D7F",\r
-"Ugaritic":"10380,1039F",\r
-"Unified Canadian Aboriginal Syllabics":"1400,167F",\r
-"Variation Selectors Supplement":"E0100,E01EF",\r
-"Variation Selectors":"FE00,FE0F",\r
-"Vertical Forms":"FE10,FE1F",\r
-"Yi Radicals":"A490,A4CF",\r
-"Yi Syllables":"A000,A48F",\r
-"Yijing Hexagram Symbols":"4DC0,4DFF"\r
-};\r
-\r
-var insert="charmap_insert";\r
-\r
-function map_load(){\r
-       editArea=opener.editArea;\r
-       // translate the document\r
-       insert= editArea.get_translation(insert, "word");\r
-       //alert(document.title);\r
-       document.title= editArea.get_translation(document.title, "template");\r
-       document.body.innerHTML= editArea.get_translation(document.body.innerHTML, "template");\r
-       //document.title= editArea.get_translation(document.getElementBytitle, "template");\r
-       \r
-       var selected_lang=opener.EditArea_charmap.default_language.toLowerCase();\r
-       var selected=0;\r
-       \r
-       var select= document.getElementById("select_range")\r
-       for(var i in char_range_list){\r
-               if(i.toLowerCase()==selected_lang)\r
-                       selected=select.options.length;\r
-               select.options[select.options.length]=new Option(i, char_range_list[i]);\r
-       }\r
-       select.options[selected].selected=true;\r
-/*     start=0;\r
-       end=127;\r
-       content="";\r
-       for(var i=start; i<end; i++){\r
-               content+="&#"+i+"; ";\r
-       }\r
-       document.getElementById("char_list").innerHTML=content;*/\r
-       renderCharMapHTML();\r
-}\r
-\r
-\r
-function renderCharMapHTML() {\r
-       range= document.getElementById("select_range").value.split(",");\r
-\r
-       start= parseInt(range[0],16);\r
-       end= parseInt(range[1],16);\r
-       var charsPerRow = 20, tdWidth=20, tdHeight=20;\r
-       html="";\r
-       for (var i=start; i<end; i++) {\r
-               html+="<a class='char' onmouseover='previewChar(\""+ i + "\");' onclick='insertChar(\""+ i + "\");' title='"+ insert +"'>"+ String.fromCharCode(i) +"</a>";\r
-       }\r
-       document.getElementById("char_list").innerHTML= html;\r
-       document.getElementById("preview_char").innerHTML="";\r
-}\r
-\r
-function previewChar(i){\r
-       document.getElementById("preview_char").innerHTML= String.fromCharCode(i);\r
-       document.getElementById("preview_code").innerHTML= "&amp;#"+ i +";";\r
-}\r
-\r
-function insertChar(i){\r
-       opener.parent.editAreaLoader.setSelectedText(editArea.id, String.fromCharCode( i));\r
-       range= opener.parent.editAreaLoader.getSelectionRange(editArea.id);\r
-       opener.parent.editAreaLoader.setSelectionRange(editArea.id, range["end"], range["end"]);\r
-       window.focus();\r
-}\r
diff --git a/project/static/js/plugins/charmap/langs/bg.js b/project/static/js/plugins/charmap/langs/bg.js
deleted file mode 100755 (executable)
index eaba0f9..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/*\r
- *     Bulgarian translation\r
- *     Author:         Valentin Hristov\r
- *     Company:        SOFTKIT Bulgarian\r
- *     Site:           http://www.softkit-bg.com\r
- */\r
-editArea.add_lang("bg",{\r
-charmap_but: "Виртуална клавиатура",\r
-charmap_title: "Виртуална клавиатура",\r
-charmap_choose_block: "избери езиков блок",\r
-charmap_insert:"постави този символ"\r
-});\r
diff --git a/project/static/js/plugins/charmap/langs/cs.js b/project/static/js/plugins/charmap/langs/cs.js
deleted file mode 100755 (executable)
index 6b1c907..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-editArea.add_lang("cs",{\r
-charmap_but: "Visual keyboard",\r
-charmap_title: "Visual keyboard",\r
-charmap_choose_block: "select language block",\r
-charmap_insert:"insert this character"\r
-});\r
diff --git a/project/static/js/plugins/charmap/langs/de.js b/project/static/js/plugins/charmap/langs/de.js
deleted file mode 100755 (executable)
index 6dfe69c..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-editArea.add_lang("de",{\r
-charmap_but: "Sonderzeichen",\r
-charmap_title: "Sonderzeichen",\r
-charmap_choose_block: "Bereich ausw&auml;hlen",\r
-charmap_insert: "dieses Zeichen einf&uuml;gen"\r
-});\r
diff --git a/project/static/js/plugins/charmap/langs/dk.js b/project/static/js/plugins/charmap/langs/dk.js
deleted file mode 100755 (executable)
index ebcde25..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-editArea.add_lang("dk",{\r
-charmap_but: "Visual keyboard",\r
-charmap_title: "Visual keyboard",\r
-charmap_choose_block: "select language block",\r
-charmap_insert:"insert this character"\r
-});\r
diff --git a/project/static/js/plugins/charmap/langs/en.js b/project/static/js/plugins/charmap/langs/en.js
deleted file mode 100755 (executable)
index 335ec28..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-editArea.add_lang("en",{\r
-charmap_but: "Visual keyboard",\r
-charmap_title: "Visual keyboard",\r
-charmap_choose_block: "select language block",\r
-charmap_insert:"insert this character"\r
-});\r
diff --git a/project/static/js/plugins/charmap/langs/eo.js b/project/static/js/plugins/charmap/langs/eo.js
deleted file mode 100755 (executable)
index 9a30841..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-editArea.add_lang("eo",{\r
-charmap_but: "Ekranklavaro",\r
-charmap_title: "Ekranklavaro",\r
-charmap_choose_block: "Elekto de lingvo",\r
-charmap_insert:"enmeti tiun signaron"\r
-});\r
diff --git a/project/static/js/plugins/charmap/langs/es.js b/project/static/js/plugins/charmap/langs/es.js
deleted file mode 100755 (executable)
index be04b4b..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-editArea.add_lang("es",{\r
-charmap_but: "Visual keyboard",\r
-charmap_title: "Visual keyboard",\r
-charmap_choose_block: "select language block",\r
-charmap_insert:"insert this character"\r
-});\r
diff --git a/project/static/js/plugins/charmap/langs/fr.js b/project/static/js/plugins/charmap/langs/fr.js
deleted file mode 100755 (executable)
index 8131e30..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-editArea.add_lang("fr",{\r
-charmap_but: "Clavier visuel",\r
-charmap_title: "Clavier visuel",\r
-charmap_choose_block: "choix du language",\r
-charmap_insert:"ins&eacute;rer ce caract&egrave;re"\r
-});\r
diff --git a/project/static/js/plugins/charmap/langs/hr.js b/project/static/js/plugins/charmap/langs/hr.js
deleted file mode 100755 (executable)
index 4d74354..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-editArea.add_lang("hr",{\r
-charmap_but: "Virtualna tipkovnica",\r
-charmap_title: "Virtualna tipkovnica",\r
-charmap_choose_block: "Odaberi blok s jezikom",\r
-charmap_insert:"Ubaci taj znak"\r
-});\r
diff --git a/project/static/js/plugins/charmap/langs/it.js b/project/static/js/plugins/charmap/langs/it.js
deleted file mode 100755 (executable)
index b05abb9..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-editArea.add_lang("it",{\r
-charmap_but: "Tastiera visuale",\r
-charmap_title: "Tastiera visuale",\r
-charmap_choose_block: "seleziona blocco",\r
-charmap_insert:"inserisci questo carattere"\r
-});\r
diff --git a/project/static/js/plugins/charmap/langs/ja.js b/project/static/js/plugins/charmap/langs/ja.js
deleted file mode 100755 (executable)
index efe060e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-editArea.add_lang("ja",{\r
-charmap_but: "Visual keyboard",\r
-charmap_title: "Visual keyboard",\r
-charmap_choose_block: "select language block",\r
-charmap_insert:"insert this character"\r
-});\r
diff --git a/project/static/js/plugins/charmap/langs/mk.js b/project/static/js/plugins/charmap/langs/mk.js
deleted file mode 100755 (executable)
index f533116..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-editArea.add_lang("mkn",{\r
-charmap_but: "Visual keyboard",\r
-charmap_title: "Visual keyboard",\r
-charmap_choose_block: "select language block",\r
-charmap_insert:"insert this character"\r
-});\r
diff --git a/project/static/js/plugins/charmap/langs/nl.js b/project/static/js/plugins/charmap/langs/nl.js
deleted file mode 100755 (executable)
index 70d7968..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-editArea.add_lang("nl",{\r
-charmap_but: "Visueel toetsenbord",\r
-charmap_title: "Visueel toetsenbord",\r
-charmap_choose_block: "Kies een taal blok",\r
-charmap_insert:"Voeg dit symbool in"\r
-});\r
diff --git a/project/static/js/plugins/charmap/langs/pl.js b/project/static/js/plugins/charmap/langs/pl.js
deleted file mode 100755 (executable)
index 9feabbb..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-editArea.add_lang("pl",{\r
-charmap_but: "Klawiatura ekranowa",\r
-charmap_title: "Klawiatura ekranowa",\r
-charmap_choose_block: "wybierz grupę znaków",\r
-charmap_insert:"wstaw ten znak"\r
-});\r
diff --git a/project/static/js/plugins/charmap/langs/pt.js b/project/static/js/plugins/charmap/langs/pt.js
deleted file mode 100755 (executable)
index 5d3eaa3..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-editArea.add_lang("pt",{\r
-charmap_but: "Visual keyboard",\r
-charmap_title: "Visual keyboard",\r
-charmap_choose_block: "select language block",\r
-charmap_insert:"insert this character"\r
-});\r
diff --git a/project/static/js/plugins/charmap/langs/ru.js b/project/static/js/plugins/charmap/langs/ru.js
deleted file mode 100755 (executable)
index 3163f36..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-editArea.add_lang("ru",{\r
-charmap_but: "Визуальная клавиатура",\r
-charmap_title: "Визуальная клавиатура",\r
-charmap_choose_block: "выбрать языковой блок",\r
-charmap_insert:"вставить этот символ"\r
-});\r
diff --git a/project/static/js/plugins/charmap/langs/sk.js b/project/static/js/plugins/charmap/langs/sk.js
deleted file mode 100755 (executable)
index 8513641..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-editArea.add_lang("sk",{\r
-charmap_but: "Vizuálna klávesnica",\r
-charmap_title: "Vizuálna klávesnica",\r
-charmap_choose_block: "vyber jazykový blok",\r
-charmap_insert: "vlož tento znak"\r
-});\r
diff --git a/project/static/js/plugins/charmap/langs/zh.js b/project/static/js/plugins/charmap/langs/zh.js
deleted file mode 100755 (executable)
index 2a20233..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-editArea.add_lang("zh",{\r
-charmap_but: "软键盘",\r
-charmap_title: "软键盘",\r
-charmap_choose_block: "选择一个语言块",\r
-charmap_insert:"插入此字符"\r
-});\r
diff --git a/project/static/js/plugins/charmap/popup.html b/project/static/js/plugins/charmap/popup.html
deleted file mode 100755 (executable)
index 4b549db..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >\r
-<head>\r
-<title>{$charmap_title}</title>\r
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
-<link rel="stylesheet" type="text/css" href="css/charmap.css" />\r
-<script language="Javascript" type="text/javascript" src="jscripts/map.js">\r
-</script>\r
-</head>\r
-<body onload='map_load()'>\r
-<div id='preview_code' class='preview'></div>\r
-<div id='preview_char' class='preview'></div>\r
-<h1>{$charmap_title}:</h1>\r
-<select id='select_range' onchange='renderCharMapHTML()' title='{$charmap_choose_block}'>\r
-</select>\r
-<div id='char_list'>\r
-\r
-</div>\r
-\r
-\r
-\r
-</body>\r
-</html>\r
diff --git a/project/static/js/plugins/test/css/test.css b/project/static/js/plugins/test/css/test.css
deleted file mode 100755 (executable)
index 01245eb..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-select#test_select{\r
-       background-color: #FF0000;\r
-}\r
diff --git a/project/static/js/plugins/test/images/Thumbs.db b/project/static/js/plugins/test/images/Thumbs.db
deleted file mode 100755 (executable)
index 863ae41..0000000
Binary files a/project/static/js/plugins/test/images/Thumbs.db and /dev/null differ
diff --git a/project/static/js/plugins/test/images/test.gif b/project/static/js/plugins/test/images/test.gif
deleted file mode 100755 (executable)
index 1ab5da4..0000000
Binary files a/project/static/js/plugins/test/images/test.gif and /dev/null differ
diff --git a/project/static/js/plugins/test/langs/bg.js b/project/static/js/plugins/test/langs/bg.js
deleted file mode 100755 (executable)
index 56e049e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/*\r
- *     Bulgarian translation\r
- *     Author:         Valentin Hristov\r
- *     Company:        SOFTKIT Bulgarian\r
- *     Site:           http://www.softkit-bg.com\r
- */\r
-editArea.add_lang("bg",{\r
-test_select: "избери таг",\r
-test_but: "тествай копието"\r
-});\r
diff --git a/project/static/js/plugins/test/langs/cs.js b/project/static/js/plugins/test/langs/cs.js
deleted file mode 100755 (executable)
index 026ef04..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-editArea.add_lang("cs",{\r
-test_select: "select tag",\r
-test_but: "test button"\r
-});\r
diff --git a/project/static/js/plugins/test/langs/de.js b/project/static/js/plugins/test/langs/de.js
deleted file mode 100755 (executable)
index bd0857c..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-editArea.add_lang("de",{\r
-test_select: "Tag ausw&auml;hlen",\r
-test_but: "Test Button"\r
-});\r
diff --git a/project/static/js/plugins/test/langs/dk.js b/project/static/js/plugins/test/langs/dk.js
deleted file mode 100755 (executable)
index e765cf9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-editArea.add_lang("dk",{\r
-test_select: "select tag",\r
-test_but: "test button"\r
-});\r
diff --git a/project/static/js/plugins/test/langs/en.js b/project/static/js/plugins/test/langs/en.js
deleted file mode 100755 (executable)
index 7d5d157..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-editArea.add_lang("en",{\r
-test_select: "select tag",\r
-test_but: "test button"\r
-});\r
diff --git a/project/static/js/plugins/test/langs/eo.js b/project/static/js/plugins/test/langs/eo.js
deleted file mode 100755 (executable)
index 8b4914f..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-editArea.add_lang("eo",{\r
-test_select:"elekto de marko",\r
-test_but: "provo-butono"\r
-});\r
diff --git a/project/static/js/plugins/test/langs/es.js b/project/static/js/plugins/test/langs/es.js
deleted file mode 100755 (executable)
index 73e30f1..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-editArea.add_lang("es",{\r
-test_select: "select tag",\r
-test_but: "test button"\r
-});\r
diff --git a/project/static/js/plugins/test/langs/fr.js b/project/static/js/plugins/test/langs/fr.js
deleted file mode 100755 (executable)
index ea08a93..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-editArea.add_lang("fr",{\r
-test_select:"choix balise",\r
-test_but: "bouton de test"\r
-});\r
diff --git a/project/static/js/plugins/test/langs/hr.js b/project/static/js/plugins/test/langs/hr.js
deleted file mode 100755 (executable)
index fbffd98..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-editArea.add_lang("hr",{\r
-test_select: "Odaberi tag",\r
-test_but: "Probna tipka"\r
-});\r
diff --git a/project/static/js/plugins/test/langs/it.js b/project/static/js/plugins/test/langs/it.js
deleted file mode 100755 (executable)
index 90926fe..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-editArea.add_lang("it",{\r
-test_select: "seleziona tag",\r
-test_but: "pulsante di test"\r
-});\r
diff --git a/project/static/js/plugins/test/langs/ja.js b/project/static/js/plugins/test/langs/ja.js
deleted file mode 100755 (executable)
index 2eb856c..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-editArea.add_lang("ja",{\r
-test_select: "select tag",\r
-test_but: "test button"\r
-});\r
diff --git a/project/static/js/plugins/test/langs/mk.js b/project/static/js/plugins/test/langs/mk.js
deleted file mode 100755 (executable)
index 058ad4b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-editArea.add_lang("mk",{\r
-test_select: "select tag",\r
-test_but: "test button"\r
-});\r
diff --git a/project/static/js/plugins/test/langs/nl.js b/project/static/js/plugins/test/langs/nl.js
deleted file mode 100755 (executable)
index 3217c35..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-editArea.add_lang("nl",{\r
-test_select: "select tag",\r
-test_but: "test button"\r
-});\r
diff --git a/project/static/js/plugins/test/langs/pl.js b/project/static/js/plugins/test/langs/pl.js
deleted file mode 100755 (executable)
index 5c73732..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-editArea.add_lang("pl",{\r
-test_select: "wybierz tag",\r
-test_but: "test"\r
-});\r
diff --git a/project/static/js/plugins/test/langs/pt.js b/project/static/js/plugins/test/langs/pt.js
deleted file mode 100755 (executable)
index 7f85172..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-editArea.add_lang("pt",{\r
-test_select: "select tag",\r
-test_but: "test button"\r
-});\r
diff --git a/project/static/js/plugins/test/langs/ru.js b/project/static/js/plugins/test/langs/ru.js
deleted file mode 100755 (executable)
index 0aaf542..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-editArea.add_lang("ru",{\r
-test_select: "выбрать тэг",\r
-test_but: "тестировать кнопку"\r
-});\r
diff --git a/project/static/js/plugins/test/langs/sk.js b/project/static/js/plugins/test/langs/sk.js
deleted file mode 100755 (executable)
index fe0a727..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-editArea.add_lang("sk",{\r
-test_select: "vyber tag",\r
-test_but: "testovacie tlačidlo"\r
-});\r
diff --git a/project/static/js/plugins/test/langs/zh.js b/project/static/js/plugins/test/langs/zh.js
deleted file mode 100755 (executable)
index 798d175..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-editArea.add_lang("zh",{\r
-test_select: "选择标签",\r
-test_but: "测试按钮"\r
-});\r
diff --git a/project/static/js/plugins/test/test.js b/project/static/js/plugins/test/test.js
deleted file mode 100755 (executable)
index 46e71ef..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/**\r
- * Plugin designed for test prupose. It add a button (that manage an alert) and a select (that allow to insert tags) in the toolbar.\r
- * This plugin also disable the "f" key in the editarea, and load a CSS and a JS file\r
- */  \r
-var EditArea_test= {\r
-       /**\r
-        * Get called once this file is loaded (editArea still not initialized)\r
-        *\r
-        * @return nothing       \r
-        */                     \r
-       init: function(){       \r
-               //      alert("test init: "+ this._someInternalFunction(2, 3));\r
-               editArea.load_css(this.baseURL+"css/test.css");\r
-               editArea.load_script(this.baseURL+"test2.js");\r
-       }\r
-       /**\r
-        * Returns the HTML code for a specific control string or false if this plugin doesn't have that control.\r
-        * A control can be a button, select list or any other HTML item to present in the EditArea user interface.\r
-        * Language variables such as {$lang_somekey} will also be replaced with contents from\r
-        * the language packs.\r
-        * \r
-        * @param {string} ctrl_name: the name of the control to add      \r
-        * @return HTML code for a specific control or false.\r
-        * @type string or boolean\r
-        */     \r
-       ,get_control_html: function(ctrl_name){\r
-               switch(ctrl_name){\r
-                       case "test_but":\r
-                               // Control id, button img, command\r
-                               return parent.editAreaLoader.get_button_html('test_but', 'test.gif', 'test_cmd', false, this.baseURL);\r
-                       case "test_select":\r
-                               html= "<select id='test_select' onchange='javascript:editArea.execCommand(\"test_select_change\")' fileSpecific='no'>"\r
-                                       +"                      <option value='-1'>{$test_select}</option>"\r
-                                       +"                      <option value='h1'>h1</option>"\r
-                                       +"                      <option value='h2'>h2</option>"\r
-                                       +"                      <option value='h3'>h3</option>"\r
-                                       +"                      <option value='h4'>h4</option>"\r
-                                       +"                      <option value='h5'>h5</option>"\r
-                                       +"                      <option value='h6'>h6</option>"\r
-                                       +"              </select>";\r
-                               return html;\r
-               }\r
-               return false;\r
-       }\r
-       /**\r
-        * Get called once EditArea is fully loaded and initialised\r
-        *       \r
-        * @return nothing\r
-        */                     \r
-       ,onload: function(){ \r
-               alert("test load");\r
-       }\r
-       \r
-       /**\r
-        * Is called each time the user touch a keyboard key.\r
-        *       \r
-        * @param (event) e: the keydown event\r
-        * @return true - pass to next handler in chain, false - stop chain execution\r
-        * @type boolean         \r
-        */\r
-       ,onkeydown: function(e){\r
-               var str= String.fromCharCode(e.keyCode);\r
-               // desactivate the "f" character\r
-               if(str.toLowerCase()=="f"){\r
-                       return true;\r
-               }\r
-               return false;\r
-       }\r
-       \r
-       /**\r
-        * Executes a specific command, this function handles plugin commands.\r
-        *\r
-        * @param {string} cmd: the name of the command being executed\r
-        * @param {unknown} param: the parameter of the command  \r
-        * @return true - pass to next handler in chain, false - stop chain execution\r
-        * @type boolean        \r
-        */\r
-       ,execCommand: function(cmd, param){\r
-               // Handle commands\r
-               switch(cmd){\r
-                       case "test_select_change":\r
-                               var val= document.getElementById("test_select").value;\r
-                               if(val!=-1)\r
-                                       parent.editAreaLoader.insertTags(editArea.id, "<"+val+">", "</"+val+">");\r
-                               document.getElementById("test_select").options[0].selected=true; \r
-                               return false;\r
-                       case "test_cmd":\r
-                               alert("user clicked on test_cmd");\r
-                               return false;\r
-               }\r
-               // Pass to next handler in chain\r
-               return true;\r
-       }\r
-       \r
-       /**\r
-        * This is just an internal plugin method, prefix all internal methods with a _ character.\r
-        * The prefix is needed so they doesn't collide with future EditArea callback functions.\r
-        *\r
-        * @param {string} a Some arg1.\r
-        * @param {string} b Some arg2.\r
-        * @return Some return.\r
-        * @type unknown\r
-        */\r
-       ,_someInternalFunction : function(a, b) {\r
-               return a+b;\r
-       }\r
-};\r
-\r
-// Adds the plugin class to the list of available EditArea plugins\r
-editArea.add_plugin("test", EditArea_test);\r
diff --git a/project/static/js/plugins/test/test2.js b/project/static/js/plugins/test/test2.js
deleted file mode 100755 (executable)
index 9a1ce51..0000000
+++ /dev/null
@@ -1 +0,0 @@
-alert("test2.js is loaded from test plugin");\r
diff --git a/project/static/js/reg_syntax.js b/project/static/js/reg_syntax.js
deleted file mode 100755 (executable)
index 11518cc..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-       EditAreaLoader.prototype.get_regexp= function(text_array){\r
-               //res="( |=|\\n|\\r|\\[|\\(|µ|)(";\r
-               res="(\\b)(";\r
-               for(i=0; i<text_array.length; i++){\r
-                       if(i>0)\r
-                               res+="|";\r
-                       //res+="("+ tab_text[i] +")";\r
-                       //res+=tab_text[i].replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\{|\})/g, "\\$1");\r
-                       res+=this.get_escaped_regexp(text_array[i]);\r
-               }\r
-               //res+=")( |\\.|:|\\{|\\(|\\)|\\[|\\]|\'|\"|\\r|\\n|\\t|$)";\r
-               res+=")(\\b)";\r
-               reg= new RegExp(res);\r
-               \r
-               return res;\r
-       };\r
-       \r
-       \r
-       EditAreaLoader.prototype.get_escaped_regexp= function(str){\r
-               return str.toString().replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\}|\{|\$|\^|\|)/g, "\\$1");\r
-       };\r
-       \r
-       EditAreaLoader.prototype.init_syntax_regexp= function(){\r
-               var lang_style= {};     \r
-               for(var lang in this.load_syntax){\r
-                       if(!this.syntax[lang])  // init the regexp if not already initialized\r
-                       {\r
-                               this.syntax[lang]= {};\r
-                               this.syntax[lang]["keywords_reg_exp"]= {};\r
-                               this.keywords_reg_exp_nb=0;\r
-                       \r
-                               if(this.load_syntax[lang]['KEYWORDS']){\r
-                                       param="g";\r
-                                       if(this.load_syntax[lang]['KEYWORD_CASE_SENSITIVE']===false)\r
-                                               param+="i";\r
-                                       for(var i in this.load_syntax[lang]['KEYWORDS']){\r
-                                               if(typeof(this.load_syntax[lang]['KEYWORDS'][i])=="function") continue;\r
-                                               this.syntax[lang]["keywords_reg_exp"][i]= new RegExp(this.get_regexp( this.load_syntax[lang]['KEYWORDS'][i] ), param);\r
-                                               this.keywords_reg_exp_nb++;\r
-                                       }\r
-                               }\r
-                               \r
-                               if(this.load_syntax[lang]['OPERATORS']){\r
-                                       var str="";\r
-                                       var nb=0;\r
-                                       for(var i in this.load_syntax[lang]['OPERATORS']){\r
-                                               if(typeof(this.load_syntax[lang]['OPERATORS'][i])=="function") continue;\r
-                                               if(nb>0)\r
-                                                       str+="|";                               \r
-                                               str+=this.get_escaped_regexp(this.load_syntax[lang]['OPERATORS'][i]);\r
-                                               nb++;\r
-                                       }\r
-                                       if(str.length>0)\r
-                                               this.syntax[lang]["operators_reg_exp"]= new RegExp("("+str+")","g");\r
-                               }\r
-                               \r
-                               if(this.load_syntax[lang]['DELIMITERS']){\r
-                                       var str="";\r
-                                       var nb=0;\r
-                                       for(var i in this.load_syntax[lang]['DELIMITERS']){\r
-                                               if(typeof(this.load_syntax[lang]['DELIMITERS'][i])=="function") continue;\r
-                                               if(nb>0)\r
-                                                       str+="|";\r
-                                               str+=this.get_escaped_regexp(this.load_syntax[lang]['DELIMITERS'][i]);\r
-                                               nb++;\r
-                                       }\r
-                                       if(str.length>0)\r
-                                               this.syntax[lang]["delimiters_reg_exp"]= new RegExp("("+str+")","g");\r
-                               }\r
-                               \r
-                               \r
-               //              /(("(\\"|[^"])*"?)|('(\\'|[^'])*'?)|(//(.|\r|\t)*\n)|(/\*(.|\n|\r|\t)*\*/)|(<!--(.|\n|\r|\t)*-->))/gi\r
-                               var syntax_trace=[];\r
-                               \r
-               //              /("(?:[^"\\]*(\\\\)*(\\"?)?)*("|$))/g\r
-                               \r
-                               this.syntax[lang]["quotes"]={};\r
-                               var quote_tab= [];\r
-                               if(this.load_syntax[lang]['QUOTEMARKS']){\r
-                                       for(var i in this.load_syntax[lang]['QUOTEMARKS']){     \r
-                                               if(typeof(this.load_syntax[lang]['QUOTEMARKS'][i])=="function") continue;                       \r
-                                               var x=this.get_escaped_regexp(this.load_syntax[lang]['QUOTEMARKS'][i]);\r
-                                               this.syntax[lang]["quotes"][x]=x;\r
-                                               //quote_tab[quote_tab.length]="("+x+"(?:\\\\"+x+"|[^"+x+"])*("+x+"|$))";\r
-                                               //previous working : quote_tab[quote_tab.length]="("+x+"(?:[^"+x+"\\\\]*(\\\\\\\\)*(\\\\"+x+"?)?)*("+x+"|$))";\r
-                                               quote_tab[quote_tab.length]="("+ x +"(\\\\.|[^"+ x +"])*(?:"+ x +"|$))";\r
-                                               \r
-                                               syntax_trace.push(x);                   \r
-                                       }                       \r
-                               }\r
-                                               \r
-                               this.syntax[lang]["comments"]={};\r
-                               if(this.load_syntax[lang]['COMMENT_SINGLE']){\r
-                                       for(var i in this.load_syntax[lang]['COMMENT_SINGLE']){ \r
-                                               if(typeof(this.load_syntax[lang]['COMMENT_SINGLE'][i])=="function") continue;                                           \r
-                                               var x=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_SINGLE'][i]);\r
-                                               quote_tab[quote_tab.length]="("+x+"(.|\\r|\\t)*(\\n|$))";\r
-                                               syntax_trace.push(x);\r
-                                               this.syntax[lang]["comments"][x]="\n";\r
-                                       }                       \r
-                               }               \r
-                               // (/\*(.|[\r\n])*?\*/)\r
-                               if(this.load_syntax[lang]['COMMENT_MULTI']){\r
-                                       for(var i in this.load_syntax[lang]['COMMENT_MULTI']){\r
-                                               if(typeof(this.load_syntax[lang]['COMMENT_MULTI'][i])=="function") continue;                                                    \r
-                                               var start=this.get_escaped_regexp(i);\r
-                                               var end=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_MULTI'][i]);\r
-                                               quote_tab[quote_tab.length]="("+start+"(.|\\n|\\r)*?("+end+"|$))";\r
-                                               syntax_trace.push(start);\r
-                                               syntax_trace.push(end);\r
-                                               this.syntax[lang]["comments"][i]=this.load_syntax[lang]['COMMENT_MULTI'][i];\r
-                                       }                       \r
-                               }               \r
-                               if(quote_tab.length>0)\r
-                                       this.syntax[lang]["comment_or_quote_reg_exp"]= new RegExp("("+quote_tab.join("|")+")","gi");\r
-                               \r
-                               if(syntax_trace.length>0) //   /((.|\n)*?)(\\*("|'|\/\*|\*\/|\/\/|$))/g\r
-                                       this.syntax[lang]["syntax_trace_regexp"]= new RegExp("((.|\n)*?)(\\\\*("+ syntax_trace.join("|") +"|$))", "gmi");\r
-                               \r
-                               if(this.load_syntax[lang]['SCRIPT_DELIMITERS']){\r
-                                       this.syntax[lang]["script_delimiters"]= {};\r
-                                       for(var i in this.load_syntax[lang]['SCRIPT_DELIMITERS']){\r
-                                               if(typeof(this.load_syntax[lang]['SCRIPT_DELIMITERS'][i])=="function") continue;                                                        \r
-                                               this.syntax[lang]["script_delimiters"][i]= this.load_syntax[lang]['SCRIPT_DELIMITERS'];\r
-                                       }                       \r
-                               }\r
-                               \r
-                               this.syntax[lang]["custom_regexp"]= {};\r
-                               if(this.load_syntax[lang]['REGEXPS']){\r
-                                       for(var i in this.load_syntax[lang]['REGEXPS']){\r
-                                               if(typeof(this.load_syntax[lang]['REGEXPS'][i])=="function") continue;\r
-                                               var val= this.load_syntax[lang]['REGEXPS'][i];\r
-                                               if(!this.syntax[lang]["custom_regexp"][val['execute']])\r
-                                                       this.syntax[lang]["custom_regexp"][val['execute']]= {};\r
-                                               this.syntax[lang]["custom_regexp"][val['execute']][i]={'regexp' : new RegExp(val['search'], val['modifiers'])\r
-                                                                                                                                                       , 'class' : val['class']};\r
-                                       }\r
-                               }\r
-                               \r
-                               if(this.load_syntax[lang]['STYLES']){                                                   \r
-                                       lang_style[lang]= {};\r
-                                       for(var i in this.load_syntax[lang]['STYLES']){\r
-                                               if(typeof(this.load_syntax[lang]['STYLES'][i])=="function") continue;\r
-                                               if(typeof(this.load_syntax[lang]['STYLES'][i]) != "string"){\r
-                                                       for(var j in this.load_syntax[lang]['STYLES'][i]){                                                      \r
-                                                               lang_style[lang][j]= this.load_syntax[lang]['STYLES'][i][j];\r
-                                                       }\r
-                                               }else{\r
-                                                       lang_style[lang][i]= this.load_syntax[lang]['STYLES'][i];\r
-                                               }\r
-                                       }\r
-                               }\r
-                               // build style string\r
-                               var style="";           \r
-                               for(var i in lang_style[lang]){\r
-                                       if(lang_style[lang][i].length>0){\r
-                                               style+= "."+ lang +" ."+ i.toLowerCase() +" span{"+lang_style[lang][i]+"}\n";\r
-                                               style+= "."+ lang +" ."+ i.toLowerCase() +"{"+lang_style[lang][i]+"}\n";                                \r
-                                       }\r
-                               }\r
-                               this.syntax[lang]["styles"]=style;\r
-                       }\r
-               }                               \r
-       };\r
-       \r
-       editAreaLoader.waiting_loading["reg_syntax.js"]= "loaded";\r
diff --git a/project/static/js/reg_syntax/basic.js b/project/static/js/reg_syntax/basic.js
deleted file mode 100755 (executable)
index 93b578d..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-editAreaLoader.load_syntax["basic"] = {\r
-       'COMMENT_SINGLE' : {1 : "'", 2 : 'rem'}\r
-       ,'COMMENT_MULTI' : { }\r
-       ,'QUOTEMARKS' : {1: '"'}\r
-       ,'KEYWORD_CASE_SENSITIVE' : false\r
-       ,'KEYWORDS' : {\r
-               'statements' : [\r
-                       'if','then','for','wend','while',\r
-                       'else','elseif','select','case','end select',\r
-                       'until','next','step','to','end if', 'call'\r
-               ]\r
-               ,'keywords' : [\r
-                       'sub', 'end sub', 'function', 'end function', 'exit',\r
-                       'exit function', 'dim', 'redim', 'shared', 'const',\r
-                       'is', 'absolute', 'access', 'any', 'append', 'as',\r
-                       'base', 'beep', 'binary', 'bload', 'bsave', 'chain',\r
-                       'chdir', 'circle', 'clear', 'close', 'cls', 'color',\r
-                       'com', 'common', 'data', 'date', 'declare', 'def',\r
-                       'defdbl', 'defint', 'deflng', 'defsng', 'defstr',\r
-                       'double', 'draw', 'environ', 'erase', 'error', 'field',\r
-                       'files', 'fn', 'get', 'gosub', 'goto', 'integer', 'key',\r
-                       'kill', 'let', 'line', 'list', 'locate', 'lock', 'long',\r
-                       'lprint', 'lset', 'mkdir', 'name', 'off', 'on', 'open',\r
-                       'option', 'out', 'output', 'paint', 'palette', 'pcopy',\r
-                       'poke', 'preset', 'print', 'pset', 'put', 'random',\r
-                       'randomize', 'read', 'reset', 'restore', 'resume',\r
-                       'return', 'rmdir', 'rset', 'run', 'screen', 'seg',\r
-                       'shell', 'single', 'sleep', 'sound', 'static', 'stop',\r
-                       'strig', 'string', 'swap', 'system', 'time', 'timer',\r
-                       'troff', 'tron', 'type', 'unlock', 'using', 'view',\r
-                       'wait', 'width', 'window', 'write'\r
-               ]\r
-               ,'functions' : [\r
-                       'abs', 'asc', 'atn', 'cdbl', 'chr', 'cint', 'clng',\r
-                       'cos', 'csng', 'csrlin', 'cvd', 'cvdmbf', 'cvi', 'cvl',\r
-                       'cvs', 'cvsmbf', 'eof', 'erdev', 'erl', 'err', 'exp',\r
-                       'fileattr', 'fix', 'fre', 'freefile', 'hex', 'inkey',\r
-                       'inp', 'input', 'instr', 'int', 'ioctl', 'lbound',\r
-                       'lcase', 'left', 'len', 'loc', 'lof', 'log', 'lpos',\r
-                       'ltrim', 'mid', 'mkd', 'mkdmbf', 'mki', 'mkl', 'mks',\r
-                       'mksmbf', 'oct', 'peek', 'pen', 'play', 'pmap', 'point',\r
-                       'pos', 'right', 'rnd', 'rtrim', 'seek', 'sgn', 'sin',\r
-                       'space', 'spc', 'sqr', 'stick', 'str', 'tab', 'tan',\r
-                       'ubound', 'ucase', 'val', 'varptr', 'varseg'\r
-               ]\r
-               ,'operators' : [\r
-                       'and', 'eqv', 'imp', 'mod', 'not', 'or', 'xor'\r
-               ]\r
-       }\r
-       ,'OPERATORS' :[\r
-               '+', '-', '/', '*', '=', '<', '>', '!', '&'\r
-       ]\r
-       ,'DELIMITERS' :[\r
-               '(', ')', '[', ']', '{', '}'\r
-       ]\r
-       ,'STYLES' : {\r
-               'COMMENTS': 'color: #99CC00;'\r
-               ,'QUOTESMARKS': 'color: #333399;'\r
-               ,'KEYWORDS' : {\r
-                       'keywords' : 'color: #3366FF;'\r
-                       ,'functions' : 'color: #0000FF;'\r
-                       ,'statements' : 'color: #3366FF;'\r
-                       ,'operators' : 'color: #FF0000;'\r
-                       }\r
-               ,'OPERATORS' : 'color: #FF0000;'\r
-               ,'DELIMITERS' : 'color: #0000FF;'\r
-\r
-       }\r
-};\r
diff --git a/project/static/js/reg_syntax/brainfuck.js b/project/static/js/reg_syntax/brainfuck.js
deleted file mode 100755 (executable)
index 810c3d6..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-editAreaLoader.load_syntax["brainfuck"] = {\r
-       'COMMENT_SINGLE' : {}\r
-       ,'COMMENT_MULTI' : {}\r
-       ,'QUOTEMARKS' : {}\r
-       ,'KEYWORD_CASE_SENSITIVE' : true\r
-       ,'OPERATORS' :[\r
-               '+', '-'\r
-       ]\r
-       ,'DELIMITERS' :[\r
-               '[', ']'\r
-       ]\r
-       ,'REGEXPS' : {\r
-               'bfispis' : {\r
-                       'search' : '()(\\.)()'\r
-                       ,'class' : 'bfispis'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before'\r
-               }\r
-               ,'bfupis' : {\r
-                       'search' : '()(\\,)()'\r
-                       ,'class' : 'bfupis'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before'\r
-               }\r
-               ,'bfmemory' : {\r
-                       'search' : '()([<>])()'\r
-                       ,'class' : 'bfmemory'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before'\r
-               }\r
-       }\r
-       ,'STYLES' : {\r
-               'COMMENTS': 'color: #AAAAAA;'\r
-               ,'QUOTESMARKS': 'color: #6381F8;'\r
-               ,'OPERATORS' : 'color: #88AA00;'\r
-               ,'DELIMITERS' : 'color: #00C138;'\r
-               ,'REGEXPS' : {\r
-                       'bfispis' : 'color: #EE0000;'\r
-                       ,'bfupis' : 'color: #4455ee;'\r
-                       ,'bfmemory' : 'color: #DD00DD;'\r
-               }\r
-       }\r
-};\r
-\r
diff --git a/project/static/js/reg_syntax/c.js b/project/static/js/reg_syntax/c.js
deleted file mode 100755 (executable)
index 31667a0..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-editAreaLoader.load_syntax["c"] = {\r
-       'COMMENT_SINGLE' : {1 : '//'}\r
-       ,'COMMENT_MULTI' : {'/*' : '*/'}\r
-       ,'QUOTEMARKS' : {1: "'", 2: '"'}\r
-       ,'KEYWORD_CASE_SENSITIVE' : true\r
-       ,'KEYWORDS' : {\r
-               'constants' : [\r
-                       'NULL', 'false', 'stdin', 'stdout', 'stderr', 'true'\r
-               ]\r
-               ,'types' : [\r
-                       'FILE', 'auto', 'char', 'const', 'double',\r
-                       'extern', 'float', 'inline', 'int', 'long', 'register',\r
-                       'short', 'signed', 'size_t', 'static', 'struct',\r
-                       'time_t', 'typedef', 'union', 'unsigned', 'void',\r
-                       'volatile'\r
-               ]\r
-               ,'statements' : [\r
-                       'do', 'else', 'enum', 'for', 'goto', 'if', 'sizeof',\r
-                       'switch', 'while'\r
-               ]\r
-               ,'keywords' : [\r
-                       'break', 'case', 'continue', 'default', 'delete',\r
-                       'return'\r
-               ]\r
-       }\r
-       ,'OPERATORS' :[\r
-               '+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&'\r
-       ]\r
-       ,'DELIMITERS' :[\r
-               '(', ')', '[', ']', '{', '}'\r
-       ]\r
-       ,'REGEXPS' : {\r
-               'precompiler' : {\r
-                       'search' : '()(#[^\r\n]*)()'\r
-                       ,'class' : 'precompiler'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before'\r
-               }\r
-/*             ,'precompilerstring' : {\r
-                       'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])'\r
-                       ,'class' : 'precompilerstring'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before'\r
-               }*/\r
-       }\r
-       ,'STYLES' : {\r
-               'COMMENTS': 'color: #AAAAAA;'\r
-               ,'QUOTESMARKS': 'color: #6381F8;'\r
-               ,'KEYWORDS' : {\r
-                       'constants' : 'color: #EE0000;'\r
-                       ,'types' : 'color: #0000EE;'\r
-                       ,'statements' : 'color: #60CA00;'\r
-                       ,'keywords' : 'color: #48BDDF;'\r
-               }\r
-               ,'OPERATORS' : 'color: #FF00FF;'\r
-               ,'DELIMITERS' : 'color: #0038E1;'\r
-               ,'REGEXPS' : {\r
-                       'precompiler' : 'color: #009900;'\r
-                       ,'precompilerstring' : 'color: #994400;'\r
-               }\r
-       }\r
-};\r
diff --git a/project/static/js/reg_syntax/coldfusion.js b/project/static/js/reg_syntax/coldfusion.js
deleted file mode 100755 (executable)
index 673e874..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-editAreaLoader.load_syntax["coldfusion"] = {\r
-       'COMMENT_SINGLE' : {1 : '//', 2 : '#'}\r
-       ,'COMMENT_MULTI' : {'<!--' : '-->'}\r
-       ,'COMMENT_MULTI2' : {'<!---' : '--->'}\r
-       ,'QUOTEMARKS' : {1: "'", 2: '"'}\r
-       ,'KEYWORD_CASE_SENSITIVE' : false\r
-               ,'KEYWORDS' : {\r
-               'statements' : [\r
-                       'include', 'require', 'include_once', 'require_once',\r
-                       'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile',\r
-            'endif', 'switch', 'case', 'endswitch',\r
-                       'return', 'break', 'continue'\r
-               ]\r
-               ,'reserved' : [\r
-                       'AND', 'break', 'case', 'CONTAIN', 'CONTAINS', 'continue', 'default', 'do', \r
-                       'DOES', 'else', 'EQ', 'EQUAL', 'EQUALTO', 'EQV', 'FALSE', 'for', 'GE', \r
-                       'GREATER', 'GT', 'GTE', 'if', 'IMP', 'in', 'IS', 'LE', 'LESS', 'LT', 'LTE', \r
-                       'MOD', 'NEQ', 'NOT', 'OR', 'return', 'switch', 'THAN', 'TO', 'TRUE', 'var', \r
-                       'while', 'XOR'\r
-               ]\r
-               ,'functions' : [\r
-                       'Abs', 'ACos', 'ArrayAppend', 'ArrayAvg', 'ArrayClear', 'ArrayDeleteAt', 'ArrayInsertAt', \r
-                       'ArrayIsEmpty', 'ArrayLen', 'ArrayMax', 'ArrayMin', 'ArrayNew', 'ArrayPrepend', 'ArrayResize', \r
-                       'ArraySet', 'ArraySort', 'ArraySum', 'ArraySwap', 'ArrayToList', 'Asc', 'ASin', 'Atn', 'AuthenticatedContext', \r
-                       'AuthenticatedUser', 'BitAnd', 'BitMaskClear', 'BitMaskRead', 'BitMaskSet', 'BitNot', 'BitOr', \r
-                       'BitSHLN', 'BitSHRN', 'BitXor', 'Ceiling', 'Chr', 'CJustify', 'Compare', 'CompareNoCase', 'Cos', \r
-                       'CreateDate', 'CreateDateTime', 'CreateODBCDate', 'CreateODBCDateTime', 'CreateODBCTime', \r
-                       'CreateTime', 'CreateTimeSpan', 'DateAdd', 'DateCompare', 'DateConvert', 'DateDiff', \r
-                       'DateFormat', 'DatePart', 'Day', 'DayOfWeek', 'DayOfWeekAsString', 'DayOfYear', 'DaysInMonth', \r
-                       'DaysInYear', 'DE', 'DecimalFormat', 'DecrementValue', 'Decrypt', 'DeleteClientVariable', \r
-                       'DirectoryExists', 'DollarFormat', 'Duplicate', 'Encrypt', 'Evaluate', 'Exp', 'ExpandPath', \r
-                       'FileExists', 'Find', 'FindNoCase', 'FindOneOf', 'FirstDayOfMonth', 'Fix', 'FormatBaseN', \r
-                       'GetBaseTagData', 'GetBaseTagList', 'GetBaseTemplatePath', 'GetClientVariablesList', \r
-                       'GetCurrentTemplatePath', 'GetDirectoryFromPath', 'GetException', 'GetFileFromPath', \r
-                       'GetFunctionList', 'GetHttpTimeString', 'GetHttpRequestData', 'GetLocale', 'GetMetricData', \r
-                       'GetProfileString', 'GetTempDirectory', 'GetTempFile', 'GetTemplatePath', 'GetTickCount', \r
-                       'GetTimeZoneInfo', 'GetToken', 'Hash', 'Hour', 'HTMLCodeFormat', 'HTMLEditFormat', 'IIf', \r
-                       'IncrementValue', 'InputBaseN', 'Insert', 'Int', 'IsArray', 'IsAuthenticated', 'IsAuthorized', \r
-                       'IsBoolean', 'IsBinary', 'IsCustomFunction', 'IsDate', 'IsDebugMode', 'IsDefined', 'IsLeapYear', \r
-                       'IsNumeric', 'IsNumericDate', 'IsProtected', 'IsQuery', 'IsSimpleValue', 'IsStruct', 'IsWDDX', \r
-                       'JavaCast', 'JSStringFormat', 'LCase', 'Left', 'Len', 'ListAppend', 'ListChangeDelims', \r
-                       'ListContains', 'ListContainsNoCase', 'ListDeleteAt', 'ListFind', 'ListFindNoCase', 'ListFirst', \r
-                       'ListGetAt', 'ListInsertAt', 'ListLast', 'ListLen', 'ListPrepend', 'ListQualify', 'ListRest', \r
-                       'ListSetAt', 'ListSort', 'ListToArray', 'ListValueCount', 'ListValueCountNoCase', 'LJustify', \r
-                       'Log', 'Log10', 'LSCurrencyFormat', 'LSDateFormat', 'LSEuroCurrencyFormat', 'LSIsCurrency', \r
-                       'LSIsDate', 'LSIsNumeric', 'LSNumberFormat', 'LSParseCurrency', 'LSParseDateTime', 'LSParseNumber', \r
-                       'LSTimeFormat', 'LTrim', 'Max', 'Mid', 'Min', 'Minute', 'Month', 'MonthAsString', 'Now', 'NumberFormat', \r
-                       'ParagraphFormat', 'ParameterExists', 'ParseDateTime', 'Pi', 'PreserveSingleQuotes', 'Quarter', \r
-                       'QueryAddRow', 'QueryNew', 'QuerySetCell', 'QuotedValueList', 'Rand', 'Randomize', 'RandRange', \r
-                       'REFind', 'REFindNoCase', 'RemoveChars', 'RepeatString', 'Replace', 'ReplaceList', 'ReplaceNoCase', \r
-                       'REReplace', 'REReplaceNoCase', 'Reverse', 'Right', 'RJustify', 'Round', 'RTrim', 'Second', 'SetLocale', \r
-                       'SetProfileString', 'SetVariable', 'Sgn', 'Sin', 'SpanExcluding', 'SpanIncluding', 'Sqr', 'StripCR', \r
-                       'StructAppend', 'StructClear', 'StructCopy', 'StructCount', 'StructDelete', 'StructFind', 'StructFindKey', \r
-                       'StructFindValue', 'StructGet', 'StructInsert', 'StructIsEmpty', 'StructKeyArray', 'StructKeyExists', \r
-                       'StructKeyList', 'StructNew', 'StructSort', 'StructUpdate', 'Tan', 'TimeFormat', 'ToBase64', 'ToBinary', \r
-                       'ToString', 'Trim', 'UCase', 'URLDecode', 'URLEncodedFormat', 'Val', 'ValueList', 'Week', 'WriteOutput', \r
-                       'XMLFormat', 'Year', 'YesNoFormat'\r
-               ]\r
-       }\r
-       ,'OPERATORS' :[\r
-               '+', '-', '/', '*', '%', '!', '&&', '||'\r
-       ]\r
-       ,'DELIMITERS' :[\r
-               '(', ')', '[', ']', '{', '}'\r
-       ]\r
-       ,'REGEXPS' : {\r
-               'doctype' : {\r
-                       'search' : '()(<!DOCTYPE[^>]*>)()'\r
-                       ,'class' : 'doctype'\r
-                       ,'modifiers' : ''\r
-                       ,'execute' : 'before' // before or after\r
-               }\r
-               ,'cftags' : {\r
-                       'search' : '(<)(/cf[a-z][^ \r\n\t>]*)([^>]*>)'\r
-                       ,'class' : 'cftags'\r
-                       ,'modifiers' : 'gi'\r
-                       ,'execute' : 'before' // before or after\r
-               }\r
-               ,'cftags2' : {\r
-                       'search' : '(<)(cf[a-z][^ \r\n\t>]*)([^>]*>)'\r
-                       ,'class' : 'cftags2'\r
-                       ,'modifiers' : 'gi'\r
-                       ,'execute' : 'before' // before or after\r
-               }\r
-               ,'tags' : {\r
-                       'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'\r
-                       ,'class' : 'tags'\r
-                       ,'modifiers' : 'gi'\r
-                       ,'execute' : 'before' // before or after\r
-               }\r
-               ,'attributes' : {\r
-                       'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'\r
-                       ,'class' : 'attributes'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before' // before or after\r
-               }\r
-       }\r
-       ,'STYLES' : {\r
-               'COMMENTS': 'color: #AAAAAA;'\r
-               ,'QUOTESMARKS': 'color: #6381F8;'\r
-               ,'KEYWORDS' : {\r
-                       'reserved' : 'color: #48BDDF;'\r
-                       ,'functions' : 'color: #0000FF;'\r
-                       ,'statements' : 'color: #60CA00;'\r
-                       }\r
-               ,'OPERATORS' : 'color: #E775F0;'\r
-               ,'DELIMITERS' : ''\r
-               ,'REGEXPS' : {\r
-                       'attributes': 'color: #990033;'\r
-                       ,'cftags': 'color: #990033;'\r
-                       ,'cftags2': 'color: #990033;'\r
-                       ,'tags': 'color: #000099;'\r
-                       ,'doctype': 'color: #8DCFB5;'\r
-                       ,'test': 'color: #00FF00;'\r
-               }       \r
-       }               \r
-};\r
-
-                
diff --git a/project/static/js/reg_syntax/cpp.js b/project/static/js/reg_syntax/cpp.js
deleted file mode 100755 (executable)
index 74826d3..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-editAreaLoader.load_syntax["cpp"] = {\r
-       'COMMENT_SINGLE' : {1 : '//'}\r
-       ,'COMMENT_MULTI' : {'/*' : '*/'}\r
-       ,'QUOTEMARKS' : {1: "'", 2: '"'}\r
-       ,'KEYWORD_CASE_SENSITIVE' : true\r
-       ,'KEYWORDS' : {\r
-               'constants' : [\r
-                       'NULL', 'false', 'std', 'stdin', 'stdout', 'stderr',\r
-                       'true'\r
-               ]\r
-               ,'types' : [\r
-                       'FILE', 'auto', 'char', 'class', 'const', 'double',\r
-                       'extern', 'float', 'friend', 'inline', 'int',\r
-                       'iterator', 'long', 'map', 'operator', 'queue',\r
-                       'register', 'short', 'signed', 'size_t', 'stack',\r
-                       'static', 'string', 'struct', 'time_t', 'typedef',\r
-                       'union', 'unsigned', 'vector', 'void', 'volatile'\r
-               ]\r
-               ,'statements' : [\r
-                       'catch', 'do', 'else', 'enum', 'for', 'goto', 'if',\r
-                       'sizeof', 'switch', 'this', 'throw', 'try', 'while'\r
-               ]\r
-               ,'keywords' : [\r
-                       'break', 'case', 'continue', 'default', 'delete',\r
-                       'namespace', 'new', 'private', 'protected', 'public',\r
-                       'return', 'using'\r
-               ]\r
-       }\r
-       ,'OPERATORS' :[\r
-               '+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&'\r
-       ]\r
-       ,'DELIMITERS' :[\r
-               '(', ')', '[', ']', '{', '}'\r
-       ]\r
-       ,'REGEXPS' : {\r
-               'precompiler' : {\r
-                       'search' : '()(#[^\r\n]*)()'\r
-                       ,'class' : 'precompiler'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before'\r
-               }\r
-/*             ,'precompilerstring' : {\r
-                       'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])'\r
-                       ,'class' : 'precompilerstring'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before'\r
-               }*/\r
-       }\r
-       ,'STYLES' : {\r
-               'COMMENTS': 'color: #AAAAAA;'\r
-               ,'QUOTESMARKS': 'color: #6381F8;'\r
-               ,'KEYWORDS' : {\r
-                       'constants' : 'color: #EE0000;'\r
-                       ,'types' : 'color: #0000EE;'\r
-                       ,'statements' : 'color: #60CA00;'\r
-                       ,'keywords' : 'color: #48BDDF;'\r
-               }\r
-               ,'OPERATORS' : 'color: #FF00FF;'\r
-               ,'DELIMITERS' : 'color: #0038E1;'\r
-               ,'REGEXPS' : {\r
-                       'precompiler' : 'color: #009900;'\r
-                       ,'precompilerstring' : 'color: #994400;'\r
-               }\r
-       }\r
-};\r
diff --git a/project/static/js/reg_syntax/css.js b/project/static/js/reg_syntax/css.js
deleted file mode 100755 (executable)
index 8dded1b..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-editAreaLoader.load_syntax["css"] = {\r
-       'COMMENT_SINGLE' : {1 : '@'}\r
-       ,'COMMENT_MULTI' : {'/*' : '*/'}\r
-       ,'QUOTEMARKS' : ['"', "'"]\r
-       ,'KEYWORD_CASE_SENSITIVE' : false\r
-       ,'KEYWORDS' : {\r
-               'attributes' : [\r
-                       'aqua', 'azimuth', 'background-attachment', 'background-color',\r
-                       'background-image', 'background-position', 'background-repeat',\r
-                       'background', 'border-bottom-color', 'border-bottom-style',\r
-                       'border-bottom-width', 'border-left-color', 'border-left-style',\r
-                       'border-left-width', 'border-right', 'border-right-color',\r
-                       'border-right-style', 'border-right-width', 'border-top-color',\r
-                       'border-top-style', 'border-top-width','border-bottom', 'border-collapse',\r
-                       'border-left', 'border-width', 'border-color', 'border-spacing',\r
-                       'border-style', 'border-top', 'border',  'caption-side',\r
-                       'clear', 'clip', 'color', 'content', 'counter-increment', 'counter-reset',\r
-                       'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display',\r
-                       'elevation', 'empty-cells', 'float', 'font-family', 'font-size',\r
-                       'font-size-adjust', 'font-stretch', 'font-style', 'font-variant',\r
-                       'font-weight', 'font', 'height', 'letter-spacing', 'line-height',\r
-                       'list-style', 'list-style-image', 'list-style-position', 'list-style-type',\r
-                       'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'margin',\r
-                       'marker-offset', 'marks', 'max-height', 'max-width', 'min-height',\r
-                       'min-width', 'opacity', 'orphans', 'outline', 'outline-color', 'outline-style',\r
-                       'outline-width', 'overflow', 'padding-bottom', 'padding-left',\r
-                       'padding-right', 'padding-top', 'padding', 'page', 'page-break-after',\r
-                       'page-break-before', 'page-break-inside', 'pause-after', 'pause-before',\r
-                       'pause', 'pitch', 'pitch-range',  'play-during', 'position', 'quotes',\r
-                       'richness', 'right', 'size', 'speak-header', 'speak-numeral', 'speak-punctuation',\r
-                       'speak', 'speech-rate', 'stress', 'table-layout', 'text-align', 'text-decoration',\r
-                       'text-indent', 'text-shadow', 'text-transform', 'top', 'unicode-bidi',\r
-                       'vertical-align', 'visibility', 'voice-family', 'volume', 'white-space', 'widows',\r
-                       'width', 'word-spacing', 'z-index', 'bottom', 'left'\r
-               ]\r
-               ,'values' : [\r
-                       'above', 'absolute', 'always', 'armenian', 'aural', 'auto', 'avoid',\r
-                       'baseline', 'behind', 'below', 'bidi-override', 'black', 'blue', 'blink', 'block', 'bold', 'bolder', 'both',\r
-                       'capitalize', 'center-left', 'center-right', 'center', 'circle', 'cjk-ideographic', \r
-            'close-quote', 'collapse', 'condensed', 'continuous', 'crop', 'crosshair', 'cross', 'cursive',\r
-                       'dashed', 'decimal-leading-zero', 'decimal', 'default', 'digits', 'disc', 'dotted', 'double',\r
-                       'e-resize', 'embed', 'extra-condensed', 'extra-expanded', 'expanded',\r
-                       'fantasy', 'far-left', 'far-right', 'faster', 'fast', 'fixed', 'fuchsia',\r
-                       'georgian', 'gray', 'green', 'groove', 'hebrew', 'help', 'hidden', 'hide', 'higher',\r
-                       'high', 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table', 'inline',\r
-                       'inset', 'inside', 'invert', 'italic', 'justify', 'katakana-iroha', 'katakana',\r
-                       'landscape', 'larger', 'large', 'left-side', 'leftwards', 'level', 'lighter', 'lime', 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek', 'lower-roman', 'lowercase', 'ltr', 'lower', 'low',\r
-                       'maroon', 'medium', 'message-box', 'middle', 'mix', 'monospace',\r
-                       'n-resize', 'narrower', 'navy', 'ne-resize', 'no-close-quote', 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', 'nw-resize',\r
-                       'oblique', 'olive', 'once', 'open-quote', 'outset', 'outside', 'overline',\r
-                       'pointer', 'portrait', 'purple', 'px',\r
-                       'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', 'ridge', 'right-side', 'rightwards',\r
-                       's-resize', 'sans-serif', 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower', 'small-caps', 'small-caption', 'smaller', 'soft', 'solid', 'spell-out', 'square',\r
-                       'static', 'status-bar', 'super', 'sw-resize',\r
-                       'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom', 'text-top', 'thick', 'thin', 'transparent',\r
-                       'ultra-condensed', 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', 'upper-roman', 'uppercase', 'url',\r
-                       'visible',\r
-                       'w-resize', 'wait', 'white', 'wider',\r
-                       'x-fast', 'x-high', 'x-large', 'x-loud', 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small',\r
-                       'yellow', 'yes'\r
-               ]\r
-               ,'specials' : [\r
-                       'important'\r
-               ]\r
-       }\r
-       ,'OPERATORS' :[\r
-               ':', ';', '!', '.', '#'\r
-       ]\r
-       ,'DELIMITERS' :[\r
-               '{', '}'\r
-       ]\r
-       ,'STYLES' : {\r
-               'COMMENTS': 'color: #AAAAAA;'\r
-               ,'QUOTESMARKS': 'color: #6381F8;'\r
-               ,'KEYWORDS' : {\r
-                       'attributes' : 'color: #48BDDF;'\r
-                       ,'values' : 'color: #2B60FF;'\r
-                       ,'specials' : 'color: #FF0000;'\r
-                       }\r
-               ,'OPERATORS' : 'color: #FF00FF;'\r
-               ,'DELIMITERS' : 'color: #60CA00;'\r
-                               \r
-       }\r
-};\r
diff --git a/project/static/js/reg_syntax/html.js b/project/static/js/reg_syntax/html.js
deleted file mode 100755 (executable)
index d508364..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*\r
-* last update: 2006-08-24\r
-*/\r
-\r
-editAreaLoader.load_syntax["html"] = {\r
-       'COMMENT_SINGLE' : {}\r
-       ,'COMMENT_MULTI' : {'<!--' : '-->'}\r
-       ,'QUOTEMARKS' : {1: "'", 2: '"'}\r
-       ,'KEYWORD_CASE_SENSITIVE' : false\r
-       ,'KEYWORDS' : {\r
-       }\r
-       ,'OPERATORS' :[\r
-       ]\r
-       ,'DELIMITERS' :[\r
-       ]\r
-       ,'REGEXPS' : {\r
-               'doctype' : {\r
-                       'search' : '()(<!DOCTYPE[^>]*>)()'\r
-                       ,'class' : 'doctype'\r
-                       ,'modifiers' : ''\r
-                       ,'execute' : 'before' // before or after\r
-               }\r
-               ,'tags' : {\r
-                       'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'\r
-                       ,'class' : 'tags'\r
-                       ,'modifiers' : 'gi'\r
-                       ,'execute' : 'before' // before or after\r
-               }\r
-               ,'attributes' : {\r
-                       'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'\r
-                       ,'class' : 'attributes'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before' // before or after\r
-               }\r
-       }\r
-       ,'STYLES' : {\r
-               'COMMENTS': 'color: #AAAAAA;'\r
-               ,'QUOTESMARKS': 'color: #6381F8;'\r
-               ,'KEYWORDS' : {\r
-                       }\r
-               ,'OPERATORS' : 'color: #E775F0;'\r
-               ,'DELIMITERS' : ''\r
-               ,'REGEXPS' : {\r
-                       'attributes': 'color: #B1AC41;'\r
-                       ,'tags': 'color: #E62253;'\r
-                       ,'doctype': 'color: #8DCFB5;'\r
-                       ,'test': 'color: #00FF00;'\r
-               }       \r
-       }               \r
-};\r
diff --git a/project/static/js/reg_syntax/java.js b/project/static/js/reg_syntax/java.js
deleted file mode 100755 (executable)
index bf48b53..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-editAreaLoader.load_syntax["java"] = {\r
-'COMMENT_SINGLE': { 1: '//', 2: '@' }\r
-       , 'COMMENT_MULTI': { '/*': '*/' }\r
-       , 'QUOTEMARKS': { 1: "'", 2: '"' }\r
-       , 'KEYWORD_CASE_SENSITIVE': true\r
-       , 'KEYWORDS': {\r
-           'constants': [\r
-                       'null', 'false', 'true'\r
-               ]\r
-               , 'types': [\r
-                       'String', 'int', 'short', 'long', 'char', 'double', 'byte',\r
-                       'float', 'static', 'void', 'private', 'boolean', 'protected',\r
-                       'public', 'const', 'class', 'final', 'abstract', 'volatile',\r
-                       'enum', 'transient', 'interface'\r
-               ]\r
-               , 'statements': [\r
-            'this', 'extends', 'if', 'do', 'while', 'try', 'catch', 'finally',\r
-            'throw', 'throws', 'else', 'for', 'switch', 'continue', 'implements',\r
-            'break', 'case', 'default', 'goto'\r
-               ]\r
-               , 'keywords': [\r
-           'new', 'return', 'import', 'native', 'super', 'package', 'assert', 'synchronized',\r
-           'instanceof', 'strictfp'\r
-               ]\r
-       }\r
-       , 'OPERATORS': [\r
-               '+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&'\r
-       ]\r
-       , 'DELIMITERS': [\r
-               '(', ')', '[', ']', '{', '}'\r
-       ]\r
-       , 'REGEXPS': {\r
-           'precompiler': {\r
-               'search': '()(#[^\r\n]*)()'\r
-                       , 'class': 'precompiler'\r
-                       , 'modifiers': 'g'\r
-                       , 'execute': 'before'\r
-           }\r
-       }\r
-       , 'STYLES': {\r
-           'COMMENTS': 'color: #AAAAAA;'\r
-               , 'QUOTESMARKS': 'color: #6381F8;'\r
-               , 'KEYWORDS': {\r
-                   'constants': 'color: #EE0000;'\r
-                       , 'types': 'color: #0000EE;'\r
-                       , 'statements': 'color: #60CA00;'\r
-                       , 'keywords': 'color: #48BDDF;'\r
-               }\r
-               , 'OPERATORS': 'color: #FF00FF;'\r
-               , 'DELIMITERS': 'color: #0038E1;'\r
-               , 'REGEXPS': {\r
-                   'precompiler': 'color: #009900;'\r
-                       , 'precompilerstring': 'color: #994400;'\r
-               }\r
-       }\r
-};\r
diff --git a/project/static/js/reg_syntax/js.js b/project/static/js/reg_syntax/js.js
deleted file mode 100755 (executable)
index 2799b70..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-editAreaLoader.load_syntax["js"] = {\r
-       'COMMENT_SINGLE' : {1 : '//'}\r
-       ,'COMMENT_MULTI' : {'/*' : '*/'}\r
-       ,'QUOTEMARKS' : {1: "'", 2: '"'}\r
-       ,'KEYWORD_CASE_SENSITIVE' : false\r
-       ,'KEYWORDS' : {\r
-               'statements' : [\r
-                       'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',\r
-                       'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',\r
-                       'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',\r
-                       'while', 'write', 'with'\r
-               ]\r
-               ,'keywords' : [\r
-                       'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',\r
-                       'function', 'import', 'namespace', 'new', 'null', 'package', 'private',\r
-                       'protected', 'public', 'super', 'true', 'use', 'var', 'window', 'document',             \r
-                       // the list below must be sorted and checked (if it is a keywords or a function and if it is not present twice\r
-                       'Link ', 'outerHeight ', 'Anchor', 'FileUpload', \r
-                       'location', 'outerWidth', 'Select', 'Area', 'find', 'Location', 'Packages', 'self', \r
-                       'arguments', 'locationbar', 'pageXoffset', 'Form', \r
-                       'Math', 'pageYoffset', 'setTimeout', 'assign', 'Frame', 'menubar', 'parent', 'status', \r
-                       'blur', 'frames', 'MimeType', 'parseFloat', 'statusbar', 'Boolean', 'Function', 'moveBy', \r
-                       'parseInt', 'stop', 'Button', 'getClass', 'moveTo', 'Password', 'String', 'callee', 'Hidden', \r
-                       'name', 'personalbar', 'Submit', 'caller', 'history', 'NaN', 'Plugin', 'sun', 'captureEvents', \r
-                       'History', 'navigate', 'print', 'taint', 'Checkbox', 'home', 'navigator', 'prompt', 'Text', \r
-                       'Image', 'Navigator', 'prototype', 'Textarea', 'clearTimeout', 'Infinity', \r
-                       'netscape', 'Radio', 'toolbar', 'close', 'innerHeight', 'Number', 'ref', 'top', 'closed', \r
-                       'innerWidth', 'Object', 'RegExp', 'toString', 'confirm', 'isFinite', 'onBlur', 'releaseEvents', \r
-                       'unescape', 'constructor', 'isNan', 'onError', 'Reset', 'untaint', 'Date', 'java', 'onFocus', \r
-                       'resizeBy', 'unwatch', 'defaultStatus', 'JavaArray', 'onLoad', 'resizeTo', 'valueOf', 'document', \r
-                       'JavaClass', 'onUnload', 'routeEvent', 'watch', 'Document', 'JavaObject', 'open', 'scroll', 'window', \r
-                       'Element', 'JavaPackage', 'opener', 'scrollbars', 'Window', 'escape', 'length', 'Option', 'scrollBy'                    \r
-               ]\r
-       ,'functions' : [\r
-                       // common functions for Window object\r
-                       'alert', 'Array', 'back', 'blur', 'clearInterval', 'close', 'confirm', 'eval ', 'focus', 'forward', 'home',\r
-                       'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',\r
-                       'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'scrollTo', 'setInterval', 'status',\r
-                       'stop' \r
-               ]\r
-       }\r
-       ,'OPERATORS' :[\r
-               '+', '-', '/', '*', '=', '<', '>', '%', '!'\r
-       ]\r
-       ,'DELIMITERS' :[\r
-               '(', ')', '[', ']', '{', '}'\r
-       ]\r
-       ,'STYLES' : {\r
-               'COMMENTS': 'color: #AAAAAA;'\r
-               ,'QUOTESMARKS': 'color: #6381F8;'\r
-               ,'KEYWORDS' : {\r
-                       'statements' : 'color: #60CA00;'\r
-                       ,'keywords' : 'color: #48BDDF;'\r
-                       ,'functions' : 'color: #2B60FF;'\r
-               }\r
-               ,'OPERATORS' : 'color: #FF00FF;'\r
-               ,'DELIMITERS' : 'color: #0038E1;'\r
-                               \r
-       }\r
-       ,'AUTO_COMPLETION' :  {\r
-               "default": {    // the name of this definition group. It's posisble to have different rules inside the same definition file\r
-                       "REGEXP": { "before_word": "[^a-zA-Z0-9_]|^"    // \\s|\\.|\r
-                                               ,"possible_words_letters": "[a-zA-Z0-9_]+"\r
-                                               ,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$"\r
-                                               ,"prefix_separator": "\\."\r
-                                       }\r
-                       ,"CASE_SENSITIVE": true\r
-                       ,"MAX_TEXT_LENGTH": 100         // the maximum length of the text being analyzed before the cursor position\r
-                       ,"KEYWORDS": {\r
-                               '': [   // the prefix of thoses items\r
-                                               /**\r
-                                                * 0 : the keyword the user is typing\r
-                                                * 1 : (optionnal) the string inserted in code ("{@}" being the new position of the cursor, "§" beeing the equivalent to the value the typed string indicated if the previous )\r
-                                                *              If empty the keyword will be displayed\r
-                                                * 2 : (optionnal) the text that appear in the suggestion box (if empty, the string to insert will be displayed)\r
-                                                */\r
-                                                ['Array', '§()', '']\r
-                                       ,['alert', '§({@})', 'alert(String message)']\r
-                                       ,['document']\r
-                                       ,['window']\r
-                               ]\r
-                       ,'window' : [\r
-                                        ['location']\r
-                                       ,['document']\r
-                                       ,['scrollTo', 'scrollTo({@})', 'scrollTo(Int x,Int y)']\r
-                                       ]\r
-                       ,'location' : [\r
-                                        ['href']\r
-                                       ]\r
-                       }\r
-               }\r
-       }\r
-};\r
diff --git a/project/static/js/reg_syntax/pas.js b/project/static/js/reg_syntax/pas.js
deleted file mode 100755 (executable)
index 7c1bc3c..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-editAreaLoader.load_syntax["pas"] = {\r
-       'COMMENT_SINGLE' : {}\r
-       ,'COMMENT_MULTI' : {'{' : '}', '(*':'*)'}\r
-       ,'QUOTEMARKS' : {1: '"', 2: "'"}\r
-       ,'KEYWORD_CASE_SENSITIVE' : false\r
-       ,'KEYWORDS' : {\r
-               'constants' : [\r
-                       'Blink', 'Black', 'Blue', 'Green', 'Cyan', 'Red',\r
-                       'Magenta', 'Brown', 'LightGray', 'DarkGray',\r
-                       'LightBlue', 'LightGreen', 'LightCyan', 'LightRed',\r
-                       'LightMagenta', 'Yellow', 'White', 'MaxSIntValue',\r
-                       'MaxUIntValue', 'maxint', 'maxLongint', 'maxSmallint',\r
-                       'erroraddr', 'errorcode', 'LineEnding'\r
-               ]\r
-               ,'keywords' : [\r
-                       'in', 'or', 'div', 'mod', 'and', 'shl', 'shr', 'xor',\r
-                       'pow', 'is', 'not','Absolute', 'And_then', 'Array',\r
-                       'Begin', 'Bindable', 'Case', 'Const', 'Do', 'Downto',\r
-                       'Else', 'End', 'Export', 'File', 'For', 'Function',\r
-                       'Goto', 'If', 'Import', 'Implementation', 'Inherited',\r
-                       'Inline', 'Interface', 'Label', 'Module', 'Nil',\r
-                       'Object', 'Of', 'Only', 'Operator', 'Or_else',\r
-                       'Otherwise', 'Packed', 'Procedure', 'Program',\r
-                       'Protected', 'Qualified', 'Record', 'Repeat',\r
-                       'Restricted', 'Set', 'Then', 'To', 'Type', 'Unit',\r
-                       'Until', 'Uses', 'Value', 'Var', 'Virtual', 'While',\r
-                       'With'\r
-               ]\r
-               ,'functions' : [\r
-                       'Abs', 'Addr', 'Append', 'Arctan', 'Assert', 'Assign',\r
-                       'Assigned', 'BinStr', 'Blockread', 'Blockwrite',\r
-                       'Break', 'Chdir', 'Chr', 'Close', 'CompareByte',\r
-                       'CompareChar', 'CompareDWord', 'CompareWord', 'Concat',\r
-                       'Continue', 'Copy', 'Cos', 'CSeg', 'Dec', 'Delete',\r
-                       'Dispose', 'DSeg', 'Eof', 'Eoln', 'Erase', 'Exclude',\r
-                       'Exit', 'Exp', 'Filepos', 'Filesize', 'FillByte',\r
-                       'Fillchar', 'FillDWord', 'Fillword', 'Flush', 'Frac',\r
-                       'Freemem', 'Getdir', 'Getmem', 'GetMemoryManager',\r
-                       'Halt', 'HexStr', 'Hi', 'High', 'Inc', 'Include',\r
-                       'IndexByte', 'IndexChar', 'IndexDWord', 'IndexWord',\r
-                       'Insert', 'IsMemoryManagerSet', 'Int', 'IOresult',\r
-                       'Length', 'Ln', 'Lo', 'LongJmp', 'Low', 'Lowercase',\r
-                       'Mark', 'Maxavail', 'Memavail', 'Mkdir', 'Move',\r
-                       'MoveChar0', 'New', 'Odd', 'OctStr', 'Ofs', 'Ord',\r
-                       'Paramcount', 'Paramstr', 'Pi', 'Pos', 'Power', 'Pred',\r
-                       'Ptr', 'Random', 'Randomize', 'Read', 'Readln',\r
-                       'Real2Double', 'Release', 'Rename', 'Reset', 'Rewrite',\r
-                       'Rmdir', 'Round', 'Runerror', 'Seek', 'SeekEof',\r
-                       'SeekEoln', 'Seg', 'SetMemoryManager', 'SetJmp',\r
-                       'SetLength', 'SetString', 'SetTextBuf', 'Sin', 'SizeOf',\r
-                       'Sptr', 'Sqr', 'Sqrt', 'SSeg', 'Str', 'StringOfChar',\r
-                       'Succ', 'Swap', 'Trunc', 'Truncate', 'Upcase', 'Val',\r
-                       'Write', 'WriteLn'\r
-               ]\r
-               ,'types' : [\r
-                       'Integer', 'Shortint', 'SmallInt', 'Longint',\r
-                       'Longword', 'Int64', 'Byte', 'Word', 'Cardinal',\r
-                       'QWord', 'Boolean', 'ByteBool', 'LongBool', 'Char',\r
-                       'Real', 'Single', 'Double', 'Extended', 'Comp',\r
-                       'String', 'ShortString', 'AnsiString', 'PChar'\r
-               ]\r
-       }\r
-       ,'OPERATORS' :[\r
-               '@', '*', '+', '-', '/', '^', ':=', '<', '=', '>'\r
-       ]\r
-       ,'DELIMITERS' :[\r
-               '(', ')', '[', ']'\r
-       ]\r
-       ,'STYLES' : {\r
-               'COMMENTS': 'color: #AAAAAA;'\r
-               ,'QUOTESMARKS': 'color: #6381F8;'\r
-               ,'KEYWORDS' : {\r
-                       'specials' : 'color: #EE0000;'\r
-                       ,'constants' : 'color: #654321;'\r
-                       ,'keywords' : 'color: #48BDDF;'\r
-                       ,'functions' : 'color: #449922;'\r
-                       ,'types' : 'color: #2B60FF;'\r
-                       }\r
-               ,'OPERATORS' : 'color: #FF00FF;'\r
-               ,'DELIMITERS' : 'color: #60CA00;'\r
-       }\r
-};\r
diff --git a/project/static/js/reg_syntax/perl.js b/project/static/js/reg_syntax/perl.js
deleted file mode 100755 (executable)
index b63e951..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/***************************************************************************\r
- * (c) 2008 - file created by Christoph Pinkel, MTC Infomedia OHG.\r
- *\r
- * You may choose any license of the current release or any future release\r
- * of editarea to use, modify and/or redistribute this file.\r
- *\r
- * This language specification file supports for syntax checking on\r
- * a large subset of Perl 5.x.\r
- * The basic common syntax of Perl is fully supported, but as for\r
- * the highlighting of built-in operations, it's mainly designed\r
- * to support for hightlighting Perl code in a Safe environment (compartment)\r
- * as used by CoMaNet for evaluation of administrative scripts. This Safe\r
- * compartment basically allows for all of Opcode's :default operations,\r
- * but little others. See http://perldoc.perl.org/Opcode.html to learn\r
- * more.\r
- ***************************************************************************/\r
-\r
-editAreaLoader.load_syntax["perl"] = {\r
-\r
-       'COMMENT_SINGLE' : {1 : '#'},\r
-       'QUOTEMARKS' : {1: "'", 2: '"'},\r
-       'KEYWORD_CASE_SENSITIVE' : true,\r
-       'KEYWORDS' :\r
-       {\r
-               'core' :\r
-                       [ "if", "else", "elsif", "while", "for", "each", "foreach",\r
-                               "next", "last", "goto", "exists", "delete", "undef",\r
-                               "my", "our", "local", "use", "require", "package", "keys", "values",\r
-                               "sub", "bless", "ref", "return" ],\r
-               'functions' :\r
-                       [\r
-                               //from :base_core\r
-                               "int", "hex", "oct", "abs", "substr", "vec", "study", "pos",\r
-                               "length", "index", "rindex", "ord", "chr", "ucfirst", "lcfirst",\r
-                               "uc", "lc", "quotemeta", "chop", "chomp", "split", "list", "splice",\r
-                               "push", "pop", "shift", "unshift", "reverse", "and", "or", "dor",\r
-                               "xor", "warn", "die", "prototype",\r
-                               //from :base_mem\r
-                               "concat", "repeat", "join", "range",\r
-                               //none from :base_loop, as we'll see them as basic statements...\r
-                               //from :base_orig\r
-                               "sprintf", "crypt", "tie", "untie", "select", "localtime", "gmtime",\r
-                               //others\r
-                               "print", "open", "close"\r
-                       ]\r
-       },\r
-       'OPERATORS' :\r
-               [ '+', '-', '/', '*', '=', '<', '>', '!', '||', '.', '&&',\r
-                       ' eq ', ' ne ', '=~' ],\r
-       'DELIMITERS' :\r
-               [ '(', ')', '[', ']', '{', '}' ],\r
-       'REGEXPS' :\r
-       {\r
-               'packagedecl' : { 'search': '(package )([^ \r\n\t#;]*)()',\r
-                       'class' : 'scopingnames',\r
-                       'modifiers' : 'g', 'execute' : 'before' },\r
-               'subdecl' : { 'search': '(sub )([^ \r\n\t#]*)()',\r
-                       'class' : 'scopingnames',\r
-                       'modifiers' : 'g', 'execute' : 'before' },\r
-               'scalars' : { 'search': '()(\\\$[a-zA-Z0-9_:]*)()',\r
-                       'class' : 'vars',\r
-                       'modifiers' : 'g', 'execute' : 'after' },\r
-               'arrays' : { 'search': '()(@[a-zA-Z0-9_:]*)()',\r
-                       'class' : 'vars',\r
-                       'modifiers' : 'g', 'execute' : 'after' },\r
-               'hashs' : { 'search': '()(%[a-zA-Z0-9_:]*)()',\r
-                       'class' : 'vars',\r
-                       'modifiers' : 'g', 'execute' : 'after' },\r
-       },\r
-\r
-       'STYLES' :\r
-       {\r
-               'COMMENTS': 'color: #AAAAAA;',\r
-               'QUOTESMARKS': 'color: #DC0000;',\r
-               'KEYWORDS' :\r
-               {\r
-                       'core' : 'color: #8aca00;',\r
-                       'functions' : 'color: #2B60FF;'\r
-               },\r
-               'OPERATORS' : 'color: #8aca00;',\r
-               'DELIMITERS' : 'color: #0038E1;',\r
-               'REGEXPS':\r
-               {\r
-                       'scopingnames' : 'color: #ff0000;',\r
-                       'vars' : 'color: #00aaaa;',\r
-               }\r
-       } //'STYLES'\r
-};\r
diff --git a/project/static/js/reg_syntax/php.js b/project/static/js/reg_syntax/php.js
deleted file mode 100755 (executable)
index 5a5cff9..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-editAreaLoader.load_syntax["php"] = {\r
-       'COMMENT_SINGLE' : {1 : '//', 2 : '#'}\r
-       ,'COMMENT_MULTI' : {'/*' : '*/'}\r
-       ,'QUOTEMARKS' : {1: "'", 2: '"'}\r
-       ,'KEYWORD_CASE_SENSITIVE' : false\r
-       ,'KEYWORDS' : {\r
-               'statements' : [\r
-                       'include', 'require', 'include_once', 'require_once',\r
-                       'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile',\r
-            'endif', 'switch', 'case', 'endswitch',\r
-                       'return', 'break', 'continue'\r
-               ]\r
-               ,'reserved' : [\r
-                       '_GET', '_POST', '_SESSION', '_SERVER', '_FILES', '_ENV', '_COOKIE', '_REQUEST',\r
-                       'null', '__LINE__', '__FILE__',\r
-                       'false', '&lt;?php', '?&gt;', '&lt;?',\r
-                       '&lt;script language', '&lt;/script&gt;',\r
-                       'true', 'var', 'default',\r
-                       'function', 'class', 'new', '&amp;new', 'this',\r
-                       '__FUNCTION__', '__CLASS__', '__METHOD__', 'PHP_VERSION',\r
-                       'PHP_OS', 'DEFAULT_INCLUDE_PATH', 'PEAR_INSTALL_DIR', 'PEAR_EXTENSION_DIR',\r
-                       'PHP_EXTENSION_DIR', 'PHP_BINDIR', 'PHP_LIBDIR', 'PHP_DATADIR', 'PHP_SYSCONFDIR',\r
-                       'PHP_LOCALSTATEDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_OUTPUT_HANDLER_START', 'PHP_OUTPUT_HANDLER_CONT',\r
-                       'PHP_OUTPUT_HANDLER_END', 'E_ERROR', 'E_WARNING', 'E_PARSE', 'E_NOTICE',\r
-                       'E_CORE_ERROR', 'E_CORE_WARNING', 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_USER_ERROR',\r
-                       'E_USER_WARNING', 'E_USER_NOTICE', 'E_ALL'\r
-                       \r
-               ]\r
-               ,'functions' : [\r
-                       'func_num_args', 'func_get_arg', 'func_get_args', 'strlen', 'strcmp', 'strncmp', 'strcasecmp', 'strncasecmp', 'each', 'error_reporting', 'define', 'defined',\r
-                       'trigger_error', 'user_error', 'set_error_handler', 'restore_error_handler', 'get_declared_classes', 'get_loaded_extensions',\r
-                       'extension_loaded', 'get_extension_funcs', 'debug_backtrace',\r
-                       'constant', 'bin2hex', 'sleep', 'usleep', 'time', 'mktime', 'gmmktime', 'strftime', 'gmstrftime', 'strtotime', 'date', 'gmdate', 'getdate', 'localtime', 'checkdate', 'flush', 'wordwrap', 'htmlspecialchars', 'htmlentities', 'html_entity_decode', 'md5', 'md5_file', 'crc32', 'getimagesize', 'image_type_to_mime_type', 'phpinfo', 'phpversion', 'phpcredits', 'strnatcmp', 'strnatcasecmp', 'substr_count', 'strspn', 'strcspn', 'strtok', 'strtoupper', 'strtolower', 'strpos', 'strrpos', 'strrev', 'hebrev', 'hebrevc', 'nl2br', 'basename', 'dirname', 'pathinfo', 'stripslashes', 'stripcslashes', 'strstr', 'stristr', 'strrchr', 'str_shuffle', 'str_word_count', 'strcoll', 'substr', 'substr_replace', 'quotemeta', 'ucfirst', 'ucwords', 'strtr', 'addslashes', 'addcslashes', 'rtrim', 'str_replace', 'str_repeat', 'count_chars', 'chunk_split', 'trim', 'ltrim', 'strip_tags', 'similar_text', 'explode', 'implode', 'setlocale', 'localeconv',\r
-                       'parse_str', 'str_pad', 'chop', 'strchr', 'sprintf', 'printf', 'vprintf', 'vsprintf', 'sscanf', 'fscanf', 'parse_url', 'urlencode', 'urldecode', 'rawurlencode', 'rawurldecode', 'readlink', 'linkinfo', 'link', 'unlink', 'exec', 'system', 'escapeshellcmd', 'escapeshellarg', 'passthru', 'shell_exec', 'proc_open', 'proc_close', 'rand', 'srand', 'getrandmax', 'mt_rand', 'mt_srand', 'mt_getrandmax', 'base64_decode', 'base64_encode', 'abs', 'ceil', 'floor', 'round', 'is_finite', 'is_nan', 'is_infinite', 'bindec', 'hexdec', 'octdec', 'decbin', 'decoct', 'dechex', 'base_convert', 'number_format', 'fmod', 'ip2long', 'long2ip', 'getenv', 'putenv', 'getopt', 'microtime', 'gettimeofday', 'getrusage', 'uniqid', 'quoted_printable_decode', 'set_time_limit', 'get_cfg_var', 'magic_quotes_runtime', 'set_magic_quotes_runtime', 'get_magic_quotes_gpc', 'get_magic_quotes_runtime',\r
-                       'import_request_variables', 'error_log', 'serialize', 'unserialize', 'memory_get_usage', 'var_dump', 'var_export', 'debug_zval_dump', 'print_r','highlight_file', 'show_source', 'highlight_string', 'ini_get', 'ini_get_all', 'ini_set', 'ini_alter', 'ini_restore', 'get_include_path', 'set_include_path', 'restore_include_path', 'setcookie', 'header', 'headers_sent', 'connection_aborted', 'connection_status', 'ignore_user_abort', 'parse_ini_file', 'is_uploaded_file', 'move_uploaded_file', 'intval', 'floatval', 'doubleval', 'strval', 'gettype', 'settype', 'is_null', 'is_resource', 'is_bool', 'is_long', 'is_float', 'is_int', 'is_integer', 'is_double', 'is_real', 'is_numeric', 'is_string', 'is_array', 'is_object', 'is_scalar',\r
-                       'ereg', 'ereg_replace', 'eregi', 'eregi_replace', 'split', 'spliti', 'join', 'sql_regcase', 'dl', 'pclose', 'popen', 'readfile', 'rewind', 'rmdir', 'umask', 'fclose', 'feof', 'fgetc', 'fgets', 'fgetss', 'fread', 'fopen', 'fpassthru', 'ftruncate', 'fstat', 'fseek', 'ftell', 'fflush', 'fwrite', 'fputs', 'mkdir', 'rename', 'copy', 'tempnam', 'tmpfile', 'file', 'file_get_contents', 'stream_select', 'stream_context_create', 'stream_context_set_params', 'stream_context_set_option', 'stream_context_get_options', 'stream_filter_prepend', 'stream_filter_append', 'fgetcsv', 'flock', 'get_meta_tags', 'stream_set_write_buffer', 'set_file_buffer', 'set_socket_blocking', 'stream_set_blocking', 'socket_set_blocking', 'stream_get_meta_data', 'stream_register_wrapper', 'stream_wrapper_register', 'stream_set_timeout', 'socket_set_timeout', 'socket_get_status', 'realpath', 'fnmatch', 'fsockopen', 'pfsockopen', 'pack', 'unpack', 'get_browser', 'crypt', 'opendir', 'closedir', 'chdir', 'getcwd', 'rewinddir', 'readdir', 'dir', 'glob', 'fileatime', 'filectime', 'filegroup', 'fileinode', 'filemtime', 'fileowner', 'fileperms', 'filesize', 'filetype', 'file_exists', 'is_writable', 'is_writeable', 'is_readable', 'is_executable', 'is_file', 'is_dir', 'is_link', 'stat', 'lstat', 'chown',\r
-                       'touch', 'clearstatcache', 'mail', 'ob_start', 'ob_flush', 'ob_clean', 'ob_end_flush', 'ob_end_clean', 'ob_get_flush', 'ob_get_clean', 'ob_get_length', 'ob_get_level', 'ob_get_status', 'ob_get_contents', 'ob_implicit_flush', 'ob_list_handlers', 'ksort', 'krsort', 'natsort', 'natcasesort', 'asort', 'arsort', 'sort', 'rsort', 'usort', 'uasort', 'uksort', 'shuffle', 'array_walk', 'count', 'end', 'prev', 'next', 'reset', 'current', 'key', 'min', 'max', 'in_array', 'array_search', 'extract', 'compact', 'array_fill', 'range', 'array_multisort', 'array_push', 'array_pop', 'array_shift', 'array_unshift', 'array_splice', 'array_slice', 'array_merge', 'array_merge_recursive', 'array_keys', 'array_values', 'array_count_values', 'array_reverse', 'array_reduce', 'array_pad', 'array_flip', 'array_change_key_case', 'array_rand', 'array_unique', 'array_intersect', 'array_intersect_assoc', 'array_diff', 'array_diff_assoc', 'array_sum', 'array_filter', 'array_map', 'array_chunk', 'array_key_exists', 'pos', 'sizeof', 'key_exists', 'assert', 'assert_options', 'version_compare', 'ftok', 'str_rot13', 'aggregate',\r
-                       'session_name', 'session_module_name', 'session_save_path', 'session_id', 'session_regenerate_id', 'session_decode', 'session_register', 'session_unregister', 'session_is_registered', 'session_encode',\r
-                       'session_start', 'session_destroy', 'session_unset', 'session_set_save_handler', 'session_cache_limiter', 'session_cache_expire', 'session_set_cookie_params', 'session_get_cookie_params', 'session_write_close', 'preg_match', 'preg_match_all', 'preg_replace', 'preg_replace_callback', 'preg_split', 'preg_quote', 'preg_grep', 'overload', 'ctype_alnum', 'ctype_alpha', 'ctype_cntrl', 'ctype_digit', 'ctype_lower', 'ctype_graph', 'ctype_print', 'ctype_punct', 'ctype_space', 'ctype_upper', 'ctype_xdigit', 'virtual', 'apache_request_headers', 'apache_note', 'apache_lookup_uri', 'apache_child_terminate', 'apache_setenv', 'apache_response_headers', 'apache_get_version', 'getallheaders', 'mysql_connect', 'mysql_pconnect', 'mysql_close', 'mysql_select_db', 'mysql_create_db', 'mysql_drop_db', 'mysql_query', 'mysql_unbuffered_query', 'mysql_db_query', 'mysql_list_dbs', 'mysql_list_tables', 'mysql_list_fields', 'mysql_list_processes', 'mysql_error', 'mysql_errno', 'mysql_affected_rows', 'mysql_insert_id', 'mysql_result', 'mysql_num_rows', 'mysql_num_fields', 'mysql_fetch_row', 'mysql_fetch_array', 'mysql_fetch_assoc', 'mysql_fetch_object', 'mysql_data_seek', 'mysql_fetch_lengths', 'mysql_fetch_field', 'mysql_field_seek', 'mysql_free_result', 'mysql_field_name', 'mysql_field_table', 'mysql_field_len', 'mysql_field_type', 'mysql_field_flags', 'mysql_escape_string', 'mysql_real_escape_string', 'mysql_stat',\r
-                       'mysql_thread_id', 'mysql_client_encoding', 'mysql_get_client_info', 'mysql_get_host_info', 'mysql_get_proto_info', 'mysql_get_server_info', 'mysql_info', 'mysql', 'mysql_fieldname', 'mysql_fieldtable', 'mysql_fieldlen', 'mysql_fieldtype', 'mysql_fieldflags', 'mysql_selectdb', 'mysql_createdb', 'mysql_dropdb', 'mysql_freeresult', 'mysql_numfields', 'mysql_numrows', 'mysql_listdbs', 'mysql_listtables', 'mysql_listfields', 'mysql_db_name', 'mysql_dbname', 'mysql_tablename', 'mysql_table_name', 'pg_connect', 'pg_pconnect', 'pg_close', 'pg_connection_status', 'pg_connection_busy', 'pg_connection_reset', 'pg_host', 'pg_dbname', 'pg_port', 'pg_tty', 'pg_options', 'pg_ping', 'pg_query', 'pg_send_query', 'pg_cancel_query', 'pg_fetch_result', 'pg_fetch_row', 'pg_fetch_assoc', 'pg_fetch_array', 'pg_fetch_object', 'pg_fetch_all', 'pg_affected_rows', 'pg_get_result', 'pg_result_seek', 'pg_result_status', 'pg_free_result', 'pg_last_oid', 'pg_num_rows', 'pg_num_fields', 'pg_field_name', 'pg_field_num', 'pg_field_size', 'pg_field_type', 'pg_field_prtlen', 'pg_field_is_null', 'pg_get_notify', 'pg_get_pid', 'pg_result_error', 'pg_last_error', 'pg_last_notice', 'pg_put_line', 'pg_end_copy', 'pg_copy_to', 'pg_copy_from',\r
-                       'pg_trace', 'pg_untrace', 'pg_lo_create', 'pg_lo_unlink', 'pg_lo_open', 'pg_lo_close', 'pg_lo_read', 'pg_lo_write', 'pg_lo_read_all', 'pg_lo_import', 'pg_lo_export', 'pg_lo_seek', 'pg_lo_tell', 'pg_escape_string', 'pg_escape_bytea', 'pg_unescape_bytea', 'pg_client_encoding', 'pg_set_client_encoding', 'pg_meta_data', 'pg_convert', 'pg_insert', 'pg_update', 'pg_delete', 'pg_select', 'pg_exec', 'pg_getlastoid', 'pg_cmdtuples', 'pg_errormessage', 'pg_numrows', 'pg_numfields', 'pg_fieldname', 'pg_fieldsize', 'pg_fieldtype', 'pg_fieldnum', 'pg_fieldprtlen', 'pg_fieldisnull', 'pg_freeresult', 'pg_result', 'pg_loreadall', 'pg_locreate', 'pg_lounlink', 'pg_loopen', 'pg_loclose', 'pg_loread', 'pg_lowrite', 'pg_loimport', 'pg_loexport',\r
-                       'echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die'\r
-\r
-               ]\r
-       }\r
-       ,'OPERATORS' :[\r
-               '+', '-', '/', '*', '=', '<', '>', '%', '!', '&&', '||'\r
-       ]\r
-       ,'DELIMITERS' :[\r
-               '(', ')', '[', ']', '{', '}'\r
-       ]\r
-       ,'REGEXPS' : {\r
-               // highlight all variables ($...)\r
-               'variables' : {\r
-                       'search' : '()(\\$\\w+)()'\r
-                       ,'class' : 'variables'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before' // before or after\r
-               }\r
-       }\r
-       ,'STYLES' : {\r
-               'COMMENTS': 'color: #AAAAAA;'\r
-               ,'QUOTESMARKS': 'color: #879EFA;'\r
-               ,'KEYWORDS' : {\r
-                       'reserved' : 'color: #48BDDF;'\r
-                       ,'functions' : 'color: #0040FD;'\r
-                       ,'statements' : 'color: #60CA00;'\r
-                       }\r
-               ,'OPERATORS' : 'color: #FF00FF;'\r
-               ,'DELIMITERS' : 'color: #2B60FF;'\r
-               ,'REGEXPS' : {\r
-                       'variables' : 'color: #E0BD54;'\r
-               }               \r
-       }\r
-       ,'AUTO_COMPLETION' :  {\r
-               "default": {    // the name of this definition group. It's posisble to have different rules inside the same definition file\r
-                       "REGEXP": { "before_word": "[^a-zA-Z0-9_]|^"    // \\s|\\.|\r
-                                               ,"possible_words_letters": "[a-zA-Z0-9_\$]+"\r
-                                               ,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$"\r
-                                               ,"prefix_separator": "\\-\\>|\\:\\:"\r
-                                       }\r
-                       ,"CASE_SENSITIVE": true\r
-                       ,"MAX_TEXT_LENGTH": 100         // the maximum length of the text being analyzed before the cursor position\r
-                       ,"KEYWORDS": {\r
-                                       '': [   // the prefix of thoses items\r
-                                               /**\r
-                                                * 0 : the keyword the user is typing\r
-                                                * 1 : (optionnal) the string inserted in code ("{@}" being the new position of the cursor, "§" beeing the equivalent to the value the typed string indicated if the previous )\r
-                                                *              If empty the keyword will be displayed\r
-                                                * 2 : (optionnal) the text that appear in the suggestion box (if empty, the string to insert will be displayed)\r
-                                                */\r
-                                                ['$_POST']\r
-                                       ,['$_GET']\r
-                                       ,['$_SESSION']\r
-                                       ,['$_SERVER']\r
-                                       ,['$_FILES']\r
-                                       ,['$_ENV']\r
-                                       ,['$_COOKIE']\r
-                                       ,['$_REQUEST']\r
-                                       // magic methods\r
-                                       ,['__construct', '§( {@} )']\r
-                                       ,['__destruct', '§( {@} )']\r
-                                       ,['__sleep', '§( {@} )']\r
-                                       ,['__wakeup', '§( {@} )']\r
-                                       ,['__toString', '§( {@} )']\r
-                                       // include\r
-                                       ,['include', '§ "{@}";']\r
-                                       ,['include_once', '§ "{@}";']\r
-                                       ,['require', '§ "{@}";']\r
-                                       ,['require_once', '§ "{@}";']\r
-                                       // statements\r
-                                       ,['for', '§( {@} )']\r
-                                       ,['foreach', '§( {@} )']\r
-                                       ,['if', '§( {@} )']\r
-                                       ,['elseif', '§( {@} )']\r
-                                       ,['while', '§( {@} )']\r
-                                       ,['switch', '§( {@} )']\r
-                                       ,['break']\r
-                                       ,['case']\r
-                                       ,['continue']\r
-                                       ,['do']\r
-                                       ,['else']\r
-                                       ,['endif']\r
-                                       ,['endswitch']\r
-                                       ,['endwhile']\r
-                                       ,['return']\r
-                                       // function\r
-                                       ,['unset', '§( {@} )']\r
-                                       ]\r
-                               }\r
-                       }\r
-               ,"live": {      \r
-                       \r
-                       // class NAME: /class\W+([a-z]+)\W+/gi\r
-                       // method: /^(public|private|protected)?\s*function\s+([a-z][a-z0-9\_]*)\s*(\([^\{]*\))/gmi\r
-                       // static: /^(public|private|protected)?\s+static\s+(public|private|protected)?\s*function\s+([a-z][a-z0-9\_]*)\s*(\([^\{]*\))/gmi \r
-                       // attributes: /(\$this\-\>|(?:var|public|protected|private)\W+\$)([a-z0-9\_]+)(?!\()\b/gi \r
-                       //              v1 : /(\$this\-\>|var\W+|public\W+|protected\W+|private\W+)([a-z0-9\_]+)\W*(=|;)/gi \r
-                       // var type: /(\$(this\-\>)?[a-z0-9\_]+)\s*\=\s*new\s+([a-z0-9\_])+/gi \r
-                       \r
-                       \r
-                       "REGEXP": { "before_word": "[^a-zA-Z0-9_]|^"    // \\s|\\.|\r
-                                               ,"possible_words_letters": "[a-zA-Z0-9_\$]+"\r
-                                               ,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$"\r
-                                               ,"prefix_separator": "\\-\\>"\r
-                                       }\r
-                       ,"CASE_SENSITIVE": true\r
-                       ,"MAX_TEXT_LENGTH": 100         // the maximum length of the text being analyzed before the cursor position\r
-                       ,"KEYWORDS": {\r
-                                       '$this': [      // the prefix of thoses items\r
-                                               ['test']\r
-                                       ]\r
-                               }\r
-                       }\r
-       }\r
-};\r
diff --git a/project/static/js/reg_syntax/python.js b/project/static/js/reg_syntax/python.js
deleted file mode 100755 (executable)
index 4b0acf2..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/**\r
- * Python syntax v 1.1 \r
- * \r
- * v1.1 by Andre Roberge (2006/12/27)\r
- *   \r
-**/\r
-editAreaLoader.load_syntax["python"] = {\r
-       'COMMENT_SINGLE' : {1 : '#'}\r
-       ,'COMMENT_MULTI' : {}\r
-       ,'QUOTEMARKS' : {1: "'", 2: '"'}\r
-       ,'KEYWORD_CASE_SENSITIVE' : true\r
-       ,'KEYWORDS' : {\r
-               /*\r
-               ** Set 1: reserved words\r
-               ** http://python.org/doc/current/ref/keywords.html\r
-               ** Note: 'as' and 'with' have been added starting with Python 2.5\r
-               */\r
-               'reserved' : [\r
-                       'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif',\r
-                       'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if', \r
-                       'import', 'is', 'in', 'lambda', 'not', 'or', 'pass', 'print', 'raise',\r
-                       'return', 'try', 'while', 'with', 'yield'\r
-                       //the following are *almost* reserved; we'll treat them as such\r
-                       , 'False', 'True', 'None'\r
-               ]\r
-               /*\r
-               ** Set 2: builtins\r
-               ** http://python.org/doc/current/lib/built-in-funcs.html\r
-               */      \r
-               ,'builtins' : [\r
-                       '__import__', 'abs', 'basestring', 'bool', 'callable', 'chr', 'classmethod', 'cmp', \r
-                       'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile', \r
-                       'file', 'filter', 'float', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help',\r
-                       'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'list', 'locals',\r
-                       'long', 'map', 'max', 'min', 'object', 'oct', 'open', 'ord', 'pow', 'property', 'range',\r
-                       'raw_input', 'reduce', 'reload', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice',\r
-                       'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode', \r
-                       'vars', 'xrange', 'zip',\r
-                       // Built-in constants: http://www.python.org/doc/2.4.1/lib/node35.html\r
-                       //'False', 'True', 'None' have been included in 'reserved'\r
-                       'NotImplemented', 'Ellipsis',\r
-                       // Built-in Exceptions: http://python.org/doc/current/lib/module-exceptions.html\r
-                       'Exception', 'StandardError', 'ArithmeticError', 'LookupError', 'EnvironmentError',\r
-                       'AssertionError', 'AttributeError', 'EOFError', 'FloatingPointError', 'IOError',\r
-                       'ImportError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'MemoryError', 'NameError',\r
-                       'NotImplementedError', 'OSError', 'OverflowError', 'ReferenceError', 'RuntimeError',\r
-                       'StopIteration', 'SyntaxError', 'SystemError', 'SystemExit', 'TypeError',\r
-                       'UnboundlocalError', 'UnicodeError', 'UnicodeEncodeError', 'UnicodeDecodeError',\r
-                       'UnicodeTranslateError', 'ValueError', 'WindowsError', 'ZeroDivisionError', 'Warning',\r
-                       'UserWarning', 'DeprecationWarning', 'PendingDeprecationWarning', 'SyntaxWarning',\r
-                       'RuntimeWarning', 'FutureWarning',              \r
-                       // we will include the string methods as well\r
-                       // http://python.org/doc/current/lib/string-methods.html\r
-                       'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs',\r
-                       'find', 'index', 'isalnum', 'isaplpha', 'isdigit', 'islower', 'isspace', 'istitle',\r
-                       'isupper', 'join', 'ljust', 'lower', 'lstrip', 'replace', 'rfind', 'rindex', 'rjust',\r
-                       'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title',\r
-                       'translate', 'upper', 'zfill'\r
-               ]\r
-               /*\r
-               ** Set 3: standard library\r
-               ** http://python.org/doc/current/lib/modindex.html\r
-               */\r
-               ,'stdlib' : [\r
-                       '__builtin__', '__future__', '__main__', '_winreg', 'aifc', 'AL', 'al', 'anydbm',\r
-                       'array', 'asynchat', 'asyncore', 'atexit', 'audioop', 'base64', 'BaseHTTPServer',\r
-                       'Bastion', 'binascii', 'binhex', 'bisect', 'bsddb', 'bz2', 'calendar', 'cd', 'cgi',\r
-                       'CGIHTTPServer', 'cgitb', 'chunk', 'cmath', 'cmd', 'code', 'codecs', 'codeop',\r
-                       'collections', 'colorsys', 'commands', 'compileall', 'compiler', 'compiler',\r
-                       'ConfigParser', 'Cookie', 'cookielib', 'copy', 'copy_reg', 'cPickle', 'crypt',\r
-                       'cStringIO', 'csv', 'curses', 'datetime', 'dbhash', 'dbm', 'decimal', 'DEVICE',\r
-                       'difflib', 'dircache', 'dis', 'distutils', 'dl', 'doctest', 'DocXMLRPCServer', 'dumbdbm',\r
-                       'dummy_thread', 'dummy_threading', 'email', 'encodings', 'errno', 'exceptions', 'fcntl',\r
-                       'filecmp', 'fileinput', 'FL', 'fl', 'flp', 'fm', 'fnmatch', 'formatter', 'fpectl',\r
-                       'fpformat', 'ftplib', 'gc', 'gdbm', 'getopt', 'getpass', 'gettext', 'GL', 'gl', 'glob',\r
-                       'gopherlib', 'grp', 'gzip', 'heapq', 'hmac', 'hotshot', 'htmlentitydefs', 'htmllib',\r
-                       'HTMLParser', 'httplib', 'imageop', 'imaplib', 'imgfile', 'imghdr', 'imp', 'inspect',\r
-                       'itertools', 'jpeg', 'keyword', 'linecache', 'locale', 'logging', 'mailbox', 'mailcap',\r
-                       'marshal', 'math', 'md5', 'mhlib', 'mimetools', 'mimetypes', 'MimeWriter', 'mimify',\r
-                       'mmap', 'msvcrt', 'multifile', 'mutex', 'netrc', 'new', 'nis', 'nntplib', 'operator',\r
-                       'optparse', 'os', 'ossaudiodev', 'parser', 'pdb', 'pickle', 'pickletools', 'pipes',\r
-                       'pkgutil', 'platform', 'popen2', 'poplib', 'posix', 'posixfile', 'pprint', 'profile',\r
-                       'pstats', 'pty', 'pwd', 'py_compile', 'pyclbr', 'pydoc', 'Queue', 'quopri', 'random',\r
-                       're', 'readline', 'repr', 'resource', 'rexec', 'rfc822', 'rgbimg', 'rlcompleter',\r
-                       'robotparser', 'sched', 'ScrolledText', 'select', 'sets', 'sgmllib', 'sha', 'shelve',\r
-                       'shlex', 'shutil', 'signal', 'SimpleHTTPServer', 'SimpleXMLRPCServer', 'site', 'smtpd',\r
-                       'smtplib', 'sndhdr', 'socket', 'SocketServer', 'stat', 'statcache', 'statvfs', 'string',\r
-                       'StringIO', 'stringprep', 'struct', 'subprocess', 'sunau', 'SUNAUDIODEV', 'sunaudiodev',\r
-                       'symbol', 'sys', 'syslog', 'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'termios',\r
-                       'test', 'textwrap', 'thread', 'threading', 'time', 'timeit', 'Tix', 'Tkinter', 'token',\r
-                       'tokenize', 'traceback', 'tty', 'turtle', 'types', 'unicodedata', 'unittest', 'urllib2',\r
-                       'urllib', 'urlparse', 'user', 'UserDict', 'UserList', 'UserString', 'uu', 'warnings',\r
-                       'wave', 'weakref', 'webbrowser', 'whichdb', 'whrandom', 'winsound', 'xdrlib', 'xml',\r
-                       'xmllib', 'xmlrpclib', 'zipfile', 'zipimport', 'zlib'\r
-\r
-               ]\r
-               /*\r
-               ** Set 4: special methods\r
-               ** http://python.org/doc/current/ref/specialnames.html\r
-               */\r
-               ,'special' : [\r
-                       // Basic customization: http://python.org/doc/current/ref/customization.html\r
-                       '__new__', '__init__', '__del__', '__repr__', '__str__', \r
-                       '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__cmp__', '__rcmp__',\r
-                       '__hash__', '__nonzero__', '__unicode__', '__dict__',\r
-                       // Attribute access: http://python.org/doc/current/ref/attribute-access.html\r
-                       '__setattr__', '__delattr__', '__getattr__', '__getattribute__', '__get__', '__set__',\r
-                       '__delete__', '__slots__',\r
-                       // Class creation, callable objects\r
-                       '__metaclass__', '__call__', \r
-                       // Container types: http://python.org/doc/current/ref/sequence-types.html\r
-                       '__len__', '__getitem__', '__setitem__', '__delitem__', '__iter__', '__contains__',\r
-                       '__getslice__', '__setslice__', '__delslice__',\r
-                       // Numeric types: http://python.org/doc/current/ref/numeric-types.html\r
-                       '__abs__','__add__','__and__','__coerce__','__div__','__divmod__','__float__',\r
-                       '__hex__','__iadd__','__isub__','__imod__','__idiv__','__ipow__','__iand__',\r
-                       '__ior__','__ixor__', '__ilshift__','__irshift__','__invert__','__int__',\r
-                       '__long__','__lshift__',\r
-                       '__mod__','__mul__','__neg__','__oct__','__or__','__pos__','__pow__',\r
-                       '__radd__','__rdiv__','__rdivmod__','__rmod__','__rpow__','__rlshift__','__rrshift__',\r
-                       '__rshift__','__rsub__','__rmul__','__repr__','__rand__','__rxor__','__ror__',\r
-                       '__sub__','__xor__'\r
-               ]\r
-       }\r
-       ,'OPERATORS' :[\r
-               '+', '-', '/', '*', '=', '<', '>', '%', '!', '&', ';', '?', '`', ':', ','\r
-       ]\r
-       ,'DELIMITERS' :[\r
-               '(', ')', '[', ']', '{', '}'\r
-       ]\r
-       ,'STYLES' : {\r
-               'COMMENTS': 'color: #AAAAAA;'\r
-               ,'QUOTESMARKS': 'color: #660066;'\r
-               ,'KEYWORDS' : {\r
-                       'reserved' : 'color: #0000FF;'\r
-                       ,'builtins' : 'color: #009900;'\r
-                       ,'stdlib' : 'color: #009900;'\r
-                       ,'special': 'color: #006666;'\r
-                       }\r
-               ,'OPERATORS' : 'color: #993300;'\r
-               ,'DELIMITERS' : 'color: #993300;'\r
-                               \r
-       }\r
-};\r
diff --git a/project/static/js/reg_syntax/robotstxt.js b/project/static/js/reg_syntax/robotstxt.js
deleted file mode 100755 (executable)
index d57395f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-editAreaLoader.load_syntax["robotstxt"] = {\r
-       'COMMENT_SINGLE' : {1 : '#'},\r
-       'COMMENT_MULTI' : {},\r
-       'QUOTEMARKS' : [],\r
-       'KEYWORD_CASE_SENSITIVE' : false,\r
-       'KEYWORDS' : {\r
-               'attributes' : ['User-agent', 'Disallow', 'Allow', 'Crawl-delay'],\r
-               'values' : ['*'],\r
-               'specials' : ['*']\r
-       },\r
-       'OPERATORS' :[':'],\r
-       'DELIMITERS' :[],\r
-       'STYLES' : {\r
-               'COMMENTS': 'color: #AAAAAA;',\r
-               'QUOTESMARKS': 'color: #6381F8;',\r
-               'KEYWORDS' : {\r
-                       'attributes' : 'color: #48BDDF;',\r
-                       'values' : 'color: #2B60FF;',\r
-                       'specials' : 'color: #FF0000;'\r
-                       },\r
-       'OPERATORS' : 'color: #FF00FF;',\r
-       'DELIMITERS' : 'color: #60CA00;'                        \r
-       }\r
-};\r
diff --git a/project/static/js/reg_syntax/ruby.js b/project/static/js/reg_syntax/ruby.js
deleted file mode 100755 (executable)
index c6ee2f4..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/**\r
- * Ruby syntax v 1.0 \r
- * \r
- * v1.0 by Patrice De Saint Steban (2007/01/03)\r
- *   \r
-**/\r
-editAreaLoader.load_syntax["ruby"] = {\r
-       'COMMENT_SINGLE' : {1 : '#'}\r
-       ,'COMMENT_MULTI' : {}\r
-       ,'QUOTEMARKS' : {1: "'", 2: '"'}\r
-       ,'KEYWORD_CASE_SENSITIVE' : true\r
-       ,'KEYWORDS' : {\r
-               'reserved' : [\r
-                       'alias', 'and', 'BEGIN', 'begin', 'break', 'case', 'class', 'def', 'defined', 'do', 'else',\r
-                       'elsif', 'END', 'end', 'ensure', 'false', 'for', 'if', \r
-                       'in', 'module', 'next', 'not', 'or', 'redo', 'rescue', 'retry',\r
-                       'return', 'self', 'super', 'then', 'true', 'undef', 'unless', 'until', 'when', 'while', 'yield'\r
-               ]\r
-       }\r
-       ,'OPERATORS' :[\r
-               '+', '-', '/', '*', '=', '<', '>', '%', '!', '&', ';', '?', '`', ':', ','\r
-       ]\r
-       ,'DELIMITERS' :[\r
-               '(', ')', '[', ']', '{', '}'\r
-       ]
-       ,'REGEXPS' : {
-               'constants' : {\r
-                       'search' : '()([A-Z]\\w*)()'\r
-                       ,'class' : 'constants'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before' \r
-               }
-               ,'variables' : {\r
-                       'search' : '()([\$\@\%]+\\w+)()'\r
-                       ,'class' : 'variables'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before' \r
-               }
-               ,'numbers' : {\r
-                       'search' : '()(-?[0-9]+)()'\r
-                       ,'class' : 'numbers'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before' \r
-               }
-               ,'symbols' : {\r
-                       'search' : '()(:\\w+)()'\r
-                       ,'class' : 'symbols'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before'\r
-               }
-       }\r
-       ,'STYLES' : {\r
-               'COMMENTS': 'color: #AAAAAA;'\r
-               ,'QUOTESMARKS': 'color: #660066;'\r
-               ,'KEYWORDS' : {\r
-                       'reserved' : 'font-weight: bold; color: #0000FF;'\r
-                       }\r
-               ,'OPERATORS' : 'color: #993300;'\r
-               ,'DELIMITERS' : 'color: #993300;'\r
-               ,'REGEXPS' : {
-                       'variables' : 'color: #E0BD54;'
-                       ,'numbers' : 'color: green;'
-                       ,'constants' : 'color: #00AA00;'
-                       ,'symbols' : 'color: #879EFA;'
-               }       \r
-       }\r
-};\r
diff --git a/project/static/js/reg_syntax/sql.js b/project/static/js/reg_syntax/sql.js
deleted file mode 100755 (executable)
index 8ef1b36..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-editAreaLoader.load_syntax["sql"] = {\r
-       'COMMENT_SINGLE' : {1 : '--'}\r
-       ,'COMMENT_MULTI' : {'/*' : '*/'}\r
-       ,'QUOTEMARKS' : {1: "'", 2: '"', 3: '`'}\r
-       ,'KEYWORD_CASE_SENSITIVE' : false\r
-       ,'KEYWORDS' : {\r
-               'statements' : [\r
-                       'select', 'SELECT', 'where', 'order', 'by',\r
-                       'insert', 'from', 'update', 'grant', 'left join', 'right join', \r
-            'union', 'group', 'having', 'limit', 'alter', 'LIKE','IN','CASE'\r
-               ]\r
-               ,'reserved' : [\r
-                       'null', 'enum', 'int', 'boolean', 'add', 'varchar'\r
-                       \r
-               ]\r
-               ,'functions' : [\r
-   'ABS','ACOS','ADDDATE','ADDTIME','AES_DECRYPT','AES_ENCRYPT','ASCII','ASIN','ATAN2 ATAN','ATAN','AVG','BENCHMARK','DISTINCT','BIN','BIT_AND','BIT_COUNT','BIT_LENGTH','BIT_OR','BIT_XOR','CAST','CEILING CEIL','CHAR_LENGTH','CHAR',\r
-'CHARACTER_LENGTH','CHARSET','COALESCE','COERCIBILITY','COLLATION','COMPRESS','CONCAT_WS','CONCAT','CONNECTION_ID','CONV','CONVERT_TZ','COS','COT','COUNT','CRC32','CURDATE','CURRENT_DATE','CURRENT_TIME','CURRENT_TIMESTAMP','CURRENT_USER','CURTIME','DATABASE','DATE_ADD','DATE_FORMAT','DATE_SUB','DATE','DATEDIFF','DAY','DAYNAME','DAYOFMONTH',\r
-'DAYOFWEEK','DAYOFYEAR','DECODE','DEFAULT','DEGREES','DES_DECRYPT','DES_ENCRYPT','ELT','ENCODE','ENCRYPT','EXP','EXPORT_SET','EXTRACT','FIELD','FIND_IN_SET','FLOOR','FORMAT','FOUND_ROWS','FROM_DAYS','FROM_UNIXTIME','GET_FORMAT','GET_LOCK','GREATEST','GROUP_CONCAT','HEX','HOUR','IF','IFNULL','INET_ATON','INET_NTOA',\r
-'INSERT','INSTR','INTERVAL','IS_FREE_LOCK','IS_USED_LOCK','ISNULL','LAST_DAY','LAST_INSERT_ID','LCASE','LEAST','LEFT','LENGTH','LN','LOAD_FILE','LOCALTIME','LOCALTIMESTAMP','LOCATE','LOG10','LOG2','LOG','LOWER','LPAD','LTRIM','MAKE_SET','MAKEDATE','MAKETIME','MASTER_POS_WAIT','MAX','MD5','MICROSECOND',\r
-'MID','MIN','MINUTE','MOD','MONTH','MONTHNAME','NOW','NULLIF','OCT','OCTET_LENGTH','OLD_PASSWORD','ORD','PASSWORD','PERIOD_ADD','PERIOD_DIFF','PI','POSITION','POW','POWER','PROCEDURE ANALYSE','QUARTER','QUOTE','RADIANS','RAND','RELEASE_LOCK','REPEAT','REPLACE','REVERSE','RIGHT','ROUND',\r
-'RPAD','RTRIM','SEC_TO_TIME','SECOND','SESSION_USER','SHA1','SHA','SIGN','SIN','SOUNDEX','SOUNDS LIKE','SPACE','SQRT','STD','STDDEV','STR_TO_DATE','STRCMP','SUBDATE','SUBSTRING_INDEX','SUBSTRING','SUBSTR','SUBTIME','SUM','SYSDATE','SYSTEM_USER','TAN','TIME_FORMAT','TIME_TO_SEC','TIME','TIMEDIFF',\r
-'TIMESTAMP','TO_DAYS','TRIM','TRUNCATE','UCASE','UNCOMPRESS','UNCOMPRESSED_LENGTH','UNHEX','UNIX_TIMESTAMP','UPPER','USER','UTC_DATE','UTC_TIME','UTC_TIMESTAMP','UUID','VALUES','VARIANCE','WEEK','WEEKDAY','WEEKOFYEAR','YEAR','YEARWEEK'\r
-               ]\r
-       }\r
-       ,'OPERATORS' :[\r
-     'AND','&&','BETWEEN','BINARY','&','|','^','/','DIV','<=>','=','>=','>','<<','>>','IS','NULL','<=','<','-','%','!=','<>','!','||','OR','+','REGEXP','RLIKE','XOR','~','*'\r
-       ]\r
-       ,'DELIMITERS' :[\r
-               '(', ')', '[', ']', '{', '}'\r
-       ]\r
-       ,'REGEXPS' : {\r
-               // highlight all variables (@...)\r
-               'variables' : {\r
-                       'search' : '()(\\@\\w+)()'\r
-                       ,'class' : 'variables'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before' // before or after\r
-               }\r
-       }\r
-       ,'STYLES' : {\r
-               'COMMENTS': 'color: #AAAAAA;'\r
-               ,'QUOTESMARKS': 'color: #879EFA;'\r
-               ,'KEYWORDS' : {\r
-                       'reserved' : 'color: #48BDDF;'\r
-                       ,'functions' : 'color: #0040FD;'\r
-                       ,'statements' : 'color: #60CA00;'\r
-                       }\r
-               ,'OPERATORS' : 'color: #FF00FF;'\r
-               ,'DELIMITERS' : 'color: #2B60FF;'\r
-               ,'REGEXPS' : {\r
-                       'variables' : 'color: #E0BD54;'\r
-               }               \r
-       }\r
-};\r
diff --git a/project/static/js/reg_syntax/tsql.js b/project/static/js/reg_syntax/tsql.js
deleted file mode 100755 (executable)
index 7e9057d..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-editAreaLoader.load_syntax["tsql"] = {\r
-       'COMMENT_SINGLE' : {1 : '--'}\r
-       ,'COMMENT_MULTI' : {'/*' : '*/'}\r
-       ,'QUOTEMARKS' : {1: "'" }\r
-       ,'KEYWORD_CASE_SENSITIVE' : false\r
-       ,'KEYWORDS' : {\r
-               'statements': [\r
-                   'ADD', 'EXCEPT', 'PERCENT', 'EXEC', 'PLAN', 'ALTER', 'EXECUTE', 'PRECISION',\r
-                   'PRIMARY', 'EXIT', 'PRINT', 'AS', 'FETCH', 'PROC', 'ASC',\r
-                   'FILE', 'PROCEDURE', 'AUTHORIZATION', 'FILLFACTOR', 'PUBLIC', 'BACKUP', 'FOR', 'RAISERROR',\r
-                   'BEGIN', 'FOREIGN', 'READ', 'FREETEXT', 'READTEXT', 'BREAK', 'FREETEXTTABLE',\r
-                   'RECONFIGURE', 'BROWSE', 'FROM', 'REFERENCES', 'BULK', 'FULL', 'REPLICATION', 'BY',\r
-                   'FUNCTION', 'RESTORE', 'CASCADE', 'GOTO', 'RESTRICT', 'CASE', 'GRANT', 'RETURN',\r
-                   'CHECK', 'GROUP', 'REVOKE', 'CHECKPOINT', 'HAVING', 'RIGHT', 'CLOSE', 'HOLDLOCK', 'ROLLBACK',\r
-                   'CLUSTERED', 'IDENTITY', 'ROWCOUNT', 'IDENTITY_INSERT', 'ROWGUIDCOL', 'COLLATE', \r
-                   'IDENTITYCOL', 'RULE', 'COLUMN', 'IF', 'SAVE', 'COMMIT', 'SCHEMA', 'COMPUTE', 'INDEX',\r
-                   'SELECT', 'CONSTRAINT', 'CONTAINS', 'INSERT', 'SET',\r
-                   'CONTAINSTABLE', 'INTERSECT', 'SETUSER', 'CONTINUE', 'INTO', 'SHUTDOWN', 'SOME',\r
-                   'CREATE', 'STATISTICS', 'KEY', 'CURRENT', 'KILL', 'TABLE',\r
-                   'CURRENT_DATE', 'TEXTSIZE', 'CURRENT_TIME', 'THEN', 'LINENO',\r
-                   'TO', 'LOAD', 'TOP', 'CURSOR', 'NATIONAL', 'TRAN', 'DATABASE', 'NOCHECK', \r
-                   'TRANSACTION', 'DBCC', 'NONCLUSTERED', 'TRIGGER', 'DEALLOCATE', 'TRUNCATE',\r
-                   'DECLARE', 'TSEQUAL', 'DEFAULT', 'UNION', 'DELETE', 'OF', 'UNIQUE',\r
-                   'DENY', 'OFF', 'UPDATE', 'DESC', 'OFFSETS', 'UPDATETEXT', 'DISK', 'ON', 'USE', 'DISTINCT', 'OPEN',\r
-                   'DISTRIBUTED', 'OPENDATASOURCE', 'VALUES', 'DOUBLE', 'OPENQUERY', 'VARYING', 'DROP', \r
-                   'OPENROWSET', 'VIEW', 'DUMMY', 'OPENXML', 'WAITFOR', 'DUMP', 'OPTION', 'WHEN', 'ELSE', 'WHERE',\r
-                   'END', 'ORDER', 'WHILE', 'ERRLVL', 'WITH', 'ESCAPE', 'OVER', 'WRITETEXT'\r
-               ],\r
-               'functions': [\r
-                   'COALESCE', 'SESSION_USER', 'CONVERT', 'SYSTEM_USER', 'CURRENT_TIMESTAMP', 'CURRENT_USER', 'NULLIF', 'USER',\r
-                       'AVG', 'MIN', 'CHECKSUM', 'SUM', 'CHECKSUM_AGG', 'STDEV', 'COUNT', 'STDEVP', 'COUNT_BIG', 'VAR', 'GROUPING', 'VARP', 'MAX',\r
-                       '@@DATEFIRST', '@@OPTIONS', '@@DBTS', '@@REMSERVER', '@@LANGID', '@@SERVERNAME', '@@LANGUAGE', '@@SERVICENAME', '@@LOCK_TIMEOUT',\r
-                       '@@SPID', '@@MAX_CONNECTIONS', '@@TEXTSIZE', '@@MAX_PRECISION', '@@VERSION', '@@NESTLEVEL',\r
-                       '@@CURSOR_ROWS', 'CURSOR_STATUS', '@@FETCH_STATUS',\r
-                       'DATEADD', 'DATEDIFF', 'DATENAME', 'DATEPART', 'DAY', 'GETDATE', 'GETUTCDATE', 'MONTH', 'YEAR',\r
-                       'ABS', 'DEGREES', 'RAND', 'ACOS', 'EXP', 'ROUND', 'ASIN', 'FLOOR', 'SIGN', 'ATAN', 'LOG', 'SIN', 'ATN2', 'LOG10', 'SQRT',\r
-                       'CEILING', 'PI ', 'SQUARE', 'COS', 'POWER', 'TAN', 'COT', 'RADIANS',\r
-                       '@@PROCID', 'COL_LENGTH', 'FULLTEXTCATALOGPROPERTY', 'COL_NAME', 'FULLTEXTSERVICEPROPERTY', 'COLUMNPROPERTY', 'INDEX_COL',\r
-                       'DATABASEPROPERTY', 'INDEXKEY_PROPERTY', 'DATABASEPROPERTYEX', 'INDEXPROPERTY', 'DB_ID', 'OBJECT_ID', 'DB_NAME', 'OBJECT_NAME',\r
-                       'FILE_ID', 'OBJECTPROPERTY', 'OBJECTPROPERTYEX', 'FILE_NAME', 'SQL_VARIANT_PROPERTY', 'FILEGROUP_ID', 'FILEGROUP_NAME',\r
-                       'FILEGROUPPROPERTY', 'TYPEPROPERTY', 'FILEPROPERTY',\r
-                       'CURRENT_USER', 'SUSER_ID', 'SUSER_SID', 'IS_MEMBER', 'SUSER_SNAME', 'IS_SRVROLEMEMBER', 'PERMISSIONS', 'SYSTEM_USER',\r
-                       'SUSER_NAME', 'USER_ID', 'SESSION_USER', 'USER_NAME', 'ASCII', 'SOUNDEX', 'PATINDEX', 'SPACE', 'CHARINDEX', 'QUOTENAME',\r
-                       'STR', 'DIFFERENCE', 'REPLACE', 'STUFF', 'REPLICATE', 'SUBSTRING', 'LEN', 'REVERSE', 'UNICODE', 'LOWER',\r
-                       'UPPER', 'LTRIM', 'RTRIM', 'APP_NAME', 'CAST', 'CONVERT', 'COALESCE', 'COLLATIONPROPERTY', 'COLUMNS_UPDATED', 'CURRENT_TIMESTAMP',\r
-                       'CURRENT_USER', 'DATALENGTH', '@@ERROR', 'FORMATMESSAGE', 'GETANSINULL', 'HOST_ID', 'HOST_NAME', 'IDENT_CURRENT', 'IDENT_INCR',\r
-                       'IDENT_SEED', '@@IDENTITY', 'ISDATE', 'ISNULL', 'ISNUMERIC', 'NEWID', 'NULLIF', 'PARSENAME', '@@ROWCOUNT',\r
-                       'SCOPE_IDENTITY', 'SERVERPROPERTY', 'SESSIONPROPERTY', 'SESSION_USER', 'STATS_DATE', 'SYSTEM_USER', '@@TRANCOUNT', 'USER_NAME',\r
-                       '@@CONNECTIONS', '@@PACK_RECEIVED', '@@CPU_BUSY', '@@PACK_SENT', '@@TIMETICKS', '@@IDLE', '@@TOTAL_ERRORS', '@@IO_BUSY', '@@TOTAL_READ',\r
-                       '@@PACKET_ERRORS', '@@TOTAL_WRITE', 'PATINDEX', 'TEXTVALID', 'TEXTPTR'\r
-               ],\r
-               'reserved': [\r
-                       'RIGHT', 'INNER', 'IS', 'JOIN', 'CROSS', 'LEFT', 'NULL', 'OUTER'\r
-               ]\r
-       }\r
-       ,'OPERATORS' :[\r
-               '+', '-', '*', '/', '%', '=', '&' ,'|', '^', '>', '<', '>=', '<=', '<>', '!=', '!<', '!>', 'ALL', 'AND', 'ANY', 'BETWEEN', 'EXISTS', 'IN', 'LIKE', 'NOT', 'OR', '~'\r
-       ]\r
-       ,'DELIMITERS' :[\r
-               '(', ')', '[', ']', '{', '}'\r
-       ]\r
-       ,'REGEXPS' : {\r
-               // highlight all variables (@...)\r
-               'variables' : {\r
-                       'search' : '()(\\@\\w+)()'\r
-                       ,'class' : 'variables'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before' // before or after\r
-               }\r
-       }\r
-       ,'STYLES' : {\r
-               'COMMENTS': 'color: #008000;'\r
-               ,'QUOTESMARKS': 'color: #FF0000;'\r
-               ,'KEYWORDS' : {\r
-                       'reserved' : 'color: #808080;'\r
-                       ,'functions' : 'color: #FF00FF;'\r
-                       ,'statements' : 'color: #0000FF;'\r
-                       }\r
-               ,'OPERATORS' : 'color: #808080;'\r
-               ,'DELIMITERS' : 'color: #FF8000;'\r
-               ,'REGEXPS' : {\r
-                       'variables' : 'color: #E0BD54;'\r
-               }               \r
-       }\r
-};\r
-\r
-                \r
diff --git a/project/static/js/reg_syntax/vb.js b/project/static/js/reg_syntax/vb.js
deleted file mode 100755 (executable)
index 73d58fc..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-editAreaLoader.load_syntax["vb"] = {\r
-       'COMMENT_SINGLE' : {1 : "'"}\r
-       ,'COMMENT_MULTI' : { }\r
-       ,'QUOTEMARKS' : {1: '"'}\r
-       ,'KEYWORD_CASE_SENSITIVE' : false\r
-       ,'KEYWORDS' : {\r
-               'statements' : [\r
-               'if','then','for','each','while','do','loop',\r
-            'else','elseif','select','case','end select',\r
-            'until','next','step','to','in','end if'\r
-               ]\r
-               ,'keywords' : [\r
-            'empty','isempty','nothing','null','isnull','true','false',\r
-            'set','call',\r
-            'sub','end sub','function','end function','exit','exit function',\r
-            'dim','Mod','In','private','public','shared','const'\r
-        ]\r
-\r
-               ,'functions' : [\r
-                       'CDate','Date','DateAdd','DateDiff','DatePart','DateSerial','DateValue','Day','FormatDateTime',\r
-            'Hour','IsDate','Minute','Month',\r
-            'MonthName','Now','Second','Time','Timer','TimeSerial','TimeValue','Weekday','WeekdayName ','Year',\r
-            'Asc','CBool','CByte','CCur','CDate','CDbl','Chr','CInt','CLng','CSng','CStr','Hex','Oct','FormatCurrency',\r
-            'FormatDateTime','FormatNumber','FormatPercent','Abs','Atn','Cos','Exp','Hex','Int','Fix','Log','Oct',\r
-            'Rnd','Sgn','Sin','Sqr','Tan',\r
-            'Array','Filter','IsArray','Join','LBound','Split','UBound',\r
-            'InStr','InStrRev','LCase','Left','Len','LTrim','RTrim','Trim','Mid','Replace','Right','Space','StrComp',\r
-            'String','StrReverse','UCase',\r
-            'CreateObject','Eval','GetLocale','GetObject','GetRef','InputBox','IsEmpty','IsNull','IsNumeric',\r
-            'IsObject','LoadPicture','MsgBox','RGB','Round','ScriptEngine','ScriptEngineBuildVersion','ScriptEngineMajorVersion',\r
-            'ScriptEngineMinorVersion','SetLocale','TypeName','VarType'\r
-               ]\r
-       }\r
-       ,'OPERATORS' :[\r
-               '+', '-', '/', '*', '=', '<', '>', '!', '&'\r
-       ]\r
-       ,'DELIMITERS' :[\r
-               '(', ')', '[', ']', '{', '}'\r
-       ]\r
-       ,'STYLES' : {\r
-               'COMMENTS': 'color: #99CC00;'\r
-               ,'QUOTESMARKS': 'color: #333399;'\r
-               ,'KEYWORDS' : {\r
-                       'keywords' : 'color: #3366FF;'\r
-                       ,'functions' : 'color: #0000FF;'\r
-                       ,'statements' : 'color: #3366FF;'\r
-                       }\r
-               ,'OPERATORS' : 'color: #FF0000;'\r
-               ,'DELIMITERS' : 'color: #0000FF;'\r
-\r
-       }\r
-};\r
diff --git a/project/static/js/reg_syntax/xml.js b/project/static/js/reg_syntax/xml.js
deleted file mode 100755 (executable)
index f8618f2..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*\r
-* last update: 2006-08-24\r
-*/\r
-\r
-editAreaLoader.load_syntax["xml"] = {\r
-       'COMMENT_SINGLE' : {}\r
-       ,'COMMENT_MULTI' : {'<!--' : '-->'}\r
-       ,'QUOTEMARKS' : {1: "'", 2: '"'}\r
-       ,'KEYWORD_CASE_SENSITIVE' : false\r
-       ,'KEYWORDS' : {\r
-       }\r
-       ,'OPERATORS' :[\r
-       ]\r
-       ,'DELIMITERS' :[\r
-       ]\r
-       ,'REGEXPS' : {\r
-               'xml' : {\r
-                       'search' : '()(<\\?[^>]*?\\?>)()'\r
-                       ,'class' : 'xml'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before' // before or after\r
-               }\r
-               ,'cdatas' : {\r
-                       'search' : '()(<!\\[CDATA\\[.*?\\]\\]>)()'\r
-                       ,'class' : 'cdata'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before' // before or after\r
-               }\r
-               ,'tags' : {\r
-                       'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'\r
-                       ,'class' : 'tags'\r
-                       ,'modifiers' : 'gi'\r
-                       ,'execute' : 'before' // before or after\r
-               }\r
-               ,'attributes' : {\r
-                       'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'\r
-                       ,'class' : 'attributes'\r
-                       ,'modifiers' : 'g'\r
-                       ,'execute' : 'before' // before or after\r
-               }\r
-       }\r
-       ,'STYLES' : {\r
-               'COMMENTS': 'color: #AAAAAA;'\r
-               ,'QUOTESMARKS': 'color: #6381F8;'\r
-               ,'KEYWORDS' : {\r
-                       }\r
-               ,'OPERATORS' : 'color: #E775F0;'\r
-               ,'DELIMITERS' : ''\r
-               ,'REGEXPS' : {\r
-                       'attributes': 'color: #B1AC41;'\r
-                       ,'tags': 'color: #E62253;'\r
-                       ,'xml': 'color: #8DCFB5;'\r
-                       ,'cdata': 'color: #50B020;'\r
-               }       \r
-       }               \r
-};\r
diff --git a/project/static/js/regexp.js b/project/static/js/regexp.js
deleted file mode 100755 (executable)
index 907063a..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-       /*EditArea.prototype.comment_or_quotes= function(v0, v1, v2, v3, v4,v5,v6,v7,v8,v9, v10){\r
-               new_class="quotes";\r
-               if(v6 && v6 != undefined && v6!="")\r
-                       new_class="comments";\r
-               return "µ__"+ new_class +"__µ"+v0+"µ_END_µ";\r
-\r
-       };*/\r
-       \r
-/*     EditArea.prototype.htmlTag= function(v0, v1, v2, v3, v4,v5,v6,v7,v8,v9, v10){\r
-               res="<span class=htmlTag>"+v2;\r
-               alert("v2: "+v2+" v3: "+v3);\r
-               tab=v3.split("=");\r
-               attributes="";\r
-               if(tab.length>1){\r
-                       attributes="<span class=attribute>"+tab[0]+"</span>=";\r
-                       for(i=1; i<tab.length-1; i++){\r
-                               cut=tab[i].lastIndexOf("&nbsp;");                               \r
-                               attributes+="<span class=attributeVal>"+tab[i].substr(0,cut)+"</span>";\r
-                               attributes+="<span class=attribute>"+tab[i].substr(cut)+"</span>=";\r
-                       }\r
-                       attributes+="<span class=attributeVal>"+tab[tab.length-1]+"</span>";\r
-               }               \r
-               res+=attributes+v5+"</span>";\r
-               return res;             \r
-       };*/\r
-       \r
-       // determine if the selected text if a comment or a quoted text\r
-       EditArea.prototype.comment_or_quote= function(){\r
-               var new_class="", close_tag="", sy, arg, i;\r
-               sy              = parent.editAreaLoader.syntax[editArea.current_code_lang];\r
-               arg             = EditArea.prototype.comment_or_quote.arguments[0];\r
-               \r
-               for( i in sy["quotes"] ){\r
-                       if(arg.indexOf(i)==0){\r
-                               new_class="quotesmarks";\r
-                               close_tag=sy["quotes"][i];\r
-                       }\r
-               }\r
-               if(new_class.length==0)\r
-               {\r
-                       for(var i in sy["comments"]){\r
-                               if( arg.indexOf(i)==0 ){\r
-                                       new_class="comments";\r
-                                       close_tag=sy["comments"][i];\r
-                               }\r
-                       }\r
-               }\r
-               // for single line comment the \n must not be included in the span tags\r
-               if(close_tag=="\n"){\r
-                       return "µ__"+ new_class +"__µ"+ arg.replace(/(\r?\n)?$/m, "µ_END_µ$1");\r
-               }else{\r
-                       // the closing tag must be set only if the comment or quotes is closed \r
-                       reg= new RegExp(parent.editAreaLoader.get_escaped_regexp(close_tag)+"$", "m");\r
-                       if( arg.search(reg)!=-1 )\r
-                               return "µ__"+ new_class +"__µ"+ arg +"µ_END_µ";\r
-                       else\r
-                               return "µ__"+ new_class +"__µ"+ arg;\r
-               }\r
-       };\r
-       \r
-/*\r
-       // apply special tags arround text to highlight\r
-       EditArea.prototype.custom_highlight= function(){\r
-               res= EditArea.prototype.custom_highlight.arguments[1]+"µ__"+ editArea.reg_exp_span_tag +"__µ" + EditArea.prototype.custom_highlight.arguments[2]+"µ_END_µ";\r
-               if(EditArea.prototype.custom_highlight.arguments.length>5)\r
-                       res+= EditArea.prototype.custom_highlight.arguments[ EditArea.prototype.custom_highlight.arguments.length-3 ];\r
-               return res;\r
-       };\r
-       */\r
-       \r
-       // return identication that allow to know if revalidating only the text line won't make the syntax go mad\r
-       EditArea.prototype.get_syntax_trace= function(text){\r
-               if(this.settings["syntax"].length>0 && parent.editAreaLoader.syntax[this.settings["syntax"]]["syntax_trace_regexp"])\r
-                       return text.replace(parent.editAreaLoader.syntax[this.settings["syntax"]]["syntax_trace_regexp"], "$3");\r
-       };\r
-       \r
-               \r
-       EditArea.prototype.colorize_text= function(text){\r
-               //text="<div id='result' class='area' style='position: relative; z-index: 4; height: 500px; overflow: scroll;border: solid black 1px;'> ";\r
-         /*            \r
-               if(this.isOpera){       \r
-                       // opera can't use pre element tabulation cause a tab=6 chars in the textarea and 8 chars in the pre \r
-                       text= this.replace_tab(text);\r
-               }*/\r
-               \r
-               text= " "+text; // for easier regExp\r
-               \r
-               /*if(this.do_html_tags)\r
-                       text= text.replace(/(<[a-z]+ [^>]*>)/gi, '[__htmlTag__]$1[_END_]');*/\r
-               if(this.settings["syntax"].length>0)\r
-                       text= this.apply_syntax(text, this.settings["syntax"]);\r
-\r
-               // remove the first space added\r
-               return text.substr(1).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/µ_END_µ/g,"</span>").replace(/µ__([a-zA-Z0-9]+)__µ/g,"<span class='$1'>");\r
-       };\r
-       \r
-       EditArea.prototype.apply_syntax= function(text, lang){\r
-               var sy;\r
-               this.current_code_lang=lang;\r
-       \r
-               if(!parent.editAreaLoader.syntax[lang])\r
-                       return text;\r
-                       \r
-               sy = parent.editAreaLoader.syntax[lang];\r
-               if(sy["custom_regexp"]['before']){\r
-                       for( var i in sy["custom_regexp"]['before']){\r
-                               var convert="$1µ__"+ sy["custom_regexp"]['before'][i]['class'] +"__µ$2µ_END_µ$3";\r
-                               text= text.replace(sy["custom_regexp"]['before'][i]['regexp'], convert);\r
-                       }\r
-               }\r
-               \r
-               if(sy["comment_or_quote_reg_exp"]){\r
-                       //setTimeout("_$('debug_area').value=editArea.comment_or_quote_reg_exp;", 500);\r
-                       text= text.replace(sy["comment_or_quote_reg_exp"], this.comment_or_quote);\r
-               }\r
-               \r
-               if(sy["keywords_reg_exp"]){\r
-                       for(var i in sy["keywords_reg_exp"]){   \r
-                               text= text.replace(sy["keywords_reg_exp"][i], 'µ__'+i+'__µ$2µ_END_µ');\r
-                       }                       \r
-               }\r
-               \r
-               if(sy["delimiters_reg_exp"]){\r
-                       text= text.replace(sy["delimiters_reg_exp"], 'µ__delimiters__µ$1µ_END_µ');\r
-               }               \r
-               \r
-               if(sy["operators_reg_exp"]){\r
-                       text= text.replace(sy["operators_reg_exp"], 'µ__operators__µ$1µ_END_µ');\r
-               }\r
-               \r
-               if(sy["custom_regexp"]['after']){\r
-                       for( var i in sy["custom_regexp"]['after']){\r
-                               var convert="$1µ__"+ sy["custom_regexp"]['after'][i]['class'] +"__µ$2µ_END_µ$3";\r
-                               text= text.replace(sy["custom_regexp"]['after'][i]['regexp'], convert);                 \r
-                       }\r
-               }\r
-                       \r
-               return text;\r
-       };\r
diff --git a/project/static/js/resize_area.js b/project/static/js/resize_area.js
deleted file mode 100755 (executable)
index 191e8ce..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-       \r
-       EditAreaLoader.prototype.start_resize_area= function(){\r
-               var d=document,a,div,width,height,father;\r
-               \r
-               d.onmouseup= editAreaLoader.end_resize_area;\r
-               d.onmousemove= editAreaLoader.resize_area;\r
-               editAreaLoader.toggle(editAreaLoader.resize["id"]);             \r
-               \r
-               a       = editAreas[editAreaLoader.resize["id"]]["textarea"];\r
-               div     = d.getElementById("edit_area_resize");\r
-               if(!div){\r
-                       div= d.createElement("div");\r
-                       div.id="edit_area_resize";\r
-                       div.style.border="dashed #888888 1px";\r
-               }\r
-               width   = a.offsetWidth -2;\r
-               height  = a.offsetHeight -2;\r
-               \r
-               div.style.display       = "block";\r
-               div.style.width         = width+"px";\r
-               div.style.height        = height+"px";\r
-               father= a.parentNode;\r
-               father.insertBefore(div, a);\r
-               \r
-               a.style.display="none";\r
-                               \r
-               editAreaLoader.resize["start_top"]= calculeOffsetTop(div);\r
-               editAreaLoader.resize["start_left"]= calculeOffsetLeft(div);            \r
-       };\r
-       \r
-       EditAreaLoader.prototype.end_resize_area= function(e){\r
-               var d=document,div,a,width,height;\r
-               \r
-               d.onmouseup="";\r
-               d.onmousemove="";               \r
-               \r
-               div             = d.getElementById("edit_area_resize");         \r
-               a= editAreas[editAreaLoader.resize["id"]]["textarea"];\r
-               width   = Math.max(editAreas[editAreaLoader.resize["id"]]["settings"]["min_width"], div.offsetWidth-4);\r
-               height  = Math.max(editAreas[editAreaLoader.resize["id"]]["settings"]["min_height"], div.offsetHeight-4);\r
-               if(editAreaLoader.isIE==6){\r
-                       width-=2;\r
-                       height-=2;      \r
-               }\r
-               a.style.width           = width+"px";\r
-               a.style.height          = height+"px";\r
-               div.style.display       = "none";\r
-               a.style.display         = "inline";\r
-               a.selectionStart        = editAreaLoader.resize["selectionStart"];\r
-               a.selectionEnd          = editAreaLoader.resize["selectionEnd"];\r
-               editAreaLoader.toggle(editAreaLoader.resize["id"]);\r
-               \r
-               return false;\r
-       };\r
-       \r
-       EditAreaLoader.prototype.resize_area= function(e){              \r
-               var allow,newHeight,newWidth;\r
-               allow   = editAreas[editAreaLoader.resize["id"]]["settings"]["allow_resize"];\r
-               if(allow=="both" || allow=="y")\r
-               {\r
-                       newHeight       = Math.max(20, getMouseY(e)- editAreaLoader.resize["start_top"]);\r
-                       document.getElementById("edit_area_resize").style.height= newHeight+"px";\r
-               }\r
-               if(allow=="both" || allow=="x")\r
-               {\r
-                       newWidth= Math.max(20, getMouseX(e)- editAreaLoader.resize["start_left"]);\r
-                       document.getElementById("edit_area_resize").style.width= newWidth+"px";\r
-               }\r
-               \r
-               return false;\r
-       };\r
-       \r
-       editAreaLoader.waiting_loading["resize_area.js"]= "loaded";\r
diff --git a/project/static/js/search_replace.js b/project/static/js/search_replace.js
deleted file mode 100755 (executable)
index bd266b3..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-       EditArea.prototype.show_search = function(){\r
-               if(_$("area_search_replace").style.visibility=="visible"){\r
-                       this.hidden_search();\r
-               }else{\r
-                       this.open_inline_popup("area_search_replace");\r
-                       var text= this.area_get_selection();\r
-                       var search= text.split("\n")[0];\r
-                       _$("area_search").value= search;\r
-                       _$("area_search").focus();\r
-               }\r
-       };\r
-       \r
-       EditArea.prototype.hidden_search= function(){\r
-               /*_$("area_search_replace").style.visibility="hidden";\r
-               this.textarea.focus();\r
-               var icon= _$("search");\r
-               setAttribute(icon, "class", getAttribute(icon, "class").replace(/ selected/g, "") );*/\r
-               this.close_inline_popup("area_search_replace");\r
-       };\r
-       \r
-       EditArea.prototype.area_search= function(mode){\r
-               \r
-               if(!mode)\r
-                       mode="search";\r
-               _$("area_search_msg").innerHTML="";             \r
-               var search=_$("area_search").value;             \r
-               \r
-               this.textarea.focus();          \r
-               this.textarea.textareaFocused=true;\r
-               \r
-               var infos= this.get_selection_infos();  \r
-               var start= infos["selectionStart"];\r
-               var pos=-1;\r
-               var pos_begin=-1;\r
-               var length=search.length;\r
-               \r
-               if(_$("area_search_replace").style.visibility!="visible"){\r
-                       this.show_search();\r
-                       return;\r
-               }\r
-               if(search.length==0){\r
-                       _$("area_search_msg").innerHTML=this.get_translation("search_field_empty");\r
-                       return;\r
-               }\r
-               // advance to the next occurence if no text selected\r
-               if(mode!="replace" ){\r
-                       if(_$("area_search_reg_exp").checked)\r
-                               start++;\r
-                       else\r
-                               start+= search.length;\r
-               }\r
-               \r
-               //search\r
-               if(_$("area_search_reg_exp").checked){\r
-                       // regexp search\r
-                       var opt="m";\r
-                       if(!_$("area_search_match_case").checked)\r
-                               opt+="i";\r
-                       var reg= new RegExp(search, opt);\r
-                       pos= infos["full_text"].substr(start).search(reg);\r
-                       pos_begin= infos["full_text"].search(reg);\r
-                       if(pos!=-1){\r
-                               pos+=start;\r
-                               length=infos["full_text"].substr(start).match(reg)[0].length;\r
-                       }else if(pos_begin!=-1){\r
-                               length=infos["full_text"].match(reg)[0].length;\r
-                       }\r
-               }else{\r
-                       if(_$("area_search_match_case").checked){\r
-                               pos= infos["full_text"].indexOf(search, start); \r
-                               pos_begin= infos["full_text"].indexOf(search); \r
-                       }else{\r
-                               pos= infos["full_text"].toLowerCase().indexOf(search.toLowerCase(), start); \r
-                               pos_begin= infos["full_text"].toLowerCase().indexOf(search.toLowerCase()); \r
-                       }               \r
-               }\r
-               \r
-               // interpret result\r
-               if(pos==-1 && pos_begin==-1){\r
-                       _$("area_search_msg").innerHTML="<strong>"+search+"</strong> "+this.get_translation("not_found");\r
-                       return;\r
-               }else if(pos==-1 && pos_begin != -1){\r
-                       begin= pos_begin;\r
-                       _$("area_search_msg").innerHTML=this.get_translation("restart_search_at_begin");\r
-               }else\r
-                       begin= pos;\r
-               \r
-               //_$("area_search_msg").innerHTML+="<strong>"+search+"</strong> found at "+begin+" strat at "+start+" pos "+pos+" curs"+ infos["indexOfCursor"]+".";\r
-               if(mode=="replace" && pos==infos["indexOfCursor"]){\r
-                       var replace= _$("area_replace").value;\r
-                       var new_text="";                        \r
-                       if(_$("area_search_reg_exp").checked){\r
-                               var opt="m";\r
-                               if(!_$("area_search_match_case").checked)\r
-                                       opt+="i";\r
-                               var reg= new RegExp(search, opt);\r
-                               new_text= infos["full_text"].substr(0, begin) + infos["full_text"].substr(start).replace(reg, replace);\r
-                       }else{\r
-                               new_text= infos["full_text"].substr(0, begin) + replace + infos["full_text"].substr(begin + length);\r
-                       }\r
-                       this.textarea.value=new_text;\r
-                       this.area_select(begin, length);\r
-                       this.area_search();\r
-               }else\r
-                       this.area_select(begin, length);\r
-       };\r
-       \r
-       \r
-       \r
-       \r
-       EditArea.prototype.area_replace= function(){            \r
-               this.area_search("replace");\r
-       };\r
-       \r
-       EditArea.prototype.area_replace_all= function(){\r
-       /*      this.area_select(0, 0);\r
-               _$("area_search_msg").innerHTML="";\r
-               while(_$("area_search_msg").innerHTML==""){\r
-                       this.area_replace();\r
-               }*/\r
-       \r
-               var base_text= this.textarea.value;\r
-               var search= _$("area_search").value;            \r
-               var replace= _$("area_replace").value;\r
-               if(search.length==0){\r
-                       _$("area_search_msg").innerHTML=this.get_translation("search_field_empty");\r
-                       return ;\r
-               }\r
-               \r
-               var new_text="";\r
-               var nb_change=0;\r
-               if(_$("area_search_reg_exp").checked){\r
-                       // regExp\r
-                       var opt="mg";\r
-                       if(!_$("area_search_match_case").checked)\r
-                               opt+="i";\r
-                       var reg= new RegExp(search, opt);\r
-                       nb_change= infos["full_text"].match(reg).length;\r
-                       new_text= infos["full_text"].replace(reg, replace);\r
-                       \r
-               }else{\r
-                       \r
-                       if(_$("area_search_match_case").checked){\r
-                               var tmp_tab=base_text.split(search);\r
-                               nb_change= tmp_tab.length -1 ;\r
-                               new_text= tmp_tab.join(replace);\r
-                       }else{\r
-                               // case insensitive\r
-                               var lower_value=base_text.toLowerCase();\r
-                               var lower_search=search.toLowerCase();\r
-                               \r
-                               var start=0;\r
-                               var pos= lower_value.indexOf(lower_search);                             \r
-                               while(pos!=-1){\r
-                                       nb_change++;\r
-                                       new_text+= this.textarea.value.substring(start , pos)+replace;\r
-                                       start=pos+ search.length;\r
-                                       pos= lower_value.indexOf(lower_search, pos+1);\r
-                               }\r
-                               new_text+= this.textarea.value.substring(start);                                \r
-                       }\r
-               }                       \r
-               if(new_text==base_text){\r
-                       _$("area_search_msg").innerHTML="<strong>"+search+"</strong> "+this.get_translation("not_found");\r
-               }else{\r
-                       this.textarea.value= new_text;\r
-                       _$("area_search_msg").innerHTML="<strong>"+nb_change+"</strong> "+this.get_translation("occurrence_replaced");\r
-                       // firefox and opera doesn't manage with the focus if it's done directly\r
-                       //editArea.textarea.focus();editArea.textarea.textareaFocused=true;\r
-                       setTimeout("editArea.textarea.focus();editArea.textarea.textareaFocused=true;", 100);\r
-               }\r
-               \r
-               \r
-       };\r
diff --git a/project/static/js/template.html b/project/static/js/template.html
deleted file mode 100755 (executable)
index 738ffce..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >\r
-<head>\r
-       <title>EditArea</title>\r
-       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
-       <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>\r
-       [__CSSRULES__]\r
-       [__JSCODE__]\r
-</head>\r
-<body>\r
-       <div id='editor'>\r
-               <div class='area_toolbar' id='toolbar_1'>[__TOOLBAR__]</div>\r
-               <div class='area_toolbar' id='tab_browsing_area'><ul id='tab_browsing_list' class='menu'> <li> </li> </ul></div>\r
-               <div id='result'>\r
-                       <div id='no_file_selected'></div>\r
-                       <div id='container'>\r
-                               <div id='cursor_pos' class='edit_area_cursor'>&nbsp;</div>\r
-                               <div id='end_bracket' class='edit_area_cursor'>&nbsp;</div>\r
-                               <div id='selection_field'></div>\r
-                               <div id='line_number' selec='none'></div>\r
-                               <div id='content_highlight'></div>\r
-                               <div id='test_font_size'></div>\r
-                               <div id='selection_field_text'></div>\r
-                               <textarea id='textarea' wrap='off' onchange='editArea.execCommand("onchange");' onfocus='javascript:editArea.textareaFocused=true;' onblur='javascript:editArea.textareaFocused=false;'>\r
-                               </textarea>\r
-                               \r
-                       </div>\r
-               </div>\r
-               <div class='area_toolbar' id='toolbar_2'>\r
-                       <table class='statusbar' cellspacing='0' cellpadding='0'>\r
-                               <tr>\r
-                                       <td class='total' selec='none'>{$position}:</td>\r
-                                       <td class='infos' selec='none'>\r
-                                               {$line_abbr} <span  id='linePos'>0</span>, {$char_abbr} <span id='currPos'>0</span>\r
-                                       </td>\r
-                                       <td class='total' selec='none'>{$total}:</td>\r
-                                       <td class='infos' selec='none'>\r
-                                               {$line_abbr} <span id='nbLine'>0</span>, {$char_abbr} <span id='nbChar'>0</span>\r
-                                       </td>\r
-                                       <td class='resize'>\r
-                                               <span id='resize_area'><img src='[__BASEURL__]images/statusbar_resize.gif' alt='resize' selec='none'></span>\r
-                                       </td>\r
-                               </tr>\r
-                       </table>\r
-               </div>\r
-       </div>\r
-       <div id='processing'>\r
-               <div id='processing_text'>\r
-                       {$processing}\r
-               </div>\r
-       </div>\r
-\r
-       <div id='area_search_replace' class='editarea_popup'>\r
-               <table cellspacing='2' cellpadding='0' style='width: 100%'>\r
-                       <tr>\r
-                               <td selec='none'>{$search}</td>\r
-                               <td><input type='text' id='area_search' /></td>\r
-                               <td id='close_area_search_replace'>\r
-                                       <a onclick='Javascript:editArea.execCommand("hidden_search")'><img selec='none' src='[__BASEURL__]images/close.gif' alt='{$close_popup}' title='{$close_popup}' /></a><br />\r
-                       </tr><tr>\r
-                               <td selec='none'>{$replace}</td>\r
-                               <td><input type='text' id='area_replace' /></td>\r
-                               <td><img id='move_area_search_replace' onmousedown='return parent.start_move_element(event,"area_search_replace", parent.frames["frame_"+editArea.id]);'  src='[__BASEURL__]images/move.gif' alt='{$move_popup}' title='{$move_popup}' /></td>\r
-                       </tr>\r
-               </table>\r
-               <div class='button'>\r
-                       <input type='checkbox' id='area_search_match_case' /><label for='area_search_match_case' selec='none'>{$match_case}</label>\r
-                       <input type='checkbox' id='area_search_reg_exp' /><label for='area_search_reg_exp' selec='none'>{$reg_exp}</label>\r
-                       <br />\r
-                       <a onclick='Javascript:editArea.execCommand("area_search")' selec='none'>{$find_next}</a>\r
-                       <a onclick='Javascript:editArea.execCommand("area_replace")' selec='none'>{$replace}</a>\r
-                       <a onclick='Javascript:editArea.execCommand("area_replace_all")' selec='none'>{$replace_all}</a><br />\r
-               </div>\r
-               <div id='area_search_msg' selec='none'></div>\r
-       </div>\r
-       <div id='edit_area_help' class='editarea_popup'>\r
-               <div class='close_popup'>\r
-                       <a onclick='Javascript:editArea.execCommand("close_all_inline_popup")'><img src='[__BASEURL__]images/close.gif' alt='{$close_popup}' title='{$close_popup}' /></a>\r
-               </div>\r
-               <div><h2>Editarea [__EA_VERSION__]</h2><br />\r
-                       <h3>{$shortcuts}:</h3>\r
-                               {$tab}: {$add_tab}<br />\r
-                               {$shift}+{$tab}: {$remove_tab}<br />\r
-                               {$ctrl}+f: {$search_command}<br />\r
-                               {$ctrl}+r: {$replace_command}<br />\r
-                               {$ctrl}+h: {$highlight}<br />\r
-                               {$ctrl}+g: {$go_to_line}<br />\r
-                               {$ctrl}+z: {$undo}<br />\r
-                               {$ctrl}+y: {$redo}<br />\r
-                               {$ctrl}+e: {$help}<br />\r
-                               {$ctrl}+q, {$esc}: {$close_popup}<br />\r
-                               {$accesskey} E: {$toggle}<br />\r
-                       <br />\r
-                       <em>{$about_notice}</em>\r
-                       <br /><div class='copyright'>&copy; Christophe Dolivet 2007-2009</div>\r
-               </div>\r
-       </div>\r
-</body>\r
-</html>\r
index 7757e12..b408cc5 100644 (file)
@@ -3,8 +3,9 @@
 {% block extrahead %}
     <script src="/static/js/jquery.fieldselection.js" type="text/javascript" charset="utf-8"></script>
     <script src="/static/js/jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
 {% block extrahead %}
     <script src="/static/js/jquery.fieldselection.js" type="text/javascript" charset="utf-8"></script>
     <script src="/static/js/jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
-    <script src="/static/js/edit_area_full.js" type="text/javascript" charset="utf-8"></script>
-    <script type="text/javascript" charset="utf-8">        
+    <script src="/static/js/codemirror/codemirror.js" type="text/javascript" charset="utf-8"></script>
+    <!-- <script src="/static/js/edit_area_full.js" type="text/javascript" charset="utf-8"></script>-->
+    <script type="text/javascript" charset="utf-8">
         function addEditorButton(label, fn) {
             $('<button type="button">' + label + '</button>').click(function(event) {
                 var text = $('#id_text').getSelection().text;
         function addEditorButton(label, fn) {
             $('<button type="button">' + label + '</button>').click(function(event) {
                 var text = $('#id_text').getSelection().text;
                 });
             });
         
                 });
             });
         
-            editAreaLoader.init({
-                       id: "id_text",
-                       start_highlight: true,
-                       allow_toggle: false,
-                       language: "pl",
-                       syntax: "xml",
-
-                // show_line_colors: true
-               });
+            var editor = CodeMirror.fromTextArea("id_text", {
+                parserfile: 'parsexml.js',
+                path: "/static/js/codemirror/",
+                stylesheet: "/static/css/xmlcolors.css",
+                parserConfig: {useHTMLKludges: false}
+            });
                
             addEditorButton('utwór', function(text) { return '<utwor>' + text + '</utwor>'; });
             addEditorButton('akap', function(text) { return '<akap>' + text + '</akap>'; });
                
             addEditorButton('utwór', function(text) { return '<utwor>' + text + '</utwor>'; });
             addEditorButton('akap', function(text) { return '<akap>' + text + '</akap>'; });
@@ -47,8 +45,8 @@
         <p>Aby zobaczyć obrazki wybierz folder z obrazkami powyżej.</p>
     </div>
     <form action="." method="post" accept-charset="utf-8">
         <p>Aby zobaczyć obrazki wybierz folder z obrazkami powyżej.</p>
     </div>
     <form action="." method="post" accept-charset="utf-8">
-        <div id="buttons"></div>
-               <textarea id="id_text" name="text" style="height: 500px; width: 500px;">{{ form.text.field.initial }}</textarea>
+        {# <div id="buttons"></div> #}
+               <textarea id="id_text" name="text" style="width:50%; height:480px">{{ form.text.field.initial }}</textarea>
         {{ form.user.errors }}
         <p>Użytkownik: {{ form.user }}</p> 
         {{ form.commit_message.errors }}
         {{ form.user.errors }}
         <p>Użytkownik: {{ form.user }}</p> 
         {{ form.commit_message.errors }}