tinyMCE.init({
	// General options
	mode								:	'specific_textareas',
	editor_selector						:	'rich_text_editor',
	theme								:	'advanced',
	skin								:	'o2k7',
	skin_variant						:	'blue',// 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',
	
	document_base_url					:	'http://clanworld.dk/cms/',
	relative_urls						:	false,
	convert_urls						:	false,
	
	// 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,styleselect,cut,copy,paste,pastetext,pasteword',
	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,

	// Path to site stylesheet
	content_css							:	'css/font.css',
	
	// Drop lists for link/image/media/template dialogs
	external_link_list_url				:	'modules/tinyMCE/lists/link_list.js'
});
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,pagebreak,style,advhr,advlink,emotions,contextmenu,paste,noneditable,visualchars,nonbreaking,xhtmlxtras',
	language							:	'da',
	
	// URL options
	//document_base_url					:	'http://devcms.togidata.dk/cms/',
	relative_urls						:	false,
	convert_urls						:	false,
	
	// 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'
});

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
	});
}