tinyMCE.init({
	mode : "textareas",
	theme : "advanced",
	skin : "o2k7",
	skin_variant : "black",
	theme_advanced_blockformats : "p,h2,h3,h4,h5,div",
	editor_deselector : "mceNoEditor",
	plugins : "maxchars,advlink,style,preview,advhr,advimage,advlink,table,preview,zoom,flash,searchreplace,paste,separator,preview,zoom,youtube",
	theme_advanced_buttons1 : "bold,italic,bullist,|,outdent,indent,|,undo,redo,link,unlink,image,cut,copy,paste,pasteword,replace,code,charmap,youtube,formatselect,styleselect",
	theme_advanced_buttons2 : "tablecontrols",
	theme_advanced_buttons3 : "",
	inline_styles : false,
	paste_create_paragraphs : true,
	paste_create_linebreaks : false,
	paste_use_dialog : true,
	paste_auto_cleanup_on_paste : true,
	paste_convert_middot_lists : false,
	paste_unindented_list_class : "unindentedList",
	paste_convert_headers_to_strong : true,
	// paste_insert_word_content_callback : "convertWord",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	//external_link_list_url : "/includes/locationList",
	relative_urls : false,
	convert_urls : false,
	remove_script_host : false,
	forced_root_block : false,
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_resizing : true,
	max_chars : 1000,
	max_chars_indicator : "lengthBox",
	content_css : "/css/tiny.css",
	// Drop lists for link/image/media/template dialogs
	external_link_list_url : "/tinymce/get_link_list",
	external_image_list_url : "/tinymce/get_image_list",
	//external_image_list_url : "js/image_list.js",
	//media_external_list_url : "js/media_list.js",
	invalid_elements : "font",
	extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],span[class|align],object[align<bottom?left?middle?right?top|archive|border|class|classid|codebase|codetype|data|declare|dir<ltr?rtl|height|hspace|id|lang|name|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|standby|style|tabindex|title|type|usemap|vspace|width],embed[src|wmode|quality|menu|pluginspage|type|width|height],param[name|value],div[class]"
});
		
function fileBrowserCallBack(field_name, url, type, win) {
	// This is where you insert your custom filebrowser logic
	alert("Filebrowser callback: field_name: " + field_name + ", url: " + url + ", type: " + type);
	// Insert new URL, this would normaly be done in a popup
	win.document.forms[0].elements[field_name].value = "someurl.htm";
}
	
