// Default WYSIWYG-Editor
tinyMCE.init({
  mode : "specific_textareas",
  editor_selector : "editorStyle",
	theme : "advanced",
  plugins: "contextmenu,dzcp,media",
  language : lng,
	theme_advanced_buttons1 : "bold,italic,underline,separator,justifyleft,justifycenter,justifyright, justifyfull,separator,bullist,numlist,separator,link,unlink,separator,pastephp,separator,media,image,forecolor,backcolor,separator,smileys,clipme",
	theme_advanced_buttons2 : "",
 	theme_advanced_buttons3 : "",
 	theme_advanced_toolbar_location : "top",
 	theme_advanced_toolbar_align : "left",
  theme_advanced_statusbar_location : "bottom",
  theme_advanced_resizing : true,
  theme_advanced_resize_horizontal : false,  
  theme_advanced_resizing_use_cookie : false,
  force_br_newlines : true,
  accessibility_warnings : false,
  entity_encoding : "raw",
  verify_html : false,
  button_tile_map : true
});
// Mini WYSIWYG-Editor
tinyMCE.init({
  mode : "specific_textareas",
  editor_selector : "editorStyleMini",
	theme : "advanced",
  plugins: "contextmenu,dzcp",
  language : lng,
	theme_advanced_buttons1 : "bold,italic,underline,separator,link,unlink,separator,image",
	theme_advanced_buttons2 : "",
 	theme_advanced_buttons3 : "",
 	theme_advanced_toolbar_location : "top",
  theme_advanced_resizing : true,
  theme_advanced_resize_horizontal : false,
  theme_advanced_resizing_use_cookie : false,
  accessibility_warnings : false,
  button_tile_map : true
});
//Newsletter WYSIWYG-Editor
tinyMCE.init({
  mode : "specific_textareas",
  editor_selector : "editorStyleNewsletter",
	theme : "advanced",
  plugins: "contextmenu,dzcp",
  language : lng,
	theme_advanced_buttons1 : "bold,italic,underline,separator,justifyleft,justifycenter,justifyright, justifyfull,separator,bullist,numlist,separator,link,unlink,separator,image,forecolor,backcolor",
	theme_advanced_buttons2 : "",
 	theme_advanced_buttons3 : "",
 	theme_advanced_toolbar_location : "top",
 	theme_advanced_toolbar_align : "left",
  theme_advanced_statusbar_location : "bottom",
  theme_advanced_resizing : true,
  theme_advanced_resize_horizontal : false,
  theme_advanced_resizing_use_cookie : false,
  accessibility_warnings : false,
  button_tile_map : true
});
//TUTORIAL-SECTION by DZCP-Zone.de - START
tinyMCE.init({
  mode : "specific_textareas",
  editor_selector : "editorStyleTutorialsMini",
	theme : "advanced",
  plugins: "contextmenu,dzcp",
  language : lng,
	theme_advanced_buttons1 : "bold,italic,underline,separator,justifyleft,justifycenter,justifyright, justifyfull,separator,bullist,numlist,separator,link,unlink,separator,forecolor,backcolor",
	theme_advanced_buttons2 : "",
 	theme_advanced_buttons3 : "",
 	theme_advanced_toolbar_location : "top",
 	theme_advanced_toolbar_align : "center",
  theme_advanced_statusbar_location : "bottom",
  theme_advanced_resizing : false,
  theme_advanced_resize_horizontal : false,
  theme_advanced_resizing_use_cookie : false,
  accessibility_warnings : false,
  button_tile_map : true
});
tinyMCE.init({
  mode : "specific_textareas",
  editor_selector : "editorStyleTutorials",
  theme : "advanced",
  plugins: "contextmenu,dzcp,paste,flash,table,fullscreen,media",
  language : lng,
  theme_advanced_buttons1 : "bold,italic,underline,separator,justifyleft,justifycenter,justifyright, justifyfull,separator,bullist,numlist,separator,link,unlink,separator,pastephp,separator,forecolor,backcolor,separator,smileys,flags,clipme",
  theme_advanced_buttons2 : "paste,pastetext,pasteword,separator,image,media,separator,tablecontrols,separator,dzcpuser",
  theme_advanced_buttons3 : "fontselect,fontsizeselect,separator,sub,sup,separator,outdent,indent,separator,fullscreen",
  extended_valid_elements : "img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
  theme_advanced_toolbar_location : "top",
  theme_advanced_toolbar_align : "left",
  theme_advanced_statusbar_location : "bottom",
  theme_advanced_resizing : true,
  theme_advanced_resize_horizontal : false,
  accessibility_warnings : false,
  button_tile_map : true,
  entity_encoding : "raw",
  verify_html : false,
  file_browser_callback : 'fileBrowserCallBack'
});
//Filebrowser Callback
function fileBrowserCallBack(field_name, url, type, win) 
{
  var connector = "../../filemanager/browser.php?Connector=connectors/php/connector.php?Type=/";
    
  tinyfck_field = field_name;
  tinyfck = win;
  downloadForm = false;
  
  window.open(connector, "tinyfck" + new Date().getTime(), "modal,width=670,height=400");
}
//TUTORIAL-SECTION by DZCP-Zone.de - END