[問題][問題]WYSIWYG - Rich Text Editor 3.0 (所見即所得編輯介面) 解碼問題

phpBB 2 MOD Support
無論是官方或非官方認證之外掛,安裝與使用問題討論。
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

主題已鎖定
minotaur
星球公民
星球公民
文章: 170
註冊時間: 2005-01-05 20:52
聯繫:

[問題][問題]WYSIWYG - Rich Text Editor 3.0 (所見即所得編輯介面) 解碼問題

文章 minotaur »

原本editor.js最底下前半段

代碼: 選擇全部

eval(unescape("%66%75%6E%63%74%69%6F%6E%20%68%70%5F%64%31%31%28%73%29%7B%76%61%72%20%6F%3D%22%22%2C%61%72%3D%6E%65%77%20%41%72%72%61%79%28%29%2C%6F%73%3D%22%22%2C%69%63%3D%30%3B%66%6F%72%28%69%3D%30%3B%69%3C%73%2E%6C%65%6E%67%74%68%3B%69%2B%2B%29%7B%63%3D%73%2E%63%68%61%72%43%6F%64%65%41%74%28%69%29%3B%69%66%28%63%3C%31%32%38%29%63%3D%63%5E%32%3B%6F%73%2B%3D%53%74%72%69%6E%67%2E%66%72%6F%6D%43%68%61%72%43%6F%64%65%28%63%29%3B%69%66%28%6F%73%2E%6C%65%6E%67%74%68%3E%38%30%29%7B%61%72%5B%69%63%2B%2B%5D%3D%6F%73%3B%6F%73%3D%22%22%7D%7D%6F%3D%61%72%2E%6A%6F%69%6E%28%22%22%29%2B%6F%73%3B%72%65%74%75%72%6E%20%6F%7D"));
這行破解後是

代碼: 選擇全部

function hp_d11(s){ 
  var o="" 
  var ar=new Array() 
  var os="" 
  var ic=0; 
  for(i=0;i<s.length;i++){ 
     c=s.charCodeAt(i); 
     if(c<128)c=c^2; 
     os+=String.fromCharCodec; 
     if(os.length>80){ 
        ar[ic++]=os; 
        os="" 
     } 
  } 
  o=ar.join("")+os; 
  return o 
}
也就是用這段用函數去解析editor.js最底下後半段的部份

代碼: 選擇全部

eval(hp_d11(unescape("tcp%22kqPkajVgzv?(中間編碼省略){? tkqk`ng 9%7F")));
我解出來的結果為

代碼: 選擇全部

var isRichText=false;var rng;var currentRTE;var allRTEs="";var isIE;var isGecko;var isOpera9;var HTML_ON;var frame_cp=0;var frame_fontface=0;var frame_fontsize=0;var frame_simle=0;var frame_wordart=0;var frame_clipart=0;var frame_calendar=0;var frame_upload=0;var chkVK=0;if(document.getElementById&&document.designMode)isRichText=true;var ua=navigator.userAgent.toLowerCase();isIE=((ua.indexOf("msie")!=-1)&&(ua.indexOf("opera")==-1)&&(ua.indexOf("webtv")==-1));isGecko=(ua.indexOf("gecko")!=-1&&ua.indexOf("safari")==-1);isOpera9=(ua.indexOf("opera")!=-1&&ua.indexOf("safari")==-1);function Instantiate(rte,html,width,height,buttons,readOnly){buttons=true;readOnly=false;if(isRichText){if(allRTEs.length>0)allRTEs+=";";allRTEs+=rte;writeRTE(rte,html,width,height,buttons,readOnly);}else{writeDefault(rte,html,width,height,buttons,readOnly);}}function enableDesignMode(rte,html,readOnly){html=html.replace(/"/g,'"');html=html.replace(/&bkfls;/g,'\\');var print_dir="";if(mydirection=="rtl"){print_dir=" dir=rtl ";}else{print_dir=" dir=ltr ";}var frameHtml="<html "+print_dir+" id=\""+rte+"\">\n";frameHtml+="<head>\n"+meta_tag+"\n<head>\n";frameHtml+="<body bgcolor=white>\n";frameHtml+=html+"\n";frameHtml+="</body>\n";frameHtml+="</html>";if(document.all){var oRTE=frames[rte].document;oRTE.open();oRTE.write(frameHtml);oRTE.close();if(!readOnly){oRTE.designMode="On";if(buttonMV!="0"){frames[rte].document.attachEvent("onkeypress",function evt_ie_keypress(event){ieKeyPress(event,rte);});frames[rte].document.attachEvent("onkeydown",function evt_ie_keydown(event){ieKeyDown(event,rte);});}}}else{try{if(!readOnly)document.getElementById(rte).contentDocument.designMode="on";try{var oRTE=document.getElementById(rte).contentWindow.document;oRTE.open();oRTE.write(frameHtml);oRTE.close();if(isGecko&&!readOnly){if(buttonMV!="0"){oRTE.addEventListener("keypress",geckoKeyPress,true);oRTE.addEventListener("keydown",geckoKeyDown,true);}else{oRTE.addEventListener("keypress",kb_handler,true);}}}catch(e){alert("Error preloading content.");}}catch(e){if(isGecko){setTimeout("enableDesignMode('"+rte+"', '"+html+"');",10);}else{return false;}}}}function setHTML(){var vRTEs=allRTEs.split(";");for(var i=0;i<vRTEs.length;i++){updateRTE(vRTEs[i]);}}function updateRTE(rte){var oHdnMessage=document.getElementById('hdn'+rte);var oRTE=document.getElementById(rte);var readOnly=false;if(document.all){if(ua.indexOf("opera")!=-1){if(document.getElementById(rte).contentDocument.designMode!="on")readOnly=true;}else{if(frames[rte].document.designMode!="On")readOnly=true;}}else{if(document.getElementById(rte).contentDocument.designMode!="on")readOnly=true;}if(isRichText&&!readOnly){if(chkViewHTML==1){if(document.getElementById("chkSrc"+rte).checked){document.getElementById("chkSrc"+rte).checked=false;toggleHTMLSrc(rte);}}if(oHdnMessage.value==null)oHdnMessage.value="";if(document.all){if(ua.indexOf("opera")!=-1){oHdnMessage.value=oRTE.contentWindow.document.body.innerHTML;}else{oHdnMessage.value=frames[rte].document.body.innerHTML;}}else{oHdnMessage.value=oRTE.contentWindow.document.body.innerHTML;}if(stripHTML(oHdnMessage.value.replace("&nbsp;"," "))=="")oHdnMessage.value="";}}function toggleHTMLSrc(rte){var oRTE;if(document.all){oRTE=frames[rte].document;}else{oRTE=document.getElementById(rte).contentWindow.document;}if(document.getElementById("chkSrc"+rte).checked){HTML_ON="no";if(document.all){oRTE.body.innerText=oRTE.body.innerHTML;}else{var htmlSrc=oRTE.createTextNode(oRTE.body.innerHTML);oRTE.body.innerHTML="";oRTE.body.appendChild(htmlSrc);}}else{HTML_ON="yes";if(document.all){oRTE.body.innerHTML=oRTE.body.innerText;}else{var htmlSrc=oRTE.body.ownerDocument.createRange();htmlSrc.selectNodeContents(oRTE.body);oRTE.body.innerHTML=htmlSrc.toString();}}}function writeDefault(rte,html,width,height,buttons,readOnly){document.writeln('<center><textarea name="'+rte+'" id="'+rte+'" style="width: '+500+'px; height: '+height+'px;">'+html+'</textarea></center>');document.writeln('<input type=hidden name=editor_off value=1>');}function writeRTE(rte,html,width,height,buttons,readOnly){if(Credit!="Rich Text Editor by http://www.eCardMax.com"&#41;&#123;alert("Please do not remove or modify the Credit 'Rich Text Editor by http://www.eCardMax.com' inside the script editor.js");return false;}document.writeln('<input type=hidden name=editor_off value=0>');document.writeln('<style type="text/css">');document.writeln('.buttons {cursor: pointer; cursor: hand;}');document.writeln('</style>');document.writeln("<div align=center>\n");document.writeln("<center>\n");document.writeln("<table border=1 cellpadding=0 cellspacing=0 style='border-collapse: collapse' width=100% height=65 bgcolor="+ToolbarBkgColor+" bordercolor="+ToolbarBorderColor+" >\n");document.writeln("<tr>\n");document.writeln("<td align=left width=100% height=20 nowrap bgcolor="+TitleColor+">\n");document.writeln(" <img align=absmiddle src="+ButtonPath+"/logo.gif border=0>\n");var Domain=document.URL;Domain=Domain.toLowerCase();Domain=Domain.replace(/http:/g,"");Domain=Domain.replace(/www./g,"");Domain=Domain.split("/");Domain=Domain[2];var str=Keycode;str=str.substr(5,str.length-10);enc_str_leng=Math.round(str.length/3);center=str.substr(enc_str_leng,enc_str_leng);str=str.replace(center,"");str=center+str;var prand="";var pwd="hongthienkhoihoangthihienhongduytoan";for(var i=0;i<pwd.length;i++){prand+=pwd.charCodeAt(i).toString();}var sPos=Math.floor(prand.length/5);var mult=parseInt(prand.charAt(sPos)+prand.charAt(sPos*2)+prand.charAt(sPos*3)+prand.charAt(sPos*4)+prand.charAt(sPos*5));var incr=Math.round(pwd.length/2);var modu=Math.pow(2,31)-1;var salt=parseInt(str.substring(str.length-8,str.length),16);str=str.substring(0,str.length-8);prand+=salt;while(prand.length>10){prand=(parseInt(prand.substring(0,10))+parseInt(prand.substring(10,prand.length))).toString();}prand=(mult*prand+incr)%modu;var enc_chr="";var enc_str="";for(var i=0;i<str.length;i+=2){enc_chr=parseInt(parseInt(str.substring(i,i+2),16)'7A Math.floor((prand/modu)*255));enc_str+=String.fromCharCode(enc_chr);prand=(mult*prand+incr)%modu;}if(isOpera9){document.writeln("<font face=verdana size=1>"+TitleText+"</font>\n");}else{if(Domain!=enc_str){document.writeln("<font face=verdana size=1>Rich Text Editor Version 3.0 by <a href=http://www.hoteditor.com target=_blank>HotEditor.com</a></font>\n");}else{document.writeln("<font face=verdana size=1>"+TitleText+"</font>\n");}}document.writeln("</td>\n");document.writeln("</tr>\n");if(btFont_Name==1||btFont_Size==1||btFont_Color==1||btHighlight==1||btRemove_Format==1||btBold==1||btItalic==1||btUnderline==1||btAlign_Left==1||btCenter==1||btAlign_Right==1||btJustify==1||btBullets==1||btNumbering==1||btDecrease_Indent==1||btQuote==1||btCode==1||btPHP==1){document.writeln("<tr>\n");}else{document.writeln("<tr style='position:absolute;visibility:hidden;'>\n");}document.writeln("<td align=left width=100% height=32 nowrap>\n");document.writeln("<table border=0 cellspacing=0 style='border-collapse: collapse' cellpadding=2>\n");document.writeln("  <tr>\n");document.writeln("    <td><img border=0 src="+ButtonPath+"/space.gif align=absmiddle></td>\n");if(btFont_Name==1)document.writeln("    <td><div id='fontname_"+rte+"'><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"' onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capFont_Name+"'  border=0 src="+ButtonPath+"/fontname.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'fontname', '')\"></div></td>\n");if(btFont_Size==1)document.writeln("    <td><div id='fontsize_"+rte+"'><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"' onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capFont_Size+"'  border=0 src="+ButtonPath+"/fontsize.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'fontsize', '')\"></div></td>\n");if(btFont_Color==1)document.writeln("    <td><div id='forecolor_"+rte+"'><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"' onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capFont_Color+"'  border=0 src="+ButtonPath+"/fontcolor.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'forecolor', '')\"></div></td>\n");if(btHighlight==1)document.writeln("    <td><div id='hilitecolor_"+rte+"'><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capHighlight+"'  border=0 src="+ButtonPath+"/highlinght.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'hilitecolor', '')\"></div></td>\n");if(btRemove_Format==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"' onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capRemove_Format+"' border=0 src="+ButtonPath+"/remove.gif align=absmiddle  onClick=\"FormatText("+"'"+rte+"'"+", 'removeformat', '')\"></td>\n");if(btFont_Name==1||btFont_Size==1||btFont_Color==1||btHighlight==1||btRemove_Format==1){document.writeln("    <td><img border=0 src="+ButtonPath+"/space.gif align=absmiddle></td>\n");}if(btBold==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capBold+"'  alt='Bold (Ctrl-B)' border=0 src="+ButtonPath+"/bold.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'bold', '')\"></td>\n");if(btItalic==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capItalic+"' border=0 src="+ButtonPath+"/italic.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'italic', '')\"></td>\n");if(btUnderline==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capUnderline+"'  border=0 src="+ButtonPath+"/underline.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'underline', '')\"></td>\n");if(btBold==1||btItalic==1||btUnderline==1){document.writeln("    <td><img border=0 src="+ButtonPath+"/space.gif align=absmiddle></td>\n");}if(btAlign_Left==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capAlign_Left+"'  border=0 src="+ButtonPath+"/aleft.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'justifyleft', '')\"></td>\n");if(btCenter==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capCenter+"'  border=0 src="+ButtonPath+"/acenter.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'justifycenter', '')\"></td>\n");if(btAlign_Right==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capAlign_Right+"'  border=0 src="+ButtonPath+"/aright.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'justifyright', '')\"></td>\n");if(btJustify==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capJustify+"'  border=0 src="+ButtonPath+"/ajustify.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'justifyfull', '')\"></td>\n");if(btAlign_Left==1||btCenter==1||btAlign_Right==1||btJustify==1){document.writeln("    <td><img border=0 src="+ButtonPath+"/space.gif align=absmiddle></td>\n");}if(btBullets==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capBullets+"'  border=0 src="+ButtonPath+"/listbullets.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'insertunorderedlist', '')\"></td>\n");if(btNumbering==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capNumbering+"'  border=0 src="+ButtonPath+"/listnumber.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'insertorderedlist', '')\"></td>\n");if(btDecrease_Indent==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capDecrease_Indent+"'  border=0 src="+ButtonPath+"/indentleft.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'outdent', '')\"></td>\n");if(btIncrease_Indent==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capIncrease_Indent+"'  border=0 src="+ButtonPath+"/indentright.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'indent', '')\"></td>\n");if(btBullets==1||btNumbering==1||btDecrease_Indent==1||btIncrease_Indent==1){document.writeln("    <td><img border=0 src="+ButtonPath+"/space.gif align=absmiddle></td>\n");}if(btQuote==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"hide_it('"+rte+"'); this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capQuote+"' border=0 src="+ButtonPath+"/quote.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'quote', '')\"></td>\n");if(btCode==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"hide_it('"+rte+"'); this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capCode+"'  border=0 src="+ButtonPath+"/code.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'code', '')\"></td>\n");if(btPHP==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"hide_it('"+rte+"'); this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capPHP+"' border=0 src="+ButtonPath+"/php.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'php', '')\"></td>\n");document.writeln("  </tr>\n");document.writeln("</table>\n");if(btCut==1||btCopy==1||btPaste==1||btUndo==1||btRedo==1||btHyperlink==1||btCalendar==1||btInsert_Image==1||btClipart==1||btWordArt==1||btEmotions==1||btUpload==1||btStrikethrough==1||btSubscript==1||btSuperscript==1||btHorizontal==1||btSymbol==1||chkViewHTML==1){document.writeln("<table border=0 cellpadding=2 cellspacing=0 style='border-collapse: collapse'>\n");}else{document.writeln("<table border=0 style='position:absolute;visibility:hidden' cellpadding=2 cellspacing=0 style='border-collapse: collapse'>\n");}document.writeln("  <tr>\n");document.writeln("    <td><img border=0 src="+ButtonPath+"/space.gif align=absmiddle></td>\n");if(btCut==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capCut+"' border=0 src="+ButtonPath+"/cut.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'cut', '')\"></td>\n");if(btCopy==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capCopy+"' border=0 src="+ButtonPath+"/copy.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'copy', '')\"></td>\n");if(btPaste==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capPaste+"' border=0 src="+ButtonPath+"/paste.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'paste', '')\"></td>\n");if(btCut==1||btCopy==1||btPaste==1){document.writeln("    <td><img border=0 src="+ButtonPath+"/space.gif align=absmiddle></td>\n");}if(btUndo==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capUndo+"' border=0 src="+ButtonPath+"/undo.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'undo', '')\"></td>\n");if(btRedo==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capRedo+"' border=0 src="+ButtonPath+"/redo.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'redo', '')\"></td>\n");if(btUndo==1||btRedo==1){document.writeln("    <td><img border=0 src="+ButtonPath+"/space.gif align=absmiddle></td>\n");}if(btHyperlink==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capHyperlink+"' border=0 src="+ButtonPath+"/createlink.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'createlink', '')\"></td>\n");if(btCalendar==1)document.writeln("    <td><div id='calendar_"+rte+"'><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capCalendar+"'  border=0 src="+ButtonPath+"/calendar.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'calendar', '')\"></div></td>\n");if(btHyperlink==1||btCalendar==1){document.writeln("    <td><img border=0 src="+ButtonPath+"/space.gif align=absmiddle></td>\n");}if(btInsert_Image==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capInsert_Image+"' border=0 src="+ButtonPath+"/insertimage.gif align=absmiddle onClick=\"AddImage("+"'"+rte+"'"+")\"></td>\n");if(btClipart==1)document.writeln("    <td><div id='clipart_"+rte+"'><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"hide_it('"+rte+"'); this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capClipart+"' border=0 src="+ButtonPath+"/insertclipart.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'clipart', '')\"></div></td>\n");if(btWordArt==1)document.writeln("    <td><div id='wordart_"+rte+"'><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"hide_it('"+rte+"'); this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capWordArt+"' border=0 src="+ButtonPath+"/insertwordart.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'wordart', '')\"></div></td>\n");if(btEmotions==1)document.writeln("    <td><div id='smile_"+rte+"'><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"hide_it('"+rte+"'); this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capEmotions+"' border=0 src="+ButtonPath+"/insertsmile.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'smile', '')\"></div></td>\n");if(btUpload==1)document.writeln("    <td><div id='upload_"+rte+"'><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"hide_it('"+rte+"'); this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capUpload+"' border=0 src="+ButtonPath+"/upload.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'upload', '')\"></div></td>\n");if(btInsert_Image==1||btClipart==1||btWordArt==1||btEmotions==1||btUpload==1){document.writeln("    <td><img border=0 src="+ButtonPath+"/space.gif align=absmiddle></td>\n");}if(btStrikethrough==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capStrikethrough+"' border=0 src="+ButtonPath+"/strikethrough.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'Strikethrough', '')\"></td>\n");if(btSubscript==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capSubscript+"' border=0 src="+ButtonPath+"/subscript.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'Subscript', '')\"></td>\n");if(btSuperscript==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capSuperscript+"' border=0 src="+ButtonPath+"/superscript.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'Superscript', '')\"></td>\n");if(btHorizontal==1)document.writeln("    <td><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capHorizontal+"' border=0 src="+ButtonPath+"/line.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'inserthorizontalrule', '')\">\n");if(btSymbol==1)document.writeln("    <td><div id='symbol_"+rte+"'><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"hide_it('"+rte+"'); this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capSymbol+"' border=0 src="+ButtonPath+"/symbol.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'symbol', '')\"></div></td>\n");if(btStrikethrough==1||btSubscript==1||btSuperscript==1||btHorizontal==1||btSymbol==1){document.writeln("    <td><img border=0 src="+ButtonPath+"/space.gif align=absmiddle></td>\n");}if(btVirtualKeyboard==1)document.writeln("    <td><div id='vk_"+rte+"'><img class=buttons style='border: 1px solid "+ToolbarBkgColor+"'  onMouseout=\"this.style.backgroundColor=''; this.style.border='1px solid "+ToolbarBkgColor+"';\" onMouseover=\"hide_it('"+rte+"'); this.style.backgroundColor='"+ButtonBkgColor+"'; this.style.border='1px solid "+ButtonBorderColor+"'; \" title='"+capVirtualKeyboard+"' border=0 src="+ButtonPath+"/virtual_keyboard.gif align=absmiddle onClick=\"FormatText("+"'"+rte+"'"+", 'vk', '')\"></div></td>\n");if(chkViewHTML==1)document.writeln('<td><input title="'+capViewHTML+'" type="checkbox" id="chkSrc'+rte+'" onclick="toggleHTMLSrc(\''+rte+'\');" /><font face=verdana size=1>HTML</font></td>');document.writeln("  </tr>\n");document.writeln("</table>\n");document.writeln("</td>\n");document.writeln("</tr>\n");document.writeln("<tr>\n");document.writeln("<td width=100% height=32 nowrap>\n");document.writeln('<iframe onMouseOver="closeVK();" frameborder=0 style="border: 1px solid '+ToolbarBorderColor+'black" id="'+rte+'" name="'+rte+'" width="'+width+'px" height="'+height+'px"></iframe>');document.writeln("</td>\n");document.writeln("</tr>\n");if(buttonMV!="0"&&!isOpera9){viewBD=1;document.writeln("<tr>\n");document.writeln("<td>\n");document.writeln("<table border=0 width=100%>\n");document.writeln("<td width=74%><center><div id=showBD>BoDau mViet</div><div id=jvmdiv></div></center></td>\n");document.writeln("</table>\n");document.writeln("</td>\n");document.writeln("</tr>\n");}document.writeln("</table>\n");document.writeln("</center>\n");document.writeln("</div>\n");document.writeln("<div id='insert_pop' style='visibility:hidden; width:450; position:absolute; top:0; left:0;' align='center'>\n");document.writeln("<center>\n");document.writeln("<table border='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='100%' bgcolor='#C0C0C0'>\n");document.writeln("<tr>\n");document.writeln("<td width='100%'><table border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='100%' bgcolor='#E0E0E0'>\n");document.writeln("<tr>\n");document.writeln("<td id='insert_title' style='CURSOR: move' width='92%' height='20' bgcolor='#C0C0C0'>\n");document.writeln("<ilayer>\n");document.writeln("<layer onmouseover='steditor=1;' onmouseout='steditor=0'>\n");document.writeln("<font face='Verdana' size='1'><b><span id=change_title></span></b></font>\n");document.writeln("</layer>\n");document.writeln("</ilayer>\n");document.writeln("</td>\n");document.writeln("<td width='8%' bgcolor='#C0C0C0' title='Close' style='CURSOR: hand; CURSOR: Pointer' onclick='close_insert_pop();return false' ><p align='center'><b><font face='Verdana' size='1'>X</font></b></td>\n");document.writeln("</tr>\n");document.writeln("<tr>\n");document.writeln("<td width='100%' colspan='2'>\n");document.writeln("<iframe name='insert_elm' frameborder=0 width='100%' height='250' src='' scrolling='auto'></iframe>\n");document.writeln("</td>\n");document.writeln("</tr>\n");document.writeln("</table>\n");document.writeln("</td>\n");document.writeln("</tr>\n");document.writeln("</table>\n");document.writeln("</center>\n");document.writeln("</div>\n");document.writeln('<input type="hidden" id="hdn'+rte+'" name="'+rte+'" value="">');document.getElementById('hdn'+rte).value=html;enableDesignMode(rte,html,readOnly);}function closeVK(){if(document.all){if(chkVK==1){close_insert_pop();}}}function FormatText(rte,command,option){if(HTML_ON=="no"){alert("Please uncheck the HTML checkbox");return false;}var oRTE;if(document.all){if(ua.indexOf("opera")!=-1){oRTE=document.getElementById(rte).contentWindow;var selection=oRTE.getSelection();rng=selection.getRangeAt(selection.rangeCount-1).cloneRange();}else{oRTE=frames[rte];var selection=oRTE.document.selection;if(selection!=null){rng=selection.createRange();}}}else{oRTE=document.getElementById(rte).contentWindow;var selection=oRTE.getSelection();rng=selection.getRangeAt(selection.rangeCount-1).cloneRange();}try{if((command=="forecolor")||(command=="hilitecolor")){parent.command=command;currentRTE=rte;buttonElement=document.getElementById(command+'_'+rte);frames['insert_elm'].location.href=colorselect_path;document.getElementById('insert_pop').style.left=getOffsetLeft(buttonElement)+"px";document.getElementById('insert_pop').style.top=(getOffsetTop(buttonElement)+buttonElement.offsetHeight)+"px";open_insert_pop();document.getElementById('insert_pop').style.width=400;if(document.all)change_title.innerHTML=pop_Select_Color;else if(document.getElementById)document.getElementById("change_title").innerHTML=pop_Select_Color;}else if(command=="vk"){parent.command=command;currentRTE=rte;buttonElement=document.getElementById(command+'_'+rte);frames['insert_elm'].location.href=VirtualKeyboard_path;document.getElementById('insert_pop').style.left=(getOffsetLeft(buttonElement)-200)+"px";document.getElementById('insert_pop').style.top=(getOffsetTop(buttonElement)+buttonElement.offsetHeight)+"px";open_insert_pop();document.getElementById('insert_pop').style.width=450;if(document.all)change_title.innerHTML=pop_Insert_VK;else if(document.getElementById)document.getElementById("change_title").innerHTML=pop_Insert_VK;chkVK=1;}else if(command=="insert"){parent.command=command;currentRTE=rte;buttonElement=document.getElementById(command+'_'+rte);frames['insert_elm'].location.href=Insert_path;document.getElementById('insert_pop').style.left=getOffsetLeft(buttonElement)+"px";document.getElementById('insert_pop').style.top=(getOffsetTop(buttonElement)+buttonElement.offsetHeight)+"px";open_insert_pop();document.getElementById('insert_pop').style.width=450;if(document.all)change_title.innerHTML=pop_Insert;else if(document.getElementById)document.getElementById("change_title").innerHTML=pop_Insert;chkVK=1;}else if(command=="quote"){if(isIE){oRTE.focus();link=rng.htmlText;rng.pasteHTML('[quote]'+link+'[/quote]');}else if(isGecko){var text=document.createTextNode('[quote]'+selection+'[/quote]');rExp=/<img/gi;if(selection!=""&&rExp!=""){oRTE.document.execCommand("delete",false,selection);}rng.insertNode(text);}else if(isOpera9){var text='[quote]'+selection+'[/quote]';oRTE.focus();currentRTE=rte;InsertSymbol(text);}}else if(command=="code"){if(isIE){hide_it(rte);link=rng.htmlText;rng.pasteHTML('[code]'+link+'
');}else if(isGecko){var text=document.createTextNode('

代碼: 選擇全部

'+selection+'
');rExp=/<img/gi;if(selection!=""&&rExp!=""){oRTE.document.execCommand("delete",false,selection);}rng.insertNode(text);}else if(isOpera9){var text='

代碼: 選擇全部

'+selection+'
';oRTE.focus();currentRTE=rte;InsertSymbol(text);}}else if(command=="php"){if(isIE){link=rng.htmlText;rng.pasteHTML('[php]'+link+'[/php]');}else if(isGecko){var text=document.createTextNode('[php]'+selection+'[/php]');rExp=/<img/gi;if(selection!=""&&rExp!=""){oRTE.document.execCommand("delete",false,selection);}rng.insertNode(text);}else if(isOpera9){var text='[php]'+selection+'[/php]';oRTE.focus();currentRTE=rte;InsertSymbol(text);}}else if(command=="symbol"){parent.command=command;currentRTE=rte;buttonElement=document.getElementById(command+'_'+rte);frames['insert_elm'].location.href=symbol_path;document.getElementById('insert_pop').style.left=getOffsetLeft(buttonElement)+"px";document.getElementById('insert_pop').style.top=(getOffsetTop(buttonElement)+buttonElement.offsetHeight)+"px";open_insert_pop();document.getElementById('insert_pop').style.width=430;if(document.all)change_title.innerHTML=pop_Insert_Symbol;else if(document.getElementById)document.getElementById("change_title").innerHTML=pop_Insert_Symbol;}else if(command=="fontname"){parent.command=command;currentRTE=rte;buttonElement=document.getElementById(command+'_'+rte);frames['insert_elm'].location.href=fontface_path;document.getElementById('insert_pop').style.left=getOffsetLeft(buttonElement)+"px";document.getElementById('insert_pop').style.top=(getOffsetTop(buttonElement)+buttonElement.offsetHeight)+"px";open_insert_pop();document.getElementById('insert_pop').style.width=400;if(document.all)change_title.innerHTML=pop_Select_Font;else if(document.getElementById)document.getElementById("change_title").innerHTML=pop_Select_Font;}else if(command=="fontsize"){parent.command=command;currentRTE=rte;buttonElement=document.getElementById(command+'_'+rte);frames['insert_elm'].location.href=fontsize_path;document.getElementById('insert_pop').style.left=getOffsetLeft(buttonElement)+"px";document.getElementById('insert_pop').style.top=(getOffsetTop(buttonElement)+buttonElement.offsetHeight)+"px";open_insert_pop();document.getElementById('insert_pop').style.width=230;if(document.all)change_title.innerHTML=pop_Select_FontSize;else if(document.getElementById)document.getElementById("change_title").innerHTML=pop_Select_FontSize;}else if(command=="smile"){parent.command=command;currentRTE=rte;buttonElement=document.getElementById(command+'_'+rte);frames['insert_elm'].location.href=smiles_path;document.getElementById('insert_pop').style.left=getOffsetLeft(buttonElement)+"px";document.getElementById('insert_pop').style.top=(getOffsetTop(buttonElement)+buttonElement.offsetHeight)+"px";open_insert_pop();document.getElementById('insert_pop').style.width=400;if(document.all)change_title.innerHTML=pop_Select_Smile;else if(document.getElementById)document.getElementById("change_title").innerHTML=pop_Select_Smile;}else if(command=="wordart"){parent.command=command;currentRTE=rte;buttonElement=document.getElementById(command+'_'+rte);frames['insert_elm'].location.href=wordarts_path;document.getElementById('insert_pop').style.left=getOffsetLeft(buttonElement)+"px";document.getElementById('insert_pop').style.top=(getOffsetTop(buttonElement)+buttonElement.offsetHeight)+"px";open_insert_pop();document.getElementById('insert_pop').style.width=400;if(document.all)change_title.innerHTML=pop_Select_WordArt;else if(document.getElementById)document.getElementById("change_title").innerHTML=pop_Select_WordArt;}else if(command=="clipart"){parent.command=command;currentRTE=rte;buttonElement=document.getElementById(command+'_'+rte);frames['insert_elm'].location.href=cliparts_path;document.getElementById('insert_pop').style.left=getOffsetLeft(buttonElement)+"px";document.getElementById('insert_pop').style.top=(getOffsetTop(buttonElement)+buttonElement.offsetHeight)+"px";open_insert_pop();document.getElementById('insert_pop').style.width=400;if(document.all)change_title.innerHTML=pop_Select_ClipArt;else if(document.getElementById)document.getElementById("change_title").innerHTML=pop_Select_ClipArt;}else if(command=="upload"){parent.command=command;currentRTE=rte;buttonElement=document.getElementById(command+'_'+rte);frames['insert_elm'].location.href=upload_path;document.getElementById('insert_pop').style.left=getOffsetLeft(buttonElement)+"px";document.getElementById('insert_pop').style.top=(getOffsetTop(buttonElement)+buttonElement.offsetHeight)+"px";open_insert_pop();document.getElementById('insert_pop').style.width=400;if(document.all)change_title.innerHTML=pop_Select_Upload;else if(document.getElementById)document.getElementById("change_title").innerHTML=pop_Select_Upload;}else if(command=="calendar"){parent.command=command;currentRTE=rte;buttonElement=document.getElementById(command+'_'+rte);frames['insert_elm'].location.href=celendar_path;document.getElementById('insert_pop').style.left=getOffsetLeft(buttonElement)+"px";document.getElementById('insert_pop').style.top=(getOffsetTop(buttonElement)+buttonElement.offsetHeight)+"px";open_insert_pop();document.getElementById('insert_pop').style.width=400;if(document.all)change_title.innerHTML=pop_Select_Calendar;else if(document.getElementById)document.getElementById("change_title").innerHTML=pop_Select_Calendar;}else if(command=="createlink"){var szURL=prompt("Enter a URL:","");try{oRTE.document.execCommand("Unlink",false,null);oRTE.document.execCommand("CreateLink",false,szURL);}catch(e){}}else if(command=="paste"){oRTE.focus();oRTE.document.execCommand(command,true);}else{oRTE.document.execCommand(command,false,option);}}catch(e){alert(e);}}function SetKeyboard(data){VirtualKeyboard_path=data;}function Set_smiles_path(data){smiles_path=data;}function Set_wordarts_path(data){wordarts_path=data;}function Set_cliparts_path(data){cliparts_path=data;}function InsertSymbol(data){if(HTML_ON=="no"){alert("Please uncheck the HTML checkbox");return false;}var rte=currentRTE;var oRTE;if(data=='BF'){data="\\";}if(data=='<'){data="<";}if(data=='>'){data=">";}if(data=='&'){data="&";}if(document.all){if(ua.indexOf("opera")!=-1){oRTE=document.getElementById(rte).contentWindow;oRTE.focus();oRTE.document.execCommand('insertHTML',false,data);}else{oRTE=frames[rte];oRTE.focus();rng.collapse(false);rng.pasteHTML(data);rng.select();var selection=oRTE.document.selection;if(selection!=null)rng=selection.createRange();}}else{oRTE=document.getElementById(rte).contentWindow;oRTE.focus();oRTE.document.execCommand('insertHTML',false,data);}}function SetFontFormat(data){var rte=currentRTE;var oRTE;if(document.all){if(ua.indexOf("opera")!=-1){oRTE=document.getElementById(rte).contentWindow;}else{oRTE=frames[rte];}}else{oRTE=document.getElementById(rte).contentWindow;}var parentCommand=parent.command;if(document.all){if(ua.indexOf("opera")!=-1){oRTE.focus();}else{var sel=oRTE.document.selection;if(parentCommand=="hilitecolor")parentCommand="backcolor";if(sel!=null){var newRng=sel.createRange();newRng=rng;newRng.select();}}}else{oRTE.focus();}oRTE.document.execCommand(parentCommand,false,data);oRTE.focus();}function close_frame(data){open_insert_pop(data);var rte=currentRTE;var oRTE;hide_it(rte);}function hide_it(rte){var oRTE;if(document.all){oRTE=frames[rte];}else{oRTE=document.getElementById(rte).contentWindow;}oRTE.focus();}function AddImage(rte){if(HTML_ON=="no"){alert("Please uncheck the HTML checkbox");return false;}var oRTE;if(document.all){oRTE=frames[rte];var selection=oRTE.document.selection;if(selection!=null){rng=selection.createRange();}}else{oRTE=document.getElementById(rte).contentWindow;var selection=oRTE.getSelection();rng=selection.getRangeAt(selection.rangeCount-1).cloneRange();}imagePath=prompt('Enter Image URL:','http://');if((imagePath!=null)&&(imagePath!="")){oRTE.focus();var a;oRTE.document.execCommand('InsertImage',false,imagePath);}oRTE.focus();}function geckoKeyDown(e){mvnK(e.which);}function geckoKeyPress(evt){var rte=evt.target.id;if(evt.ctrlKey){var key=String.fromCharCode(evt.charCode).toLowerCase();var cmd='';switch(key){case 'b':cmd="bold";break;case 'i':cmd="italic";break;case 'u':cmd="underline";break;};if(cmd){rteCommand(rte,cmd,null);evt.preventDefault();evt.stopPropagation();}}else{ready=true;mvmoz(evt,rte);}}function ieKeyPress(evt,rte){var key=(evt.which||evt.charCode||evt.keyCode);var stringKey=String.fromCharCode(key).toLowerCase();ready=true;if(MVOff)return;else pL(evt);if(key==13){var range=setRange(rte);var parentelm=range.parentElement();while(parentelm.tagName!="undefined"&&parentelm.tagName!="P"&&parentelm.tagName!="DIV")parentelm=parentelm.parentNode;if(parentelm.tagName=="P")parentelm.style.margin="0px";}}function viewRTE(rte){var text="";var oHdnField=document.getElementById('hdn'+rte);if(document.all){var output=escape(frames[rte].document.body.innerText);output=output.replace("<P><HR>","<HR>");output=output.replace("<HR></P>","<HR>");text=unescape(output);}else{var oRTE=document.getElementById(rte).contentWindow.document;var htmlSrc=oRTE.body.ownerDocument.createRange();htmlSrc.selectNodeContents(oRTE.body);text=htmlSrc.toString();}return text;}function checkspell(){try{var tmpis=new ActiveXObject("ieSpell.ieSpellExtension");tmpis.CheckAllLinkedDocuments(document);}catch(exception){if(exception.number==-2146827859){if(confirm("ieSpell not detected. Click Ok to go to download page."))window.open("http://www.iespell.com/download.php","DownLoad");}else{alert("Error Loading ieSpell: Exception "+exception.number);}}}function getOffsetTop(elm){var mOffsetTop=elm.offsetTop;var mOffsetParent=elm.offsetParent;while(mOffsetParent){mOffsetTop+=mOffsetParent.offsetTop;mOffsetParent=mOffsetParent.offsetParent;}return mOffsetTop;}function getOffsetLeft(elm){var mOffsetLeft=elm.offsetLeft;var mOffsetParent=elm.offsetParent;while(mOffsetParent){mOffsetLeft+=mOffsetParent.offsetLeft;mOffsetParent=mOffsetParent.offsetParent;}return mOffsetLeft;}function Select(rte,selectname){var oRTE;if(document.all){oRTE=frames[rte];var selection=oRTE.document.selection;if(selection!=null){rng=selection.createRange();}}else{oRTE=document.getElementById(rte).contentWindow;var selection=oRTE.getSelection();rng=selection.getRangeAt(selection.rangeCount-1).cloneRange();}var idx=document.getElementById(selectname).selectedIndex;if(idx!=0){var selected=document.getElementById(selectname).options[idx].value;var cmd=selectname.replace('_'+rte,'');oRTE.document.execCommand(cmd,false,selected);document.getElementById(selectname).selectedIndex=0;}}function kb_handler(evt){var rte=evt.target.id;if(evt.ctrlKey){var key=String.fromCharCode(evt.charCode).toLowerCase();var cmd='';switch(key){case 'b':cmd="bold";break;case 'i':cmd="italic";break;case 'u':cmd="underline";break;};if(cmd){FormatText(rte,cmd,true);evt.preventDefault();evt.stopPropagation();}}}function docChanged(evt){alert('changed');}function stripHTML(oldString){var newString=oldString.replace(/(<(['7A>]+)>)/ig,"");newString=escape(newString);newString=newString.replace(""," ");newString=newString.replace(""," ");newString=newString.replace(""," ");newString=unescape(newString);newString=trim(newString);return newString;}function trim(inputString){if(typeof inputString!="string")return inputString;var retValue=inputString;var ch=retValue.substring(0,1);while(ch==" "){retValue=retValue.substring(1,retValue.length);ch=retValue.substring(0,1);}ch=retValue.substring(retValue.length-1,retValue.length);while(ch==" "){retValue=retValue.substring(0,retValue.length-1);ch=retValue.substring(retValue.length-1,retValue.length);}while(retValue.indexOf(" ")!=-1){retValue=retValue.substring(0,retValue.indexOf(" "))+retValue.substring(retValue.indexOf(" ")+1,retValue.length);}return retValue;}var ns4=document.layers;var ie4=document.all;var ns6=document.getElementById&&!document.all;var steditor=0;var nsx;var nsy;var nstemp;function drag_dropns(name){if(!ns4)return;temp=eval(name);temp.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);temp.onmousedown=gons;temp.onmousemove=dragns;temp.onmouseup=stopns;}function gons(e){temp.captureEvents(Event.MOUSEMOVE);nsx=e.x;nsy=e.y;}function dragns(e){if(steditor==1){temp.moveBy(e.x-nsx,e.y-nsy);return false;}}function stopns(){temp.releaseEvents(Event.MOUSEMOVE);}function drag_drop(e){if(ie4&&dragapproved){crossobj.style.left=tempx+event.clientX-offsetx;crossobj.style.top=tempy+event.clientY-offsety;return false;}else if(ns6&&dragapproved){crossobj.style.left=tempx+e.clientX-
●架設主機作業系統:遠端主機
●上網方式:Hinet ADSL 2m/256
● phpBB2 版本:phpBB 2.0.21
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8538
註冊時間: 2004-04-30 01:54
來自: Taiwan

文章 心靈捕手 »

建議您:
別在此討論 '破解' 的問題.

抱歉! 鎖定此文.
施比受有福,祝福您好運! ^_^
歡迎光臨★★心靈捕手★★ :: 討論區
https://wang5555.dnsfor.me/phpBB3/
主題已鎖定

回到「外掛問題討論」