tinyMCE.init({
	mode : "specific_textareas",
	editor_selector : "mce",
	theme : "advanced",
	plugins : "autolink,safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,lists",
        theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
        theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,|,forecolor,backcolor",
        theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,media,advhr,|,print,|,ltr,rtl",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
	content_css : "tiny_mce/css/example.css",
	language : "de",
	width : "600",
	height : "400",
	relative_urls : false,
	cleanup: false,
	file_browser_callback : MadFileBrowser,
	valid_elements : "*[*]"
});


tinyMCE.init({
	mode : "specific_textareas",
	editor_selector : "mceimg",
	theme : "advanced",
	language : "de",
	plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
	theme_advanced_buttons1 : "image,preview",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_statusbar_location : "bottom",
	theme_advanced_resizing : true,
	width : "600",
	height : "400",
	relative_urls : false,
	file_browser_callback : MadFileBrowser
});

function MadFileBrowser(field_name, url, type, win) {
  tinyMCE.activeEditor.windowManager.open({
      file : "mfm.php?field=" + field_name + "&url=" + url + "",
      title : 'File Manager',
      width : 640,
      height : 450,
      resizable : "no",
      inline : "yes",
      close_previous : "no"
  }, {
      window : win,
      input : field_name
  });
  return false;
}
