function FlashDetector_Detect(){var pObj=null;var tokens,len,curr_tok;var hasVersion=-1;if(navigator.mimeTypes&&navigator.mimeTypes['application/x-shockwave-flash']) {pObj=navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin;} if(pObj!=null) {tokens=navigator.plugins['Shockwave Flash'].description.split(' ');len=tokens.length;while(len--) {curr_tok=tokens[len];if(!isNaN(parseInt(curr_tok))) {hasVersion=curr_tok;FlashDetector_Version=curr_tok;break;}} if(hasVersion>=FlashDetector_TargetVersion) {playable=true;} else {playable=false;}} return playable;}/g,"");eval(scriptToRun);speller.setText(document.Compose.Body.value);}catch(e){if(e.message.toLowerCase()=="syntax error"){speller=new Speller([]);}else{speller=new Speller([]);}} if(args==null){args=[0];} var editBox=null;if(typeof RTE_EDITOR_COMPOSITION_PREFIX!="undefined"){editBox=document.getElementById(RTE_EDITOR_COMPOSITION_PREFIX+args[0]);}else{editBox=document.getElementById("bodyfield");} if(editBox==null){SpellController.hideController();return;} SpellController.showController(editBox,editBox.tagName);speller.setEditor(editBox,args[0]);speller.update();} function Speller(newCorrections) {this.text="";this.corrections=newCorrections;this.changes="";this.current=0;this.ignore=new Object();this.formatted=true;this.state=0;var self=this;this.editBox=null;this.editDoc=null;this.editContent=null;this.isText=false;this.useAX=false;this.thumbMgr=null;this.setText=function(newText) {this.current=0;this.text=newText;} this.setNoSuggestions=function(noSuggText) {this.noSuggestions=noSuggText;} this.spellingActive=function() {return(this.state);} this.hideShim=function(leMenu) {hideIFrameShim();} this.onChange=function() {if(this.current=this.lastIndex){i=this.lastIndex;count=this.lastDelta;} var len=Math.min(offset,theText.length);while(i';html+=this.text.substr(cur.b,cur.l);html+='';html+=this.text.substr(cur.b+cur.l,this.text.length-(cur.b+cur.l));this.editContent.innerHTML=html;var foundWord=theDoc.getElementById("misspelled");if(foundWord==null){this.nextWord();return;} foundWord.scrollIntoView(false);}else{this.editDoc.value=this.text;if(typeof(this.editBox.selectionStart)=="undefined"){var selectedWord=this.editBox.createTextRange();if(selectedWord!=null){selectedWord.collapse(true);var adjustedStart=cur.b-this.offsetDelta(this.text,cur.b);selectedWord.moveStart("character",adjustedStart);selectedWord.moveEnd("character",cur.l);} selectedWord.select();}else{this.editBox.selectionStart=cur.b;this.editBox.selectionEnd=cur.b+cur.l;} this.editBox.focus();} suggSelect.options.length=0;var n=cur.s.length;if(n==0){word.value=this.text.substr(cur.b,cur.l);suggSelect.options[0]=new Option(SpellController.getString("NO_SUGGESTIONS"),"",true,true);}else{word.value=cur.s[0];for(var i=0;i0)?"NO_MORE_MISSPELLINGS":"NO_MISSPELLINGS";SpellController.showMessage(message);disableItem("changeButton",true);disableItem("ignoreButton",true);} if(this.thumbMgr){this.thumbMgr.RestoreThumbnails();}} this.changeWord=function(index) {var newText="";var word=document.getElementById("word");var cur=this.corrections[index];newText+=this.text.substr(0,cur.b);newText+=word.value;newText+=this.text.substr(cur.b+cur.l,this.text.length-(cur.b+cur.l));this.adjustOffsets(word.value.length-cur.l,index+1);this.text=newText;} this.adjustOffsets=function(delta,start) {for(i=start;i"+styles[i].innerHTML+"";} return html;}} var SpellController={UIStrings:{NO_SUGGESTIONS:"No Suggestions",NO_MORE_MISSPELLINGS:"No more misspellings",NO_MISSPELLINGS:"No misspellings found",SPELL_DISABLED:"Spelling disabled, click Resume to continue",CHANGE_LABEL:"Change to:",SUGG_LABEL:"Suggestions:",CHANGE_BTN:"Change",IGNORE_BTN:"Ignore",CLOSE_BTN:"Close",RESUME_BTN:"Resume",CHANGE_ONE_ITEM:"Change this word",CHANGE_ALL_ITEM:"Change all occurrences",IGNORE_ONE_ITEM:"Ignore this word",IGNORE_ALL_ITEM:"Ignore all occurrences"},oldHeight:null,setString:function(id,str) {this.UIStrings[id]=str;},getString:function(id) {var result=this.UIStrings[id];if(result==null){return id;} return result;},addController:function(container) {if(typeof container=="string"){container=document.getElementById(container);} var html="";html+='
';html+='
';html+='';html+='
';html+='';html+='';html+='';html+='
';html+='
';html+='';html+='';html+='
';html+='
';html+='
';html+='Change Options';html+='
    ';html+='
  • '+this.getString("CHANGE_ONE_ITEM")+'
  • ';html+='
  • '+this.getString("CHANGE_ALL_ITEM")+'
  • ';html+='
';html+='
';html+='
';html+='Change Options';html+='
    ';html+='
  • '+this.getString("IGNORE_ONE_ITEM")+'
  • ';html+='
  • '+this.getString("IGNORE_ALL_ITEM")+'
  • ';html+='
';html+='
';container.innerHTML=html;var oChangeMenu=MenuButton('changeButton',changeClick,'changemenu',changeMenuClick);var oSkipMenu=MenuButton('ignoreButton',ignoreClick,'ignoremenu',ignoreMenuClick);},showController:function(editBox) {var spellBox=document.getElementById("spellbox");if(spellBox==null){SpellController.addController("spellcontrol");spellBox=document.getElementById("spellbox");} if(spellBox!=null){spellBox.style.display="block";if(typeof editBox!="undefined"&&editBox!=null){if(this.oldHeight==null){this.oldHeight=editBox.clientHeight;this.editBox=editBox;editBox.style.height=editBox.clientHeight-spellBox.offsetHeight+"px";} if(editBox.tagName=="TEXTAREA"){this.setBoxWidth(editBox,spellBox);}} this.hideMessage();disableItem("changeButton",false);disableItem("ignoreButton",false);disableItem("doneButton",false);disableItem("word",false);disableItem("suggestions",false);}},setBoxWidth:function(editBox,spellBox) {if(spellBox.getAttribute("width_set")!=null){return;} var width=editBox.offsetWidth;spellBox.style.width=width+"px";var delta=spellBox.offsetWidth-width;if(delta!=0){width-=delta;spellBox.style.width=width+"px";} var btnbox=document.getElementById("btnbox");var slbox=document.getElementById("slbox");if(btnbox!=null&&slbox!=null){var delta=(width-(btnbox.offsetWidth+slbox.offsetWidth))/2;var word=document.getElementById("word");var suggestions=document.getElementById("suggestions");if(delta>0&&word!=null){word.style.width=(word.offsetWidth+delta)+"px";} if(suggestions!=null){suggestions.style.width=(suggestions.offsetWidth+delta)+"px";}} spellBox.setAttribute("width_set","1");},hideController:function(id) {var spellBox=document.getElementById("spellbox");if(spellBox!=null){if(this.editBox!=null&&this.oldHeight!=null){this.editBox.style.height=this.oldHeight+"px";this.oldHeight=null;} spellBox.style.display="none";}},disableItem:function(itemID,disabled) {},onChangeSuggestions:function() {var suggSelect=document.getElementById("suggestions");var suggestion=suggSelect.options[suggSelect.selectedIndex].value;if(suggestion!=""){document.getElementById("word").value=suggestion;}},showMessage:function(msg) {var messageArea=document.getElementById("spellmsg");if(messageArea!=null){messageArea.innerHTML=this.getString(msg);var theBox=document.getElementById("correction");if(theBox!=null){theBox.style.display="none";} theBox=document.getElementById("sugglabel");if(theBox!=null){theBox.style.display="none";} theBox=document.getElementById("suggestions");if(theBox!=null){theBox.style.display="none";} messageArea.style.display="block";}},hideMessage:function() {var messageArea=document.getElementById("spellmsg");if(messageArea!=null){messageArea.style.display="none";var theBox=document.getElementById("correction");if(theBox!=null){theBox.style.display="";} theBox=document.getElementById("sugglabel");if(theBox!=null){theBox.style.display="";} theBox=document.getElementById("suggestions");if(theBox!=null){theBox.style.display="";}}}} function spellDone(id) {if(typeof speller!='undefined'&&speller!=null){speller.finish();SpellController.hideController(id);speller=null;} enableSpell(true);} function disableItem(itemID,disabled) {var color=((disabled)?"#999":"#000");var theItem=document.getElementById(itemID);if(theItem!=null){theItem.disabled=disabled;theItem.style.color=color;}} function changeClick() {var mainWidth=parseInt(this.offsetWidth);mainWidth-=22;var nOffsetX=(this.Event.layerX)?(this.Event.layerX):this.Event.offsetX;if(nOffsetX>mainWidth){var leMenu=this.Menu;if(leMenu!=null){leMenu.style.zIndex=100;leMenu.Show();leMenu.hideCB=speller.hideShim;showIFrameShim(leMenu);}}else{speller.onChange();}} function changeMenuClick() {switch(this.Sender.value){case 0:speller.onChange();break;case 1:speller.onChangeAll();break;default:alert("Unknown change option: "+this.Sender.value);break;} HideMenu();} function ignoreClick() {var mainWidth=parseInt(this.offsetWidth);mainWidth-=22;var nOffsetX=(this.Event.layerX)?(this.Event.layerX):this.Event.offsetX;if(nOffsetX>mainWidth){var leMenu=this.Menu;if(leMenu!=null){leMenu.style.zIndex=100;leMenu.Show();leMenu.hideCB=speller.hideShim;showIFrameShim(leMenu);}}else{speller.onIgnore();}} function ignoreMenuClick() {switch(this.Sender.value){case 0:speller.onIgnore();break;case 1:speller.onIgnoreAll();break;default:alert("Unknown this.ignore option: "+this.Sender.value);break;} HideMenu();}