tinyMCE.init({

	mode : "specific_textareas",
	textarea_trigger: "wysiwyg",
	language : "de",
	theme : "advanced",
	width: "450",
	height: "250",
  cleanup : true,
  cleanup_on_startup : true,
	plugins: "preview, print, paste, aidMediaLink",
	plugin_preview_width : "500",
	plugin_preview_height : "600",
	theme_advanced_buttons1 : "bold,italic,underline,separator,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,undo,redo,link,unlink",
	theme_advanced_buttons2 : "pastetext,pasteword,selectall,separator,aidMediaLink,separator",
	theme_advanced_buttons3 : "",
	theme_advanced_buttons1_add : "code,print,preview",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	entity_encoding : "raw",
	paste_auto_cleanup_on_paste: true,
	content_css : "http://127.0.0.1/forum/tinycontent.css",
	convert_urls : false
});


function fileBrowserCallBack(field_name, url, type, win) {
	// This is where you insert your custom filebrowser logic
	alert("Filebrowser callback: field_name: " + field_name + ", url: " + url + ", type: " + type);

	// Insert new URL, this would normaly be done in a popup
	win.document.forms[0].elements[field_name].value = "someurl.htm";
}

function urlconverter_callback(url, node, on_save) {
        
        /*  replace :// with :&#047;&#047;     */
        
        return url;
        
}

function convertWord(type, content) {
	switch (type) {
		// Gets executed before the built in logic performes it's cleanups
		case "before":
			content = content.toLowerCase(); // Some dummy logic
			break;

		// Gets executed after the built in logic performes it's cleanups
		case "after":
			content = content.toLowerCase(); // Some dummy logic
			break;
	}

	return content;
}
