var width;

try{
	
    width = tiny_width;
	
} catch (e) {
    width = 530;
}

tinyMCE.init({
	width : width,
	mode : "textareas",
	theme : "advanced",
	language  : 'ru',
	plugins : "emotions", //safari,table,iespell,preview,paste,visualchars,inlinepopups",plugins : "emotions,",
	advimage_update_dimensions_onchange : false,
	theme_advanced_buttons1 : "bold,italic,underline,|,link,unlink,image,emotions",//code,|,help",
	theme_advanced_buttons2 : "",
	theme_advanced_buttons3 : "",
	theme_advanced_buttons4 : "",
	//theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
	theme_advanced_toolbar_location : "bottom",
	theme_advanced_toolbar_align : "center",
	theme_advanced_statusbar_location : "",
	theme_advanced_resizing : true,
	
	//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]",
	template_external_list_url : "example_template_list.js",
	remove_linebreaks: false,
	content_css : "/media/user/visual.css",
	//template_external_list_url : "lists/template_list.js",
	//external_link_list_url : "lists/link_list.js",
	//external_image_list_url : "lists/image_list.js",
	//media_external_list_url : "lists/media_list.js",
	tab_focus : ':prev,:next',
	editor_deselector: "skip_tiny"
	//file_browser_callback : CustomFileBrowser

	});