﻿if (typeof(RadSpellNamespace)=="u\x6e\x64efined")RadSpellNamespace= {} ; function GetSpellCheckService(o){return window[o]; } ; RadSpellNamespace.SpellCheckService= function (t){ this.Initialized= false; this.Id=t[0]; this.i6=t[1]; this.DictionaryLanguage=t[2]; this.Configuration=t[3]; this.I6= false; this.o7=null; this.O7=null; this.l7=null; RadControlsNamespace.DomEventsMixin.Initialize(this ); };RadSpellNamespace.SpellCheckService.prototype= {SpellCheck:function (text,i7,onError){var I7=this.SetupXmlHttpRequest(i7,onError); if (I7){ this.SendXmlHttpRequest(this.GetSpellCheckPostArguments(text)); }return I7; } ,AddCustomWord:function (o8,i7,onError){var I7=this.SetupXmlHttpRequest(i7,onError); if (I7){ this.SendXmlHttpRequest(this.GetAddCustomPostArguments(o8)); }return I7; } ,SetupXmlHttpRequest:function (i7,onError){if (!this.I6){ this.I6= true; this.O7=RadControlsNamespace.EventMixin.ResolveFunction(i7); this.l7=onError?RadControlsNamespace.EventMixin.ResolveFunction(onError): this.SpellErrorHandler; return true; }return false; } ,SendXmlHttpRequest:function (O8){if (typeof(XMLHttpRequest)!="\x75n\x64\x65fined"){ this.o7=new XMLHttpRequest(); }else if (typeof(ActiveXObject)!="\x75ndefi\x6e\x65d"){ this.o7=new ActiveXObject("\x4dicrosoft\x2e\x58MLH\x54\x54P"); }else return; this.o7.onreadystatechange=this.CreateEventHandler("\x48andleC\x61\x6clback"); this.o7.open("\120\x4f\123T",this.GetTimeStampedCallbackUrl(), true); this.o7.setRequestHeader("Content-T\x79\x70e","\x61pplicatio\x6e\x2fx-w\x77\x77-f\x6f\x72m-u\x72\x6cen\x63\x6fd\x65d"); this.o7.send(O8); } ,GetTimeStampedCallbackUrl:function (){var m=this.i6.indexOf("?")<0?"?": "\x26"; return this.i6+m+"RadUploadTim\x65\123t\x61\x6dp="+new Date().getTime(); } ,HandleCallback:function (){if (this.o7.readyState!=4)return; this.I6= false; this.ProcessCallbackResponse(); this.Cleanup(); } ,ProcessCallbackResponse:function (){if (this.ErrorOccured()){ this.RaiseErrorEvent(); return; }var responseText=this.o7.responseText; if (responseText){var l8=null; try {eval(responseText); l8=SpellCheckResult; }catch (ex){ this.RaiseErrorEvent( { "Er\x72orCode": 500,"\x45rrorText":ex.message,"Message":ex.message,"Text":responseText,"\x58ml": this.o7.i8 } ); return; } this.O7(this,l8); }} ,ErrorOccured:function (){if (!document.all)return false; if (this.o7.status==0 || this.o7.status==200){return false; }return true; } ,SpellErrorHandler:function (I3,o4){var message=""; if (o4.ErrorCode==404){message="\x52adSpell er\x72\x6fr. \x53\x70e\x6c\x6cChe\x63\153\x48\x61nd\x6cer \x77\141s\x20not fo\x75nd: \015\012\x0d\012"+"Please,\x20\x73ee t\x68\x65 he\x6cp for m\x6f\x72e \x64\x65ta\x69ls: Ra\x64Spell\x20\x33.x\x20- Con\x66igura\x74ion \x2d Spel\x6cCh\x65ckHa\x6edle\x72.\015\x0a\015\x0a"+this.i6+"\015\x0a\x0d\012\x44\151d \x79\x6fu \x72\x65gis\x74\145r\x20\164h\x65\040S\x70ellCh\x65\143k\x48andle\x72 in \x77\145b\x2econf\x69g?"; }else if (o4.ErrorCode>0 && o4.ErrorCode!=200){message="RadSpe\x6c\x6c err\x6f\x72. S\x65\162\x76\x65r r\x65\x74ur\x6e\x65d\x20\x65rr\x6f\162:\x20"+o4.ErrorCode+" \015\x0a\015\012"+"\x50\x6cease,\x20\x73ee \x74\x68e h\x65\154p\x20\x66or \x6d\157r\x65 deta\x69\154s\x3a RadS\x70\145l\x6c 3.x\x20\055\x20Confi\x67ura\x74ion \x2d Spe\x6clCh\x65ckHa\x6edle\x72.\015\x0a\015\x0a"+this.i6+"\x0d\012\x0d\x0a"+o4.ErrorText+"\015\x0a\015\x0a"+o4.Text+"\x0d\x0a\015\x0a"; }alert(message); } ,RaiseErrorEvent:function (o4){if (!o4){o4= { "ErrorCode": this.o7.status,"ErrorText": this.o7.I8,"\x4dessage": this.o7.I8,"Text": this.o7.responseText,"Xml": this.o7.i8 };} ; this.l7(this,o4); } ,Cleanup:function (){ this.O7=null; this.l7=null; this.o7.onreadystatechange= function (){} ; } ,GetSpellCheckPostArguments:function (text){return "\x44ictionary\x4c\x61ngu\x61\x67e="+this.o9(this.DictionaryLanguage)+"\x26Config\x75\x72atio\x6e\x3d"+this.o9(this.Configuration)+"\046\x43\x6fmmandA\x72\x67ume\x6e\x74="+this.o9(text)+"\x26\x43ommandN\x61\x6de=Sp\x65\154l\x43\x68eck"; } ,o9:function (value){return (encodeURIComponent)?encodeURIComponent(value):escape(value); } ,GetAddCustomPostArguments:function (o8){return "\x44ictionar\x79\x4cangu\x61\x67e="+this.o9(this.DictionaryLanguage)+"&Configurat\x69\x6fn="+this.o9(this.Configuration)+"\x26CommandArgu\x6d\x65nt="+this.o9(o8)+"&CommandNa\x6d\x65=Ad\x64\x43ust\x6f\155"; }};

if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();