📄 editor_.js
字号:
{if(!this.scriptPath)this.scriptPath=oScripts[i].src.replace(/innovaeditor.js/,"")+"moz/";}}this.scriptPathLang=this.scriptPath.replace(/\/moz/,"")+"language/"+this.langDir+"/";if(this.langDir=="english")document.write("<scr"+"ipt src='"+this.scriptPathLang+"editor_lang.js'></scr"+"ipt>");this.oName;this.oEditor;this.obj;this.oSel;this.sType;this.bInside=bInside;this.useSelection=true;this.arrEditor=[];this.onSelectionChanged=function(){return true;};this.activeElement;this.activeModalWin;this.setEdit=setEdit;this.bOnLoadReplaced=false;}function bInside(oElement){while(oElement!=null){if(oElement.designMode&&oElement.designMode=="on")return true;oElement=oElement.parentNode;}return false;}function checkFocus(){var oEditor=document.getElementById("idContent"+this.oName).contentWindow;var oSel=oEditor.getSelection();var parent=getSelectedElement(oSel);if(parent!=null){if(!bInside(parent))return false;}else{if(!bInside(parent))return false;}return true;}function iwe_focus(){var oEditor=document.getElementById("idContent"+this.oName);if(oEditor)oEditor.contentWindow.focus();}function setEdit(oName){if((oName!=null)&&(oName!="")){try{document.getElementById("idContent"+oName).contentDocument.designMode="on";}catch(e){}}else{for(var i=0;i<this.arrEditor.length;i++){try{document.getElementById("idContent"+this.arrEditor[i]).contentDocument.designMode="on";}catch(e){}}}}function InnovaEditor(oName){this.oName=oName;this.RENDER=RENDER;this.loadHTML=loadHTML;this.loadHTMLFull=loadHTMLFull;this.getHTMLBody=getHTMLBody;this.getHTML=getHTML;this.getXHTMLBody=getHTMLBody;this.getXHTML=getHTML;this.putHTML=putHTML;this.css="";this.bInside=bInside;this.checkFocus=checkFocus;this.focus=iwe_focus;this.doCmd=doCmd;this.applyParagraph=applyParagraph;this.applyFontName=applyFontName;this.applyFontSize=applyFontSize;this.applyBullets=applyBullets;this.applyNumbering=applyNumbering;this.applyJustifyLeft=applyJustifyLeft;this.applyJustifyCenter=applyJustifyCenter;this.applyJustifyRight=applyJustifyRight;this.applyJustifyFull=applyJustifyFull;this.applyBlockDirLTR=applyBlockDirLTR;this.applyBlockDirRTL=applyBlockDirRTL;this.applySpan=applySpan;this.makeAbsolute=makeAbsolute;this.insertHTML=insertHTML;this.clearAll=clearAll;this.insertCustomTag=insertCustomTag;this.selectParagraph=selectParagraph;this.doOnPaste=doOnPaste;this.isAfterPaste=false;this.doClean=doClean;this.hide=hide;this.dropShow=dropShow;this.width="580";this.height="250";this.publishingPath="";var oScripts=document.getElementsByTagName("script");for(var i=0;i<oScripts.length;i++){var sSrc=oScripts[i].src.toLowerCase();if(sSrc.indexOf("moz/editor.js")!=-1){this.scriptPath=oScripts[i].src.replace(/editor.js/,"")}}this.iconPath="icons/";this.iconWidth=25;this.iconHeight=24;this.writeIconToggle=writeIconToggle;this.writeIconStandard=writeIconStandard;this.writeDropDown=writeDropDown;this.writeBreakSpace=writeBreakSpace;this.dropTopAdjustment=0;this.applyColor=applyColor;this.customColors=[];this.oColor1=new ColorPicker("oColor1",this.oName);this.oColor2=new ColorPicker("oColor2",this.oName);this.expandSelection=expandSelection;this.useLastForeColor=false;this.useLastBackColor=false;this.stateForeColor="";this.stateBackColor="";this.fullScreen=fullScreen;this.stateFullScreen=false;this.useRealTime=true;this.setRealTime=setRealTime;this.features=[];this.buttonMap=["Save","FullScreen","Preview","Print","Search","SpellCheck","Cut","Copy","Paste","PasteWord","|","Undo","Redo","|","ForeColor","BackColor","|","Bookmark","Hyperlink","CustomTag","Image","Flash","Media","ContentBlock","InternalLink","CustomObject","|","Table","Guidelines","Absolute","|","Characters","Line","Form","Clean","HTMLFullSource","HTMLSource","XHTMLFullSource","XHTMLSource","ClearAll","BRK","StyleAndFormatting","|","Paragraph","FontName","FontSize","|","Bold","Italic","Underline","Strikethrough","Superscript","Subscript","|","JustifyLeft","JustifyCenter","JustifyRight","JustifyFull","|","Numbering","Bullets","|","Indent","Outdent","LTR","RTL"];this.btnSave=false;this.btnPreview=true;this.btnFullScreen=true;this.btnPrint=false;this.btnSearch=true;this.btnSpellCheck=false;this.btnTextFormatting=true;this.btnListFormatting=true;this.btnBoxFormatting=true;this.btnParagraphFormatting=true;this.btnCssText=true;this.btnStyles=false;this.btnParagraph=true;this.btnFontName=true;this.btnFontSize=true;this.btnCut=true;this.btnCopy=true;this.btnPaste=true;this.btnUndo=true;this.btnRedo=true;this.btnBold=true;this.btnItalic=true;this.btnUnderline=true;this.btnStrikethrough=false;this.btnSuperscript=false;this.btnSubscript=false;this.btnJustifyLeft=true;this.btnJustifyCenter=true;this.btnJustifyRight=true;this.btnJustifyFull=true;this.btnNumbering=true;this.btnBullets=true;this.btnIndent=true;this.btnOutdent=true;this.btnLTR=false;this.btnRTL=false;this.btnForeColor=true;this.btnBackColor=true;this.btnHyperlink=true;this.btnBookmark=true;this.btnCharacters=true;this.btnCustomTag=false;this.btnImage=true;this.btnFlash=false;this.btnMedia=false;this.btnTable=true;this.btnGuidelines=true;this.btnAbsolute=true;this.btnPasteWord=true;this.btnLine=true;this.btnForm=true;this.btnClean=true;this.btnHTMLFullSource=false;this.btnHTMLSource=false;this.btnXHTMLFullSource=false;this.btnXHTMLSource=true;this.btnClearAll=false;this.cmdAssetManager="";this.btnContentBlock=false;this.cmdContentBlock=";";this.btnInternalLink=false;this.cmdInternalLink=";";this.insertLink=insertLink;this.btnCustomObject=false;this.cmdCustomObject=";";this.arrStyle=[];this.onCustomCssShow=new Function("modelessDialogShow('"+this.scriptPath+"styles_cssText.htm',360,345)");this.addonCSSBuilder=addonCSSBuilder;this.arrParagraph=[[getText("Heading 1"),"H1"],[getText("Heading 2"),"H2"],[getText("Heading 3"),"H3"],[getText("Heading 4"),"H4"],[getText("Heading 5"),"H5"],[getText("Heading 6"),"H6"],[getText("Preformatted"),"PRE"],[getText("Normal (P)"),"P"],[getText("Normal (DIV)"),"DIV"]];this.arrFontName=["Arial","Arial Black","Arial Narrow","Book Antiqua","Bookman Old Style","Century Gothic","Comic Sans MS","Courier New","Franklin Gothic Medium","Garamond","Georgia","Impact","Lucida Console","Lucida Sans","Lucida Unicode","Modern","Monotype Corsiva","Palatino Linotype","Roman","Script","Small Fonts","Symbol","Tahoma","Times New Roman","Trebuchet MS","Verdana","Webdings","Wingdings","serif","sans-serif","cursive","fantasy","monoscape"];this.arrFontSize=[[getText("Size 1"),"1"],[getText("Size 2"),"2"],[getText("Size 3"),"3"],[getText("Size 4"),"4"],[getText("Size 5"),"5"],[getText("Size 6"),"6"],[getText("Size 7"),"7"]];this.arrCustomTag=[];this.docType="";this.html="<html>";this.headContent="";this.preloadHTML="";this.onSave=function(){return true;};this.onFullScreen=function(){return true;};this.onNormalScreen=function(){return true;};this.initialRefresh=false;this.doUndo=doUndo;this.doRedo=doRedo;this.saveForUndo=saveForUndo;this.doUndoRedo=doUndoRedo;this.arrUndoList=[];this.arrRedoList=[];this.useTagSelector=true;this.TagSelectorPosition="bottom";this.moveTagSelector=moveTagSelector;this.selectElement=selectElement;this.removeTag=removeTag;this.doClick_TabCreate=doClick_TabCreate;this.doRefresh_TabCreate=doRefresh_TabCreate;this.arrCustomButtons=[["CustomName1","alert(0)","caption here","btnSave.gif"],["CustomName2","alert(0)","caption here","btnSave.gif"]];this.onSelectionChanged=function(){return true;};editor[editor.length]=this;return this;}function addonCSSBuilder(bEnabled){if(bEnabled)this.onCustomCssShow=new Function("modelessDialogShow('"+this.scriptPath+"styles_cssText2.htm',430,410)");else this.onCustomCssShow=new Function("modelessDialogShow('"+this.scriptPath+"styles_cssText.htm',360,345)");}function saveForUndo(){var oEditor=document.getElementById("idContent"+this.oName).contentWindow;var obj=this;if(obj.arrUndoList[0])if(oEditor.document.body.innerHTML==obj.arrUndoList[0][0])return;for(var i=20;i>1;i--)obj.arrUndoList[i-1]=obj.arrUndoList[i-2];obj.focus();var oSel=oEditor.getSelection();var range=oSel.getRangeAt(0);obj.arrUndoList[0]=[oEditor.document.body.innerHTML,range.cloneRange()];this.arrRedoList=[];if(this.useRealTime){if(this.btnUndo)makeEnableNormal(document.getElementById("btnUndo"+this.oName));if(this.btnRedo)makeDisabled(document.getElementById("btnRedo"+this.oName));}}function doUndo(){this.doUndoRedo(this.arrUndoList,this.arrRedoList);}function doRedo(){this.doUndoRedo(this.arrRedoList,this.arrUndoList);}function doUndoRedo(listA,listB){var oEditor=document.getElementById("idContent"+this.oName).contentWindow;var obj=this;if(!listA[0])return;for(var i=20;i>1;i--)listB[i-1]=listB[i-2];var oSel=oEditor.getSelection();var range=oSel.getRangeAt(0);listB[0]=[oEditor.document.body.innerHTML,range.cloneRange()];sHTML=listA[0][0];oEditor.document.body.innerHTML=sHTML;oSel=oEditor.getSelection();oSel.removeAllRanges();oSel.addRange(listA[0][1]);for(var i=0;i<19;i++)listA[i]=listA[i+1];listA[19]=null;realTime(this);}function RENDER(sPreloadHTML){if(sPreloadHTML.substring(0,4)=="<!--"&&sPreloadHTML.substring(sPreloadHTML.length-3)=="-->")sPreloadHTML=sPreloadHTML.substring(4,sPreloadHTML.length-3);if(sPreloadHTML.substring(0,4)=="<!--"&&sPreloadHTML.substring(sPreloadHTML.length-6)=="-->")sPreloadHTML=sPreloadHTML.substring(4,sPreloadHTML.length-6);sPreloadHTML=sPreloadHTML.replace(/</g,"<");sPreloadHTML=sPreloadHTML.replace(/>/g,">");sPreloadHTML=sPreloadHTML.replace(/&/g,"&");sPreloadHTML=sPreloadHTML.replace(/"/g,"\"");var bUseFeature=false;if(this.features.length>0){bUseFeature=true;for(var i=0;i<this.buttonMap.length;i++)eval(this.oName+".btn"+this.buttonMap[i]+"=true");this.btnTextFormatting=false;this.btnListFormatting=false;this.btnBoxFormatting=false;this.btnParagraphFormatting=false;this.btnCssText=false;this.btnStyles=false;for(var j=0;j<this.features.length;j++)eval(this.oName+".btn"+this.features[j]+"=true");for(var i=0;i<this.buttonMap.length;i++){sButtonName=this.buttonMap[i];bBtnExists=false;for(var j=0;j<this.features.length;j++)if(sButtonName==this.features[j])bBtnExists=true;if(!bBtnExists)eval(this.oName+".btn"+sButtonName+"=false");}this.buttonMap=this.features;}this.preloadHTML=sPreloadHTML;var sHTMLDropMenus="";var sHTMLIcons="";var sTmp="";for(var i=0;i<this.buttonMap.length;i++){sButtonName=this.buttonMap[i];switch(sButtonName){case"|":sHTMLIcons+=this.writeBreakSpace();break;case"BRK":sHTMLIcons+="</td></tr></table><table cellpadding=0 cellspacing=0><tr><td dir=ltr>";break;case"Save":if(this.btnSave)sHTMLIcons+=this.writeIconStandard("btnSave"+this.oName,this.oName+".onSave()","btnSave.gif",getText("Save"));break;case"Preview":if(this.btnPreview){sHTMLIcons+=this.writeIconStandard("btnPreview"+this.oName,this.oName+".dropShow(this,'dropPreview"+this.oName+"')","btnPreview.gif",getText("Preview"));var arrPreviewSize=[[640,480],[800,600],[1024,768]];sTmp="";for(var j=0;j<arrPreviewSize.length;j++){sTmp+="<tr><td onclick=\"document.getElementById('dropPreview"+this.oName+"').style.display='none';setActiveEditor("+this.oName+");modalDialogShow('"+this.scriptPath+"preview.htm',"+arrPreviewSize[j][0]+","+arrPreviewSize[j][1]+");\" "+"style=\"padding:2px;padding-top:1px;font-family:Tahoma;font-size:11px;color:black;\" "+"onmouseover=\"this.style.backgroundColor='#708090';this.style.color='#FFFFFF';\" "+"onmouseout=\"this.style.backgroundColor='';this.style.color='#000000';\" unselectable=on>"+arrPreviewSize[j][0]+"x"+arrPreviewSize[j][1]+"</td></tr>";}sHTMLDropMenus+="<table id=dropPreview"+this.oName+" cellpadding=0 cellspacing=0 "+"style='z-index:1;display:none;position:absolute;border:#716F64 1px solid;"+"cursor:default;background-color:#fdfdfd;' unselectable=on>"+sTmp+"</table>";}break;case"FullScreen":if(this.btnFullScreen)sHTMLIcons+=this.writeIconStandard("btnFullScreen"+this.oName,this.oName+".fullScreen()","btnFullScreen.gif",getText("Full Screen"));break;case"Print":if(this.btnPrint)sHTMLIcons+=this.writeIconStandard("btnPrint"+this.oName,"document.getElementById('idContent"+this.oName+"').contentWindow.print()","btnPrint.gif",getText("Print"));break;case"StyleAndFormatting":sTmp="";if(this.btnTextFormatting)sTmp+="<tr><td onclick=\"modelessDialogShow('"+this.scriptPath+"text1.htm',525,485);"+"document.getElementById('dropStyle"+this.oName+"').style.display='none'\""+" style=\"padding:2px;padding-top:1px;font-family:Tahoma;font-size:11px;color:black;\" "+"onmouseover=\"this.style.backgroundColor='#708090';this.style.color='#FFFFFF';\" "+"onmouseout=\"this.style.backgroundColor='';this.style.color='#000000';\" unselectable=on>"+getText("Text Formatting")+"</td></tr>";if(this.btnParagraphFormatting)sTmp+="<tr><td onclick=\"modelessDialogShow('"+this.scriptPath+"paragraph.htm',440,240);"+"document.getElementById('dropStyle"+this.oName+"').style.display='none'\""+" style=\"padding:2px;padding-top:1px;font-family:Tahoma;font-size:11px;color:black;\" "+"onmouseover=\"this.style.backgroundColor='#708090';this.style.color='#FFFFFF';\" "+"onmouseout=\"this.style.backgroundColor='';this.style.color='#000000';\" unselectable=on>"+getText("Paragraph Formatting")+"</td></tr>";if(this.btnListFormatting)sTmp+="<tr><td onclick=\"modelessDialogShow('"+this.scriptPath+"list.htm',300,285);"+"document.getElementById('dropStyle"+this.oName+"').style.display='none'\""+" style=\"padding:2px;padding-top:1px;font-family:Tahoma;font-size:11px;color:black;\" "+"onmouseover=\"this.style.backgroundColor='#708090';this.style.color='#FFFFFF';\" "+"onmouseout=\"this.style.backgroundColor='';this.style.color='#000000';\" unselectable=on>"+getText("List Formatting")+"</td></tr>";if(this.btnBoxFormatting)sTmp+="<tr><td onclick=\"modelessDialogShow('"+this.scriptPath+"box.htm',438,390);"+"document.getElementById('dropStyle"+this.oName+"').style.display='none'\""+" style=\"padding:2px;padding-top:1px;font-family:Tahoma;font-size:11px;color:black;\" "+"onmouseover=\"this.style.backgroundColor='#708090';this.style.color='#FFFFFF';\" "+"onmouseout=\"this.style.backgroundColor='';this.style.color='#000000';\" unselectable=on>"+getText("Box Formatting")+"</td></tr>";if(this.btnStyles)sTmp+="<tr><td onclick=\"modelessDialogShow('"+this.scriptPath+"styles.htm',360,297);"+"document.getElementById('dropStyle"+this.oName+"').style.display='none'\""+" style=\"padding:2px;padding-top:1px;font-family:Tahoma;font-size:11px;color:black;\" "+"onmouseover=\"this.style.backgroundColor='#708090';this.style.color='#FFFFFF';\" "+"onmouseout=\"this.style.backgroundColor='';this.style.color='#000000';\" unselectable=on>"+getText("Styles")+"</td></tr>";if(this.btnCssText)sTmp+="<tr><td onclick=\""+this.oName+".onCustomCssShow();"+"document.getElementById('dropStyle"+this.oName+"').style.display='none'\""+" style=\"padding:2px;padding-top:1px;font-family:Tahoma;font-size:11px;color:black;\" "+"onmouseover=\"this.style.backgroundColor='#708090';this.style.color='#FFFFFF';\" "+"onmouseout=\"this.style.backgroundColor='';this.style.color='#000000';\" unselectable=on>"+getText("Custom CSS")+"</td></tr>";if(this.btnTextFormatting||this.btnParagraphFormatting||this.btnListFormating||this.btnBoxFormatting||this.btnStyles||this.btnCssText){sHTMLIcons+=this.writeIconStandard("btnStyleAndFormat"+this.oName,this.oName+".dropShow(this,'dropStyle"+this.oName+"')","btnStyle.gif",getText("Styles & Formatting"));sHTMLDropMenus+="<table id=dropStyle"+this.oName+" cellpadding=0 cellspacing=0 "+"style='z-index:1;display:none;position:absolute;border:#716F64 1px solid;"+"cursor:default;background-color:#fdfdfd;' unselectable=on>"+sTmp+"</table>";}break;case"Paragraph":if(this.btnParagraph){sHTMLDropMenus+="<table id=dropParagraph"+this.oName+" cellpadding=0 cellspacing=0 "+"style='z-index:1;display:none;position:absolute;border:#716F64 1px solid;"+"cursor:default;background-color:#fdfdfd;' unselectable=on>";for(var j=0;j<this.arrParagraph.length;j++){sHTMLDropMenus+="<tr><td onclick=\""+this.oName+".applyParagraph('"+this.arrParagraph[j][1]+"')\" "+"style=\"padding:1px;font-family:tahoma;color:black;\" "+"onmouseover=\"this.style.backgroundColor='#708090';this.style.color='#FFFFFF';\" "+"onmouseout=\"this.style.backgroundColor='';this.style.color='#000000';\" unselectable=on align=center>"+"<"+this.arrParagraph[j][1]+" style=\"\margin-bottom:4px;margin-top:4px\" unselectable=on> "+this.arrParagraph[j][0]+"</"+this.arrParagraph[j][1]+"></td></tr>";}sHTMLDropMenus+="</table>";sHTMLIcons+=this.writeDropDown("btnParagraph"+this.oName,this.oName+".selectParagraph();"+this.oName+".dropShow(this,'dropParagraph"+this.oName+"')","btnParagraph.gif",getText("Paragraph"),77);}break;case"FontName":if(this.btnFontName){sHTMLDropMenus+="<table id=dropFontName"+this.oName+" cellpadding=0 cellspacing=0 "+"style='z-index:1;display:none;position:absolute;border:#716F64 1px solid;"+"cursor:default;background-color:#fdfdfd;' unselectable=on><tr><td>";var numOfFonts=0;for(var j=0;j<this.arrFontName.length;j++){if(this.arrFontName[j].toString().indexOf(",")==-1){if(this.arrFontName[j]!="serif"&&this.arrFontName[j]!="sans-serif"&&this.arrFontName[j]!="cursive"&&this.arrFontName[j]!="fantasy"&&this.arrFontName[j]!="monoscape")numOfFonts++;}else numOfFonts++;}sHTMLDropMenus+="<table cellpadding=0 cellspacing=0>";for(var j=0;j<this.arrFontName.length;j++){if(this.arrFontName[j].toString().indexOf(",")==-1){if(this.arrFontName[j]!="serif"&&this.arrFontName[j]!="sans-serif"&&this.arrFontName[j]!="cursive"&&this.arrFontName[j]!="fantasy"&&this.arrFontName[j]!="monoscape")sHTMLDropMenus+="<tr><td onclick=\""+this.oName+".applyFontName('"+this.arrFontName[j]+"')\" "+"style=\"padding:2px;padding-top:1px;font-family:"+this.arrFontName[j]+";font-size:11px;color:black;\" "+"onmouseover=\"if(this.style.backgroundColor=='#708090')this.sel='true';this.style.backgroundColor='#708090';this.style.color='#FFFFFF';\" "+"onmouseout=\"if(this.sel=='true'){this.sel='false'}else{this.style.backgroundColor='';this.style.color='#000000';}\" unselectable=on>"+this.arrFontName[j]+" <span unselectable=on style='font-family:tahoma'>("+this.arrFontName[j]+")</span></td></tr>";}else{sHTMLDropMenus+="<tr><td onclick=\""+this.oName+".applyFontName('"+this.arrFontName[j][0]+"')\" "+"style=\"padding:2px;padding-top:1px;font-family:"+this.arrFontName[j][0]+";font-size:11px;color:black;\" "+"onmouseover=\"if(this.style.backgroundColor=='#708090')this.sel='true';this.style.backgroundColor='#708090';this.style.color='#FFFFFF';\" "+"onmouseout=\"if(this.sel=='true'){this.sel='false'}else{this.style.backgroundColor='';this.style.color='#000000';}\" unselectable=on>"+this.arrFontName[j][1]+" <span unselectable=on style='font-family:tahoma'>("+this.arrFontName[j][1]+")</span></td></tr>";}if(j==14||j==29||j==44||j==59||j==74||j==89||j==104){if(j!=numOfFonts-1){sHTMLDropMenus+="</table>";sHTMLDropMenus+="</td><td valign=top style='border-left:#716f64 1px solid'>";sHTMLDropMenus+="<table cellpadding=0 cellspacing=0>";}}}sHTMLDropMenus+="</table>";sHTMLDropMenus+="</td></tr></table>";sHTMLIcons+=this.writeDropDown("btnFontName"+this.oName,this.oName+".expandSelection();"+this.oName+".dropShow(this,'dropFontName"+this.oName+"');realtimeFontSelect('"+this.oName+"')","btnFontName.gif",getText("Font Name"),77);}break;case"FontSize":if(this.btnFontSize){sHTMLDropMenus+="<table id=dropFontSize"+this.oName+" cellpadding=0 cellspacing=0 "+"style='z-index:1;display:none;position:absolute;border:#716F64 1px solid;"+"cursor:default;background-color:#fdfdfd;' unselectable=on>";for(var j=0;j<this.arrFontSize.length;j++){sHTMLDropMenus+="<tr><td onclick=\""+this.oName+".applyFontSize('"+this.arrFontSize[j][1]+"')\" "+"style=\"padding:0;padding-left:5px;padding-right:5px;font-family:tahoma;color:black;\" "+"onmouseover=\"if(this.style.backgroundColor=='#708090')this.sel='true';this.style.backgroundColor='#708090';this.style.color='#FFFFFF';\" "+"onmouseout=\"if(this.sel=='true'){this.sel='false'}else{this.style.backgroundColor='';this.style.color='#000000';}\" unselectable=on align=center>"+"<font unselectable=on size=\""+this.arrFontSize[j][1]+"\">"+this.arrFontSize[j][0]+"</font></td></tr>";}sHTMLDropMenus+="</table>";sHTMLIcons+=this.writeDropDown("btnFontSize"+this.oName,this.oName+".expandSelection();"+this.oName+".dropShow(this,'dropFontSize"+this.oName+"');realtimeSizeSelect('"+this.oName+"')","btnFontSize.gif",getText("Font Size"),60);}break;case"Undo":if(this.btnUndo)sHTMLIcons+=this.writeIconStandard("btnUndo"+this.oName,this.oName+".doUndo()","btnUndo.gif",getText("Undo"));break;case"Redo":if(this.btnRedo)sHTMLIcons+=this.writeIconStandard("btnRedo"+this.oName,this.oName+".doRedo()","btnRedo.gif",getText("Redo"));break;case"Bold":if(this.btnBold)sHTMLIcons+=this.writeIconToggle("btnBold"+this.oName,this.oName+".doCmd('Bold')","btnBold.gif",getText("Bold"));break;case"Italic":if(this.btnItalic)sHTMLIcons+=this.writeIconToggle("btnItalic"+this.oName,this.oName+".doCmd('Italic')","btnItalic.gif",getText("Italic"));break;case"Underline":if(this.btnUnderline)sHTMLIcons+=this.writeIconToggle("btnUnderline"+this.oName,this.oName+".doCmd('Underline')","btnUnderline.gif",getText("Underline"));break;case"Strikethrough":if(this.btnStrikethrough)sHTMLIcons+=this.writeIconToggle("btnStrikethrough"+this.oName,this.oName+".doCmd('Strikethrough')","btnStrikethrough.gif",getText("Strikethrough"));break;case"Superscript":if(this.btnSuperscript)sHTMLIcons+=this.writeIconToggle("btnSuperscript"+this.oName,this.oName+".doCmd('Superscript')","btnSuperscript.gif",getText("Superscript"));break;case"Subscript":if(this.btnSubscript)sHTMLIcons+=this.writeIconToggle("btnSubscript"+this.oName,this.oName+".doCmd('Subscript')","btnSubscript.gif",getText("Subscript"));break;case"JustifyLeft":if(this.btnJustifyLeft)sHTMLIcons+=this.writeIconToggle("btnJustifyLeft"+this.oName,this.oName+".applyJustifyLeft()","btnLeft.gif",getText("Justify Left"));break;case"JustifyCenter":if(this.btnJustifyCenter)sHTMLIcons+=this.writeIconToggle("btnJustifyCenter"+this.oName,this.oName+".applyJustifyCenter()","btnCenter.gif",getText("Justify Center"));break;case"JustifyRight":if(this.btnJustifyRight)sHTMLIcons+=this.writeIconToggle("btnJustifyRight"+this.oName,this.oName+".applyJustifyRight()","btnRight.gif",getText("Justify Right"));break;case"JustifyFull":if(this.btnJustifyFull)sHTMLIcons+=this.writeIconToggle("btnJustifyFull"+this.oName,this.oName+".applyJustifyFull()","btnFull.gif",getText("Justify Full"));break;case"Numbering":if(this.btnNumbering)sHTMLIcons+=this.writeIconToggle("btnNumbering"+this.oName,this.oName+".applyNumbering()","btnNumber.gif",getText("Numbering"));break;case"Bullets":if(this.btnBullets)sHTMLIcons+=this.writeIconToggle("btnBullets"+this.oName,this.oName+".applyBullets()","btnList.gif",getText("Bullets"));break;case"Indent":if(this.btnIndent)sHTMLIcons+=this.writeIconStandard("btnIndent"+this.oName,this.oName+".doCmd('Indent')","btnIndent.gif",getText("Indent"));break;case"Outdent":if(this.btnOutdent)sHTMLIcons+=this.writeIconStandard("btnOutdent"+this.oName,this.oName+".doCmd('Outdent')","btnOutdent.gif",getText("Outdent"));break;case"LTR":if(this.btnLTR)sHTMLIcons+=this.writeIconToggle("btnLTR"+this.oName,this.oName+".applyBlockDirLTR()","btnLTR.gif",getText("Left To Right"));break;case"RTL":if(this.btnRTL)sHTMLIcons+=this.writeIconToggle("btnRTL"+this.oName,this.oName+".applyBlockDirRTL()","btnRTL.gif",getText("Right To Left"));break;case"ForeColor":if(this.btnForeColor)sHTMLIcons+=this.writeIconStandard("btnForeColor"+this.oName,this.oName+".expandSelection();"+this.oName+".oColor1.show(this)","btnForeColor.gif",getText("Foreground Color"));break;case"BackColor":if(this.btnBackColor)sHTMLIcons+=this.writeIconStandard("btnBackColor"+this.oName,this.oName+".expandSelection();"+this.oName+".oColor2.show(this)","btnBackColor.gif",getText("Background Color"));break;case"Bookmark":if(this.btnBookmark)sHTMLIcons+=this.writeIconStandard("btnBookmark"+this.oName,"modelessDialogShow('"+this.scriptPath+"bookmark.htm',245,170)","btnBookmark.gif",getText("Bookmark"));break;case"Hyperlink":if(this.btnHyperlink)sHTMLIcons+=this.writeIconStandard("btnHyperlink"+this.oName,"modelessDialogShow('"+this.scriptPath+"hyperlink.htm',420,150)","btnHyperlink.gif",getText("Hyperlink"));break;case"CustomTag":if(this.btnCustomTag){sHTMLDropMenus+="<table id=dropCustomTag"+this.oName+" cellpadding=0 cellspacing=0 "+"style='z-index:1;display:none;position:absolute;border:#716F64 1px solid;"+"cursor:default;background-color:#fdfdfd;' unselectable=on><tr><td valign=top>";sHTMLDropMenus+="<table cellpadding=0 cellspacing=0>";for(var j=0;j<this.arrCustomTag.length;j++){sHTMLDropMenus+="<tr><td onclick=\""+this.oName+".insertCustomTag('"+this.arrCustomTag[j][1]+"')\" "+"style=\"padding:1px;padding-left:5px;padding-right:5px;font-family:tahoma;font-size:11px;color:black;\" "+"onmouseover=\"this.style.backgroundColor='#708090';this.style.color='#FFFFFF';\" "+"onmouseout=\"this.style.backgroundColor='';this.style.color='#000000';\" unselectable=on align=center>"+this.arrCustomTag[j][0]+"</td></tr>";if(j==14||j==29||j==44||j==59||j==74||j==89||j==104){if(j!=this.arrCustomTag.length-1){sHTMLDropMenus+="</table>";sHTMLDropMenus+="</td><td valign=top style='border-left:#716f64 1px solid'>";sHTMLDropMenus+="<table cellpadding=0 cellspacing=0>";}}}sHTMLDropMenus+="</table>";sHTMLDropMenus+="</td></tr></table>";sHTMLIcons+=this.writeDropDown("btnCustomTag"+this.oName,this.oName+".dropShow(this,'dropCustomTag"+this.oName+"')","btnCustomTag.gif",getText("Tags"),60);}break;case"Image":if(this.btnImage)sHTMLIcons+=this.writeIconStandard("btnImage"+this.oName,"modelessDialogShow('"+this.scriptPath+"image.htm',440,305)","btnImage.gif",getText("Image"));break;case"Flash":if(this.btnFlash)sHTMLIcons+=this.writeIconStandard("btnFlash"+this.oName,"modelessDialogShow('"+this.scriptPath+"flash.htm',410,205)","btnFlash.gif",getText("Flash"));break;case"Media":if(this.btnMedia)sHTMLIcons+=this.writeIconStandard("btnMediah"+this.oName,"modelessDialogShow('"+this.scriptPath+"media.htm',420,232)","btnMedia.gif",getText("Media"));break;case"ContentBlock":if(this.btnContentBlock)sHTMLIcons+=this.writeIconStandard("btnContentBlock"+this.oName,this.cmdContentBlock,"btnContentBlock.gif",getText("Content Block"));break;case"InternalLink":if(this.btnInternalLink)sHTMLIcons+=this.writeIconStandard("btnInternalLink"+this.oName,this.cmdInternalLink,"btnInternalLink.gif",getText("Internal Link"));break;case"CustomObject":if(this.btnCustomObject)sHTMLIcons+=this.writeIconStandard("btnCustomObject"+this.oName,this.cmdCustomObject,"btnCustomObject.gif",getText("Object"));break;case"Table":if(this.btnTable){sHTMLDropMenus+="<table id=dropTable"+this.oName+" cellpadding=0 cellspacing=0 "+"style='z-index:1;display:none;position:absolute;border:#716F64 1px solid;"+"cursor:default;background-color:#fdfdfd;' unselectable=on>"+"<tr><td id=\"mnuTableSize"+this.oName+"\" onclick=\"if(this.style.color!='gray'){modelessDialogShow('"+this.scriptPath+"table_size.htm',240,212);"+" document.getElementById('dropTable"+this.oName+"').style.display='none'}\""+" style=\"padding:2px;padding-top:1px;font-family:Tahoma;font-size:11px;color:black\""+" onmouseover=\"if(this.style.color!='gray'){this.style.backgroundColor='#708090';this.style.color='#FFFFFF';}\""+" onmouseout=\"if(this.style.color!='gray'){this.style.backgroundColor='';this.style.color='#000000';}\" unselectable=on>"+getText("Table Size")+" </td></tr>"+"<tr><td id=\"mnuTableEdit"+this.oName+"\" onclick=\"if(this.style.color!='gray'){modelessDialogShow('"+this.scriptPath+"table_edit.htm',358,300);"+" document.getElementById('dropTable"+this.oName+"').style.display='none'}\""+" style=\"padding:2px;padding-top:1px;font-family:Tahoma;font-size:11px;color:black\""+" onmouseover=\"if(this.style.color!='gray'){this.style.backgroundColor='#708090';this.style.color='#FFFFFF';}\""+" onmouseout=\"if(this.style.color!='gray'){this.style.backgroundColor='';this.style.color='#000000';}\" unselectable=on>"+getText("Edit Table")+" </td></tr>"+"<tr><td id=\"mnuCellEdit"+this.oName+"\" onclick=\"if(this.style.color!='gray'){modelessDialogShow('"+this.scriptPath+"table_editCell.htm',427,380);"+" document.getElementById('dropTable"+this.oName+"').style.display='none'}\""+" style=\"padding:2px;padding-top:1px;font-family:Tahoma;font-size:11px;color:black\""+" onmouseover=\"if(this.style.color!='gray'){this.style.backgroundColor='#708090';this.style.color='#FFFFFF';}\""+" onmouseout=\"if(this.style.color!='gray'){this.style.backgroundColor='';this.style.color='#000000';}\" unselectable=on>"+getText("Edit Cell")+" </td></tr>"+"</table>";sHTMLDropMenus+="<table width=175 id=dropTableCreate"+this.oName+" onmouseout='//doOut_TabCreate(this);event.cancelBubble=true;' style='position:absolute;display:none;cursor:default;background:#f3f3f3;border:#d3d3d3 1px solid;' cellpadding=0 cellspacing=1 unselectable=on>";for(var m=0;m<8;m++){sHTMLDropMenus+="<tr>";for(var n=0;n<8;n++){sHTMLDropMenus+="<td onclick='"+this.oName+".doClick_TabCreate(this)' onmouseover='doOver_TabCreate(this);event.cancelBubble=true;' style='background:#ffffff;font-size:1px;border:#d3d3d3 1px solid;width:20px;height:20px;' unselectable=on> </td>";}sHTMLDropMenus+="</tr>";}sHTMLDropMenus+="<tr><td colspan=8 onclick=\""+this.oName+".hide();modelessDialogShow('"+this.scriptPath+"table_insert.htm',380,270);\" onmouseover=\"doOut_TabCreate(document.getElementById('dropTableCreate"+this.oName+"'));this.innerHTML='"+getText("Advanced Table Insert")+"';this.style.border='#777777 1px solid';this.style.backgroundColor='#8d9aa7';this.style.color='#ffffff'\" onmouseout=\"this.style.border='#f3f3f3 1px solid';this.style.backgroundColor='#f3f3f3';this.style.color='#000000'\" align=center style='font-family:verdana;font-size:10px;font-color:black;border:#f3f3f3 1px solid;padding:1px 1px 1px 1px' unselectable=on>"+getText("Advanced Table Insert")+"</td></tr>";sHTMLDropMenus+="</table>";sHTMLIcons+=this.writeIconStandard("btnTable"+this.oName,this.oName+".dropShow(this, 'dropTableCreate"+this.oName+"')","btnTable.gif",getText("Insert Table"));sHTMLIcons+=this.writeIconStandard("btnTableEdit"+this.oName,this.oName+".dropShow(this, 'dropTable"+this.oName+"')","btnTableEdit.gif",getText("Edit Table/Cell"));}break;case"Absolute":if(this.btnAbsolute)sHTMLIcons+=this.writeIconStandard("btnAbsolute"+this.oName,this.oName+".makeAbsolute()","btnAbsolute.gif",getText("Absolute"));break;case"Characters":if(this.btnCharacters)sHTMLIcons+=this.writeIconStandard("btnCharacters"+this.oName,"modelessDialogShow('"+this.scriptPath+"characters.htm',520,150)","btnSymbol.gif",getText("Special Characters"));break;case"Line":if(this.btnLine)sHTMLIcons+=this.writeIconStandard("btnLine"+this.oName,this.oName+".doCmd('InsertHorizontalRule')","btnLine.gif",getText("Line"));break;case"Form":if(this.btnForm){var arrFormMenu=[[getText("Form"),"form_form.htm","280","150"],[getText("Text Field"),"form_text.htm","285","239"],[getText("List"),"form_list.htm","295","272"],[getText("Checkbox"),"form_check.htm","235","150"],[getText("Radio Button"),"form_radio.htm","235","150"],[getText("Hidden Field"),"form_hidden.htm","235","150"],[getText("File Field"),"form_file.htm","235","150"],[getText("Button"),"form_button.htm","235","150"]];sHTMLIcons+=this.writeIconStandard("btnForm"+this.oName,this.oName+".dropShow(this,'dropForm"+this.oName+"')","btnForm.gif",getText("Form Editor"));sHTMLDropMenus+="<table id=dropForm"+this.oName+" cellpadding=0 cellspacing=0 "+"style='z-index:1;display:none;position:absolute;border:#716F64 1px solid;"+"cursor:default;background-color:#fdfdfd;' unselectable=on>";for(var j=0;j<arrFormMenu.length;j++){sHTMLDropMenus+="<tr><td onclick=\"modelessDialogShow('"+this.scriptPath+arrFormMenu[j][1]+"',"+arrFormMenu[j][2]+","+arrFormMenu[j][3]+");"+"document.getElementById('dropForm"+this.oName+"').style.display='none'\""+" style=\"padding:2px;padding-top:1px;font-family:Tahoma;font-size:11px;color:black;\" "+"onmouseover=\"this.style.backgroundColor='#708090';this.style.color='#FFFFFF';\" "+"onmouseout=\"this.style.backgroundColor='';this.style.color='#000000';\" unselectable=on>"+arrFormMenu[j][0]+"</td></tr>";}sHTMLDropMenus+="</table>";}break;case"Clean":if(this.btnClean)sHTMLIcons+=this.writeIconStandard("btnClean"+this.oName,this.oName+".doClean()","btnRemoveFormat.gif",getText("Clean"));break;case"HTMLFullSource":if(this.btnHTMLFullSource)sHTMLIcons+=this.writeIconStandard("btnHTMLFullSource"+this.oName,"setActiveEditor("+this.oName+");modalDialogShow('"+this.scriptPath+"source_html_full.htm',600,450);","btnSource.gif",getText("View/Edit Source"));break;case"HTMLSource":if(this.btnHTMLSource)sHTMLIcons+=this.writeIconStandard("btnHTMLSource"+this.oName,"setActiveEditor("+this.oName+");modalDialogShow('"+this.scriptPath+"source_html.htm',600,450);","btnSource.gif",getText("View/Edit Source"));break;case"XHTMLFullSource":if(this.btnXHTMLFullSource&&!this.btnHTMLFullSource)sHTMLIcons+=this.writeIconStandard("btnHTMLFullSource"+this.oName,"setActiveEditor("+this.oName+");modalDialogShow('"+this.scriptPath+"source_html_full.htm',600,450);","btnSource.gif",getText("View/Edit Source"));break;case"XHTMLSource":if(this.btnXHTMLSource&&!this.btnHTMLSource)sHTMLIcons+=this.writeIconStandard("btnHTMLSource"+this.oName,"setActiveEditor("+this.oName+");modalDialogShow('"+this.scriptPath+"source_html.htm',600,450);","btnSource.gif",getText("View/Edit Source"));break;case"ClearAll":if(this.btnClearAll)sHTMLIcons+=this.writeIconStandard("btnClearAll"+this.oName,this.oName+".clearAll()","btnDelete.gif",getText("Clear All"));break;default:for(j=0;j<this.arrCustomButtons.length;j++){if(sButtonName==this.arrCustomButtons[j][0]){sCbName=this.arrCustomButtons[j][0];sCbCaption=this.arrCustomButtons[j][2];sCbImage=this.arrCustomButtons[j][3];sHTMLIcons+=this.writeIconStandard("btn"+sCbName+this.oName,"eval("+this.oName+".arrCustomButtons["+j+"][1])",sCbImage,sCbCaption);}}break;}}var sHTML="";if(!document.getElementById("id_refresh_z_index"))sHTML+="<div id=id_refresh_z_index style='margin:0px'></div>";sHTML+="<table id=idArea"+this.oName+" name=idArea"+this.oName+" border='0px' "+"cellpadding=0 cellspacing=0 width='"+this.width+"px' height='"+this.height+"px'>"+"<tr><td colspan=2 style=\"padding:1px;border:#cfcfcf 1px solid;background:url('"+this.scriptPath+"icons/bg.gif')\">"+"<table cellpadding=0 cellspacing=0 border=0><tr><td dir=ltr>"+sHTMLIcons+"</td></tr></table>"+"</td></tr>"+"<tr id=idTagSelTopRow"+this.oName+"><td colspan=2 id=idTagSelTop"+this.oName+" height=0px></td></tr>";sHTML+="<tr><td colspan=2 valign=top height=100% style='background:white;padding-right:2px'>";sHTML+="<iframe style='width:100%;height:100%; margin-top:1px;border:solid 1px #cfcfcf' "+" name=idContent"+this.oName+" id=idContent"+this.oName+"></iframe>";if(this.css!=""){document.write("<iframe style='width:1px;height:1px;overflow:auto;border:0px' id=\"myStyle"+this.oName+"\" name=\"myStyle"+this.oName+"\" src='"+this.scriptPath+"blank.gif'></iframe>");}sHTML+="</td></tr>";sHTML+="<tr id=idTagSelBottomRow"+this.oName+"><td colspan=2 id=idTagSelBottom"+this.oName+"></td></tr>";sHTML+="</table>";sHTML+=sHTMLDropMenus;document.write(sHTML);this.oColor1.url=this.scriptPath+"color_picker_fg.htm";this.oColor1.onShow=new Function(this.oName+".hide()");this.oColor1.onMoreColor=new Function(this.oName+".hide()");this.oColor1.onPickColor=new Function(this.oName+".applyColor('ForeColor', "+this.oName+".oColor1.color)");this.oColor1.onRemoveColor=new Function(this.oName+".applyColor('ForeColor','')");this.oColor1.txtCustomColors=getText("Custom Colors");this.oColor1.txtMoreColors=getText("More Colors...");this.oColor1.RENDER();this.oColor2.url=this.scriptPath+"color_picker_bg.htm";this.oColor2.onShow=new Function(this.oName+".hide()");this.oColor2.onMoreColor=new Function(this.oName+".hide()");this.oColor2.onPickColor=new Function(this.oName+".applyColor('hilitecolor', "+this.oName+".oColor2.color)");this.oColor2.onRemoveColor=new Function(this.oName+".applyColor('HiliteColor','')");this.oColor2.txtCustomColors=getText("Custom Colors");this.oColor2.txtMoreColors=getText("More Colors...");this.oColor2.RENDER();if(this.useTagSelector){if(this.TagSelectorPosition=="bottom")this.TagSelectorPosition="top";else this.TagSelectorPosition="bottom";this.moveTagSelector()}var oEditor=document.getElementById("idContent"+this.oName).contentWindow;oUtil.oName=this.oName;oUtil.oEditor=oEditor;oUtil.obj=this;oUtil.arrEditor.push(this.oName);var arrA=String(this.preloadHTML).match(/<HTML[^>]*>/ig);if(arrA){this.loadHTMLFull(this.preloadHTML);}else{this.loadHTML(sPreloadHTML);}if(!oUtil.bOnLoadReplaced){if(window.onload)onload_original=window.onload;window.onload=new Function("onload_new()");oUtil.bOnLoadReplaced=true;}this.focus();}function onload_new(){onload_original();oUtil.setEdit();}function onload_original(){}function applyColor(sType,sColor){this.hide();this.focus();var oEditor=document.getElementById("idContent"+this.oName).contentWindow;this.saveForUndo();if(sColor!=null&&sColor!=""){oEditor.document.execCommand(sType,false,sColor);var sel=oEditor.getSelection();var range=sel.getRangeAt(0);if(range.startContainer.nodeType==Node.TEXT_NODE){var el=range.startContainer.nextSibling;if(el){range=oEditor.document.createRange();range.selectNode(el);sel=oEditor.getSelection();sel.removeAllRanges();sel.addRange(range);}}}else{var el=getSelectedElement(oEditor.getSelection());if(sType=="ForeColor"){el.style.color="";}else if(sType=="HiliteColor"){el.style.backgroundColor="";}}realTime(this);if(sColor=="")return;}var arrColorPickerObjects=[];function ColorPicker(sName,sParent){this.oParent=sParent;if(sParent){this.oName=sParent+"."+sName;this.oRenderName=sName+sParent;}else{this.oName=sName;this.oRenderName=sName;}arrColorPickerObjects.push(this.oName);this.url="color_picker.htm";this.onShow=function(){return true;};this.onHide=function(){return true;};this.onPickColor=function(){return true;};this.onRemoveColor=function(){return true;};this.onMoreColor=function(){return true;};this.show=showColorPicker;this.hide=hideColorPicker;this.hideAll=hideColorPickerAll;this.color;this.customColors=[];this.refreshCustomColor=refreshCustomColor;this.isActive=false;this.txtCustomColors="Custom Colors";this.txtMoreColors="More Colors...";this.align="left";this.currColor="#ffffff";this.RENDER=drawColorPicker;}function drawColorPicker(){var arrColors=[["#800000","#8b4513","#006400","#2f4f4f","#000080","#4b0082","#800080","#000000"],["#ff0000","#daa520","#6b8e23","#708090","#0000cd","#483d8b","#c71585","#696969"],["#ff4500","#ffa500","#808000","#4682b4","#1e90ff","#9400d3","#ff1493","#a9a9a9"],["#ff6347","#ffd700","#32cd32","#87ceeb","#00bfff","#9370db","#ff69b4","#dcdcdc"],["#ffdab9","#ffffe0","#98fb98","#e0ffff","#87cefa","#e6e6fa","#dda0dd","#ffffff"]];var sHTMLColor="<table id=dropColor"+this.oRenderName+" style=\"z-index:1;display:none;position:absolute;border:#716F64 1px solid;cursor:default;background-color:#f3f3f3;padding:2px\" unselectable=on cellpadding=0 cellspacing=0 width=145px><tr><td unselectable=on>";sHTMLColor+="<table align=center cellpadding=0 cellspacing=0 border=0 unselectable=on>";for(var i=0;i<arrColors.length;i++){sHTMLColor+="<tr>";for(var j=0;j<arrColors[i].length;j++)sHTMLColor+="<td onclick=\""+this.oName+".color='"+arrColors[i][j]+"';"+this.oName+".onPickColor();"+this.oName+".currColor='"+arrColors[i][j]+"';"+this.oName+".hideAll()\" onmouseover=\"this.style.border='#777777 1px solid'\" onmouseout=\"this.style.border='#efefef 1px solid'\" style=\"cursor:default;padding:1px;border:#efefef 1px solid;\" unselectable=on>"+"<table style='margin:0px;width:13px;height:13px;background:"+arrColors[i][j]+";border:white 1px solid' cellpadding=0 cellspacing=0 unselectable=on>"+"<tr><td unselectable=on></td></tr>"+"</table></td>";sHTMLColor+="</tr>";}sHTMLColor+="<tr><td colspan=8 id=idCustomColor"+this.oRenderName+"></td></tr>";sHTMLColor+="<tr>";sHTMLColor+="<td unselectable=on>"+"<table style='margin-left:1px;width:14px;height:14px;background:#f3f3f3;' cellpadding=0 cellspacing=0 unselectable=on>"+"<tr><td onclick=\""+this.oName+".onRemoveColor();"+this.oName+".currColor='';"+this.oName+".hideAll()\" onmouseover=\"this.style.border='#777777 1px solid'\" onmouseout=\"this.style.border='white 1px solid'\" style=\"cursor:default;padding:1px;border:white 1px solid;font-family:verdana;font-size:10px;font-color:black;line-height:9px;\" align=center valign=top unselectable=on>x</td></tr>"+"</table></td>";sHTMLColor+="<td colspan=7 unselectable=on>"+"<table style='margin:1px;width:117px;height:16px;background:#f3f3f3;border:#f3f3f3 1px solid' cellpadding=0 cellspacing=0 unselectable=on>"+"<tr><td id=\""+this.oName+"moreColTd\" onclick=\""+this.oName+".onMoreColor();"+this.oName+".hideAll();modalDialogShow('"+this.url+"?"+this.oName+"', 442, 380)\" onmouseover=\"this.style.border='#777777 1px solid';this.style.background='#8d9aa7';this.style.color='#ffffff'\" onmouseout=\"this.style.border='#efefef 1px solid';this.style.background='#f3f3f3';this.style.color='#000000'\" style=\"font-family:verdana;font-size:9px;font-color:black;line-height:9px;padding:1px\" align=center valign=top nowrap unselectable=on>"+this.txtMoreColors+"</td></tr>"+"</table></td>";sHTMLColor+="</tr>";sHTMLColor+="</table>";sHTMLColor+="</td></tr></table>";document.write(sHTMLColor);}function refreshCustomColor(){this.customColors=eval(this.oParent).customColors;if(this.customColors.length==0){document.getElementById("idCustomColor"+this.oRenderName).innerHTML="";return;}sHTML="<table cellpadding=0 cellspacing=0 width=100%><tr><td colspan=8 style=\"font-family:verdana;font-size:9px;font-color:black;line-height:9px;padding:1px\">"+this.txtCustomColors+":</td></tr></table>";sHTML+="<table cellpadding=0 cellspacing=0><tr>";for(var i=0;i<this.customColors.length;i++){if(i<22){if(i==8||i==16||i==24||i==32)sHTML+="</tr></table><table cellpadding=0 cellspacing=0><tr>";sHTML+="<td onclick=\""+this.oName+".color='"+this.customColors[i]+"';"+this.oName+".onPickColor()\" onmouseover=\"this.style.border='#777777 1px solid'\" onmouseout=\"this.style.border='#efefef 1px solid'\" style=\"cursor:default;padding:1px;border:#efefef 1px solid;\" unselectable=on>"+" <table style='margin:0px;width:13px;height:13px;background:"+this.customColors[i]+";border:white 1px solid' cellpadding=0 cellspacing=0 unselectable=on>"+" <tr><td unselectable=on></td></tr>"+" </table>"+"</td>";}}sHTML+="</tr></table>";document.getElementById("idCustomColor"+this.oRenderName).innerHTML=sHTML;}function showColorPicker(oEl){this.onShow();this.hideAll();var box=document.getElementById("dropColor"+this.oRenderName);var allTds=box.getElementsByTagName("TD");for(var i=0;i<allTds.length;i++){allTds[i].style.border="#efefef 1px solid";if(allTds[i].id==this.oName+"moreColTd"){allTds[i].style.border="#efefef 1px solid";allTds[i].style.background="#f3f3f3";allTds[i].style.color="#000000";}}box.style.display="block";var nTop=0;var nLeft=0;oElTmp=oEl;while(oElTmp.tagName!="BODY"&&oElTmp.tagName!="HTML"){if(oElTmp.style.top!="")nTop+=oElTmp.style.top.substring(1,oElTmp.style.top.length-2)*1;else nTop+=oElTmp.offsetTop;oElTmp=oElTmp.offsetParent;}oElTmp=oEl;while(oElTmp.tagName!="BODY"&&oElTmp.tagName!="HTML"){if(oElTmp.style.left!="")nLeft+=oElTmp.style.left.substring(1,oElTmp.style.left.length-2)*1;else nLeft+=oElTmp.offsetLeft;oElTmp=oElTmp.offsetParent;}if(this.align=="left")box.style.left=nLeft+"px";else box.style.left=(nLeft-143+oEl.offsetWidth)+"px";box.style.top=(nTop+iconOffsetTop+1+oUtil.obj.dropTopAdjustment)+"px";this.isActive=true;this.refreshCustomColor();}function hideColorPicker(){this.onHide();var box=document.getElementById("dropColor"+this.oRenderName);box.style.display="none";this.isActive=false;}function hideColorPickerAll(){for(var i=0;i<arrColorPickerObjects.length;i++){var box=document.getElementById("dropColor"+eval(arrColorPickerObjects[i]).oRenderName);box.style.display="none";eval(arrColorPickerObjects[i]).isActive=false;}}function moveTagSelector(){var sTagSelTop="<table unselectable=on ondblclick='"+this.oName+".moveTagSelector()' width='100%' cellpadding=0 cellspacing=0><tr style='background:#e7e7e7;font-family:arial;font-size:10px;color:black;'>"+"<td id=idElNavigate"+this.oName+" style='padding:1px;width:100%' valign=top> </td>"+"<td align=right valign=top nowrap>"+"<span id=idElCommand"+this.oName+" unselectable=on style='display:none;text-decoration:underline;cursor:pointer;padding-right:5px;' onclick='"+this.oName+".removeTag()'>"+getText("Remove Tag")+"</span>"+"</td></tr></table>";var sTagSelBottom="<table unselectable=on ondblclick='"+this.oName+".moveTagSelector()' width='100%' cellpadding=0 cellspacing=0><tr style='background:#e7e7e7;font-family:arial;font-size:10px;color:black;'>"+"<td id=idElNavigate"+this.oName+" style='padding:1px;width:100%' valign=top> </td>"+"<td align=right valign=top nowrap>"+"<span id=idElCommand"+this.oName+" unselectable=on style='display:none;text-decoration:underline;cursor:pointer;padding-right:5px;' onclick='"+this.oName+".removeTag()'>"+getText("Remove Tag")+"</span>"+"</td></tr></table>";var selTop=document.getElementById("idTagSelTop"+this.oName);var selTopRow=document.getElementById("idTagSelTopRow"+this.oName);var selBottom=document.getElementById("idTagSelBottom"+this.oName);var selBottomRow=document.getElementById("idTagSelBottomRow"+this.oName);if(this.TagSelectorPosition=="top"){selTop.innerHTML="";selBottom.innerHTML=sTagSelBottom;selTopRow.style.display="none";selBottomRow.style.display="";this.TagSelectorPosition="bottom";}else {selTop.innerHTML=sTagSelTop;selBottom.innerHTML="";selTopRow.style.display="";selBottomRow.style.display="none";this.TagSelectorPosition="top";}}function loadHTML(sHTML){var oEditor=document.getElementById("idContent"+this.oName).contentWindow;var oDoc=oEditor.document.open("text/html","replace");if(this.publishingPath!=""){var arrA=String(this.preloadHTML).match(/<base[^>]*>/ig);if(!arrA){sHTML=this.docType+"<HTML><HEAD><BASE HREF=\""+this.publishingPath+"\"/>"+this.headContent+"</HEAD><BODY>"+sHTML+"</BODY></HTML>";}}else{sHTML=this.docType+"<HTML><HEAD>"+this.headContent+"</HEAD><BODY>"+sHTML+"</BODY></HTML>";}oDoc.write(sHTML);oDoc.close();oEditor.document.addEventListener("keydown",new Function("editorDoc_onkeydown("+this.oName+")"),true);oEditor.document.addEventListener("keyup",new Function("editorDoc_onkeyup("+this.oName+")"),true);oEditor.document.addEventListener("mouseup",new Function("editorDoc_onmouseup("+this.oName+")"),true);if(this.arrStyle.length>0){var oElement=oEditor.document.createElement("STYLE");oEditor.document.documentElement.childNodes[0].appendChild(oElement);var sCssText="";for(var i=0;i<this.arrStyle.length;i++){selector=this.arrStyle[i][0];style=this.arrStyle[i][3];sCssText+=selector+" { "+style+" } ";oEditor.document.styleSheets[0].insertRule(selector+" { "+style+" } ",0);}oElement.appendChild(oEditor.document.createTextNode(sCssText));}oEditor.document.body.style.width="50px";oEditor.document.body.style.height="50px";oEditor.document.body.style.width="";oEditor.document.body.style.height="";if(this.css!=""){var cssFrame=document.getElementById("myStyle"+this.oName).contentWindow;var cssDoc=cssFrame.document.open("text/html","replace");cssDoc.write("<html><head><link href=\""+this.css+"\" rel=\"stylesheet\" type=\"text/css\"></head><body onload=\"parent.ApplyExternalStyle('"+this.oName+"')\"></body></html>");cssDoc.close();try{ApplyExternalStyle(this.oName)}catch(e){;}}oEditor.document.addEventListener("keydown",new Function("var e=arguments[0];doKeyPress(eval(e), "+this.oName+")"),false);}function doOnPaste(){this.isAfterPaste=true;this.saveForUndo();}function loadHTMLFull(sHTML,firstLoad){var oEditor=document.getElementById("idContent"+this.oName).contentWindow;var arrA=String(sHTML).match(/<!DOCTYPE[^>]*>/ig);if(arrA)for(var i=0;i<arrA.length;i++){this.docType=arrA[i];}else this.docType="";var arrB=String(sHTML).match(/<HTML[^>]*>/ig);if(arrB)for(var i=0;i<arrB.length;i++){s=arrB[i];s=s.replace(/\"[^\"]*\"/ig,function(x){x=x.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/[\s+]/ig,"#_#");return x});s=s.replace(/<([^ >]*)/ig,function(x){return x.toLowerCase()});s=s.replace(/ ([^=]+)=([^" >]+)/ig," $1=\"$2\"");s=s.replace(/ ([^=]+)=/ig,function(x){return x.toLowerCase()});s=s.replace(/#_#/ig," ");this.html=s;}else this.html="<html>";if(this.publishingPath!=""){var arrA=sHTML.match(/<base[^>]*>/ig);if(!arrA){sHTML="<BASE HREF=\""+this.publishingPath+"\"/>"+sHTML;}}if(firstLoad){try{oEditor.document.designMode="on";}catch(e){}}var oDoc=oEditor.document.open("text/html","replace");oDoc.write(sHTML);oDoc.close();oEditor.document.addEventListener("keydown",new Function("editorDoc_onkeydown("+this.oName+")"),true);oEditor.document.addEventListener("keyup",new Function("editorDoc_onkeyup("+this.oName+")"),true);oEditor.document.addEventListener("mouseup",new Function("editorDoc_onmouseup("+this.oName+")"),true);oEditor.document.addEventListener("keydown",new Function("var e=arguments[0];doKeyPress(eval(e), "+this.oName+")"),false);}function putHTML(sHTML){this.loadHTMLFull(sHTML,true);}function getHTML(){var oEditor=document.getElementById("idContent"+this.oName).contentWindow;sHTML=getOuterHTML(oEditor.document.documentElement);sHTML=String(sHTML).replace(/ contentEditable=true/g,"");sHTML=String(sHTML).replace(/\<PARAM NAME=\"Play\" VALUE=\"0\">/ig,"<PARAM NAME=\"Play\" VALUE=\"-1\">");sHTML=this.docType+sHTML;return sHTML;}function getHTMLBody(){var oEditor=document.getElementById("idContent"+this.oName).contentWindow;sHTML=oEditor.document.body.innerHTML;sHTML=String(sHTML).replace(/ contentEditable=true/g,"");sHTML=String(sHTML).replace(/\<PARAM NAME=\"Play\" VALUE=\"0\">/ig,"<PARAM NAME=\"Play\" VALUE=\"-1\">");return sHTML;}function ApplyExternalStyle(oName){var sTmp="";var myStyle=document.getElementById("myStyle"+oName).contentWindow;for(var i=0;i<myStyle.document.styleSheets[0].cssRules.length;i++){sSelector=myStyle.document.styleSheets[0].cssRules[i].selectorText;sCssText=myStyle.document.styleSheets[0].cssRules[i].style.cssText.replace(/"/g,""");var itemCount=sSelector.split(".").length;if(itemCount>1)sTmp+=",[\""+sSelector+"\",true,\""+sSelector+"\",\""+sCssText+"\"]";else sTmp+=",[\""+sSelector+"\",false,\"\",\""+sCssText+"\"]";}var arrStyle=eval("["+sTmp.substr(1)+"]");if(arrStyle.length>0){var oEditor=document.getElementById("idContent"+oName).contentWindow;var oElement=oEditor.document.createElement("STYLE");oEditor.document.documentElement.childNodes[0].appendChild(oElement);var sCssText="";for(var i=0;i<arrStyle.length;i++){selector=arrStyle[i][0];style=arrStyle[i][3].replace(/"/g,"\"");sCssText+=selector+" { "+style+" } ";if(style!="")oEditor.document.styleSheets[0].insertRule(selector+" { "+style+" } ",0);}oElement.appendChild(oEditor.document.createTextNode(sCssText));}eval(oName).arrStyle=arrStyle;}function doKeyPress(evt,obj){if(!obj.arrUndoList[0]){obj.saveForUndo();}if(evt.keyCode==37||evt.keyCode==38||evt.keyCode==39||evt.keyCode==40){obj.saveForUndo();}if(evt.keyCode==13){obj.saveForUndo();}}function fullScreen(){var oEditor=document.getElementById("idContent"+this.oName).contentWindow;var edtArea=document.getElementById("idArea"+this.oName);this.hide();if(this.stateFullScreen){this.onNormalScreen();this.stateFullScreen=false;document.body.style.overflow="";document.getElementById("id_refresh_z_index").style.margin="0px";edtArea.style.position="";edtArea.style.top="0px";edtArea.style.left="0px";edtArea.style.width=this.width+"px";edtArea.style.height=this.height+"px";for(var i=0;i<oUtil.arrEditor.length;i++){if(oUtil.arrEditor[i]!=this.oName){document.getElementById("idArea"+oUtil.arrEditor[i]).style.display="";try{document.getElementById("idContent"+oUtil.arrEditor[i]).contentWindow.document.designMode="on";}catch(e){}}}}else{this.onFullScreen();this.stateFullScreen=true;window.scroll(0,0);document.body.style.overflow="hidden";document.getElementById("id_refresh_z_index").style.margin="70px";edtArea.style.position="absolute";edtArea.style.top="0px";edtArea.style.left="0px";edtArea.style.width=window.innerWidth+"px";edtArea.style.height=window.innerHeight+"px";for(var i=0;i<oUtil.arrEditor.length;i++){if(oUtil.arrEditor[i]!=this.oName)document.getElementById("idArea"+oUtil.arrEditor[i]).style.display="none";}oEditor.focus();}try{oEditor.document.designMode="on";}catch(e){}}function editorDoc_onkeydown(edtObj){realTime(edtObj);}function editorDoc_onkeyup(edtObj){if(edtObj.isAfterPaste){edtObj.isAfterPaste=false;}realTime(edtObj);}function editorDoc_onmouseup(edtObj){oUtil.activeElement=null;oUtil.oName=edtObj.oName;oUtil.oEditor=document.getElementById("idContent"+edtObj.oName).contentWindow;oUtil.obj=edtObj;edtObj.hide();realTime(edtObj);}function setActiveEditor(edtObj){oUtil.oName=edtObj.oName;oUtil.oEditor=document.getElementById("idContent"+edtObj.oName).contentWindow;oUtil.obj=edtObj;}var arrTmp=[];function GetElement(oElement,sMatchTag){while(oElement!=null&&oElement.tagName!=sMatchTag){if(oElement.tagName=="BODY")return null;oElement=oElement.parentNode;}return oElement;}var arrTmp2=[];function setRealTime(bUseRealTime){if(bUseRealTime){this.useRealTime=true;realTime(this);}else{buttonNormal(this.oName);this.useRealTime=false;}}function buttonNormal(oName){var obj=eval(oName);if(obj.btnTable){document.getElementById("mnuTableSize"+oName).style.color="black";document.getElementById("mnuTableEdit"+oName).style.color="black";document.getElementById("mnuCellEdit"+oName).style.color="black";}if(obj.btnParagraph)makeEnableNormal(document.getElementById("btnParagraph"+oName));if(obj.btnFontName)makeEnableNormal(document.getElementById("btnFontName"+oName));if(obj.btnFontSize)makeEnableNormal(document.getElementById("btnFontSize"+oName));if(obj.btnUndo)makeEnableNormal(document.getElementById("btnUndo"+oName));if(obj.btnRedo)makeEnableNormal(document.getElementById("btnRedo"+oName));if(obj.btnBold)makeEnableNormal(document.getElementById("btnBold"+oName));if(obj.btnItalic)makeEnableNormal(document.getElementById("btnItalic"+oName));if(obj.btnUnderline)makeEnableNormal(document.getElementById("btnUnderline"+oName));if(obj.btnStrikethrough)makeEnableNormal(document.getElementById("btnStrikethrough"+oName));if(obj.btnSuperscript)makeEnableNormal(document.getElementById("btnSuperscript"+oName));if(obj.btnSubscript)makeEnableNormal(document.getElementById("btnSubscript"+oName));if(obj.btnNumbering)makeEnableNormal(document.getElementById("btnNumbering"+oName));if(obj.btnBullets)makeEnableNormal(document.getElementById("btnBullets"+oName));if(obj.btnJustifyLeft)makeEnableNormal(document.getElementById("btnJustifyLeft"+oName));if(obj.btnJustifyCenter)makeEnableNormal(document.getElementById("btnJustifyCenter"+oName));if(obj.btnJustifyRight)makeEnableNormal(document.getElementById("btnJustifyRight"+oName));if(obj.btnJustifyFull)makeEnableNormal(document.getElementById("btnJustifyFull"+oName));if(obj.btnIndent)makeEnableNormal(document.getElementById("btnIndent"+oName));if(obj.btnOutdent)makeEnableNormal(document.getElementById("btnOutdent"+oName));if(obj.btnLTR)makeEnableNormal(document.getElementById("btnLTR"+oName));if(obj.btnRTL)makeEnableNormal(document.getElementById("btnRTL"+oName));if(obj.btnForeColor)makeEnableNormal(document.getElementById("btnForeColor"+oName));if(obj.btnBackColor)makeEnableNormal(document.getElementById("btnBackColor"+oName));if(obj.btnLine)makeEnableNormal(document.getElementById("btnLine"+oName));}function realTime(edtObj){var oName=edtObj.oName;var oEditor=document.getElementById("idContent"+oName).contentWindow;var oSel=oEditor.getSelection();var element=getSelectedElement(oSel);if(edtObj.useRealTime){if(edtObj.btnTable){document.getElementById("mnuTableSize"+oName).style.color="gray";document.getElementById("mnuTableEdit"+oName).style.color="gray";document.getElementById("mnuCellEdit"+oName).style.color="gray";var oTable=GetElement(element,"TABLE");if(oTable){document.getElementById("mnuTableSize"+oName).style.color="black";document.getElementById("mnuTableEdit"+oName).style.color="black";document.getElementById("mnuCellEdit"+oName).style.color="gray";makeEnableNormal(document.getElementById("btnTableEdit"+oName));}else makeDisabled(document.getElementById("btnTableEdit"+oName));var oTD=GetElement(element,"TD");if(oTD){document.getElementById("mnuTableSize"+oName).style.color="black";document.getElementById("mnuTableEdit"+oName).style.color="black";document.getElementById("mnuCellEdit"+oName).style.color="black";}}if(edtObj.btnParagraph){if(oEditor.document.queryCommandEnabled("FormatBlock"))makeEnableNormal(document.getElementById("btnParagraph"+oName));else makeDisabled(document.getElementById("btnParagraph"+oName));}if(edtObj.btnFontName){if(oEditor.document.queryCommandEnabled("FontName"))makeEnableNormal(document.getElementById("btnFontName"+oName));else makeDisabled(document.getElementById("btnFontName"+oName));}if(edtObj.btnFontSize){if(oEditor.document.queryCommandEnabled("FontSize"))makeEnableNormal(document.getElementById("btnFontSize"+oName));else makeDisabled(document.getElementById("btnFontSize"+oName));}if(edtObj.btnUndo){if(!edtObj.arrUndoList[0])makeDisabled(document.getElementById("btnUndo"+oName));else makeEnableNormal(document.getElementById("btnUndo"+oName));}if(edtObj.btnRedo){if(!edtObj.arrRedoList[0])makeDisabled(document.getElementById("btnRedo"+oName));else makeEnableNormal(document.getElementById("btnRedo"+oName));}if(edtObj.btnBold){if(oEditor.document.queryCommandEnabled("Bold")){if(oEditor.document.queryCommandState("Bold"))makeEnablePushed(document.getElementById("btnBold"+oName));else makeEnableNormal(document.getElementById("btnBold"+oName));}else makeDisabled(document.getElementById("btnBold"+oName));}if(edtObj.btnItalic){if(oEditor.document.queryCommandEnabled("Italic")){if(oEditor.document.queryCommandState("Italic"))makeEnablePushed(document.getElementById("btnItalic"+oName));else makeEnableNormal(document.getElementById("btnItalic"+oName));}else makeDisabled(document.getElementById("btnItalic"+oName));}if(edtObj.btnUnderline){if(oEditor.document.queryCommandEnabled("Underline")){if(oEditor.document.queryCommandState("Underline"))makeEnablePushed(document.getElementById("btnUnderline"+oName));else makeEnableNormal(document.getElementById("btnUnderline"+oName));}else makeDisabled(document.getElementById("btnUnderline"+oName));}if(edtObj.btnStrikethrough){if(oEditor.document.queryCommandEnabled("Strikethrough")){if(oEditor.document.queryCommandState('Strikethrough'))makeEnablePushed(document.getElementById("btnStrikethrough"+oName));else makeEnableNormal(document.getElementById("btnStrikethrough"+oName));}else makeDisabled(document.getElementById("btnStrikethrough"+oName));}if(edtObj.btnSuperscript){if(oEditor.document.queryCommandEnabled("Superscript")){if(oEditor.document.queryCommandState("Superscript"))makeEnablePushed(document.getElementById("btnSuperscript"+oName));else makeEnableNormal(document.getElementById("btnSuperscript"+oName));}else makeDisabled(document.getElementById("btnSuperscript"+oName));}if(edtObj.btnSubscript){if(oEditor.document.queryCommandEnabled("Subscript")){if(oEditor.document.queryCommandState("Subscript"))makeEnablePushed(document.getElementById("btnSubscript"+oName));else makeEnableNormal(document.getElementById("btnSubscript"+oName));}else makeDisabled(document.getElementById("btnSubscript"+oName));}if(edtObj.btnNumbering){if(oEditor.document.queryCommandEnabled("InsertOrderedList")){if(oEditor.document.queryCommandState("InsertOrderedList"))makeEnablePushed(document.getElementById("btnNumbering"+oName));else makeEnableNormal(document.getElementById("btnNumbering"+oName));}else makeDisabled(document.getElementById("btnNumbering"+oName));}if(edtObj.btnBullets){if(oEditor.document.queryCommandEnabled("InsertUnorderedList")){if(oEditor.document.queryCommandState("InsertUnorderedList"))makeEnablePushed(document.getElementById("btnBullets"+oName));else makeEnableNormal(document.getElementById("btnBullets"+oName));}else makeDisabled(document.getElementById("btnBullets"+oName));}if(edtObj.btnJustifyLeft){if(oEditor.document.queryCommandEnabled("JustifyLeft")){if(oEditor.document.queryCommandState("JustifyLeft"))makeEnablePushed(document.getElementById("btnJustifyLeft"+oName));else makeEnableNormal(document.getElementById("btnJustifyLeft"+oName));}else makeDisabled(document.getElementById("btnJustifyLeft"+oName));}if(edtObj.btnJustifyCenter){if(oEditor.document.queryCommandEnabled("JustifyCenter")){if(oEditor.document.queryCommandState("JustifyCenter"))makeEnablePushed(document.getElementById("btnJustifyCenter"+oName));else makeEnableNormal(document.getElementById("btnJustifyCenter"+oName));}else makeDisabled(document.getElementById("btnJustifyCenter"+oName));}if(edtObj.btnJustifyRight){if(oEditor.document.queryCommandEnabled("JustifyRight")){if(oEditor.document.queryCommandState("JustifyRight"))makeEnablePushed(document.getElementById("btnJustifyRight"+oName));else makeEnableNormal(document.getElementById("btnJustifyRight"+oName));}else makeDisabled(document.getElementById("btnJustifyRight"+oName));}if(edtObj.btnJustifyFull){if(oEditor.document.queryCommandEnabled("JustifyFull")){if(oEditor.document.queryCommandState("JustifyFull"))makeEnablePushed(document.getElementById("btnJustifyFull"+oName));else makeEnableNormal(document.getElementById("btnJustifyFull"+oName));}else makeDisabled(document.getElementById("btnJustifyFull"+oName));}if(edtObj.btnIndent){if(oEditor.document.queryCommandEnabled("Indent"))makeEnableNormal(document.getElementById("btnIndent"+oName));else makeDisabled(document.getElementById("btnIndent"+oName));}if(edtObj.btnOutdent){if(oEditor.document.queryCommandEnabled("Outdent"))makeEnableNormal(document.getElementById("btnOutdent"+oName));else makeDisabled(document.getElementById("btnOutdent"+oName));}if(edtObj.btnLTR){if(element.dir){if(element.dir.toLowerCase()=="ltr")makeEnablePushed(document.getElementById("btnLTR"+oName));else makeEnableNormal(document.getElementById("btnLTR"+oName));}else{makeEnableNormal(document.getElementById("btnLTR"+oName));}}if(edtObj.btnRTL){if(element.dir){if(element.dir.toLowerCase()=="rtl")makeEnablePushed(document.getElementById("btnRTL"+oName));else makeEnableNormal(document.getElementById("btnRTL"+oName));}else{makeEnableNormal(document.getElementById("btnRTL"+oName));}}if(element){if(edtObj.btnForeColor)makeEnableNormal(document.getElementById("btnForeColor"+oName));if(edtObj.btnBackColor)makeEnableNormal(document.getElementById("btnBackColor"+oName));if(edtObj.btnLine)makeEnableNormal(document.getElementById("btnLine"+oName));}else{if(edtObj.btnForeColor)makeDisabled(document.getElementById("btnForeColor"+oName));if(edtObj.btnBackColor)makeDisabled(document.getElementById("btnBackColor"+oName));if(edtObj.btnLine)makeDisabled(document.getElementById("btnLine"+oName));}}try{oUtil.onSelectionChanged()}catch(e){;}try{edtObj.onSelectionChanged()}catch(e){;}if(edtObj.useTagSelector){oElement=element;var sHTML="";var i=0;arrTmp2=[];while(oElement!=null&&oElement.tagName!="BODY"&&oElement.nodeType==1){arrTmp2[i]=oElement;sHTML=" <<span id=tag"+oName+i+" unselectable=on style='text-decoration:underline;cursor:pointer' onclick=\""+oName+".selectElement("+i+")\">"+oElement.tagName+"</span>>"+sHTML;oElement=oElement.parentNode;i++;}sHTML=" <BODY>"+sHTML;document.getElementById("idElNavigate"+oName).innerHTML=sHTML;document.getElementById("idElCommand"+oName).style.display="none";for(i=0;i<arrTmp2.length;i++){document.getElementById("tag"+oName+i).addEventListener("click",new Function(oName+".selectElement("+i+")"),true);}}}function selectElement(i){var oEditor=document.getElementById("idContent"+this.oName).contentWindow;var range=oEditor.document.createRange();range.selectNode(arrTmp2[i]);var oSel=oEditor.getSelection();oSel.removeAllRanges();oSel.addRange(range);oActiveElement=arrTmp2[i];if(oActiveElement.tagName!="TD"&&oActiveElement.tagName!="TR"&&oActiveElement.tagName!="TBODY"&&oActiveElement.tagName!="LI")document.getElementById("idElCommand"+this.oName).style.display="block";for(var j=0;j<arrTmp2.length;j++)document.getElementById("tag"+this.oName+j).style.background="";document.getElementById("tag"+this.oName+i).style.background="DarkGray";if(oActiveElement)oUtil.activeElement=oActiveElement;this.focus();}function removeTag(){this.saveForUndo();var oEditor=document.getElementById("idContent"+this.oName).contentWindow;var oSel=oEditor.getSelection();var element=getSelectedElement(oSel);var nearElement=element.nextSibling==null?(element.previousSibling==null?element.parentNode:element.previousSibling):element.nextSibling;switch(element.nodeNa
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -