xinha_editors = null;
xinha_init    = null;
xinha_config  = null;
xinha_plugins = null;

xinha_init = xinha_init ? xinha_init : function()
{
	xinha_plugins = xinha_plugins ? xinha_plugins :
		[
			'DoubleClick',
			'ExtendedFileManager',
			'Linker',
			'InsertAnchor'
		];

	// THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING
	if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;

	xinha_editors = xinha_editors ? xinha_editors :
	[
		'inkeditor'
	];

	xinha_config = xinha_config ? xinha_config : new Xinha.Config();

	xinha_config.pageStyleSheets =
	[
		"http://aetsq.qc.ca/content/template/content.css"
	];

	xinha_config.toolbar =
	[
		[
			"popupeditor",
			"separator",
			"formatblock",
			"bold",
			"italic",
			"underline",
			"forecolor",
			"separator",
			"superscript",
			"inserthorizontalrule",
			"insertunorderedlist",
			"separator",
			"createlink",
			"insertimage",
			"inserttable",
			"toggleborders",
			"separator",
			"undo",
			"redo",
			"separator",
			"showhelp",
			"htmlmode"]
	];

	xinha_config.formatblock =
	{
		"&mdash; format &mdash;" : "",
		"Texte normal" : 'p',
		"Grand texte"  : 'h5',
		"Titre"        : 'h1',
		"Sous-titre"   : 'h2',
		"Petit titre"  : 'h3',
		"Titre page"   : 'h4',
		"Titre cadre"  : 'h6'
	};

	xinha_config.showLoading = false;
	xinha_config.statusBar = false;
	xinha_config.stripBaseHref = true;
	xinha_config.baseHref = "http://aetsq.qc.ca";

	
	if (xinha_config.Linker)
	{
		with(xinha_config.Linker)
		{
			backend_data = {
'backend_data[data]': 'a:5:\x7Bs:3:\x22dir\x22;s:59:\x22/kunden/homepages/13/d126488152/htdocs/aetsq/aetsq/content/\x22;s:7:\x22include\x22;s:58:\x22/\x5C.(php|shtml|html|htm|shtm|cgi|txt|doc|pdf|rtf|xls|csv)$/\x22;s:7:\x22exclude\x22;N;s:10:\x22dirinclude\x22;N;s:10:\x22direxclude\x22;N;\x7D',
'backend_data[session_name]': 'PHPSESSID',
'backend_data[key_location]': 'Xinha:BackendKey',
'backend_data[hash]': '0bfe743eca1fefb24db01adbfd7538433feae7ac',
PHPSESSID: '4bed81f1449c3009d0b69ec97685f8c4'
}; 
		}
	}

	xinha_config.ExtendedFileManager.use_linker = true;

	if (xinha_config.ExtendedFileManager)
	{
		with (xinha_config.ExtendedFileManager)
		{
			backend_data = {
'backend_data[data]': 'a:9:\x7Bs:17:\x22max_foldersize_mb\x22;i:1024;s:9:\x22files_dir\x22;s:51:\x22/kunden/homepages/13/d126488152/htdocs/aetsq/images\x22;s:10:\x22images_dir\x22;s:51:\x22/kunden/homepages/13/d126488152/htdocs/aetsq/images\x22;s:9:\x22files_url\x22;s:8:\x22/images/\x22;s:10:\x22images_url\x22;s:8:\x22/images/\x22;s:21:\x22images_enable_styling\x22;b:0;s:21:\x22max_filesize_kb_image\x22;i:1024;s:20:\x22max_filesize_kb_link\x22;s:3:\x22max\x22;s:23:\x22allowed_link_extensions\x22;a:12:\x7Bi:0;s:3:\x22jpg\x22;i:1;s:3:\x22gif\x22;i:2;s:2:\x22js\x22;i:3;s:3:\x22pdf\x22;i:4;s:3:\x22zip\x22;i:5;s:3:\x22txt\x22;i:6;s:3:\x22psd\x22;i:7;s:3:\x22png\x22;i:8;s:4:\x22html\x22;i:9;s:3:\x22swf\x22;i:10;s:3:\x22xml\x22;i:11;s:3:\x22xls\x22;\x7D\x7D',
'backend_data[session_name]': 'PHPSESSID',
'backend_data[key_location]': 'Xinha:BackendKey',
'backend_data[hash]': 'b1c56440a7155dbf9cb712aef7908cd2ee97d9b3',
PHPSESSID: '4bed81f1449c3009d0b69ec97685f8c4'
}; 
		}
	}


	xinha_editors   = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);

	Xinha.startEditors(xinha_editors);
}

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