tinyMCE.init({
	// General options
	mode								:	'specific_textareas',
	editor_selector						:	'rich_text_editor_full',
	theme								:	'advanced',
	skin								:	'o2k7',
	skin_variant						:	'silver',// blue | black | silver
	plugins								:	'safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template',
	language							:	'da',
	//width								:	'400px',
	//height								:	'250px',
	
	// Set ajaxfilemanager as file callback plugin
	file_browser_callback				:	'ajaxfilemanager',
	
	// Theme options
	theme_advanced_buttons1				:	'bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontselect,fontsizeselect,|,replace,styleprops',
	theme_advanced_buttons2				:	'bullist,numlist,cite,blockquote,|,undo,redo,|,link,unlink,image,media,advhr,charmap,|,removeformat,visualaid,|,cut,copy,paste,pastetext,pasteword',
	theme_advanced_buttons3				:	'tablecontrols,|,code,fullscreen',
	theme_advanced_buttons4				:	'',
	theme_advanced_toolbar_location		:	'top',
	theme_advanced_toolbar_align		:	'left',
	theme_advanced_statusbar_location	:	'bottom',
	
	// Resizing options
	theme_advanced_resizing				:	true,
	theme_advanced_resize_horizontal	:	true,
	theme_advanced_resizing_use_cookie	:	false,
	
	// URL settings
	document_base_url					:	'http://oplevholbaek.dk/cms/',
	relative_urls						:	false,
	remove_script_host					:	false,
	urlconvertor_callback				:	'tinyMCE_urlconvertor',
	
	// Drop lists for link/image/media/template dialogs
	external_link_list_url				:	'http://oplevholbaek.dk/cms/modules/tinyMCE/lists/link_list.php',
	
	// Misc
	fix_content_duplication				:	true
});
tinyMCE.init({
	// General options
	mode								:	'specific_textareas',
	editor_selector						:	'rich_text_editor',
	theme								:	'advanced',
	skin								:	'o2k7',
	skin_variant						:	'silver',// blue | black | silver
	plugins								:	'safari,style,advimage,advlink,emotions,inlinepopups,media,contextmenu,fullscreen,noneditable,xhtmlxtras,paste',
	language							:	'da',
	//width								:	'400px',
	//height								:	'250px',
	
	// Set ajaxfilemanager as file callback plugin
	file_browser_callback				:	'ajaxfilemanager',
	
	// Theme options
	theme_advanced_buttons1				:	'bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,|,replace,styleprops',
	theme_advanced_buttons2				:	'bullist,numlist,cite,blockquote,|,undo,redo,|,link,unlink,image,media,|,removeformat,visualaid,fullscreen,|,cut,copy,paste,pastetext,pasteword',
	theme_advanced_buttons3				:	'',
	theme_advanced_buttons4				:	'',
	theme_advanced_toolbar_location		:	'top',
	theme_advanced_toolbar_align		:	'left',
	theme_advanced_statusbar_location	:	'bottom',
	
	// Resizing options
	theme_advanced_resizing				:	true,
	theme_advanced_resize_horizontal	:	true,
	theme_advanced_resizing_use_cookie	:	false,
	
	// URL settings
	document_base_url					:	'http://oplevholbaek.dk/cms/',
	relative_urls						:	false,
	remove_script_host					:	false,
	urlconvertor_callback				:	'tinyMCE_urlconvertor',
	
	// Drop lists for link/image/media/template dialogs
	external_link_list_url				:	'http://oplevholbaek.dk/cms/modules/tinyMCE/lists/link_list.php',
	
	// Misc
	fix_content_duplication				:	true
});
tinyMCE.init({
	// General options
	mode								:	'specific_textareas',
	editor_selector						:	'rich_text_editor_limited',
	theme								:	'advanced',
	skin								:	'o2k7',
	skin_variant						:	'silver',// blue | black | silver
	plugins								:	'safari,style,advhr,advlink,emotions,contextmenu,xhtmlxtras',
	language							:	'da',
	//width								:	'400px',
	//height								:	'250px',
	
	// Theme options
	theme_advanced_buttons1				:	'bold,italic,underline,strikethrough,|,bullist,numlist,|,outdent,indent,blockquote,cite,|,link,unlink',
	theme_advanced_buttons2				:	'',
	theme_advanced_buttons3				:	'',
	theme_advanced_buttons4				:	'',
	theme_advanced_toolbar_location		:	'bottom',
	theme_advanced_toolbar_align		:	'center',
	theme_advanced_statusbar_location	:	'none',
	
	// Resizing options
	theme_advanced_resizing				:	true,
	theme_advanced_resize_horizontal	:	true,
	theme_advanced_resizing_use_cookie	:	false,
	
	// URL settings
	document_base_url					:	'http://oplevholbaek.dk/cms/',
	relative_urls						:	false,
	remove_script_host					:	false,
	urlconvertor_callback				:	'tinyMCE_urlconvertor',
	
	// Drop lists for link/image/media/template dialogs
	//external_link_list_url				:	'http://oplevholbaek.dk/cms/modules/tinyMCE/lists/link_list.php',
	
	// Misc
	fix_content_duplication				:	true
});

function tinyMCE_urlconvertor(strUrl, node, on_save) {
	//strUrl = strUrl.replace('http://oplevholbaek.dk/cms/', '');
	return strUrl;
}

function ajaxfilemanager(field_name, url, type, win) {
	var ajaxfilemanagerurl = "http://oplevholbaek.dk/cms/modules/tinyMCE/tiny_mce/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: "http://oplevholbaek.dk/cms/modules/tinyMCE/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php",
		width: 782,
		height: 440,
		inline : "yes",
		close_previous : "no"
	},{
		window : win,
		input : field_name
	});
}
