CKEDITOR.config.extraPlugins = "aspell";
function ckeditor_init() {

	var ckconfig = {
		customConfig : ''
,		on : { instanceReady : function( ev )
			{
                		this.dataProcessor.writer.indentationChars = '';
                		this.dataProcessor.writer.lineBreakChars = '';
			}
		}
,		removePlugins : 'elementspath'
,		toolbar_banner : [
			['Bold','Italic','Underline','Strike','TextColor','BGColor'],['Font','FontSize','Format'],"/",
			['SpellCheck','Cut','Copy','Paste','PasteText','PasteFromWord',
				'SelectAll','RemoveFormat','Undo','Redo','-','Find','Replace'],
				 ['Superscript','Subscript'],['Table','ShowBlocks','Source','Preview'],'/',
			['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock',
				'Outdent','Indent','Blockquote','-','NumberedList','BulletedList'],
				['HorizontalRule','Link','Unlink','Anchor'],['Image','Flash','SpecialChar','Smiley','aspell']
		]
,		toolbar_note : [
			['Bold','Italic','Underline','Strike','TextColor','BGColor'],['Font','FontSize','Format'],"/",
			['SpellCheck','Cut','Copy','Paste','PasteText','PasteFromWord',
				'SelectAll','RemoveFormat','Undo','Redo','-','Find','Replace'],
				 ['Superscript','Subscript'],['Source'],'/',
			['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock',
				'Outdent','Indent','Blockquote','-','NumberedList','BulletedList'],
				['HorizontalRule','Link','Unlink','Anchor'],['Image','Flash','SpecialChar','aspell']
		]
,		toolbar_chat : [
			['Bold','Italic','Underline','TextColor','BGColor'],['Font','FontSize'],"/",
			['SpellCheck','Cut','Copy','Paste','PasteText','PasteFromWord',
				'RemoveFormat','Undo','Redo','-','Find'],
				 ['Superscript','Subscript'],'/',
			['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock',
				'Outdent','Indent','Blockquote','-','NumberedList','BulletedList'],
				['HorizontalRule','Link','Unlink','Anchor'],['SpecialChar','aspell']
		]
,		toolbar : 'banner'
,		contentsCss : '/eboard/css/editor_content.css'
,		bodyClass : 'bodyContent'
,		docType : (/MSIE 6.0/.test(navigator.appVersion))?"":"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w2.org/TR/html4/loose.dtd\">"
,		fontSize_sizes : '8/8pt;10/10pt;12/12pt;14/14pt;18/18pt;24/24pt;36/36pt;48/48pt;72/72pt'
,		height:300
//,		resize_enabled : false
,		resize_minWidth : 400
,		resize_maxWidth : 570
,		resize_minHeight : 200
,		resize_maxHeight : 600
	};
/* temp stuff
	if(CKEDITOR.instances['CKbannerTextRW'])
		 CKEDITOR.instances['CKbannerTextRW'].destroy();
	$('CKbannerTextRW').addClassName('ckBanner');
	if(CKEDITOR.instances['noteEdit'])
		 CKEDITOR.instances['noteEdit'].destroy();
	$('noteEdit').addClassName('ckNote');

// end temp stuff */
	if($('bannerTextRW') && $('bannerTextRW').hasClassName('ckBanner')) {
		var bannerConfig = Object.clone(ckconfig); 	// warning, shallow copy
		bannerConfig.bodyClass = 'banner bodyContent';
		bannerConfig.height = 120;
		CKEDITOR.replace('bannerTextRW', bannerConfig);
	}
	if($('announcementText') && $('announcementText').hasClassName('ckAnnouncement')) {
		var annConfig = Object.clone(ckconfig); 	// warning, shallow copy
		annConfig.width=588;
		CKEDITOR.replace('announcementText', annConfig);
	}
	if($('noteEdit') && $('noteEdit').hasClassName('ckNote')) {
		var noteConfig = Object.clone(ckconfig); 	// warning, shallow copy
		noteConfig.toolbar = 'note';
		noteConfig.resize_maxWidth = 530;
		CKEDITOR.replace('noteEdit', noteConfig);
	}
	if($('iNote') && $('iNote').hasClassName('ckiNote')) {
		var iNoteConfig = Object.clone(ckconfig); 	// warning, shallow copy
		iNoteConfig.toolbar = 'chat';
		CKEDITOR.replace('iNote', iNoteConfig);
	}
}

Element.observe($(window), 'load', ckeditor_init)

function openLink(URI){
        win = window.open(URI,"secWin","");
        win.focus;
        }


