Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SpellCheckService=function(){Telerik.Web.UI.SpellCheckService.initializeBase(this);
this._url="Telerik.Web.UI.SpellCheckHandler.axd";
this._language="en-US";
this._configuration=null
};
Telerik.Web.UI.SpellCheckService.prototype={spellCheck:function(b){this._sendRequest(this._getPostData("SpellCheck",b))
},addCustomWord:function(b){this._sendRequest(this._getPostData("AddCustom",b))
},_processResponse:function(e,f){var h=e.get_statusCode();
if(e.get_responseAvailable()&&200==h&&e.get_responseData().length>0){var g=e.get_object();
if(g.badWords!=null){g.badWords=eval(g.badWords)
}if(g.wordOffsets!=null){g.wordOffsets=eval(g.wordOffsets)
}this.raise_complete(e.get_object())
}else{if(e.get_timedOut()){alert("Spell Check Request time out")
}else{if(e.get_aborted()){alert("Spell Check Request aborted")
}else{if(404==h){window.alert("Web.config registration missing!\n The spellchecking functionality requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information.\n\n"+this.get_url())
}else{if(h>0&&h!=200){window.alert("Spell Check Handler Server Error:"+h+"\n"+e.get_responseData())
}}}}}},_sendRequest:function(f,e){var d=new Sys.Net.WebRequest();
d.set_url(this.get_url());
d.set_httpVerb("POST");
d.set_body(f);
d.add_completed(Function.createDelegate(this,this._processResponse));
d.invoke()
},_getPostData:function(c,d){return"DictionaryLanguage="+this._encode(this._language)+"&Configuration="+this._encode(this._configuration)+"&CommandArgument="+this._encode(d)+"&CommandName="+c
},_encode:function(f){var h=true;
try{var e=$telerik.isIE?document.charset:document.characterSet;
e=e+"";
if(e&&e.toLowerCase().indexOf("utf")==-1){h=false
}}catch(g){}return(encodeURIComponent&&h)?encodeURIComponent(f):escape(f)
},initialize:function(){Telerik.Web.UI.SpellCheckService.callBaseMethod(this,"initialize")
},dispose:function(){Telerik.Web.UI.SpellCheckService.callBaseMethod(this,"dispose")
},get_url:function(){return this._url
},set_url:function(b){this._url=b
},get_language:function(){return this._language
},set_language:function(b){this._language=b
},get_configuration:function(){return this._configuration
},set_configuration:function(b){this._configuration=b
},add_complete:function(b){this.get_events().addHandler("complete",b)
},remove_complete:function(b){this.get_events().removeHandler("complete",b)
},raise_complete:function(c){var d=this.get_events().getHandler("complete");
if(d){if(!c){c=Sys.EventArgs.Empty
}d(this,c)
}}};
Telerik.Web.UI.SpellCheckService.registerClass("Telerik.Web.UI.SpellCheckService",Sys.Component);
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();