tinyMCE.init({
	// General options
	mode : "textareas",
//	mode : "exact",
	editor_selector : "editor",
	theme : "advanced",
	skin : "o2k7",
	skin_variant : "silver",
	plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",

	// Theme options
	theme_advanced_buttons1 : "code, bullist,numlist,|,undo,redo,|,link,unlink,image,|,preview,sub,sup,|,charmap,emotions, |,forecolor,backcolor",
	theme_advanced_buttons2 : "bold,italic,underline,strikethrough,|,formatselect,fontselect,fontsizeselect",
	theme_advanced_buttons3 : "",
	theme_advanced_buttons4 : "",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_statusbar_location : "bottom",
	theme_advanced_resizing : false,

	// Example content CSS (should be your site CSS)
	content_css : "css/content.css",

	// Drop lists for link/image/media/template dialogs
	template_external_list_url : "lists/template_list.js",
	external_link_list_url : "lists/link_list.js",
	external_image_list_url : "lists/image_list.js",
	media_external_list_url : "lists/media_list.js",

    document_base_url : "http://freiraum-dachau.de/",   
    relative_urls : false,
    remove_script_host : false,
    convert_urls : false
});

 

tinyMCE.init({
	// General options
	mode : "textareas",
    width: 100,
    height: 440,
//	mode : "exact",
	editor_selector : "backendEditor",
	theme : "advanced",
	skin : "o2k7",
	skin_variant : "black",
	plugins : "imgmap,filemanager,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",
	file_browser_callback : "ajaxfilemanager",
	// Theme options
	//tablecontrols,|,
	theme_advanced_buttons1 : "filemanager, save,newdocument,|,undo,redo,|,fullscreen,|,print,preview,pasteword,|,link,unlink,anchor,cleanup,help,code",
	theme_advanced_buttons2 : "sub,sup,|,bullist,numlist,|,outdent,indent,blockquote,|,image,imgmap,|,emotions,charmap,iespell,media,advhr,|,hr,removeformat,visualaid,|,insertdate,inserttime",
	theme_advanced_buttons3 : "template, |,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,ltr,rtl,|,fontselect,fontsizeselect,|,forecolor,backcolor",
	theme_advanced_buttons4 : "",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_statusbar_location : "bottom",
	theme_advanced_resizing : false,

	//imgmap
	extended_valid_elements: "img[usemap|class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],map[id|name],area[shape|alt|coords|href|target]",

	// Example content CSS (should be your site CSS)
	content_css : "css/front/screen/content.css",

	// Drop lists for link/image/media/template dialogs
	template_external_list_url : "lists/template_list.js",
	external_link_list_url : "lists/link_list.js",
	external_image_list_url : "lists/image_list.js",
	media_external_list_url : "lists/media_list.js",

	// Replace values for the template plugin
	template_replace_values : {
		username : "Some User",
		staffid : "991234"
	},
	template_templates : [
		{
			title : "Editor Details",
			src : "files/vorlage.html",
			description : "Adds Editor Name and Staff ID"
		},
		{
			title : "Timestamp",
			src : "files/vorlage2.html",
			description : "Adds an editing timestamp."
		}
	],
    document_base_url : "/",   
    relative_urls : false,
    remove_script_host : false
});

function ajaxfilemanager(field_name, url, type, win) {
	var ajaxfilemanagerurl = "../../../../js/tinymce/plugins/ajaxfilemanager/ajaxfilemanager.php";
	switch (type) {
		case "image":
			break;
		case "media":
			break;
		case "flash": 
			break;
		case "file":
			break;
		default:
			return false;
	}
    tinyMCE.activeEditor.windowManager.open({
        url: "../../../../js/tinymce/plugins/ajaxfilemanager/ajaxfilemanager.php",
        width: 782,
        height: 440,
        inline : "yes",
        close_previous : "no"
    },{
        window : win,
        input : field_name
    });
    
/*            return false;			
	var fileBrowserWindow = new Array();
	fileBrowserWindow["file"] = ajaxfilemanagerurl;
	fileBrowserWindow["title"] = "Ajax File Manager";
	fileBrowserWindow["width"] = "782";
	fileBrowserWindow["height"] = "440";
	fileBrowserWindow["close_previous"] = "no";
	tinyMCE.openWindow(fileBrowserWindow, {
	  window : win,
	  input : field_name,
	  resizable : "yes",
	  inline : "yes",
	  editor_id : tinyMCE.getWindowArg("editor_id")
	});
	
	return false;*/
}

