tinyMCE.init({
	language : "zh_tw_utf8",
	mode : "exact",
	theme : "advanced",
	elements : "CONTENT",
	plugins : "table,inlinepopups,insertdatetime,emotions,insertvideo,insertaudio,contextmenu,uploader",
	relative_urls : false,
    fix_list_elements : true,
	remove_script_host : false,
	force_p_newlines : true,
	cleanup_on_startup : true,	
	theme_advanced_buttons1 : "fontsizeselect,fontselect,forecolor,backcolor,bold,italic,underline,strikethrough,separator,code",
	theme_advanced_buttons2 : "justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,indent,outdent,separator,link,unlink,image,insertvideo,insertaudio,emotions,table,separator,hr,insertdate,inserttime,uploader",
	theme_advanced_buttons3 : "",
	fullscreen_settings : {
                theme_advanced_buttons3 : "tablecontrols"
        },	
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_path_location : "bottom",
	content_css : "",
    plugin_insertdate_dateFormat : "%Y-%m-%d",
    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",
	theme_advanced_resize_horizontal : false,
	theme_advanced_resizing : true,
	nonbreaking_force_tab : true,
	apply_source_formatting : true,
	relat2ive_urls : false,
	rem2ove_script_host : false,
	uploader_limited_width	:	480
});

function contentUpdate() {
	tinyMCE.triggerSave();
	chgMode('f1') ;
}
function	forum_post()	{
	tinyMCE.triggerSave();
	var	plain_text	=	$.ajax({
		type	:	"POST" ,
		url		:	"/forum/post" ,
		data	:	{
					NAME	:	$('form[@name=CSI_FORM]').find(':text[@name=NAME]').val(),
					TITLE	:	$('form[@name=CSI_FORM]').find(':text[@name=TITLE]').val(),
					CONTENT	:	$('form[@name=CSI_FORM]').find(':input[@name=CONTENT]').val()
					},
		async	:	false
	}).responseText ;
	var	response=	eval('(' + plain_text + ')') ;
	var	index	=	0 ;
	if	(response['opcode'] == 0)	$('<FONT CLASS="indent_1 text" STYLE="color:#f00">' + response['message'] + '</FONT>').insertAfter(':button[@name=btn_forum_post]').fadeOut(5000) ;
	else							$('<FONT CLASS="indent_1 text">' + response['message'] + '</FONT>').insertAfter(':button[@name=btn_forum_post]').fadeOut(5000) ;
	return false ;
}
function	act() {
	document.CSI.submit() ;
}
$(document).ready(function(){
	$('TR.record').hover(function(){
		$(this).removeClass('record').addClass('focus') ;
	},function(){
		$(this).removeClass('focus').addClass('record') ;
	}) ;
}) ;