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,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,spellchecker',
	language							:	'da',
	width								:	'300px',
	height								:	'200px',
	
	// Set ajaxfilemanager as file callback plugin
	file_browser_callback				:	'ajaxfilemanager',
	
	// Languages to use when spellchecking
	spellchecker_languages				:	'+Dansk=da,English=en',
	
	// Theme options
	theme_advanced_buttons1				:	'bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,cut,copy,paste,pastetext,pasteword,|,formatselect,fontselect,fontsizeselect',
	theme_advanced_buttons2				:	'search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,|,image,media,emotions,|,insertdate,inserttime',
	theme_advanced_buttons3				:	'tablecontrols,|,hr,removeformat,visualaid,|,sub,sup',
	theme_advanced_buttons4				:	'insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,attribs,|,pagebreak,charmap,advhr,|,spellchecker,|,preview,code,fullscreen',
	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	:	false,
	theme_advanced_resizing_use_cookie	:	false,
	
	// URL settings
	document_base_url					:	'http://identalab.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://identalab.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',
	language							:	'da',
	width								:	'300px',
	height								:	'200px',
	
	// Set ajaxfilemanager as file callback plugin
	file_browser_callback				:	'ajaxfilemanager',
	
	// Languages to use when spellchecking
	spellchecker_languages				:	'+Dansk=da,English=en',
	
	// Theme options
	theme_advanced_buttons1				:	'bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,|,image,media,emotions,hr,bullist,numlist,link,unlink,|,styleprops',
	theme_advanced_buttons2				:	'formatselect,fontselect,fontsizeselect,|,undo,redo,removeformat,code,fullscreen',
	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	:	false,
	theme_advanced_resizing_use_cookie	:	false,
	
	// URL settings
	document_base_url					:	'http://identalab.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://identalab.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								:	'300px',
	height								:	'150px',
	
	// 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	:	false,
	theme_advanced_resizing_use_cookie	:	false,
	
	// URL settings
	document_base_url					:	'http://identalab.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://identalab.dk/cms/modules/tinyMCE/lists/link_list.php',
	
	// Misc
	fix_content_duplication				:	true
});

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

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