if (typeof(RadSpellNamespace)=="unde\x66\x69ned")RadSpellNamespace= {} ; function GetSpellCheckService(o){return window[o]; } ; RadSpellNamespace.SpellCheckService= function (t){ this.Initialized= false; this.Id=t[0]; this.l6=t[1]; this.DictionaryLanguage=t[2]; this.Configuration=t[3]; this.i6= false; this.I6=null; this.o7=null; this.O7=null; RadControlsNamespace.DomEventsMixin.Initialize(this ); };RadSpellNamespace.SpellCheckService.prototype= {SpellCheck:function (text,l7,onError){var i7=this.SetupXmlHttpRequest(l7,onError); if (i7){ this.SendXmlHttpRequest(this.GetSpellCheckPostArguments(text)); }return i7; } ,AddCustomWord:function (I7,l7,onError){var i7=this.SetupXmlHttpRequest(l7,onError); if (i7){ this.SendXmlHttpRequest(this.GetAddCustomPostArguments(I7)); }return i7; } ,SetupXmlHttpRequest:function (l7,onError){if (!this.i6){ this.i6= true; this.o7=RadControlsNamespace.EventMixin.ResolveFunction(l7); this.O7=onError?RadControlsNamespace.EventMixin.ResolveFunction(onError): this.SpellErrorHandler; return true; }return false; } ,SendXmlHttpRequest:function (o8){if (typeof(XMLHttpRequest)!="u\x6edefin\x65\x64"){ this.I6=new XMLHttpRequest(); }else if (typeof(ActiveXObject)!="\x75\x6edefin\x65\x64"){ this.I6=new ActiveXObject("M\x69\x63rosoft.\x58\x4dLHT\x54\x50"); }else return; this.I6.onreadystatechange=this.CreateEventHandler("HandleCallba\x63\153"); this.I6.open("POST",this.GetTimeStampedCallbackUrl(), true); this.I6.setRequestHeader("\x43ontent-Typ\x65","ap\x70\x6cication\x2f\x78-ww\x77-form-u\x72\x6cenc\x6f\144e\x64"); this.I6.send(o8); } ,GetTimeStampedCallbackUrl:function (){var m=this.l6.indexOf("?")<0?"\x3f": "\x26"; return this.l6+m+"RadUplo\x61\x64Time\x53\x74amp\x3d"+new Date().getTime(); } ,HandleCallback:function (){if (this.I6.readyState!=4)return; this.i6= false; this.ProcessCallbackResponse(); this.Cleanup(); } ,ProcessCallbackResponse:function (){if (this.ErrorOccured()){ this.RaiseErrorEvent(); return; }var responseText=this.I6.responseText; if (responseText){var O8=null; try {eval(responseText); O8=SpellCheckResult; }catch (ex){ this.RaiseErrorEvent( { "\x45r\x72\x6frCode": 500,"\x45rrorText":ex.message,"Mes\x73\x61ge":ex.message,"\x54\x65xt":responseText,"\x58ml": this.I6.l8 } ); return; } this.o7(this,O8); }} ,ErrorOccured:function (){if (!document.all)return false; if (this.I6.status==0 || this.I6.status==200){return false; }return true; } ,SpellErrorHandler:function (i3,I3){var message=""; if (I3.ErrorCode==404){message="\x72.a.d.spell\x20\x65rro\x72\x2e S\x70\145\x6clCheckH\x61\156d\x6cer wa\x73 no\x74\040\x66ound\x3a \015\x0a\015\x0a"+"\x50lease,\x20\x73ee \x74\x68e h\x65\154p\x20\x66or \x6d\157r\x65 deta\x69ls: R\x61dSpel\x6c 3.0 \x2d Con\x66igur\x61tion\x20- S\x70ell\x43hec\x6bHand\x6cer.\x0d\012\x0d\012"+this.l6+"\x0d\012\015\x0aDid yo\x75\040re\x67ister \x74\x68e \x53\x70el\x6c\103\x68\145c\x6bHandl\x65r in\x20web.\x63\157\x6efig?"; }else if (I3.ErrorCode>0 && I3.ErrorCode!=200){message="r.a.d.spell\x20\x65rro\x72\x2e Se\x72\x76er \x72\x65tur\x6e\x65d \x65rror:\x20"+I3.ErrorCode+"\x20\x0d\012\x0d\012"+"\x50\x6cease, \x73\x65e th\x65\x20he\x6c\x70 fo\x72\x20mo\x72\x65 \x64\145t\x61\151l\x73: Ra\x64\123p\x65ll 3\x2e0 - \x43onfi\x67ura\x74ion \x2d Spe\x6clCh\x65ckHa\x6edle\x72.\015\x0a\015\x0a"+this.l6+"\015\x0a\015\x0a"+I3.ErrorText+"\015\012\x0d\012"+I3.Text+"\015\x0a\015\x0a"; }alert(message); } ,RaiseErrorEvent:function (I3){if (!I3){I3= { "ErrorCode": this.I6.status,"\x45rrorText": this.I6.i8,"Message": this.I6.i8,"\x54ext": this.I6.responseText,"\x58ml": this.I6.l8 };} ; this.O7(this,I3); } ,Cleanup:function (){ this.o7=null; this.O7=null; this.I6.onreadystatechange= function (){} ; } ,GetSpellCheckPostArguments:function (text){return "\x44ictionaryLa\x6e\x67uage\x3d"+this.I8(this.DictionaryLanguage)+"\x26Configur\x61\x74ion="+this.I8(this.Configuration)+"\x26\x43ommand\x41\x72gum\x65\x6et="+this.I8(text)+"&Co\x6d\x6dandNam\x65\x3dSpe\x6c\154C\x68\x65ck"; } ,I8:function (value){return (encodeURIComponent)?encodeURIComponent(value):escape(value); } ,GetAddCustomPostArguments:function (I7){return "DictionaryLa\x6e\147u\x61\x67e="+this.I8(this.DictionaryLanguage)+"\x26\x43onfigu\x72\x61tion\x3d"+this.I8(this.Configuration)+"&C\x6f\x6dmandAr\x67\x75ment\x3d"+this.I8(I7)+"&Comm\x61\x6edName\x3d\x41ddCu\x73\164o\x6d"; }};
if (typeof(Sys) != "undefined"){if (Sys.Application != null && Sys.Application.notifyScriptLoaded != null){Sys.Application.notifyScriptLoaded();}}
