=0;i--)a.removeNode(d[i],false);d=a._tags(g,"SPAN");for(i=d.length-1;i>=0;i--){b=d[i];l=b.style.fontWeight,c=b.style.color;if(""===b.innerHTML.replace(/<[a-z\/][^>]*>/gi,"")||l==""&&c==""){a.removeNode(b,false);continue}b.removeAttribute("style");b.className="";b.removeAttribute("class");b.style.fontWeight=l;b.style.color=c}d=a._tags(g,"H3");for(i=d.length-1;i>=0;i--)if(d[i].className==="splitPage")d[i].innerHTML=d[i].innerHTML.replace(/<\/?[a-zA-z][^>]*>/g,"");d=a._tags(g,"P");var n=/^( | ){3,}/;for(i=d.length-1;i>=0;i--){b=d[i];if(""==b.innerHTML.replace(/<[a-z\/][^>]*>/gi,"").replace(/( |\n|\r|\t| )/gi,"")){a.removeNode(b,false);continue}b.removeAttribute("style");b.className="";b.removeAttribute("class");if(n.test(b.innerHTML))b.align="center";else{b.removeAttribute("align");b.style.textIndent=k.config.typesetIndentParagraph?"2em":""}}d=a._tags(g,"A");for(i=d.length-1;i>=0;i--){b=d[i];if(""==b.innerHTML.replace(/<[a-z\/][^>]*>/gi,"").replace(/( |\n|\r|\t| )/gi,"")){a.removeNode(b,false);continue}b.removeAttribute("style");b.className="";b.removeAttribute("class")}var m=function(a){var b=a.nodeName,c=/^( |\n|\r|\t| )*$/gi;return b==="#text"?c.test(a.nodeValue):"BR"===b||"IMG"!==b&&""==a.innerHTML.replace(/<[a-z\/][^>]*>/gi,"").replace(/(\s| )/gmi,"")},j=function(c){var b,d;while(c&&c.tagName!="BODY"){b=c;while(b=b.nextSibling){if(m(b))continue;if(b.nodeName==="#text"){f=a.CE("CENTER","",b.nodeValue);c.parentNode.insertBefore(f,b);a.removeNode(b,true);return}else{if(b.tagName=="CENTER")return;if(b.tagName=="P")b.align="center";else b.style.textAlign="center";return}}c=c.parentNode}};d=a._tags(g,"IMG");for(i=d.length-1;i>=0;i--){b=d[i];if(b.getAttribute("emot"))continue;k.config.typesetImageTextCenter&&j(b);b.removeAttribute("style");b.border=k.config.typesetImageBorder?"1":"0";b.style.margin="5px";e=b.parentNode;if(e.tagName=="A"&&e.firstChild==e.lastChild){b=e;e=e.parentNode}if(e.tagName=="P"&&e.align=="center"||e.tagName=="CENTER"||e.style.textAlign=="center")continue;f=a.CE("CENTER");e.insertBefore(f,b);f.appendChild(b)}d=a._tags(g,"OBJECT");for(i=d.length-1;i>=0;i--){b=d[i];k.config.typesetImageTextCenter&&j(b);e=b.parentNode;if(e.tagName=="P"&&e.align=="center"||e.tagName=="CENTER"||e.style.textAlign=="center")continue;f=a.CE("CENTER");e.insertBefore(f,b);f.appendChild(b)}d=a._tags(g,"EMBED");for(i=d.length-1;i>=0;i--){b=d[i];if("OBJECT"===b.parentNode.tagName)continue;k.config.typesetImageTextCenter&&j(b);e=b.parentNode;if(e.tagName=="P"&&e.align=="center"||e.tagName=="CENTER"||e.style.textAlign=="center")continue;f=a.CE("CENTER");e.insertBefore(f,b);f.appendChild(b)}k.cleanWord(true)};k.cleanWord=function(f){if("visual"!=k.currentMode())return;var b=k._getDoc(),d;if(!f){d=b.body.innerHTML;if(d.indexOf("mso")<0&&d.search(/[a-z]+:[a-z0-9]+="[^\"]*"/ig)<0)return}var c=function(i,h){for(var d,f,c,e,g=i.length-1;g>=0;g--){f=a._tags(b,i[g]);for(e=f.length-1;e>=0;e--){d=f[e];d.removeAttribute("lang");c=d.getAttribute("style");if(null==c&&h){a.removeNode(d,false);continue}if(typeof c=="string"&&c.indexOf("mso-")>=0){c+=";";c=c.replace(/mso\-[^;]+?;/gi,"").replace(/FONT\-FAMILY[^;]+?;/gi,"").replace(/\s+/g," ").replace(/MARGIN\: 0cm 0cm 0pt;/gi,"").replace(/tab\-stops\:[^;]+?;/gi,"");if(""==c||" "==c){if(h){a.removeNode(d,false);continue}d.removeAttribute("style")}else d.setAttribute("style",c)}c=d.getAttribute("class");if(null!=c){c=c.replace(/mso[a-z\-]+\s*/gi,"").replace(/^xl[0-9]+$/i,"");if(""==c)d.removeAttribute("class");else d.setAttribute("class",c)}}}},e=function(g){for(var e,d,h,c,f=g.length-1;f>=0;f--){d=a._tags(b,g[f]);for(c=d.length-1;c>=0;c--){e=d[c];e.innerHTML==""&&a.removeNode(e,false)}}};c(["SPAN"],true);c(["P","B","I","U","TD","TR","TABLE","DIV","COL","FONT"],false);b.body.innerHTML=b.body.innerHTML.replace(/
]*>/gi,"").replace(/<\/o:[a-z0-9_]+>/gi,"").replace(/<\?xml.+?\/>/gi,"").replace(/(<[a-z]+[^>]+>)/ig,function(b,a){if(a.indexOf(":")>0)a=a.replace(/[a-z]+:[a-z0-9]+="[^\"]*"/ig,"");return a});c(["SPAN"],true);e(["SPAN","FONT","B","U","I","STRONG","EM"]);k.save()};k.setWidth=function(a){if(a>1)k.config.width=a+"px";else k.config.width=a*100+"%";k._containerDiv.style.width=k.config.width};k.setHeight=function(a){if(a<9)a=9;k.config.height=a;k._setHeight(a)};k._setHeight=function(a){if(a<2)a=2;k._editorObj().style.height=a+"px";if("visual"==k.currentMode()){a-=6;if(a<2)a=2;k._getDoc().body.style.minHeight=a+"px";if(j)k._getDoc().body.style.height=a+"px"}};k._fixFull=function(){var c=a._doc(),b=k._containerDiv,d;b.style.zIndex="10000";b.style.width=c.clientWidth-2+"px";b.style.top=a._docST()+"px";b.style.left=a._docSL()+"px";d=c.clientHeight-k._toolbarDiv.offsetHeight;k._setHeight(d-("visual"==k.currentMode()?2:6))};k._button=function(d){for(var c=a._tags(k._toolbarDiv,"A"),b=c.length-1;b>=0;b--)if(d==c[b].getAttribute("name"))return c[b];return null};k.changeToolbarMode=function(l,m){var c=k._toolbarDiv,e,d,n=c.offsetHeight;if(l===g||null===l)l=c.className=="eToolBar"?true:false;else if(m===g||!m)if(l==(c.className!="eToolBar"))return;if(l){c.className="eToolBar eLargeIcons";b.body.appendChild(c);c.innerHTML=k._toobarCode(k.config.advToolbar,k.config.advToolbarRight)}else{c.className="eToolBar";b.body.appendChild(c);c.innerHTML=k._toobarCode(k.config.toolbar,k.config.toolbarRight)}k._containerDiv.insertBefore(c,k._containerDiv.firstChild);if(f&&r<9){var j=a._tags(c,"SPAN"),i=0,h=0;for(d=j.length-1;d>=0;d--){j[d].style.width=j[d].offsetWidth+2+"px";e=a._tags(j[d],"A");i=0;for(h=e.length-1;h>=0;h--)if(e[h].offsetLeft+e[h].offsetWidth>i)i=e[h].offsetLeft+e[h].offsetWidth;i-=j[d].offsetLeft-2;if(i>0)j[d].style.width=i+"px"}}if(n){k.setHeight(k.config.height+n-c.offsetHeight);k._containerDiv.style.position=="absolute"&&k._fixFull()}a._noSel(c);if(k.config.showToolbarGroupHandle){var i=c.getElementsByTagName("DIV")[0].offsetWidth;c.style.marginLeft="-"+i+"px"}e=a._tags(c,"A");for(d=e.length-1;d>=0;d--){a.addListener(e[d],"click",k._toolbarBottonClick);a.addListener(e[d],"mouseout",function(){var b=a.activePop;this.className=b&&b.relateObj==this?"eButtonDropDown":"eButton"})}k._updateToolbar("visual"===k.currentMode(),["toolbarmode","mode","fullscreen","help"],true)};k.fullScreen=function(d){var c=k._containerDiv,f="visual"===k.currentMode(),i,h;if(d===g||null===d)d=c.style.position!="absolute";else if(d==(c.style.position=="absolute"))return;f&&k.changeMode("code");if(d){b.body.parentNode.style.overflow="hidden";b.body.appendChild(c);if(f)if(l)e.setTimeout(function(){k.changeMode("visual")},1);else k.changeMode("visual");c.style.position="absolute";c.style.top="0px";k._fixFull();a.addListener(e,"resize",k._fixFull)}else{b.body.parentNode.style.overflow="auto";a.delListener(e,"resize",k._fixFull);c.style.position="";c.style.width=k.config.width;i=k._editorObj();i.style.height=k.config.height+"px";k.obj.parentNode.insertBefore(c,k.obj);f&&k.changeMode("visual");c.scrollIntoView(false)}h=k._button("fullscreen");if(h)h.id=d?"eBTNfullscreen-reset":"eBTNfullscreen"};k.setContent=function(a){if("code"===k.currentMode())k._editorObj().value=a;else{if("function"===typeof k.config.onsetcontent)a=k.config.onsetcontent.call(k,a);k._getDoc().body.innerHTML=a}k.save()};k._initContent=function(b){if("code"!==k.currentMode()){if((l||m)&&"
"==b.substring(0,4))b=b.substr(4);if(l)b=b.replace(/]*)>\s*<\/td/ig," |
| ",c=k._getDoc(),d;a+="\n";if(k.config.baseHref!="")a+='';if(k.config.css)a+='\n';a+='';c.open();c.write(a);c.close();d=Math.max(20,k._editorObj().offsetHeight-6);if(c.body){c.body.style.minHeight=d+"px";if(j)c.body.style.height=d+"px"}}k.setContent(b);k._changed()};k.setOpacity=function(b,a){if(f)b.style.filter=a==100?"":"gray() alpha(opacity="+a+")";else b.style.opacity=a==100?"":a/100};k.inArray=function(c,b){for(var a=b.length-1;a>=0;a--)if(c==b[a])return true;return false};k.content=function(){var e=k.currentMode(),d,c,b;if("visual"===e){d=k.selectedCells();for(c=d.length-1;c>=0;c--)d[c].className="";b=k._getDoc().body.innerHTML;for(c=d.length-1;c>=0;c--)d[c].className="selectedTD";if((l||m)&&"
"==b.substring(0,4))b=b.substr(4);if(""==b.replace(/<\/?(div|p|font|b|s|u|i|strong|em|strike)(?![a-z0-9])[^>]*>| |\s/ig,""))b="";if("function"===typeof k.config.ongetcontent)b=k.config.ongetcontent.call(k,b);else b=a.formatHTML(b)}else b=k._editorObj().value;return b};k._autoSave=function(d){var c=k._editorObj(),b=d?a.addListener:a.delListener;if(f)b(c,"beforedeactivate",k.save);else if("code"==k.currentMode())b(c,"blur",k.save);else b(c.contentWindow,"blur",k.save)};k.save=function(){k.obj.value=k.content()};k._intEdit=function(a){if(a.isIniEdit)return;a.isIniEdit=true;a.style.imeMode="disabled";a.onkeypress=function(){if(45==event.keyCode){this.value="-"==this.value.charAt(0)?this.value.substr(1):"-"+this.value;return false}return event.keyCode>=48&&event.keyCode<=57};a.onpaste=function(){return!clipboardData.getData("text").match(/\D/)};a.ondragenter=function(){return!/\D/.test(event.dataTransfer.getData("text"))};a.oldBlur=a.onblur;a.onblur=function(){if(""==this.value)return;this.value=parseInt(this.value,10);var a=this.getAttribute("max"),b=this.getAttribute("min");if(a!==g&&parseInt(this.value,10)>parseInt(a,10))this.value=parseInt(a,10);if(b!=g&&parseInt(this.value,10)');f&&b.compatMode!="CSS1Compat"&&b.write('')}a.config={paragraphs:[["\u6b63\u6587","p"],["\u6807\u98981","h1"],["\u6807\u98982","h2"],["\u6807\u98983","h3"],["\u6807\u98984","h4"],["\u6807\u98985","h5"],["\u6807\u98986","h6"],["\u9884\u5b9a\u4e49","pre"]],fontnames:[["\u5b8b\u4f53","\u5b8b\u4f53"],["\u65b0\u5b8b\u4f53","\u65b0\u5b8b\u4f53"],["\u4eff\u5b8b_GB2312","\u4eff\u5b8b_GB2312"],["\u9ed1\u4f53","\u9ed1\u4f53"],["\u5fae\u8f6f\u96c5\u9ed1","\u5fae\u8f6f\u96c5\u9ed1"],["\u6977\u4f53_GB2312","\u6977\u4f53_GB2312"],["Arial","arial, helvetica, sans-serif"],["Courier New","courier new, courier, mono"],["Georgia","Georgia, Times New Roman, Times, Serif"],["Tahoma","Tahoma, Arial, Helvetica, sans-serif"],["Times New Roman","times new roman, times, serif"]],fontsizes:[["\u7279\u5c0f","xx-small",1],["\u8f83\u5c0f","x-small",2],["\u5c0f","small",3],["\u4e2d","medium",4],["\u5927","large",5],["\u8f83\u5927","x-large",6],["\u7279\u5927","xx-large",7]],toolbar:"default",toolbarRight:[],advToolbar:["paragraph","fontname","fontsize","br","bold","italic","underline","strikethrough","forecolor","backcolor","removeformat","typeset","||","justifyleft","justifycenter","justifyright","justifynone",["superscript","subscript"],"br","orderedlist","unorderedlist","indent","outdent","||","inserthorizontalrule","splitpage","cleanword","br","createlink","unlink","inserttable","||","insertface","insertimage","insertmusic","insertflash","insertvideo"],advToolbarRight:["toolbarmode","br","fullscreen","mode","help"],advToolbarMode:false,showToolbarGroupHandle:true,tplFlash:'',tplFlv:'',tplRm:'',tplVideo:'',tplMusic:'',tplSplitPage:'',uploadFieldName:"file",imageUploadUrl:"",imageFileTypes:"*.jpg;*.gif;*.png;*.jpeg",imageFileSize:"2MB",directInsertUploadImage:false,linkUploadUrl:"",linkFileTypes:"*.*",linkFileSize:"2MB",flashUploadUrl:"",flashFileTypes:"*.swf",flashFileSize:"2MB",musicUploadUrl:"",musicFileTypes:"*.mp3;*.wma",musicFileSize:"2MB",videoUploadUrl:"",videoFileTypes:"*.flv;.mp4;*.mkv;*.wmv;*.asf;*.avi;*.rmvb;*.rm",videoFileSize:"2MB",enter2br:false,width:"auto",height:"auto",autoClean:true,faceCount:55,css:"",cssCode:"",bgColor:"",textColor:"",autoPopImagePanel:true,autoPopTablePanel:true,typesetImageTextCenter:true,typesetIndentParagraph:false,typesetImageBorder:true,baseHref:"",resize:true,onfocus:null,onblur:null,onkeydown:null,onkeyup:null,onpaste:null,oninit:null,ongetcontent:null,onsetcontent:null,debug:false};a.find=function(a){return b.getElementById(a)};a.CE=function(f,d,c,e){var a=b.createElement(f);if(d)a.id=d;if(c)a.innerHTML=c;e&&b.body.appendChild(a);return a};a.loadSkin=function(b){var c=a.find("TQEditorSkinCSS");c.href=a.url+(b&&"default"!=b?"skin/"+b+"/":"")+"TQEditor.css"};a.checkSkin=function(e){for(var d=b.styleSheets,f,c=d.length-1;c>=0;c--)if(d[c].href==e.href){f=d[c].cssRules||d[c].rules;if(f.length<1)e.href=a.url+"TQEditor.css";break}};a._doc=function(){return b.compatMode!="CSS1Compat"?b.body:b.documentElement};a._docST=function(){return e.scrollY?e.scrollY:a._doc().scrollTop};a._docSL=function(){return e.scrollX?e.scrollX:a._doc().scrollLeft};a.pos=function(b){var c=0,d=0,e=b.getBoundingClientRect(),f=a._doc();c=e.left+a._docSL()-f.clientLeft;d=e.top+a._docST()-f.clientTop;return{x:c,y:d,left:c,top:d,width:b.offsetWidth,height:b.offsetHeight}};a._hideContext=function(){if(a.activeContext){a.activeContext.style.display="none";a.activeContext=null}};a.pop=function(b,c){if(a.activePop==b){a.hidePop();return false}a._hideContext();a.hidePop();a.activePop=b;b.relateObj=c;c.className="eButtonDropDown";b.style.display="block";var e=a.pos(c),d=e.x,g=1+c.clientHeight+e.y,f=a._docSL(),h=a._doc().clientWidth;if(d+b.offsetWidth>f+h)d-=b.offsetWidth-c.offsetWidth;b.style.left=d+"px";b.style.top=g+"px";return true};a.hidePop=function(){if(!a.activePop)return;var b=a.activePop;a.activePop=null;b.style.display="none";if(b.relateObj&&b.relateObj.className=="eButtonDropDown")b.relateObj.className="eButton";b=a.find("ColorPicker");if(b)b.style.display="none"};a.delListener=function(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,false);else a.detachEvent("on"+b,a["e"+b+c])};a.addListener=function(a,c,b){if(a.addEventListener)a.addEventListener(c,b,false);else{a["fn"+b]=b;a["e"+c+b]=function(c){a["fn"+b](c)};a.attachEvent("on"+c,a["e"+c+b])}};a._tags=function(a,b){return a.getElementsByTagName(b)};a.listenTags=function(f,g,d,e){for(var c=a._tags(f,g),b=c.length-1;b>=0;b--)a.addListener(c[b],d,e)};a._noSel=function(e,g){var h=function(){if(f){var a=event.srcElement.tagName;return"INPUT"==a||"TEXTAREA"==a}return false};if(g)for(var i=g.split(","),c,b,d=i.length-1;d>=0;d--){c=a._tags(e,i[d]);for(b=c.length-1;b>=0;b--){c[b].unselectable="on";c[b].onselectstart=h}}else{e.unselectable="on";e.onselectstart=h}};a._colorPickerUI=function(){var c=["00","33","66","99","CC","FF"],h=["FF0000","00FF00","0000FF","FFFF00","00FFFF","FF00FF"],i=191,a=''};a+=f?'cellspacing=1 border=0 bgcolor="#000000;">':'cellspacing=0 border=1 style="border-collapse:collapse;" >';for(d=0;d<2;d++)for(b=0;b<6;b++){a+="";if(d>0)a+=g(h[b]);else a+=g(c[b]+c[b]+c[b]);for(e=0;e<3;e++)for(k=0;k<6;k++)a+=g(c[e+d*3]+c[k]+c[b]);a+="
"}a+='
';return a};a.pickColor=function(f,h,i){var c=a.find("ColorPicker");if(null==c){c=a.CE("DIV","ColorPicker",a._colorPickerUI(),true);c.className="ePopPanel";c.style.zIndex=99999999;c.onmouseover=function(){this.active=true};c.onmouseout=function(){this.active=false};a._noSel(c);a.listenTags(c,"TD","mouseover",function(){var a=this,b=this.parentNode.parentNode.parentNode.parentNode.lastChild,c=e.setInterval(function(){a.style.backgroundColor=a.style.backgroundColor!=""?"":"#FFFFFF"},500);b.firstChild.style.backgroundColor=this.bgColor;b.firstChild.nextSibling.innerHTML=this.bgColor;a.style.backgroundColor="#FFFFFF";a.onmouseout=function(){e.clearInterval(c);this.style.backgroundColor=""}});c.lastChild.lastChild.onclick=function(){this.parentNode.parentNode.style.display="none"};a.listenTags(c,"TD","mouseup",function(){this.parentNode.parentNode.parentNode.parentNode.style.display="none"});a.addListener(b,"mousedown",function(){var b=a.find("ColorPicker");if(!b.active)b.style.display="none"})}for(var g=a._tags(c,"TD"),d=g.length-1;d>=0;d--)g[d].onmousedown=function(a){f(this.bgColor);a=a||event;a.cancelBubble=true};c.lastChild.lastChild.onclick=function(a){f("");a=a||event;a.cancelBubble=true};c.style.left=h+"px";c.style.top=i+"px";c.style.display="block"};a.drag=function(b){b.style.position="absolute";b.style.userSelect="none";b.style.mozUserSelect="none";b.style.webkitUserSelect="none";b.dragging=false;b.onmousedown=function(c){var i,j,g,d,h=a.pos(this),k=a._docSL(),l=a._docST();if(f){c=e.event;g=c.srcElement;i=k+c.clientX-h.x;j=l+c.clientY-h.y}else{g=c.target;i=c.pageX-h.x;j=c.pageY-h.y}if(b.dragging)return;d=g.tagName;if(g!=this&&(d=="INPUT"||d=="TEXTAREA"||d=="BUTTON"||d=="SELECT"))return;b.dragging=true;var m=function(a){if(f){a=e.event;a.pageX=k+a.clientX;a.pageY=l+a.clientY}var c=a.pageX-i,d=a.pageY-j;b.style.left=c+"px";b.style.top=d+"px";b.style.cursor="move"},n=function(){b.style.cursor="";b.dragging=false};a._draging(m,n,b)}};a._draging=function(f,g,d){if(a._draging.running)return;if(d.setCapture)d.setCapture();else e.captureEvents&&e.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);a._draging.running=true;a._draging.mm=b.onmousemove;a._draging.mu=b.onmouseup;var c=a.CE("DIV","","",true);c.className="eDragMaskDiv";c.style.height=Math.max(b.documentElement.clientHeight,b.body.scrollHeight)+"px";b.onmousemove=f;b.onmouseup=function(f){c&&b.body.removeChild(c);c=null;b.onmousemove=a._draging.mm;b.onmouseup=a._draging.mu;if(d.releaseCapture)d.releaseCapture();else e.releaseEvents&&e.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP);a._draging.running=false;g(f)};return c};a._draging.running=null;a.clone=function(b){if(typeof b!="object")return b;if(b==null)return b;var c,d="[object Array]"==Object.prototype.toString.call(b)?[]:{};for(c in b)d[c]=a.clone(b[c]);return d};a.removeNode=function(a,b){if(a.removeNode)return a.removeNode(b);if(b)return a.parentNode.removeChild(a);while(a.firstChild)a.parentNode.insertBefore(a.firstChild,a);a.parentNode.removeChild(a)};a.updateCellsStatus=function(k){for(var e=k.rows,d,j,f,i,a,c,g,b=0;b=f.colStart){i.colStart+=f.colSpan;i.colEnd+=f.colSpan}}}}}for(b=e.length-1;b>=0;b--){d=e[b].cells;var h=d[0].rowSpan;for(a=d.length-1;a>0;a--){h=Math.min(h,d[a].rowSpan);if(h<2)break}if(--h>0){for(a=d.length-1;a>=0;a--){d[a].rowSpan-=h;d[a].rowEnd-=h}for(c=b-1;c>=0;c--)for(g=e[c].cells.length-1;g>=0;g--)if(e[c].cells[g].rowEnd>d[0].rowStart){e[c].cells[g].rowSpan-=h;e[c].cells[g].rowEnd-=h}}}};a.insertCol=function(j,l){var i=j.parentNode.parentNode.parentNode,g,e,b,h=0,f,c,d,k,m=i.rows.length;a.updateCellsStatus(i);c=l?j.colStart:j.colEnd+1;while(h=0;f--){d=g[f];if(d.colStart<=c){if(d.colStart=c){d.colSpan++;d.colEnd++;h+=d.rowSpan-1}else e=k.insertCell(d.colStart!=c&&(d.colEnd==c-1||f==g.length-1)?f+1:f);if(e)if(l){b=e.nextSibling;if(b&&b.rowSpan<2&&b.colStart==c)e.style.backgroundColor=b.style.backgroundColor}else{b=e.previousSibling;if(b&&b.rowSpan<2&&b.colEnd==c-1)e.style.backgroundColor=b.style.backgroundColor}break}}}};a.insertRow=function(h,k){var e=h.parentNode.parentNode.parentNode,c,i,g,d,b,j=0,f;a.updateCellsStatus(e);f=k?h.rowStart:h.rowEnd+1;for(d=Math.min(e.rows.length-1,f-1);d>=0;d--){c=e.rows[d].cells;for(b=c.length-1;b>=0;b--)if(c[b].rowEnd>=f){c[b].rowSpan++;j+=c[b].colSpan}}c=e.rows[0].cells;for(b=c.length-1;b>=0;b--)j-=c[b].colSpan;i=e.insertRow(f);while(j++<0)i.insertCell(0).innerHTML=" ";a.updateCellsStatus(e);c=i.cells;g=e.rows[k?f+1:f-1].cells;b=g.length-1;for(d=c.length-1;d>=0;d--){while(b>=0&&g[b].colStart>c[d].colStart)b--;if(b>=0&&g[b].colStart==c[d].colStart&&g[b].colEnd==c[d].colEnd)c[d].style.backgroundColor=g[b].style.backgroundColor}};a.deleteCol=function(i){var g=i.parentNode.parentNode.parentNode,f=g.rows,b,d,h,e,c;a.updateCellsStatus(g);e=i.colStart;c=i.colEnd;for(d=f.length-1;d>=0;d--){for(h=Math.min(c,f[d].cells.length-1);h>=0;h--){b=f[d].cells[h];if(b.colEnd>=e&&b.colStart<=c)if(b.colStart>=e&&b.colEnd<=c)f[d].removeChild(b);else if(b.colStartc)b.colSpan-=1+c-e;else if(b.colStart=e)b.colSpan-=b.colEnd-e+1;else if(b.colStart<=c&&b.colEnd>c){b.colSpan-=1+c-b.colStart;b.innerHTML=""}}f[d].cells.length<1&&f[d].parentNode.removeChild(f[d])}f.length<1&&g.parentNode.removeChild(g)};a.deleteRow=function(k){var j=k.parentNode.parentNode.parentNode,c=j.rows,h,b,g,d,l,i,f,e;a.updateCellsStatus(j);f=k.rowStart;e=k.rowEnd;delRowCount=k.rowSpan;h=c[e+1];for(d=Math.min(e,c.length-1);d>=0;d--){for(l=c[d].cells.length-1;l>=0;l--){b=c[d].cells[l];if(b.rowEnd>=f&&b.rowStart<=e)if(b.rowStart>=f&&b.rowEnd<=e)c[d].removeChild(b);else if(b.rowStarte)b.rowSpan-=delRowCount;else if(b.rowStart=f)b.rowSpan-=b.rowEnd-f+1;else if(b.rowStart<=e&&b.rowEnd>e){if(h){for(i=0;ib.colEnd)break;g=h.insertCell(i);g.rowSpan=b.rowSpan-delRowCount;g.colSpan=b.colSpan;g.colStart=b.colStart;g.colEnd=b.colEnd;g.style.backgroundColor=b.style.backgroundColor}c[d].removeChild(b)}}c[d].cells.length<1&&c[d].parentNode.removeChild(c[d])}c.length<1&&j.parentNode.removeChild(j)};a.formatHTML=function(a){return a.replace(/\s*<(p|table|tr|hr|div|object|ol|li|ul|h[1-6])(?![a-z])/ig,"\n<$1").replace(/<\/(p|table|div|object|ol|ul|h[1-6])>\s*/ig,"$1>\n").replace(/(<(?:br|hr)(?![a-z0-9])[^>]*>)\s*/ig,"$1\n").replace(/^\s*/,"").replace(/\s*$/,"")};a.toolbarMode={admin:{left:["paragraph","fontsize","|","bold","italic","underline","forecolor","backcolor","removeformat","|","justifyleft","justifycenter","orderedlist","unorderedlist",["justifyright","|","indent","outdent","|","superscript","subscript"],"||","createlink","insertimage","inserttable",["splitpage","inserthorizontalrule"],"|","insertmusic","insertflash","insertvideo","||","cleanword","typeset"],right:["toolbarmode","fullscreen","|","help"]},bbs:{left:["fontsize","|","bold","italic","underline","forecolor","backcolor","removeformat","|","justifyleft","justifycenter","justifyright","||","createlink","insertimage","|","insertface","insertmusic","insertflash","insertvideo","|","typeset"],right:["toolbarmode","fullscreen","|","help"]},user:{left:["fontsize","|","bold","italic","underline","forecolor","backcolor","removeformat","|","justifyleft","justifycenter","orderedlist",["justifyright","unorderedlist","|","indent","outdent","|","inserthorizontalrule"],"||","createlink","insertimage","insertvideo","|","typeset"],right:["toolbarmode","fullscreen","|","help"]},mini:{left:["fontsize","|","bold","italic","underline","forecolor","backcolor","removeformat","|","align","|","createlink","insertimage"],right:["help"]},message:{left:["insertface","|","bold","italic","underline","forecolor","removeformat"],right:["help"]},full:{left:["paragraph","fontname","fontsize","|","bold","italic","underline","strikethrough","forecolor","backcolor","removeformat","||","align","list","iodent",["superscript","subscript"],"||","createlink","unlink","insertimage","inserttable","inserthorizontalrule","splitpage","insertface","|","insertmusic","insertflash","insertvideo","||","cleanword","typeset"],right:["toolbarmode","fullscreen","mode","|","help"]},normal:{left:["paragraph","fontsize","|","bold","italic","underline","forecolor","backcolor","removeformat","||","justifyleft","justifycenter","orderedlist","unorderedlist","||","createlink","insertimage","inserttable","|","insertvideo","|","typeset"],right:["toolbarmode","fullscreen","|","help"]}};a.toolbarBottons={paragraph:{text:"\u6bb5\u843d",click:function(d,i){var c=a.find(d.objId+"Paragraph"),b;if(null==c){var h="",e=d.config.paragraphs;for(b=0;b ";c=a.CE("DIV",d.objId+"Paragraph",h,true);c.className="ePopPanel";a._noSel(c);a.listenTags(c,"DIV","click",function(){a.hidePop();var b=this.getAttribute("paraValue");if(f)b="<"+b+">";d.exeCmd("FormatBlock",b)});if(j){var g=a._tags(c,"DIV");for(b=g.length-1;b>=0;b--)d._ieMouseStyle(g[b],"eMenuItem","eMenuItemUp","eMenuItem")}}a.pop(c,i)}},fontsize:{text:"\u6587\u5b57\u5927\u5c0f",click:function(d,h){var c=a.find(d.objId+"FontSize");if(null==c){for(var g="",f,e=d.config.fontsizes,b=0;b