function tiny_mce_wysiwyg_getContent() {
	return tinyMCE.get(Editor.getId()).getContent();
}

function tiny_mce_wysiwyg_insert(mValue) {
	switch( _proxy_jslib_handle(mValue, ('type'), 0, 0))
	{
		case 'emoticon':			
			sValue = ' <img src="' +  _proxy_jslib_handle(mValue, ('path'), 0, 0) + '" alt="" /> ';
			break;
		case 'image':
			sValue = '[img]' +  _proxy_jslib_handle(mValue, ('path'), 0, 0) + '[/img]';
			break;
		case 'attachment':
			sValue = ' <img src="' +  _proxy_jslib_handle(mValue, ('path'), 0, 0) + '" alt="" /> ';
			break;
		case 'video':
			sValue = '[video]' +  _proxy_jslib_handle(mValue, ('id'), 0, 0) + '[/video]';
			break;
	}			
	
	// Reset the editor ID# in case we have more then one editor open
	if ( _proxy_jslib_handle(mValue, ('editor_id'), 0, 0))
	{
		Editor.setId( _proxy_jslib_handle(mValue, ('editor_id'), 0, 0));
	}
	
	 _proxy_jslib_handle(tinyMCE, 'execCommand', '', 1, 0)('mceInsertContent', false, sValue);
			
	return false;	
}

function tiny_mce_wysiwyg_remove(mValue) {
	switch( _proxy_jslib_handle(mValue, ('type'), 0, 0))
	{
		case 'attachment':
			
			break;
	}	
}

function tiny_mce_wysiwyg_quick_edit(mId) {
	 _proxy_jslib_handle(tinyMCE, 'execCommand', '', 1, 0)('mceFocus', false, mId);            
	 _proxy_jslib_handle(tinyMCE, 'execCommand', '', 1, 0)('mceRemoveControl', false, mId);
	tinyMCE.triggerSave(false, false);
}

function tiny_mce_wysiwyg_feed_reply(mId) {
	 _proxy_jslib_handle(tinyMCE, 'execCommand', '', 1, 0)('mceFocus', false, mId);
	tinyMCE.triggerSave(false, false);	
}

function tiny_mce_wysiwyg_feed_comment(mId) {
	 $('#js_item_feed_' + mId).find('.js_comment_feed_textarea:first').attr('id', 'js_comment_feed_textarea_' + mId);
	 customTinyMCE_init('js_comment_feed_textarea_' + mId);	 
}

function tiny_mce_wysiwyg_feed_comment_form(oObj) {
	tinyMCE.triggerSave(false, false);		
}

function tiny_mce_wysiwyg_custom_field(mId) {
	tinyMCE.triggerSave(false, false);	
}

function tiny_mce_newsletter_show_plain() {
	tinyMCE.triggerSave(false, false);	
} ;
_proxy_jslib_flush_write_buffers() ;
