<? if ( !defined("_INCLUDED_GLOBAL") ) exit;		// [Security]Allow_url_fopen = On ?>

<? if ($G_SYS['WEBEDITOR'] == 'FCK') { $G_SYS['WEBEDITOR'] = 'TINYMCE'; } ?>

<? if ($G_SYS['WEBEDITOR'] == 'OPEN') { ?>
	<script language="JavaScript" src="<?= $nmpath ?>/addon/openwysiwyg/wysiwyg.js?v=<?= NM_VER ?>"></script>
<? } else if ($G_SYS['WEBEDITOR'] == 'TINYMCE') { ?>
	<!-- [2012-11-06] 웹에디터 업그레이드 <script language="JavaScript" src="<?= $nmpath ?>/addon/tinymce/tiny_mce_src.js?v=<?= NM_VER ?>"></script> -->
	<script language="JavaScript" src="<?= $nmpath ?>/addon/tinymce/tiny_mce.js?v=<?= NM_VER ?>"></script>
	<script type="text/javascript">
	// [2010-05-27] tinyMCE.init
	window.onload = function()
	{
		// 웹에디터
		tinyMCE.init({
			// General options
			language : "<?= $G_SYS['nm_lang'] ?>",
			mode : "exact",
			theme : "advanced",
			elements : "b_memo",
			document_base_url  : "<?= $G_SYS['HTTP_URL_ROOT'] ?>",
			relative_urls : false,
			remove_script_host : false,
			visual : false,		// 가이드라인 비표시
		
			plugins : "safari,table,advlink,preview,media,contextmenu,fullscreen,visualchars,inlinepopups,paste",

			// Theme options
			<? if ($G_SYS['nm_lang'] == 'ko') { ?>
				theme_advanced_fonts : '굴림=굴림,돋움=돋움,바탕=바탕,궁서=궁서,Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings',
			<? } else { ?>

			<? }	// if() ?>

			theme_advanced_buttons1 : "fontselect,fontsizeselect,|,bold,italic,underline,strikethrough,forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,link,unlink,|,removeformat",
			theme_advanced_buttons2 : "charmap,|,hr,|,tablecontrols,|,visualaid,|,code,preview,fullscreen",
			theme_advanced_buttons3 : "",
			theme_advanced_buttons4 : "",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			theme_advanced_statusbar_location : "bottom",
			theme_advanced_resizing : true,
			theme_advanced_resize_horizontal : false,

			// [2010-02-09] Performance tuning
			// [2012-11-16] 3.5.7 - 크롬/사파리 빈라인 무시 현상 해결
			//verify_html : false,
			cleanup : false,

			// [2010-05-27] path hidden
			theme_advanced_path : false,

			// [2013-07-09] style
			paste_retain_style_properties : 'all',

			content_css : '<?= $nmpath ?>/addon/tinymce/themes/advanced/skins/default/content.css?v=<?= NM_VER ?>'
		});

		<? if ($ba[ba_isuse_file] == "Y" && get_activex_use()) { ?>
			uploadConfigSet();
		<? }	// if() ?>

	}
	</script>
<? }	// if() ?>
<SCRIPT LANGUAGE="JavaScript">
<!--
	var nm_webeditor = '<?= $G_SYS['WEBEDITOR'] ?>';
	var get_qs = "<?= get_qs('mode') ?>";
	var nm_php_self = "board.php";
//-->
</SCRIPT>

<script language="JavaScript" src="<?= $nmpath ?>/include/board_upload.js?v=<?= NM_VER ?>"></script>
<SCRIPT LANGUAGE="JavaScript" src="<?= $nmpath ?>/include/form_check.js?v=<?= NM_VER ?>"></SCRIPT>

<? if ($mode != "DEL") { ?>
<SCRIPT LANGUAGE="JavaScript">
<!--
	// 임시보관함에 자동 저장.
	function board_write_draft_save_auto()
	{
		board_write_draft_save(1);
		window.setTimeout('board_write_draft_save_auto()', <?= ($G_SYS['DRAFT_SAVE_AUTO_TIME']*1000) ?>);
	}
	var mwdsa = window.setTimeout('board_write_draft_save_auto()', <?= ($G_SYS['DRAFT_SAVE_AUTO_TIME']*1000) ?>);
//-->
</SCRIPT>
<? }	// if() ?>
