
tinyMCE.init({
	theme : "advanced",
	plugins : "table,save,advhr,advimage,advlink,flash,searchreplace,paste,directionality,fullscreen,noneditable",
	file_browser_callback : "fileBrowserCallBack"
});

function fileBrowserCallBack(field_name, url, type, win) {
	var connector = "../../filemanager/browser.html?Connector=/elite/addons/tiny_mcpuk/filemanager/connectors/php/connector.php";
	var enableAutoTypeSelection = true;
	var cType;
	tinymcpuk_field = field_name;
	tinymcpuk = 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, "tinymcpuk", "modal,width=600,height=400");
}
