

// Adds the plugin class to the list of available TinyMCE plugins
//tinyMCE.addPlugin("autoscroll", TinyMCE_autoscrollPlugin);

if (navigator.userAgent.indexOf('Opera') != -1) {
	var jc_br_newlines = "false";
	var jc_p_newlines = "true";
	
} else {
	var jc_br_newlines = "true";
	var jc_p_newlines = "false";
}

tinyMCE.init({
	mode : "textareas",
	editor_selector : "message",
	theme : "advanced",
	theme_advanced_image_image_browser_callback : "img_upload_disabled",
	plugins : "-pm, -autoscroll, -send, advlink, emotions",
	//theme_advanced_buttons1_add : "pm",
	theme_advanced_buttons2_add : "forecolor, removeformat,charmap,bold,italic,underline,spechar,spellchecker,emotions,autoscroll, separator,pm,send",
	theme_advanced_disable : "numlist,bullist,advimage,search, searchreplace,paste,bold,italic,charmap,separator,underline,removeformat,help,code,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,outdent,indent,cleanup,hr,formatselect,styleselect,sub,sup,backcolor,visualaid,anchor,newdocument",
	spellchecker_languages : "+English=en",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_path_location : "bottom",
	theme_advanced_source_editor_height : "550",
	theme_advanced_source_editor_width : "400",
	force_br_newlines : jc_br_newlines,
	force_p_newlines : jc_p_newlines,
	//content_css : "example_full.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",
	file_browser_callback : "fileBrowserCallBack",
	theme_advanced_resize_horizontal : false,
	encoding : "xml",
	theme_advanced_resizing : true
	
});

tinyMCE.loadPlugin('autoscroll','components/com_jchat/javascript/tinyMCE/tinyMCEplugins/autoscroll/');
tinyMCE.loadPlugin('send','components/com_jchat/javascript/tinyMCE/tinyMCEplugins/send/');
tinyMCE.loadPlugin('pm','components/com_jchat/javascript/tinyMCE/tinyMCEplugins/pm/');

function img_upload_disabled(){

	alert('Image Upload Disabled');	
}


