
var editors=new Object();var fieldsToCheck=new Array();function FCKeditor_OnComplete(editorInstance)
{var opts={getCharactersLeft:function(){return this.maxLength-this.inputElement.find("body").text().length;}};var doc=editorInstance.EditorDocument;if(editorInstance.Name.match("detail")){editors["detail"]=editorInstance;jQuery(doc).countLength('#chars_remain2',7200,opts);}else if(editorInstance.Name.match("reply")){editors["reply"]=editorInstance;}
editorInstance.Events.AttachEvent('OnFocus',FCKeditor_OnFocus);editorInstance.Events.AttachEvent('OnBlur',FCKeditor_OnBlur);if(typeof enableSpellCheck!=='undefined'&&enableSpellCheck&&typeof BrowserDetect!=='undefined'&&(BrowserDetect.browser!='Chrome'&&BrowserDetect.browser!='Safari')){document.getElementById(editorInstance.Name+"___Frame").contentWindow.document.getElementById("xEditingArea").firstChild.id=editorInstance.Name+"jspell";fieldsToCheck[fieldsToCheck.length]=[document.getElementById(editorInstance.Name+"___Frame").contentWindow.document,editorInstance.Name+"jspell",document.getElementById(editorInstance.Name+"___Frame")];jspellInit();}}
function FCKeditor_OnFocus(editorInstance)
{if(editorInstance.Name.match("detail")||editorInstance.Name.match("reply"))
{if(!editorInstance.Name.match("__")){window.onbeforeunload=unloadMessage;}
jQuery('#chars_remain2').show();}}
function FCKeditor_OnBlur(editorInstance)
{if(editorInstance.Name.match("detail"))
{jQuery('#chars_remain2').hide();}}
function getSpellCheckArray()
{return fieldsToCheck;}