tinyMCE.init({

	// General options
	mode : 'textareas',
	theme : 'advanced',
	editor_selector : 'mceAdvanced',
	language : 'es',
    plugins: "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",

	// Skins
	skin : 'o2k7',
	skin_variant : 'silver',

	// Theme options
	theme_advanced_toolbar_location : 'top',
	theme_advanced_toolbar_align : 'left',
	theme_advanced_statusbar_location : 'bottom',
	theme_advanced_resizing : true,
	theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
	theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",
	theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl",
	theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage,|,insertdate,inserttime,preview,|,forecolor,backcolor,|,fullscreen",
	theme_advanced_toolbar_location : 'top',
	theme_advanced_toolbar_align : 'left',
	theme_advanced_statusbar_location : 'bottom',
	theme_advanced_resizing : true,
	autosave_ask_before_unload : false,

	// Example content CSS (should be your site CSS)
	content_css : 'http://www.ehtsimoneortega.com/pluggins/tiny_mce/tiny_mce.css',
	
	// File browser
	file_browser_callback: 'openKCFinder'

});

function openKCFinder(field_name, url, type, win) {
   tinyMCE.activeEditor.windowManager.open({
        file: 'http://www.ehtsimoneortega.com/pluggins/kcfinder/browse.php?opener=tinymce&lang=es&type=' + type ,
        title: 'KCFinder',
        width: 600,
        height: 500,
        resizable: "yes",
        inline: true,
        close_previous: "no",
        popup_css: false
    }, {
        window: win,
        input: field_name
    });
    return false;
}

