function do_init_mce(element_id) {
  tinyMCE.init({
  mode : 'none',
        theme: 'advanced',
        plugins: 'advimage,table',
        theme_advanced_buttons1: "styleselect,formatselect,outdent,indent,separator,undo,redo",
        theme_advanced_buttons2: "justifyleft,justifycenter,justifyright,separator,bold,italic,separator,bullist,numlist,anchor,link,unlink,separator,sub,sup",
        theme_advanced_buttons3: "cleanup,help,code,separator,image,table,tablecontrols",
        theme_advanced_styles : "Small Text=small",
        valid_elements :
          '-p[class|align],'+
          '-ol[type|compact],'+
          '-ul[type|compact],'+
          '-li,'+
          'br,'+
          'img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align|style[float]],'+
          '-sup,'+
          '-sub,'+
          '-b,'+
          '-span[class],'+
          '-strong,'+
          '-table[border:0|cellspacing|cellpadding|width|height|class|align],'+
          'tr[class|rowspan|width|height|align|valign],'+
          'td[class|colspan|rowspan|width|height|align|valign],'+
          'th[class|colspan|rowspan|width|height|align|valign],'+
          'tbody,'+
          'thead,'+
          'tfoot,'+
          '#th[colspan|rowspan|width|height|align|valign|scope],'+
          '-h1,-h2,-h3,-h4,-h5,-h6,'+
          'a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur]'
  });
  
  setTimeout('tinyMCE.execCommand("mceAddControl", true, "'+element_id+'")',200);
};

//          'table[border:0|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],'+
//          '-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],'+
//         '#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],'+

function do_init_pageditor_mce(element_id) {
  tinyMCE.init({
  mode : 'none',
        theme: 'advanced',
        plugins: 'advimage,table',
        theme_advanced_buttons1: "styleselect,formatselect,outdent,indent,separator,undo,redo",
        theme_advanced_buttons2: "justifyleft,justifycenter,justifyright,separator,bold,italic,separator,bullist,numlist,anchor,link,unlink,separator,sub,sup",
        theme_advanced_buttons3: "cleanup,help,code,separator,image,table,tablecontrols",
        theme_advanced_styles : "Small Text=small",
				width: "640",
				height: "400",
        valid_elements :
          '-p[class|align],'+
          '-ol[type|compact],'+
          '-ul[type|compact],'+
          '-li,'+
          'br,'+
          'img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align|style[float]],'+
          '-sup,'+
          '-sub,'+
          '-b,'+
          '-strong,'+
          '-span[class],'+
          '-table[border:0|cellspacing|cellpadding|width|height|class|align],'+
          'tr[class|rowspan|width|height|align|valign],'+
          'td[class|colspan|rowspan|width|height|align|valign],'+
          'th[class|colspan|rowspan|width|height|align|valign],'+
          'tbody,'+
          'thead,'+
          'tfoot,'+
          '#th[colspan|rowspan|width|height|align|valign|scope],'+
          '-h1,-h2,-h3,-h4,-h5,-h6,'+
          'a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur]'
  });
  
  setTimeout('tinyMCE.execCommand("mceAddControl", true, "'+element_id+'")',200);
};
