tinyMCE.init({
	mode: "specific_textareas",
	editor_selector: "tinyfckEditor",
	plugins: "advimage",
	theme: "advanced",
	theme_advanced_buttons1: "bold, italic, bullist, numlist, image, link, unlink, undo, redo",
	theme_advanced_buttons2: "",
	theme_advanced_buttons3: "",
	theme_advanced_toolbar_location: "top",
	theme_advanced_toolbar_align: "left",
	file_browser_callback: "fileBrowserCallBack",
	language: "nl"
});

function fileBrowserCallBack(field_name, url, type, win)
{
	var connector = "../../filemanager/browser.html?Connector=connectors/php/connector.php";
	var enableAutoTypeSelection = true;
	
	var cType;
	tinyfck_field = field_name;
	tinyfck = win;
	
	switch(type)
	{
		case "image":
			cType = "Image";
			break;
		case "flash":
			cType = "Flash";
			break;
		case "file":
			cType = "File";
			break;
	}
	
	if(enableAutoTypeSelection && cType)
	{
		connector += "&Type=" + cType;
	}
	
	window.open(connector, "tinyfck", "modal, width=600, height=400");
}