//editor
tinyMCE.init({
	  mode : "textareas",
	  theme : "advanced",
	  editor_selector : "mceAdvanced",
		/*elements : "ajaxfilemanager",*/
    theme_advanced_toolbar_location : "top",
    language: "en",
		plugins : "table,advimage,advlink,contextmenu,paste,imagemanager,media,fullscreen,inlinepopups",
		content_css : urlroot+"css/style_tinymce.css",
		theme_advanced_buttons1 : "undo,redo,separator,bold,italic,underline,strikethrough,bullist,numlist,separator,outdent,indent,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,pastetext,pasteword,separator,image,media,separator,link,unlink,anchor,cleanup",
		theme_advanced_buttons2 : "flash,hr,removeformat,separator,charmap,separator,code,blockquote,tablecontrols,forecolor,backcolor,fontsizeselect",
		theme_advanced_buttons3 : "insertimage,fullscreen",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",				
		theme_advanced_resizing : true,
		theme_advanced_resize_horizontal : false,
		theme_advanced_path : false,
		theme_advanced_path_location : "bottom",
		relative_urls: false,
		convert_urls: false,
		accessibility_warnings : false,
		paste_auto_cleanup_on_paste : true,   
    media_strict: false,	    		
		/*
		extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed]",

		
		paste_use_dialog : false,

    paste_convert_headers_to_strong : false,
		paste_strip_class_attributes : "all",
		paste_remove_spans : true,
		paste_remove_styles : false,


		/*
		apply_source_formatting : true,
		cleanup : false,
*/

  /*  file_browser_callback : 'ajaxfilemanager',*/
	  plugin_preview_width : "500",
	  plugin_preview_height : "600",
    //force_br_newlines : true,
    forced_root_block : '', // Needed for 3.x
    entity_encoding : "raw"	  
    	
});
tinyMCE.init({
	  mode : "textareas",
	  theme : "advanced",
	  editor_selector : "mceSimple",

    theme_advanced_toolbar_location : "top",
    language: "en",
		plugins : "emotions",
		content_css : urlroot+"css/style_tinymce.css",
		theme_advanced_buttons1 : "bold,italic,underline,strikethrough,emotions",
		theme_advanced_buttons2 : "",
		theme_advanced_buttons3 : "",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",				
		theme_advanced_resizing : true,
		theme_advanced_resize_horizontal : false,
		theme_advanced_path : false,
		theme_advanced_path_location : "bottom",		
		extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed]",
		paste_use_dialog : true,
		paste_auto_cleanup_on_paste : true,
		paste_convert_headers_to_strong : false,
		paste_strip_class_attributes : "all",
		paste_remove_spans : true,
		paste_remove_styles : true,
		accessibility_warnings : false,
		relative_urls: false,
		convert_urls: false,
    force_br_newlines : true,
    forced_root_block : '', // Needed for 3.x
    entity_encoding : "raw",
		apply_source_formatting : true,
		cleanup : false    

		
    	
});

tinyMCE.init({
	  mode : "textareas",
	  theme : "advanced",
	  editor_selector : "mceClanN",
		/*elements : "ajaxfilemanager",*/
    theme_advanced_toolbar_location : "top",
    language: "en",
		plugins : "table,advimage,advlink,contextmenu,paste,imagemanager,media,fullscreen,inlinepopups",
		content_css : urlroot+"css/style_tinymce.css",
		theme_advanced_buttons1 : "undo,redo,separator,bold,italic,underline,strikethrough,bullist,numlist,separator,outdent,indent,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,pastetext,pasteword,separator,separator,link,unlink,anchor,cleanup",
		theme_advanced_buttons2 : "flash,hr,removeformat,separator,charmap,separator,code,blockquote,tablecontrols,forecolor,backcolor,fontsizeselect",
		theme_advanced_buttons3 : "fullscreen",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",				
		theme_advanced_resizing : true,
		theme_advanced_resize_horizontal : false,
		theme_advanced_path : false,
		theme_advanced_path_location : "bottom",
		relative_urls: false,
		convert_urls: false,
		accessibility_warnings : false,
		paste_auto_cleanup_on_paste : true,    		    		
		/*
		extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed]",

		
		paste_use_dialog : false,

    paste_convert_headers_to_strong : false,
		paste_strip_class_attributes : "all",
		paste_remove_spans : true,
		paste_remove_styles : false,


		/*
		apply_source_formatting : true,
		cleanup : false,
*/

  /*  file_browser_callback : 'ajaxfilemanager',*/
	  plugin_preview_width : "500",
	  plugin_preview_height : "600",
    //force_br_newlines : true,
    forced_root_block : '', // Needed for 3.x
    entity_encoding : "raw"	  
    	
});

tinyMCE.init({
	  mode : "textareas",
	  theme : "advanced",
	  editor_selector : "mceBlog",
		elements : "ajaxfilemanager",
    theme_advanced_toolbar_location : "top",
    language: "en",
		plugins : "table,advimage,advlink,contextmenu,paste,imagemanager,media",
		content_css : urlroot+"css/style_tinymce.css",
		theme_advanced_buttons1 : "undo,redo,separator,bold,italic,underline,strikethrough,bullist,numlist,separator,outdent,indent,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,pastetext,pasteword,separator,image,media,separator,link,unlink,anchor,cleanup",
		theme_advanced_buttons2 : "hr,removeformat,separator,charmap,separator,code,blockquote,forecolor,backcolor,fontsizeselect",
		theme_advanced_buttons3 : "",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",				
		theme_advanced_resizing : true,
		theme_advanced_resize_horizontal : false,
		theme_advanced_path : false,
		theme_advanced_path_location : "bottom",		
		extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed]",
		paste_use_dialog : false,
		paste_auto_cleanup_on_paste : true,
		paste_convert_headers_to_strong : false,
		paste_strip_class_attributes : "all",
		paste_remove_spans : true,
		paste_remove_styles : true,
		accessibility_warnings : false,
		relative_urls: false,
		convert_urls: false,
    /*file_browser_callback : 'ajaxfilemanager',*/
	  plugin_preview_width : "500",
	  plugin_preview_height : "600",
    force_br_newlines : true,
    forced_root_block : '', // Needed for 3.x
    entity_encoding : "raw"	
    /*  
		apply_source_formatting : true,
		
		cleanup : false
    */    	
});      

   
/*
		function ajaxfilemanager(field_name, url, type, win) {
			var ajaxfilemanagerurl = urlroot+"lib/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php";
			switch (type) {
				case "image":
					break;
				case "media":
					break;
				case "flash": 
					break;
				case "file":
					break;
				default:
					return false;
			}
            tinyMCE.activeEditor.windowManager.open({
                url:  urlroot+"lib/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php",
                width: 782,
                height: 440,
                inline : "yes",
                close_previous : "no"
            },{
                window : win,
                input : field_name
            });
            
            
/ *            return false;			
			var fileBrowserWindow = new Array();
			fileBrowserWindow["file"] = ajaxfilemanagerurl;
			fileBrowserWindow["title"] = "Ajax File Manager";
			fileBrowserWindow["width"] = "782";
			fileBrowserWindow["height"] = "440";
			fileBrowserWindow["close_previous"] = "no";
			tinyMCE.openWindow(fileBrowserWindow, {
			  window : win,
			  input : field_name,
			  resizable : "yes",
			  inline : "yes",
			  editor_id : tinyMCE.getWindowArg("editor_id")
			});
			
			return false;* /
		}
*/
