text: editor.firstForSR=0;editor.currentRangeForSR=null;function clickHandler(a,b,c){for(var e=0,d=a.length;e<d;e++)a[e].className="";c.className="focus";a=c.getAttribute("tabSrc");c=0;for(e=b.length;c<e;c++)d=b[c],d.getAttribute("id")!=a?d.style.zIndex=1:d.style.zIndex=200}function switchTab(a){a=$G(a).children;var b=a[0].children,c=a[1].children;a=0;for(var e=b.length;a<e;a++){var d=b[a];"focus"===d.className&&clickHandler(b,c,d);d.onclick=function(){clickHandler(b,c,this)}}}
  $G("searchtab").onmousedown=function(){$G("search-msg").innerHTML="";$G("replace-msg").innerHTML=""};function getMatchCase(a){return $G(a).checked?!0:!1}$G("nextFindBtn").onclick=function(a,b,c){a=$G("findtxt").value;if(!a)return!1;a={searchStr:a,dir:1,casesensitive:getMatchCase("matchCase")};frCommond(a)||(a=editor.selection.getRange().createBookmark(),$G("search-msg").innerHTML=lang.getEnd,editor.selection.getRange().moveToBookmark(a).select())};
  $G("nextReplaceBtn").onclick=function(a,b,c){a=$G("findtxt1").value;if(!a)return!1;a={searchStr:a,dir:1,casesensitive:getMatchCase("matchCase1")};frCommond(a)};$G("preFindBtn").onclick=function(a,b,c){a=$G("findtxt").value;if(!a)return!1;a={searchStr:a,dir:-1,casesensitive:getMatchCase("matchCase")};frCommond(a)||($G("search-msg").innerHTML=lang.getStart)};
  $G("preReplaceBtn").onclick=function(a,b,c){a=$G("findtxt1").value;if(!a)return!1;a={searchStr:a,dir:-1,casesensitive:getMatchCase("matchCase1")};frCommond(a)};$G("repalceBtn").onclick=function(){var a=$G("findtxt1").value.replace(/^\s|\s$/g,""),b=$G("replacetxt").value.replace(/^\s|\s$/g,"");if(!a||a==b||!getMatchCase("matchCase1")&&a.toLowerCase()==b.toLowerCase())return!1;a={searchStr:a,dir:1,casesensitive:getMatchCase("matchCase1"),replaceStr:b};frCommond(a)};
  $G("repalceAllBtn").onclick=function(){var a=$G("findtxt1").value.replace(/^\s|\s$/g,""),b=$G("replacetxt").value.replace(/^\s|\s$/g,"");if(!a||a==b||!getMatchCase("matchCase1")&&a.toLowerCase()==b.toLowerCase())return!1;a={searchStr:a,casesensitive:getMatchCase("matchCase1"),replaceStr:b,all:!0};if(a=frCommond(a))$G("replace-msg").innerHTML=lang.countMsg.replace("{#count}",a)};var frCommond=function(a){return editor.execCommand("searchreplace",a)};switchTab("searchtab");