function menuExpand(id)
{
    $('#MenuContent'+id).slideToggle('fast');
    $('#MenuHeader'+id).toggleClass('expand_minus');
}

function menuExpandShow(id)
{
    $('#MenuContent'+id).show();
    $('#MenuHeader'+id).toggleClass('expand_minus');
}

function tinyMCEsetupWiadomosciDodaj()
{
    tinyMCE.init({
	mode : "textareas",
	language : "pl",
        theme : "advanced",
	theme_advanced_buttons1 : "forecolor,backcolor,separator,bold,italic,underline,strikethrough,hr,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,outdent,indent,separator,preview,fullscreen",
	theme_advanced_buttons2 : "fontselect,fontsizeselect,separator,pastetext,pasteword,search,replace,separator,link,unlink,image,separator,undo,redo",
        theme_advanced_buttons3 : "tablecontrols,separator,removeformat,cleanup,code",
	theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
	theme_advanced_statusbar_location : "bottom",
	theme_advanced_resizing : true,
	convert_urls : false,
	relative_urls : false,
	plugins : "preview,fullscreen,paste,searchreplace,table",
	tab_focus : ':prev,:next',
	editor_selector : "mceEditorWiadomoscDodaj"
    });
}

function tinyMCEsetupWiadomosciEdytuj(link_img,link_file)
{
    tinyMCE.init({
	mode : "textareas",
	language : "pl",
        theme : "advanced",
	theme_advanced_buttons1 : "forecolor,backcolor,separator,bold,italic,underline,strikethrough,hr,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,outdent,indent,separator,preview,fullscreen",
	theme_advanced_buttons2 : "fontselect,fontsizeselect,separator,pastetext,pasteword,search,replace,separator,link,unlink,image,separator,undo,redo",
        theme_advanced_buttons3 : "tablecontrols,separator,removeformat,cleanup,code",
	theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
	theme_advanced_statusbar_location : "bottom",
	theme_advanced_resizing : true,
	plugins : "preview,fullscreen,paste,searchreplace,table",
	theme_advanced_styles : "lightBox=lightBox",
	external_image_list_url : link_img,
	external_link_list_url : link_file,
	tab_focus : ':prev,:next',
	editor_selector : "mceEditorWiadomoscEdytuj"
    });
}

function tinyMCEsetupCMS(link_img,link_file)
{
    tinyMCE.init({
	mode : "textareas",
	language : "pl",
        theme : "advanced",
	theme_advanced_buttons1 : "forecolor,backcolor,separator,bold,italic,underline,strikethrough,hr,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,outdent,indent,separator,preview,fullscreen",
	theme_advanced_buttons2 : "fontselect,fontsizeselect,separator,pastetext,pasteword,search,replace,separator,link,unlink,image,separator,undo,redo",
        theme_advanced_buttons3 : "tablecontrols,separator,removeformat,cleanup,code",
	theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
	theme_advanced_statusbar_location : "bottom",
	theme_advanced_resizing : true,
	plugins : "preview,fullscreen,paste,searchreplace,table",
	theme_advanced_styles : "lightBox=lightBox",
	external_image_list_url : link_img,
	external_link_list_url : link_file,
	tab_focus : ':prev,:next',
	editor_selector : "mceEditorCMS"
    });
}

function tinyMCEsetupPomoc()
{
    tinyMCE.init({
	mode : "textareas",
	language : "pl",
        theme : "advanced",
	theme_advanced_buttons1 : "bold,italic,underline,separator,forecolor,backcolor,separator,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,undo,redo,link,unlink",
        theme_advanced_buttons2 : "",
	theme_advanced_buttons3 : "",
	theme_advanced_buttons4 : "",
	theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
	theme_advanced_statusbar_location : "bottom",
	theme_advanced_resizing : true,
	convert_urls : false,
	relative_urls : false,
	tab_focus : ':prev,:next',
	editor_selector : "mceEditorPomoc"
    });
}
