
	function runTinyMCE()
	{
		tinyMCE.init({
			mode: "exact",
			elements: "tinymce",
			theme: "advanced",
			plugins: "safari, emotions, spellchecker, inlinepopups, paste",
			theme_advanced_buttons1: "emotions,blockquote,spellchecker",
			theme_advanced_buttons2: "",
			theme_advanced_buttons3: "",
			theme_advanced_buttons4: "",
			theme_advanced_toolbar_location: "top",
			theme_advanced_toolbar_align: "left",
			theme_advanced_statusbar_location: "none",
			valid_elements: "#p,br,hr,-blockquote,-div,-span,img[alt|title|src=script/tinymce/.+]",
			paste_auto_cleanup_on_paste: true,
			setup : function(ed) {
				ed.onKeyUp.add(function(ed, e) {
					if(ed.getContent().length > 0)
					{
						if($('commentSubmit').hasClassName('disabled'))
						{
							$('commentSubmit').removeClassName('disabled');
						}
					}
					else
					{
						if(!$('commentSubmit').hasClassName('disabled'))
						{
							$('commentSubmit').addClassName('disabled');
						}
					}
				});
				ed.onExecCommand.add(function(ed, cmd, ui, val) {
					if(ed.getContent().length > 0)
					{
						if($('commentSubmit').hasClassName('disabled'))
						{
							$('commentSubmit').removeClassName('disabled');
						}
					}
					else
					{
						if(!$('commentSubmit').hasClassName('disabled'))
						{
							$('commentSubmit').addClassName('disabled');
						}
					}
				});
			}
		});
	}
