/*
 * $Id: tiny_init.js 47 2009-06-29 19:49:30Z pedrosoft $
 */

tinyMCE.init({
	mode : 'none',
	theme : 'advanced',
	theme_advanced_buttons1 : 'undo,redo,separator,bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,hr,',
	theme_advanced_buttons2 : '',
	theme_advanced_buttons3 : '',
	theme_advanced_toolbar_location : 'top',
	theme_advanced_toolbar_align : 'left',
	extended_valid_elements : 'a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]',
	language : 'russian'
});

function setTextareaToTinyMCE(sEditorID) {
	var oEditor = document.getElementById(sEditorID);
	if(oEditor) {
		tinyMCE.execCommand('mceAddControl', true, sEditorID);
	}
	return;
}

function unsetTextareaToTinyMCE(sEditorID) {
	var oEditor = document.getElementById(sEditorID);
	if(oEditor) {
		tinyMCE.execCommand('mceRemoveControl', true, sEditorID);
	}
	return;
}
