if (typeof(RadSpellNamespace)=="\165ndefin\x65\x64")RadSpellNamespace= {} ; RadSpellNamespace.ContentDisplay= function (U,Z,z,W){RadControlsNamespace.DomEventsMixin.Initialize(this ); RadControlsNamespace.EventMixin.Initialize(this ); this.SpellDialogControl=U; this.IsEditMode= false; this.TextContainer=Z; this.TextEditor=z; this.Suggestions=W; this.Localization=U.Localization; this.AttachDomEvent(this.TextContainer,"click","Swi\x74\x63hMode"); this.InitSuggestions(); } ; RadSpellNamespace.ContentDisplay.prototype= {ShowText:function (text){if (this.IsEditMode){ this.TextEditor.value=text; }else { this.TextContainer.innerHTML=text; }} ,w:function (){if (this.IsEditMode){ this.TextEditor.focus(); }else { this.Suggestions.focus(); }} ,FindWordElement:function (id){var anchors=this.display().V.getElementsByTagName("a"); for (var i=0; i<anchors.length; i++){var anchor=anchors[i]; if (anchor.id=="spell_highl\x69ght_"+id){return anchor; }}return null; } ,SwitchMode:function (){ this.IsEditMode=!this.IsEditMode; if (this.IsEditMode){ this.TextContainer.style.display="n\x6f\x6ee"; this.TextEditor.style.display="block"; this.TextEditor.focus(); this.DisableElement(this.Suggestions); }else { this.TextContainer.style.display=""; this.TextEditor.style.display="n\x6f\x6ee"; this.EnableElement(this.Suggestions); } this.RaiseEvent("\x4dodeC\x68\x61nged", {IsEditMode: this.IsEditMode } ); this.w(); } ,GetReplacementWord:function (){if (this.IsEditMode){return this.TextEditor.value; }else {return this.GetSelectedSuggestion(); }} ,GetSelectedSuggestion:function (){return this.Suggestions.options[this.Suggestions.selectedIndex].value; } ,FillSuggestions:function (W){ this.ClearSuggestions(); if (W.length>0){for (var i=0; i<W.length; i++){ this.AddSuggestion(W[i]); }}else { this.AddSuggestion(this.Localization["Nosugg\x65stions"]); } this.Suggestions.selectedIndex=0; } ,ClearSuggestions:function (){ this.Suggestions.options.length=0; } ,AddSuggestion:function (v){ this.Suggestions.options[this.Suggestions.options.length]=new Option(v,v); } ,EnableElement:function (T){ this.SpellDialogControl.EnableElement(T); } ,DisableElement:function (T){ this.SpellDialogControl.DisableElement(T); } ,InitSuggestions:function (){ this.EnableElement(this.Suggestions); this.AttachDomEvent(this.Suggestions,"\x64blclick","\x4fnSugge\x73\x74ionsD\x62\x6cCl\x69ck"); } ,OnSuggestionsDblClick:function (){ this.RaiseEvent("Sug\x67\x65stions\x44\x62lCl\x69\143\x6b", {SelectedValue: this.GetSelectedSuggestion()} ); }} ;
if (typeof(Sys) != "undefined"){if (Sys.Application != null && Sys.Application.notifyScriptLoaded != null){Sys.Application.notifyScriptLoaded();}}
