/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */
xinha_editors=null;
xinha_init=null;
xinha_config=null;
xinha_plugins=null;

xinha_init=xinha_init?xinha_init:function( ) {
	xinha_editors=xinha_editors?xinha_editors:["tdw_editor_area","anotherOne"];
	xinha_plugins=xinha_plugins?xinha_plugins:[
		"ContextMenu"
		//	,"ListType"
		, "ClientsideSpellcheck"
		, "SpellChecker"
		, "Stylist"
		, "Linker"
		//	,"SuperClean"
		, "CharacterMap"
		//	,"TableOperations"
		, "SaveSubmit"
	];
	if( !Xinha.loadPlugins(xinha_plugins,xinha_init) ) {
		return;
	}
	xinha_config=xinha_config?xinha_config():new Xinha.Config();
	/*
	xinha_config.pageStyleSheets=[_editor_url+"examples/full_example.css"];
	*/
	// TDW: customize editor
	xinha_config.showLoading = true;
	xinha_config.convertUrlsToLinks = true;

	// Automatically encode non-ascii chars as entities:
//	xinha_config.HtmlEntities.Encoding= null;

	xinha_config.toolbar = [
		["separator","formatblock",/*"fontname","fontsize",*/"bold","italic","underline","strikethrough"],
		["separator","forecolor","hilitecolor","textindicator"],
		["separator","subscript","superscript"],
		["linebreak","separator","justifyleft","justifycenter","justifyright","justifyfull"],
		["separator","insertorderedlist","insertunorderedlist","outdent","indent"],
		/*
		["separator","inserthorizontalrule","createlink","insertimage","inserttable"],
		["linebreak","separator","undo","redo","selectall","print"], (Xinha.is_gecko ? [] : ["cut","copy","paste","overwrite","saveas"]),
		["separator","killword","clearfonts","removeformat","toggleborders","splitblock","lefttoright", "righttoleft"],
		*/
		["separator","popupeditor"],
		["separator","htmlmode","showhelp","about"]
	];

	xinha_config.formatblock = {
	    "&mdash; format &mdash;": "",
	    "Title": "h1",
	    /*
	    "Heading 2": "h2",
	    */
	    "Section": "h3",
	    /*
	    "Heading 4": "h4",
	    "Heading 5": "h5",
	    "Heading 6": "h6",
	    */
	    "Normal"   : "p",
	    "Address"  : "address",
	    "Formatted": "pre"
	};

	xinha_config.pageStyleSheets = ["/style.css","/style_editor.css"];
/*
	xinha_config.specialReplacements = {
		'http://nancycossel.com/' : '/',
		'http://www.nancycossel.com/' : '/'
	};
*/
	xinha_editors=Xinha.makeEditors( xinha_editors, xinha_config, xinha_plugins);
	Xinha.startEditors( xinha_editors );

};
Xinha._addEvent(window,"load",xinha_init);


