function loadFCKeditorAreas() {
    if(typeof(Prototype) == "undefined")
        return;

    var ids = new Array('rte', 'rte0', 'rte1', 'rte2', 'rte3', 'rte4');
    ids.each(function (id) {
            if ($(id) != null) {
                try {
                var textareaNode = $(id);
                var height = textareaNode.getAttribute('rows');
                var cols = textareaNode.getAttribute('cols');
                var toolbarset = textareaNode.getAttribute('toolbarset');
                var fullpage = textareaNode.getAttribute('fullpage');
                
                var oFCKeditor = new FCKeditor(id) ;
                if(fullpage) {
                    oFCKeditor.Config["FullPage"] = true;
                }
                oFCKeditor.BasePath = FCKeditorPath;
//    oFCKeditor.BaseHref = FCKeditorPath + '/../'
                var width = cols * 10;
                if(width >= 300) {
                    oFCKeditor.Width = width;
                }
                if(height > 0) {
                    oFCKeditor.Height = height * 40;
                }
                else {
                    oFCKeditor.Height = 400;
                }
                if(toolbarset) {
                    oFCKeditor.ToolbarSet = toolbarset;
                }
                else {
                    oFCKeditor.ToolbarSet = 'myweb2go';
                }
                oFCKeditor.ReplaceTextarea();
                }
                catch (e) {}
            }
        });
}

function tinyMCEinit() {
  try {
    tinyMCE.init({
      mode : "textareas",
	  theme : "simple",
	  editor_selector : "mceSimple",
	  editor_deselector : "norte"
	  });
    
    tinyMCE.init({
      mode : "textareas",
	  theme : "advanced",
	  editor_selector : "mceAdvanced",
	  editor_deselector : "norte"
	  });
  }
  catch (e) {
  }
}

if(typeof(Ajax) != "undefined") {
    Ajax.Responders.register({
          onComplete: function() {
                tinyMCEinit();
            }
        });
}
