tinyMCE.init({
        mode : "textareas",
 		theme : "advanced",
		editor_selector : "adv",
		plugins : "style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
	 
		theme_advanced_buttons1_add : "fontselect,fontsizeselect",
		theme_advanced_buttons2_add : "separator,insertdate,inserttime,separator,forecolor,backcolor,media",
		plugin_insertdate_dateFormat : "%d-%m-%Y",
	    plugin_insertdate_timeFormat : "%H:%M:%S",
		extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
		external_link_list_url : "example_link_list.js",
		external_image_list_url : "example_image_list.js",
		flash_external_list_url : "example_flash_list.js",
		media_external_list_url : "example_media_list.js",
		template_external_list_url : "example_template_list.js",
		file_browser_callback : "ajaxfilemanager",
		theme_advanced_resize_horizontal : false,
		theme_advanced_resizing : true,
		nonbreaking_force_tab : true,
	 
		content_css : "editor.css",
		theme_advanced_toolbar_align : "left",
		theme_advanced_path_location : "bottom",
		theme_advanced_toolbar_location : "top",
		apply_source_formatting : true
	});

	tinyMCE.init({
		mode : "textareas",
		theme : "advanced",
		content_css : "editor.css", 
		editor_selector : "minimce",	
		
		theme_advanced_buttons1 : "bold,italic,underline,forecolor,code",
		theme_advanced_buttons2 : "",
		theme_advanced_buttons3 : "",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left"
	});	
	
	tinyMCE.init({
		mode : "textareas",
		theme : "advanced",
		content_css : "editor.css", 
		editor_selector : "boxcomment",	
		plugins: "advlink,inlinepopups",
		theme_advanced_buttons1: "bold,italic,underline,separator,link,unlink",
		theme_advanced_buttons2: "",
		theme_advanced_buttons3: "",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left"	
		
	});	
	
	tinyMCE.init({
		mode : "textareas",
		theme : "advanced",
		content_css : "editor.css", 
		editor_selector : "mcecomment",	
		
		plugins: "contextmenu,advlink,paste,inlinepopups,insertresource",
		theme_advanced_buttons1: "removeformat,separator,undo,redo,separator,forecolor, backcolor,bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,indent, outdent,separator,link,unlink,separator,code",
		theme_advanced_buttons2: "",
		theme_advanced_buttons3: "",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left"	
		
	});	
	
	function ajaxfilemanager(field_name, url, type, win) {
		var ajaxfilemanagerurl = "../../../tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php";
		switch (type) {
			case "image":
				break;
			case "media":
				break;
			case "flash": 
				break;
			case "file":
				break;
			default:
				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;
	}
