tinyMCE.init({

    // General options
    mode: "exact",
    elements : "opis",
    theme : "advanced",
    plugins : "pagebreak,style,iespell,paste,visualchars,nonbreaking,xhtmlxtras",

    // Theme options
    theme_advanced_buttons1 : "bold,italic,underline,separator,bullist,numlist,indent,outdent,separator,undo,redo",
    theme_advanced_buttons2 : "",
    theme_advanced_buttons3 : "",
    theme_advanced_buttons4 : "",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",


    // Example content CSS (should be your site CSS)
    content_css : "/css/tiny_mce.css",

    convert_urls : false,
    forced_root_block : false,
    force_p_newlines : false,
    remove_linebreaks : false,
    force_br_newlines : true,
    remove_trailing_nbsp : true,
    forced_root_block : '', // Needed for 3.x
    auto_cleanup_word : true,
    valid_elements : "a[href|target=_blank|rel=nofollow],table,tr,td,ul,ol,li,b,i,u,br,div,p,blockquote"

});

function toggleEditor(id) {
	if (!tinyMCE.get(id))
		tinyMCE.execCommand('mceAddControl', false, id);
	else
		tinyMCE.execCommand('mceRemoveControl', false, id);
    }

