var commoninit = {
	mode : "textareas"
,	auto_reset_designmode : true
,	plugins : "table,advhr,advlink,advimage,emotions,insertdatetime,searchreplace,contextmenu,paste,spellchecker,media"
,	theme : "advanced"
//,	theme_advanced_buttons1 : "bold,italic,underline,strikethrough,forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull,outdent,indent,blockquote,|,bullist,numlist,|,insertdate,inserttime"
,	theme_advanced_buttons1 : "bold,italic,underline,strikethrough,forecolor,backcolor,|,fontselect,fontsizeselect,formatselect"
//,	theme_advanced_buttons2 : "spellchecker,cut,copy,paste,pastetext,pasteword,selectall,removeformat,undo,redo,|,search,replace,|,sub,sup,|,table,visualaid,advhr,link,unlink,image,code,charmap,emotions"
,	theme_advanced_buttons2 : "spellchecker,"+((/Firefox/.test(navigator.userAgent))?"":"cut,copy,paste,")+"pastetext,pasteword,selectall,removeformat,cleanup,undo,redo,|,search,replace,|,sub,sup,|,table,visualaid,code"
//,	theme_advanced_buttons3 : "fontselect,fontsizeselect,formatselect"
,	theme_advanced_buttons3 : "justifyleft,justifycenter,justifyright,justifyfull,outdent,indent,blockquote,|,bullist,numlist,|,insertdate,inserttime,advhr,link,unlink,anchor,image,media,charmap,emotions" 
,	theme_advanced_buttons1_add : "help"
,	theme_advanced_toolbar_location : "top"
,	theme_advanced_toolbar_align : "left"
,	theme_advanced_path_location : ""
,	theme_advanced_styles : "none="
,	button_tile_map : true
,	dialog_type : "modal"
,	plugin_insertdate_dateFormat : "%Y-%m-%d"
,	plugin_insertdate_timeFormat : "%H:%M:%S"
,	spellchecker_languages : "+English=en-us,Spanish=es,German=de"
,	spellchecker_rpc_url : "/SpellCheck/go"
,	doctype : (/MSIE 6.0/.test(navigator.appVersion))?"":"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">"
,	extended_valid_elements : "iframe[*],marquee[*],hr[width|size|noshade]"
,	invalid_elements : "form,textarea,input,select"
,	forced_root_block: false
,	verify_css_classes : true
,	convert_urls : false
//,	relative_urls : false
//,	remove_script_host : true
//,	document_base_url : "http://www.eboard.com"
,	convert_newlines_to_brs : true
,	apply_source_formatting : false
,	remove_linebreaks : true
,	editor_css : "/eboard/css/tinymce_editor.css"
,	content_css : "/eboard/css/editor_content.css"
,	cleanup : true
,	font_size_style_values : "8pt,10pt,12pt,14pt,18pt,24pt,36pt"
//,	convert_fonts_to_spans : true  // well this doesn't matter, this is the default behavior for 3.0a23 and >
//,	fix_nesting : true		// doesnt' seem to help with <span><p></p></span>
//,	inline_styles : true		// no difference I could see
,	paste_auto_cleanup_on_paste : false // this does help with pasting invalid HTML in IE from, say, PDFs
//,	paste_use_dialog : true 		// no help here
//	function to remove empy <strong> elements
,	setup : function(ed) { ed.onPostProcess.add(function(ed, o) { if (o.get) { o.content = o.content.replace(/<(strong|em)>(?:<(strong|em)><\/\2>)?<\/\1>/g, '');}})}
}
var bannerInit = Object.clone(commoninit);
Object.extend(bannerInit,	{
	editor_selector : "tinymceBanner"
//,	content_css : "/eboard/css/banner.css"
,	body_class : "banner"
,	height : "196px"
,	width : "100%"
	})
var announceInit= Object.clone(commoninit);
Object.extend(announceInit,	{
	editor_selector : "mceAnnouncment"
,	theme_advanced_buttons3_add_before : "tablecontrols,|,print"
,	body_class : "announcement"
,	height : "360px"
	})
var noteInit = Object.clone(commoninit);
Object.extend(noteInit,	{
	mode : "textareas"
//,	theme_advanced_disable : "insertdate,inserttime,indent,outdent,selectall,replace,table,visualaid,emotions"
,	theme_advanced_disable : "table,visualaid,emotions"
//,	theme_advanced_buttons2_add : "media"
,	body_class : "note"
,	editor_selector : "mceEditor"
,	editor_deselector : "mceNoEditor"
,	height : "300px"
,	width : "510px"
	})
var iNoteInit = Object.clone(commoninit);
Object.extend(iNoteInit,	{
	mode : "textareas"
,	theme_advanced_disable : "strikethrough,insertdate,inserttime,selectall,replace,table,visualaid,advhr,code,emotions,formatselect,image,media"
,	body_class : "inote"
,	editor_selector : "iNoteEditor"
,	editor_deselector : "mceNoEditor"
,	handle_event_callback : "myHandleEvent"
,	oninit : "myCustomOnInit"

	})
function initRTE() {
	if(typeof tinyMCE != 'undefined'){
		tinyMCE.init(bannerInit);
		tinyMCE.init(announceInit);
		tinyMCE.init(noteInit);
		tinyMCE.init(iNoteInit);
	}
}
if(/Microsoft Internet Explorer/.test(navigator.appName)) {
	initRTE();
} else {
	Event.observe(window,'load',initRTE);
}

function openLink(URI){
	win = window.open(URI,"secWin","");
	win.focus;
	} 

