<?

	if(!function_exists('version_compare') || version_compare(phpversion(), '5', '<'))
		@include_once $path_abs.'components/CKEditor/ckeditor_php4.php';
	else
		@include_once $path_abs.'components/CKEditor/ckeditor_php5.php';

	$CKEditor = new CKEditor();
	$CKEditor->basePath = $path_url.'components/CKEditor/';
	$CKEditor->returnOutput = true;
	$CKEditor->textareaAttributes = array('id' => $id);
	$CKEditor->config['height'] = ($this->getTextLines() * 17) + 85;
	$CKEditor->config['uiColor'] = '#E8E8E8';
	$CKEditor->config['toolbar'] = array(	
									array('Source','-','NewPage','Preview','-','Templates'),
									array('Cut','Copy','Paste','PasteText','PasteFromWord','Print'),
									array('Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
									array('BidiLtr', 'BidiRtl'),
									'/',
									array('Bold','Italic','Underline','Strike','-','Subscript','Superscript'),
									array('NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'),
									array('JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'),
									array('Link','Unlink','Anchor'),
									array('Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'),
									'/',
									array('Styles','Format','Font','FontSize'),
									array('TextColor','BGColor'),
									array('Maximize')
								);
			
	echo $CKEditor->editor($id, $value);
	
?>