tinyMCE.init({
	language : "ko",
	editor_selector : "mceEditor2",
	mode : "textareas",
	theme : "simple"
});

tinyMCE.init({
	language : "ko",
	editor_selector : "mceEditor",
	mode : "textareas",
	theme : "advanced",
	plugins : "style,table,advhr,advimage,advlink,emotions,preview,searchreplace,contextmenu,paste,fullscreen,noneditable,visualchars,nonbreaking",
	theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,forecolor,backcolor,separator,justifyleft,justifycenter,justifyright,justifyfull,separator",
	theme_advanced_buttons1_add : "fontselect,fontsizeselect",
	theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,separator",
	theme_advanced_buttons2 : "bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,cleanup,code",
	theme_advanced_buttons2_add : "separator,image",
	theme_advanced_buttons3 : "",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_path_location : "bottom",
	content_css : "",
	extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
	external_link_list_url : "/include/TINYMCE/lists/example_link_list.js",
	template_external_list_url : "/include/TINYMCE/lists/example_template_list.js",
	file_browser_callback : "fileBrowserCallBack",
	theme_advanced_resize_horizontal : false,
	theme_advanced_resizing : true,
	nonbreaking_force_tab : true,
	apply_source_formatting : true,
	theme_advanced_path : false,
	relative_urls : false,
	remove_script_host : false,
	convert_urls : false
});

var fileBrowserReturnURL = "";
var fileBrowserWin;
var fileBrowserFieldName;

function fileBrowserCallBack(field_name, url, type, win)
{
	popup_upload('', field_name, '');
	fileBrowserWin = win;
	fileBrowserFieldName = field_name;

	// This is where you insert your custom filebrowser logic
	//alert("Example of filebrowser callback: field_name: " + field_name + ", url: " + url + ", type: " + type);

	// Insert new URL, this would normaly be done in a popup
	//win.document.forms[0].elements[field_name].value = "someurl.htm";
}

function fileBrowserReturn(url)
{

	fileBrowserWin.document.forms[0].elements[fileBrowserFieldName].value = url;
}

