(function(e,g){if(e.TQE)return;var w="2.3.6",q=navigator.userAgent.toLowerCase(),b=e.document,f=!!e.ActiveXObject,j=f&&!e.XMLHttpRequest,x=/msie ([0-9]+)/.exec(q),r=x!=null?parseInt(x[1]):0,o=q.indexOf("webkit")>=0,m=q.indexOf("presto")>=0,l=!o&&!m&&q.indexOf("gecko")>=0,L="\u6dfb\u52a0\u94fe\u63a5",s='',E='\u7f51\u5740:
\u6807\u9898:
\u6253\u5f00:",I="\u63d2\u5165\u56fe\u7247",B='\u56fe\u7247\u7f51\u5740:
\u66ff\u6362\u6587\u672c:
\u5c3a\u5bf8: × px  
\u5bf9\u9f50:     \u8fb9\u6846:',y='
\u7f51\u5740:
\u5c3a\u5bf8: × px \u91cd\u8bbe\u5927\u5c0f
\u66ff\u6362\u6587\u672c: \u8fb9\u6846:
\u6392\u7248: \u9ed8\u8ba4 | \u5de6\u6d6e\u52a8 | \u5c45\u4e2d | \u53f3\u6d6e\u52a8 | \u4e0a\u5bf9\u9f50 | \u4e2d\u5bf9\u9f50 | \u4e0b\u5bf9\u9f50

\u94fe\u63a5:
",H="\u63d2\u5165\u52a8\u753b",A='Flash\u7f51\u5740:
\u5c3a\u5bf8:× px',J="\u63d2\u5165\u97f3\u9891",C='\u97f3\u9891\u7f51\u5740:
\u81ea\u52a8\u64ad\u653e:',K="\u63d2\u5165\u89c6\u9891",D='\u89c6\u9891\u7f51\u5740:
\u5c3a\u5bf8:× px
\u81ea\u52a8\u64ad\u653e:
\u89c6\u9891\u7c7b\u578b:',P="\u63d2\u5165\u884c",O="\u63d2\u5165\u5217",N="\u5220\u9664\u884c",M="\u5220\u9664\u5217",G="\u5220\u9664\u8868\u683c",z='
\u5408\u5e76\u5355\u5143\u683c\u62c6\u5206\u5355\u5143\u683c
\u8868\u683c\u6392\u7248: \u5c45\u5de6 | \u5c45\u4e2d | \u5c45\u53f3
\u5185\u5bb9\u5bf9\u9f50


\u5bbd\u5ea6
\u8fb9\u6846
\u95f4\u8ddd
\u586b\u5145

\u63d2\u5165\u8868\u683c
',Q="\u65e0\u8272",W="\u786e\u5b9a",T="\u53d6\u6d88",S="\u4e0a\u4f20",Y="\u5173\u95ed",R="\u7248\u672c",X="\u4f5c\u8005",V="\u5b98\u7f51",U="\u90ae\u7bb1",F="\u5206\u9875\u6807\u9898: ",a=function(u,n){var k=this,q=a.clone(a.config);k.objId=u;if(n){if(n.height&&n.height!="auto"){n.height=parseInt(n.height);if(isNaN(n.height))n.height="auto"}for(var v in n)q[v]=n[v]}if(typeof q.toolbar=="string"){var s=a.toolbarMode[q.toolbar];if(!s)s=a.toolbarMode.normal;q.toolbar=s.left;if(!n||g===n.toolbarRight)q.toolbarRight=s.right}k.config=q;k.hasFocus=false;k._containerDiv=null;k._toolbarDiv=null;k._clientDiv=null;k._statusDiv=null;k.init=function(){k.obj=a.find(k.objId);if(!k.obj){if(k.config.debug)throw"\u7f3a\u5c11ID\u4e3a "+k.objId+" \u8868\u5355\u5143\u7d20";return}if(k.obj.editor)return;k.obj.editor=k;if(!k.config.width||k.config.width=="auto")if(k.obj.style.width)k.config.width=k.obj.style.width;else if(k.obj.cols)k.config.width=k.obj.cols*8+"px";else k.config.width="100%";if(!k.config.height||k.config.height=="auto")if(k.obj.style.height)k.config.height=parseInt(k.obj.style.height,10);else if(k.obj.offsetHeight)k.config.height=k.obj.offsetHeight;else if(k.obj.rows)k.config.height=k.obj.rows*17;else k.config.height=200;var g,h,d,c='
';c+='
';if(!k.config.debug)k.obj.style.display="none";var b=a.CE("DIV","TQEditorContainer_"+k.objId,c);b.className="eEditor";b.style.width=k.config.width;k.obj.parentNode.insertBefore(b,k.obj);k._containerDiv=b;k._toolbarDiv=a.find(k.objId+"_EditorToolBar");k._clientDiv=a.find(k.objId+"_EditorClient");"function"===typeof k.config.oninit&&k.config.oninit.call(k);k._initContent(k.obj.value);k.changeToolbarMode(k.config.advToolbarMode,true);k.obj.focus=function(){this.editor.focus()};k._statusDiv=b.lastChild;if(false==k.config.resize)k._statusDiv.style.display="none";k._statusDiv.onmousedown=function(c){if(k._containerDiv.style.position=="absolute")return;var i,j,h,n,g=this,b=a.pos(this),m=a._docST(),l=a._docSL(),o=k.config.height,p=k._containerDiv.offsetWidth-2,d=this.style.cursor=="se-resize",s=a.pos(k._clientDiv).y;k._showTableContext(0);if(f){c=e.event;h=c.srcElement;i=l+c.clientX-b.x;j=m+c.clientY-b.y}else{h=c.target;i=c.pageX-b.x;j=c.pageY-b.y}d=d||h===g.firstChild&&"h"!=k.config.resize;g.mouseout=g.onmouseleave=null;var q=function(c){if(f){c=e.event;c.pageX=l+c.clientX;c.pageY=m+c.clientY}var g=s-a.pos(k._clientDiv).y,n=Math.max(50-o+b.y-g,c.pageY-j),h=Math.max(100-p+b.x,c.pageX-i);d&&k.setWidth(h-b.x+p);k.setHeight(n-b.y+o+g)},r=function(){k.focus();k._popTableContext()};n=a._draging(q,r,g);n.style.cursor=d?"se-resize":"s-resize"}};k._toobarCode=function(f,d){var c,e,b="";if(d.length){b+='';for(c=0;c"}b+='';if(k.config.showToolbarGroupHandle){e=a.toolbarBottons.group;b+='
'}for(c=0;c
';return b};k._btnCode=function(b,g){var f="",c,e,d;if("||"===b)b="group";else if("|"===b)b="separator";else if("string"!==typeof b){f='submenu="'+b.join(",")+'" ';b="submenu"}c=a.toolbarBottons[b];if(!c)return"";d=function(a){return'id="eBTN'+b+'" class="eButton"'+(a.css?' style="'+a.css+'"':"")};switch(b){case"group":if(!g)return"";e='
';if(k.config.showToolbarGroupHandle)e+="
";return e;case"separator":return"
";case"br":return"
";default:return'"+c.text+""}};k._ieMouseStyle=function(c,e,d,g){if(!f||!j&&b.compatMode=="CSS1Compat")return;a.addListener(c,"mouseover",function(){this.className=d});a.addListener(c,"mouseup",function(){this.className=d});a.addListener(c,"mousedown",function(){this.className=g});a.addListener(c,"mouseout",function(){this.className=e})};k._keepBookmark=function(){if(f){var b,c=a.find(k.objId+"_Editor");a.addListener(c,"beforedeactivate",function(){b=k._getRange()});a.addListener(c,"activate",function(){if(null==b)return;var a=k._getSelection();if(a.addRange)a.addRange(b);else b.select();b=null})}};k._toolbarBottonClick=function(){var d=f?event:arguments[0],c=this.getAttribute("name"),b=a.toolbarBottons[c];d.cancelBubble=true;k.focus();if(b&&b.click)b.click(k,this);else{a.hidePop();k.exeCmd(c)}};k.__selectOption=function(b,c){for(var a=b.options.length-1;a>=0;a--)if(b.options[a].value==c){b.selectedIndex=a;return}};k.exeCmd=function(a,d){k.focus();var f=k.selectedCells(),c=k._getDoc(),b=k._getSelection(),e,g,h;if(f.length){g=c.createRange?c.createRange():c.body.createTextRange();for(e=0;e';continue}e=a.toolbarBottons[d];if(e)g+='
'+e.text+"
"}b.innerHTML=g;a._noSel(b);m&&a._noSel(b,"DIV");a.listenTags(b,"DIV","click",k._toolbarBottonClick);if(j){f=a._tags(b,"DIV");for(c=f.length-1;c>=0;c--)k._ieMouseStyle(f[c],"eMenuItem","eMenuItemUp","eMenuItem")}a.pop(b,h)};k._popFormUI=function(u,r,t,s,e,b,o,p,q){var c='
';if(b){c+='";c+="
"}c+=t;c+='
 
";if(b){c+='
';var f=b;if(b.substr(0,1)=="#")f=b.substring(1);else{if(!("http://"==b.substr(0,7).toLowerCase()||"/"==b.substr(0,1)||"https://"==b.substr(0,6).toLowerCase()))if("?"==b.substr(0,1))b=location.pathname+b;else{var h=location.pathname.split("/");h[h.length-1]=b;b=h.join("/")}f=a.url+"upload.htm?url="+encodeURIComponent(b)+"&field_name="+k.config.uploadFieldName+"&exts="+encodeURIComponent(o)+"&max_size="+encodeURIComponent(p)+"&debug="+k.config.debug+"&upload_type="+q}c+='';c+="
"}c+="
";var d=a.CE("DIV",u,c,true);d.className="ePopPanel";if(b){var l=function(){this.className="active";var a=this.parentNode.nextSibling;if(this.nextSibling){this.nextSibling.className="";a.style.display="";a.nextSibling.style.display="none";a.parentNode.getElementsByTagName("INPUT")[0].focus()}else if(this.previousSibling){this.previousSibling.className="";a.style.display="none";a.nextSibling.style.display=""}},n=d.firstChild.firstChild;n.firstChild.onclick=l;n.lastChild.onclick=l}var j=a._tags(d,"FORM")[0],g=j.elements;j.srcEditor=k;g.Cancel.onclick=a.hidePop;g.OK.onclick=s;j.onsubmit=function(){this.elements.OK.click();return false};if(e)for(i=e.length-1;i>=0;i--)k._intEdit(g[e[i]]);a._noSel(d);m&&a._noSel(d,"FORM,DIV");return d};k.insertMusic=function(b,a){var c=k.config.tplMusic.replace(/\{\$url\}/g,b).replace(/\{\$auto_start\}/g,a);k.insertHtml(c)};k.insertFlash=function(d,c,b){var a=k.config.tplFlash.replace(/\{\$url\}/g,d);a=a.replace(/\{\$width\}/g,c);a=a.replace(/\{\$height\}/g,b);k.insertHtml(a)};k.insertVideo=function(c,d,g,f,e){var a="",b;switch(e){case"rm":a=k.config.tplRm;break;case"flv":a=k.config.tplFlv;break;case"wm":a=k.config.tplVideo;break;default:b=c.substr(c.lastIndexOf(".")).toLowerCase();if(".flv"==b)a=k.config.tplFlv;else if(".rm"==b||".rmvb"==b)a=k.config.tplRm;else a=k.config.tplVideo}a=a.replace(/\{\$url\}/g,c).replace(/\{\$auto_start\}/g,d).replace(/\{\$width\}/g,g).replace(/\{\$height\}/g,f);k.insertHtml(a)};k.insertHtml=function(e,d){k.focus();if("code"==k.currentMode()){var f=k._editorObj();if(b.selection){var c=b.selection.createRange();if("before"==d||-1==d)c.text=e+c.text;else if("after"==d||1==d)c.text+=e;else c.text=e;c.select()}else if(f.selectionStart||f.selectionStart=="0"){var j=f.selectionStart,m=f.selectionEnd,p=f.scrollTop,h=f.value;if("before"==d||-1==d)e=h.substring(j,m)+e;else if("after"==d||1==d)e+=h.substring(j,m);f.value=h.substr(0,j)+e+h.substr(m,h.length);f.focus();f.selectionStart=f.selectionEnd=j+e.length;f.scrollTop=p}else{f.value+=e;f.focus()}k.save();return}if(l)e=e.replace(/]*)>\s*<\/td/ig,"
0?a.getRangeAt(0):a.createRange?a.createRange():c.createRange()}catch(d){}if(!b)b=f?c.body.createTextRange():c.createRange();return b};k.insertImage=function(h,c,b,d,f,e){if(""==h)return;var a='0)a+=" width="+parseInt(c);if(b!==g&&""!=b&&!isNaN(parseInt(b))&&parseInt(b)>0)a+=" height="+parseInt(b);if(d!==g&&""!=d&&!isNaN(parseInt(d)))a+=" border="+parseInt(d);if(f!==g&&""!=f)a+=' alt="'+f+'"';if(e!==g&&""!=e)a+=' align="'+e+'"';a+=" />";k.insertHtml(a);return};k._enableButton=function(b,c){if(b.disabled===g)b.disabled=false;if(b.disabled!=c)return;if(c){b.disabled=false;k.setOpacity(b,100);a.addListener(b,"click",k._toolbarBottonClick)}else{b.disabled=true;k.setOpacity(b,30);a.delListener(b,"click",k._toolbarBottonClick)}};k._updateToolbar=function(g,f,e){var h=k._toolbarDiv,d=k._button("mode"),c=a._tags(h,"A"),b;if(d)d.id="visual"===k.currentMode()?"eBTNmode":"eBTNmode-reset";for(b=c.length-1;b>=0;b--)k.inArray(c[b].getAttribute("name"),f)^e&&k._enableButton(c[b],g)};k._hook=function(){var c=k._getDoc();c.onkeydown=function(h){a._hideContext();if(f)h=k._realEvent(h);var i=h.keyCode||h.which;h.ctrlKey&&(13==i||10==i||83==i)&&k.save();var o=k._call("keydown",h);if(g!==o&&false==o)return false;(8==i||46==i)&&k.selectedCells().length&&k.exeCmd("delete");if(i==13){var c=k.focusNode(),m,j,e,n;if(!c)return;if(c.nodeName==="#text")c=c.parentNode;if(c.className=="splitPage"){m=c.parentNode;if(c.nextSibling&&c.nextSibling.nodeName==="BR")j=c.nextSibling;else{j=b.createElement("BR");if(m.lastChild==c)m.appendChild(j);else m.insertBefore(j,c.nextSibling)}n=k._getDoc();if(f){e=n.body.createTextRange();e.moveToElementText(j);e.collapse(true);e.select()}else{e=n.createRange();e.selectNode(j);e.collapse(true);var p=k._getSelection();p.removeAllRanges();p.addRange(e)}return false}if(k.config.enter2br){if(c.tagName!="LI"){k.insertHtml("
");return false}}else if(!f&&!h.shiftKey){for(var o=k._getRange(),d,l=o.startContainer;l;l=l.parentNode){d=l.nodeName;if(d=="LI"||d=="P"||"H1"==d||"H2"==d||"H3"==d||"H4"==d||"H5"==d||"H6"==d||"DIV"==d)return true}k.exeCmd("FormatBlock","p")}}};c.onkeyup=function(b){b=k._realEvent(b);var e=b.keyCode||b.which,d=this.body.firstChild;if((8===e||46===e)&&d&&d===c.body.lastChild){var a=d.nodeName,f=d.innerHTML,g=/^<(strong|em|b|i|u|font)[^>]*><\/\1>| $/i;if(a==="P"||a==="H1"||a==="H2"||a==="H3"||a==="H4"||a==="H5"||a==="H6"||a==="BR")if(""===f||g.test(f))c.body.innerHTML=""}k._call("keyup",b)};c.ondragstart=function(){a._hideContext();k._showTableContext(0)};c.onclick=function(c){var b,e,d;a._hideContext();if(!f){b=c.target;if("IMG"===b.nodeName){e=k._getDoc().createRange();d=k._getSelection();e.selectNode(c.target);d.removeAllRanges();d.addRange(e);k._popImagePanel(b)}}else{c=k._realEvent(c);b=c.srcElement;"IMG"===b.nodeName&&k._popImagePanel(b)}};if(f){c.onmousedown=c.onclick;c.onclick=null}c.body.onpaste=function(a){if(f)a=k._realEvent(a);var b=k._call("paste",a);k.config.autoClean&&setTimeout(k.cleanWord,200)};a.addListener(c,"mouseup",a.hidePop);a.addListener(c,"scroll",k._popTableContext);a.addListener(c.body,"scroll",k._popTableContext);a.addListener(c,"keyup",k._popTableContext);a.addListener(c,"mouseup",k._popTableContext);a.addListener(c,"mousedown",k._startSelectTd);a.addListener(c,"keypress",k.unselectAllCells);if(j){a.addListener(c,"mouseup",k.focus);a.addListener(c,"mousedown",k.focus)}};k._popImagePanel=function(c){if(!k.config.autoPopImagePanel)return;var b=a.find("__tqImagePanel");if(null==b){b=a.CE("DIV","__tqImagePanel",y,true);b.className="ePopPanel";var j=a._tags(b,"FORM")[0],d=j.elements;k._intEdit(d.width);k._intEdit(d.height);k._intEdit(d.border);b.urlField=d.url;b.widthField=d.width;b.heightField=d.height;b.lockField=d.lock;b.borderField=d.border;b.altField=d.alt;b.linkField=d.link;b.targetField=d.target;b.linkField.onchange=function(){var c=this.parentNode.parentNode.parentNode,b=c.target,a=b.parentNode;if(a.nodeName!=="A")return;a.setAttribute("href",this.value)};b.targetField.onchange=function(){var c=this.parentNode.parentNode.parentNode,b=c.target,a=b.parentNode;if(a.nodeName!=="A")return;a.setAttribute("target",this.options[this.selectedIndex].value)};b.urlField.onchange=function(){this.parentNode.parentNode.target.src=this.value};b.urlField.onfocus=function(){this.select()};var i=function(){var a=this.parentNode.parentNode,b=a.target,c=h=Math.max(1,this.value);if(a.lockField.checked)if(this.id=="width")h=a.heightField.value=Math.round(c/a.rate);else c=a.widthField.value=Math.round(h*a.rate);else if(this.id=="width")h=a.heightField.value;else c=a.widthField.value;b.width=c;b.height=h;b.style.width="";b.style.height=""};b.widthField.onchange=b.widthField.onblur=b.heightField.onchange=b.heightField.onblur=i;b.borderField.onchange=function(){var a=this.parentNode.parentNode.target;if(""===this.value)a.removeAttribute("border");else a.border=this.value};b.altField.onchange=function(){var a=this.parentNode.parentNode.target;if(""===this.value)a.removeAttribute("alt");else a.alt=this.value};b.lockField.onclick=function(){if(this.checked){var a=this.parentNode.parentNode.parentNode;a.rate=a.widthField.value/a.heightField.value}};for(var g=function(){var c=this.parentNode.parentNode,a=c.target,b=this.id;if("resetWH"==b){a.removeAttribute("width");a.removeAttribute("height");a.style.width="";a.style.height="";c.widthField.value=a.width;c.heightField.value=a.height;c.rate=a.width/a.height}else{a.align="";a.style.display="";a.style.margin="";k.exeCmd("justifynone");if("alignC"==b)k.exeCmd("justifycenter");else if("alignDefault"!=b)a.align=b.substring(5,20).toLowerCase()}return false},f=a._tags(b,"A"),e=f.length-1;e>=0;e--)f[e].onclick=g;a._noSel(b)}if(c.parentNode&&c.parentNode.nodeName==="A"){b.lastChild.lastChild.style.display="";b.linkField.value=c.parentNode.getAttribute("href");k.__selectOption(b.targetField,c.parentNode.getAttribute("target"))}else{b.lastChild.lastChild.style.display="none";b.linkField.value="";b.targetField.selectedIndex=0}b.target=c;b.urlField.value=c.getAttribute("src");b.widthField.value=c.width;b.heightField.value=c.height;b.borderField.value=c.border;b.altField.value=c.alt;b.rate=c.width>0&&c.height>0?c.width/c.height:1;k._popContext(b,c)};k._popContext=function(b,g){a.activeContext!=b&&a._hideContext();var f,c,e;p=a.pos(k._editorObj()),p2=g.getBoundingClientRect(),d=a._doc();b.style.display="block";f=Math.min(p.x+p2.left,a._docSL()+d.clientWidth-b.offsetWidth-5);c=Math.min(p.y+p.height,10+p.y+p2.bottom);e=a._docST()+d.clientHeight-b.offsetHeight-10;if(c>e)c=Math.max(p.y-b.offsetHeight,p.y+p2.top-b.offsetHeight-10);b.style.left=f+"px";b.style.top=c+"px";a.activeContext=b;a.drag(b)};k._showTableContext=function(e){for(var b,d=["TQEAddRowBefore","TQEAddRowAfter","TQEAddColBefore","TQEAddColAfter","TQEDeleteRow","TQEDeleteColumn","TQEDeleteTable"],c=d.length;c>=0;c--){b=a.find(d[c]);if(b)b.style.display=e?"":"none"}};k._popTableContext=function(){if(!k.config.autoPopTablePanel)return;var m,b=k.focusNode();while(b&&b.nodeName!=="TD")b=b.parentNode;if(!b)return k._showTableContext(0);m=b.parentNode.parentNode.parentNode;var l=a.pos(k._editorObj()),p=m.getBoundingClientRect(),e=b.getBoundingClientRect(),c=a.find("TQEAddRowBefore"),h=a.find("TQEAddRowAfter"),f=a.find("TQEAddColBefore"),d=a.find("TQEAddColAfter"),j=a.find("TQEDeleteRow"),g=a.find("TQEDeleteColumn"),i=a.find("TQEDeleteTable"),q=k._getDoc().documentElement,n,o;if(e.top+b.offsetHeight<0||e.left+b.offsetWidth<0||e.top>=q.clientHeight||e.left>=q.clientWidth)return k._showTableContext(0);if(!c){i=a.CE("A","TQEDeleteTable","",true);i.title=G;c=a.CE("A","TQEAddRowBefore","",true);h=a.CE("A","TQEAddRowAfter","",true);h.className=c.className="eButtonAddRow";c.title=h.title=P;f=a.CE("A","TQEAddColBefore","",true);d=a.CE("A","TQEAddColAfter","",true);d.className=f.className="eButtonAddCol";f.title=d.title=O;j=a.CE("A","TQEDeleteRow","",true);g=a.CE("A","TQEDeleteColumn","",true);g.className=j.className=i.className="eButtonDeleteRC";j.title=N;g.title=M;a._noSel(c);a._noSel(h);a._noSel(f);a._noSel(d);a._noSel(j);a._noSel(g);a._noSel(i);c.onclick=h.onclick=f.onclick=d.onclick=j.onclick=g.onclick=i.onclick=function(){if(!this.cell)return;var b=this.cell,d=b.parentNode.parentNode.parentNode,c=this.editor;c.unselectAllCells();switch(this.id){case"TQEAddRowBefore":a.insertRow(b,1);break;case"TQEAddRowAfter":a.insertRow(b,0);break;case"TQEAddColBefore":a.insertCol(b,1);break;case"TQEAddColAfter":a.insertCol(b,0);break;case"TQEDeleteRow":a.deleteRow(b);break;case"TQEDeleteColumn":a.deleteCol(b);break;case"TQEDeleteTable":d.parentNode.removeChild(d)}c.focus();c._popTableContext()}}else k._showTableContext(1);c.cell=h.cell=f.cell=d.cell=j.cell=g.cell=i.cell=b;c.editor=h.editor=f.editor=d.editor=j.editor=g.editor=i.editor=k;h.style.left=c.style.left=j.style.left=Math.min(l.x+k._getDoc().body.offsetWidth-12,l.x+p.left+m.offsetWidth)+"px";c.style.top=l.y+e.top-5+"px";h.style.top=l.y+e.top+b.offsetHeight-4+"px";j.style.top=l.y+e.top+(b.offsetHeight>>>1)-6+"px";d.style.top=f.style.top=g.style.top=l.y+Math.max(0,p.top-12)+"px";f.style.left=l.x+e.left-5+"px";d.style.left=l.x+e.left+b.offsetWidth-5+"px";g.style.left=l.x+e.left+(b.offsetWidth>>1)-6+"px";n=a.pos(c);o=a.pos(d);i.style.top=Math.min(o.y,n.y-13)+"px";i.style.left=Math.max(o.x+10,n.x)+"px"};k.activeTable=null;k.unselectAllCells=function(){if(!k.activeTable)return;try{for(var d=k.activeTable,c,b=d.rows.length-1;b>=0;b--)for(c=d.rows[b].cells.length-1;c>=0;c--){td=d.rows[b].cells[c];p=a.pos(td);k._selectCell(td,false)}}catch(e){}k.activeTable=null};k.selectedCells=function(){if(!k.activeTable)return[];try{for(var c=k.activeTable,b,d=[],a=c.rows.length-1;a>=0;a--)for(b=c.rows[a].cells.length-1;b>=0;b--)c.rows[a].cells[b].isSelected&&d.push(c.rows[a].cells[b])}catch(e){}return d};k._selectCell=function(a,b){if(a.isSelected==b)return;a.className=b?"selectedTD":"";a.isSelected=b};k._pos=function(d){var e=0,f=0,g=d.getBoundingClientRect(),c=k._getDoc(),b=k._editorObj().contentWindow,a=c.compatMode!="CSS1Compat"?c.body:c.documentElement;e=g.left-a.clientLeft+(b.scrollX?b.scrollX:a.scrollLeft);f=g.top-a.clientTop+(b.scrollY?b.scrollY:a.scrollTop);return{x:e,y:f,left:e,top:f,width:d.offsetWidth,height:d.offsetHeight}};k._startSelectTd=function(c){var u,v,l,m,h,t,s,r,g,d,i=false,a=k._getDoc(),e=a.parentWindow,j=a.compatMode!="CSS1Compat"?a.body:a.documentElement,p=a.onmousemove,q=a.onmouseup,o=a.ondragstart,n=b.onmouseup;c=k._realEvent(c);if(c.ctrlKey||c.altKey||c.button!=f?1:0)return;k.unselectAllCells();d=f?c.srcElement:c.target;while(d&&d.nodeName!="BODY"&&d.nodeName!="TD")d=d.parentNode;if(!d||d.nodeName!=="TD")return;h=d.parentNode.parentNode.parentNode;if(h.nodeName!=="TABLE")return;g=k._pos(d);l=f?c.clientX+(e.scrollX?e.scrollX:j.scrollLeft):c.pageX;m=f?c.clientY+(e.scrollY?e.scrollY:j.scrollTop):c.pageY;a.onmousemove=function(d){var b,c,v,w,o,p,r,s,t,u,a,q,n;if(f){d=this.parentWindow.event;b=d.clientX+(e.scrollX?e.scrollX:j.scrollLeft);c=d.clientY+(e.scrollY?e.scrollY:j.scrollTop)}else{b=d.pageX;c=d.pageY}if(!i&&(bg.x+g.width||cg.y+g.height)){i=true;k.activeTable=h}if(!i)return;n=k._getSelection();if(n.empty)n.empty();else n.removeAllRanges&&n.removeAllRanges();r=Math.min(l,b);s=Math.max(l,b);t=Math.min(m,c);u=Math.max(m,c);for(o=h.rows.length-1;o>=0;o--)for(p=h.rows[o].cells.length-1;p>=0;p--){q=h.rows[o].cells[p];a=k._pos(q);k._selectCell(q,a.x<=s&&a.y<=u&&a.x+a.width>=r&&a.y+a.height>t)}};a.ondragstart=a.onmouseup=b.onmouseup=function(){a.onmousemove=p;a.ondragstart=o,b.onmouseup=n;i=false}};k.canMergeSelectedCells=function(){if(!k.activeTable)return false;var f=k.activeTable,b,g,h,j,i,e,m,d,l=0,c=k.selectedCells();if(c.length<2)return false;a.updateCellsStatus(f);h=c[0].colStart;i=c[0].colEnd;j=c[0].rowStart;e=c[0].rowEnd;for(b=c.length-1;b>0;b--){h=Math.min(h,c[b].colStart);j=Math.min(j,c[b].rowStart);i=Math.max(i,c[b].colEnd);e=Math.max(e,c[b].rowEnd)}for(b=Math.min(e,f.rows.length-1);b>=0;b--)for(g=f.rows[b].cells.length-1;g>=0;g--){d=f.rows[b].cells[g];if(!d.isSelected&&d.colStart<=i&&d.colEnd>=h&&d.rowStart<=e&&d.rowEnd>=j)return false}return true};k.mergeSelectedCells=function(){if(!k.canMergeSelectedCells())return false;for(var g=k.activeTable,e,j,m,b,l="",f=null,i=1,h=1,c,d=0;d)+$/,"$1");f.rowSpan=i;f.colSpan=h;for(d=g.rows.length-1;d>=0;d--){b=g.rows[d];for(e=b.cells.length-1;e>=0;e--)if(b.cells[e].isSelected){c=b.cells[e];c!=f&&b.removeChild(c)}b.cells.length<1&&g.deleteRow(d)}a.updateCellsStatus(g)};k.splitCell=function(b){if(!b||b.rowSpan<2&&b.colSpan<2)return true;var h=b.parentNode.parentNode.parentNode,c,d,g,e,f;a.updateCellsStatus(h);for(c=b.rowStart;c<=b.rowEnd;c++){e=h.rows[c];for(d=0;db.colEnd)break;g=b.colSpan;if(c==b.rowStart)g--;while(0'}else if(g)d='';else return;k._autoSave(0);a._hideContext();var h=k.content();b.body.appendChild(k._clientDiv);k._clientDiv.innerHTML=d;k._containerDiv.insertBefore(k._clientDiv,k._containerDiv.lastChild);k._initContent(h);k._updateToolbar(g,["toolbarmode","mode","fullscreen","help"],true)};k.typeset=function(){if("visual"!=k.currentMode())return;k._showTableContext(0);var g=k._getDoc(),b,d,h,f,e,l;h=g.body.innerHTML;h=h.replace(/ /gi," ").replace(/>\s+ <").replace(/ +/gi," ").replace(/
=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,"\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'+e[b][0]+"
";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'+e[b][0]+"";c=a.CE("DIV",d.objId+"FontSize",g,true);c.className="ePopPanel";a._noSel(c);a.listenTags(c,"DIV","click",function(){a.hidePop();d.exeCmd("FontSize",this.getAttribute("paraValue"))});if(j){f=a._tags(c,"DIV");for(b=f.length-1;b>=0;b--)d._ieMouseStyle(f[b],"eMenuItem","eMenuItemUp","eMenuItem")}}a.pop(c,h)}},fontname:{text:"\u5b57\u4f53",click:function(d,h){var c=a.find(d.objId+"FontName");if(null==c){for(var f,g="",e=d.config.fontnames,b=0;b'+e[b][0]+"";c=a.CE("DIV",d.objId+"FontName",g,true);c.className="ePopPanel";a._noSel(c);a.listenTags(c,"DIV","click",function(){a.hidePop();d.exeCmd("FontName",this.getAttribute("paraValue"))});if(j){f=a._tags(c,"DIV");for(b=f.length-1;b>=0;b--)d._ieMouseStyle(f[b],"eMenuItem","eMenuItemUp","eMenuItem")}}a.pop(c,h)}},forecolor:{text:"\u6587\u672c\u989c\u8272",click:function(b,a){b._showColorSelectUI(a,"forecolor")}},backcolor:{text:"\u80cc\u666f\u8272",click:function(b,a){b._showColorSelectUI(a,f?"backcolor":"hilitecolor")}},bold:{text:"\u7c97\u4f53",click:null},italic:{text:"\u659c\u4f53",click:null},underline:{text:"\u4e0b\u5212\u7ebf",click:null},strikethrough:{text:"\u5220\u9664\u7ebf",click:null},removeformat:{text:"\u6d88\u9664\u683c\u5f0f",click:function(e){a.hidePop();e.exeCmd("removeformat");if(l||m)return;var g=e._getRange(),f=function(a){return a.replace(/<\/?span[^>]*>/ig,"").replace(/

]*>/ig,"

").replace(/

]*>/ig,"
")},h="",d=g.htmlText,c,b;if(d)e.insertHtml(f(d));else{c=g.cloneContents().childNodes;for(b=0;b"+(e?e:f)+"");return false}var c=b.focusNode();do if(c.tagName=="A"){if(""==d)c.removeAttribute("target");else c.setAttribute("target",d);if(""==e)c.removeAttribute("title");else c.setAttribute("title",e);break}while(c=c.parentNode);return false};d=b._popFormUI(b.objId+"CreateLink",L,E,g,null,b.config.linkUploadUrl,b.config.linkFileTypes,b.config.linkFileSize,"link");a.drag(d)}if(!a.pop(d,h))return;var f=a._tags(d,"FORM")[0],e=f.elements,c=b.focusNode();f.reset();do if(c.tagName=="A"){e.url.value=c.getAttribute("href");e.title.value=c.getAttribute("title");b.__selectOption(e.target,c.getAttribute("target"));break}while(c=c.parentNode);e.url.focus()}},unlink:{text:"\u5220\u9664\u94fe\u63a5",click:null},inserttable:{text:"\u63d2\u5165\u8868\u683c",click:function(h,t){var e=a.find(h.objId+"InsertTable");if(null==e){for(var o=z+'
',b=0,s=0,b=0;b<5;b++){o+="";for(s=0;s<8;s++)o+='';o+=""}o+='
1 × 1
';e=a.CE("DIV",h.objId+"InsertTable",o,true);e.className="ePopPanel";a._noSel(e);a.listenTags(e.lastChild,"TD","click",function(){a.hidePop();for(var c,b='',d=this.parentNode.rowIndex;d>=0;d--){b+="";for(c=this.cellIndex;c>=0;c--)b+=f?'':'';b+=""}b+="

";h.insertHtml(b)});a.listenTags(e.lastChild,"TD","mouseover",function(){for(var b,e=this.cellIndex,a=this.parentNode,f=a.rowIndex,d=a.parentNode.parentNode,h=d.rows.length,g=a.cells.length,c=0;c1||c.colSpan>1));k(r.nextSibling,q.style.display!="none"||r.style.display!="none")}else k(p,0);k(m.previousSibling,p.style.display!="none"&&m.style.display!="none");var j=e.firstChild.getElementsByTagName("A"),i=function(d,b){if(l.length>0)for(var a=l.length-1;a>=0;a--){l[a].align=d;l[a].vAlign=b}else if(c){c.align=d;c.vAlign=b}};for(b=j.length-1;b>=0;b--){j[b].href="#";j[b].onclick=function(){switch(this.id){case"eTableAlignDefault":d.align="";break;case"eTableAlignLeft":d.align="left";break;case"eTableAlignCenter":d.align="center";break;case"eTableAlignRight":d.align="right";break;case"eCellAlignLT":i("left","top");break;case"eCellAlignCT":i("center","top");break;case"eCellAlignRT":i("right","top");break;case"eCellAlignLC":i("left","middle");break;case"eCellAlignCC":i("center","middle");break;case"eCellAlignRC":i("right","middle");break;case"eCellAlignLB":i("left","bottom");break;case"eCellAlignCB":i("center","bottom");break;case"eCellAlignRB":i("right","bottom")}h.focus();return false}}j=e.firstChild.getElementsByTagName("INPUT");for(b=j.length-1;b>=0;b--){if(d)j[b].value=g==d[j[b].id]?"":d[j[b].id];j[b].onblur=function(){if(""==this.value)d.removeAttribute(this.id);else d[this.id]=this.value;d.style.borderCollapse=d.cellSpacing<1&&d.border==1?"collapse":""}}q.onclick=function(){a.hidePop();h.mergeSelectedCells();h.focus();return false};r.onclick=function(){a.hidePop();h.splitCell(c);h.focus();return false};if(!a.pop(e,t))return void 0}},insertimage:{text:"\u63d2\u5165\u56fe\u7247",click:function(d,j){var f=a.find(d.objId+"InsertImage");if(null==f){var i=function(){a.hidePop();var b=this.form.elements;d.insertImage(b.url.value,b.width.value,b.height.value,b.border.value,b.alt.value,b.align.value);return false};f=d._popFormUI(d.objId+"InsertImage",I,B,i,["width","height","border"],d.config.imageUploadUrl,d.config.imageFileTypes,d.config.imageFileSize,"image");a.drag(f)}if(!a.pop(f,j))return;var h=a._tags(f,"FORM")[0],e=h.elements,b=d._getRange(),c=b.commonAncestorContainer;h.reset();if(c){if(!b.collapsed&&b.startContainer==b.endContainer&&b.startOffset-b.endOffset<2&&b.startContainer.hasChildNodes())c=b.startContainer.childNodes[b.startOffset];if(c.tagName!="IMG"&&r>=9&&""===b.toString())if(g===b.startContainer.length&&b.startContainer.firstChild===b.endContainer.previousSibling)c=b.startContainer.firstChild;else if(b.endContainer.lastChild===b.startContainer.nextSibling)c=b.endContainer.lastChild;else if(b.startContainer.length==b.startOffset&&b.endOffset==0&&b.startContainer.nextSibling==b.endContainer.previousSibling)c=b.startContainer.nextSibling;if(!c||c.tagName!="IMG")c=null}else if(b.length&&b.item(0).tagName=="IMG")c=b.item(0);if(c&&"IMG"==c.nodeName){e.url.value=c.getAttribute("src");e.width.value=c.width;e.height.value=c.height;e.border.value=c.border;e.alt.value=c.alt;d.__selectOption(e.align,c.align)}e.url.focus()}},insertface:{text:"\u8868\u60c5",click:function(d,g){var c=a.find(d.objId+"InsertFace");if(null==c){for(var e,f='
',b=1;b<=d.config.faceCount;b++)f+='';f+="
";c=a.CE("DIV",d.objId+"InsertFace",f,true);c.className="ePopPanel";a._noSel(c);a.listenTags(c,"IMG","click",function(){a.hidePop();d.insertHtml('')});if(j){e=a._tags(c,"IMG");for(b=e.length-1;b>=0;b--)d._ieMouseStyle(e[b],"","imgHover","")}}a.pop(c,g)}},insertflash:{text:"\u63d2\u5165Flash",click:function(b,f){var c=a.find(b.objId+"InsertFlash"),d;if(null==c){var e=function(){a.hidePop();var c=this.form.elements;b.insertFlash(c.url.value,c.width.value,c.height.value);return false};c=b._popFormUI(b.objId+"InsertFlash",H,A,e,["width","height"],b.config.flashUploadUrl,b.config.flashFileTypes,b.config.flashFileSize,"flash");a.drag(c)}if(!a.pop(c,f))return;d=a._tags(c,"FORM")[0];d.reset();d.elements.url.focus()}},insertmusic:{text:"\u63d2\u5165\u97f3\u9891",click:function(b,f){var c=a.find(b.objId+"InsertMusic"),d;if(null==c){var e=function(){a.hidePop();var c=this.form.elements;b.insertMusic(c.url.value,c.auto_start.value);return false};c=b._popFormUI(b.objId+"InsertMusic",J,C,e,null,b.config.musicUploadUrl,b.config.musicFileTypes,b.config.musicFileSize,"music");a.drag(c)}if(!a.pop(c,f))return;d=a._tags(c,"FORM")[0];d.reset();d.elements.url.focus()}},insertvideo:{text:"\u63d2\u5165\u89c6\u9891",click:function(b,f){var c=a.find(b.objId+"InsertVideo"),d;if(null==c){var e=function(){a.hidePop();var c=this.form.elements;b.insertVideo(c.url.value,c.auto_start.value,c.width.value,c.height.value,c.video_type.value);return false};c=b._popFormUI(b.objId+"InsertVideo",K,D,e,["width","height"],b.config.videoUploadUrl,b.config.videoFileTypes,b.config.videoFileSize,"video");a.drag(c)}if(!a.pop(c,f))return;d=a._tags(c,"FORM")[0];d.reset();d.elements.url.focus()}},cleanword:{text:"\u6e05\u7406Word\u4ee3\u7801",click:function(b){a.hidePop();b.cleanWord(true)}},typeset:{text:"\u81ea\u52a8\u6392\u7248",click:function(b,h){a.hidePop();b.typeset();return;var c=a.find(b.objId+"Typeset"),d;if(null==c){var f="\u81ea\u52a8\u6392\u7248",e='\u56fe\u7247/\u89c6\u9891/Flash
\u9996\u884c\u7f29\u8fdb ',g=function(){a.hidePop();var c=this.form.elements;b.typeset();return false};c=b._popFormUI(b.objId+"Typeset",f,e,g);a.drag(c)}if(!a.pop(c,h))return;d=a._tags(c,"FORM")[0];d.reset();d.elements.url.focus()}},mode:{text:"\u67e5\u770b\u6e90\u7801",click:function(b){a.hidePop();b.changeMode()}},splitpage:{text:"\u63d2\u5165\u5206\u9875\u7b26",click:function(b){a.hidePop();b.insertHtml(b.config.tplSplitPage)}},group:{text:"",click:null},br:{text:"",click:null},separator:{text:"",click:null},fullscreen:{text:"\u5168\u5c4f",click:function(b){a.hidePop();b.fullScreen()}},toolbarmode:{text:"\u5de5\u5177\u680f\u6a21\u5f0f",click:function(b){a.hidePop();b.changeToolbarMode()}},help:{text:"\u5e2e\u52a9",click:function(c,d){var b=a.find(c.objId+"TQHelpPanel");if(null==b){b=a.CE("DIV",c.objId+"TQHelpPanel",'
TQEditor
'+R+": "+w+"
"+V+': e512.net
'+U+': litqqs@163.com
',true);b.className="ePopPanel"}a.pop(b,d)}}};e.tqEditor=e.tqeditor=e.TQEditor=e.TQE=a;e.isIE=f;e.isIE6=j;e.IEVersion=r;e.isWebkit=o;e.isOpera=m;e.isGecko=l})(window); (function(a){if(!a){throw"\u5fc5\u987b\u5148\u52a0\u8f7d TQEditor.js ";return}var b=a.prototype;b.images=function(e){var d=this,c=[],g="",f=d._getDoc(),b,a;if("code"===d.currentMode())return c;b=f.getElementsByTagName("IMG");for(a=0;a=0;b--){f=d(c[b].getAttribute("href"));f&&a.removeNode(c[b],false)}else for(b=c.length-1;b>=0;b--)a.removeNode(c[b],false);return};b.removeImages=function(d){var e=this,g=e._getDoc(),c,b,f;if("code"===e.currentMode())return;c=g.getElementsByTagName("IMG");if("function"===typeof d)for(b=c.length-1;b>=0;b--){f=d(c[b].getAttribute("src"));f&&a.removeNode(c[b],false)}else for(b=c.length-1;b>=0;b--)a.removeNode(c[b],false);return};b.removeFlashs=function(d){var e=this,g=e._getDoc(),c,b,f;if("code"===e.currentMode())return;c=g.getElementsByTagName("EMBED");if("function"===typeof d)for(b=c.length-1;b>=0;b--){f=d(c[b].getAttribute("src"));f&&a.removeNode(c[b],false)}else for(b=c.length-1;b>=0;b--)a.removeNode(c[b],false);return};b.removeObjects=function(){var d=this,e=d._getDoc(),c,b,f;if("code"===d.currentMode())return;c=e.getElementsByTagName("OBJECT");for(b=c.length-1;b>=0;b--)a.removeNode(c[b],false)};b.getSelectText=function(b){var c=this,a=c.getSelectHtml();if(b)a=a.replace(/<(br|p|div|ul|ol|li|tr)[^>]*>\n?/g,"\n");return a.replace(/<(textarea|select|script|style)[^>]*>.*?<\/\1>/ig,"").replace(/<\/?[a-z][^>]*>/ig,"").replace(/\n+/g,"\n").replace(/</g,"<").replace(/>/g,">").replace(/ /g," ")};b.getSelectHtml=function(){var d=this;if("code"==d.currentMode()){var f=d._editorObj();if(document.selection){var k=document.selection.createRange();return k.text}return f.selectionStart!=f.selectionEnd?f.value.substring(f.selectionStart,f.selectionEnd):""}if(d.activeTable){var c,b,e,g=a.CE("DIV");g.innerHTML=d.activeTable.outerHTML;c=g.firstChild;for(b=c.rows.length-1;b>=0;b--){for(e=c.rows[b].cells.length-1;e>=0;e--)if(c.rows[b].cells[e].className=="selectedTD")c.rows[b].cells[e].className="";else c.rows[b].removeChild(c.rows[b].cells[e]);c.rows[b].cells.length<1&&c.rows[b].parentNode.removeChild(c.rows[b])}return g.innerHTML}d.focus();var i=d._getRange(),j=i.htmlText;if(j)return j;else{var g=a.CE("DIV"),h=i.cloneContents().childNodes;while(h.length)g.appendChild(h[0]);return g.innerHTML}}})(window.TQE); function ubb2html(g){var c=0,f=[],a=""+g,b="",e=TQE.url,d=function(a){return a.replace(/\[\]/g,function(a){return({"[":"%5b","]":"%5d"})[a]})};a=a.replace(/[<>\" ]/g,function(a){return({"<":"<",">":">",'"':"""," ":" "})[a]}).replace(/\r?\n/g,"
");do b="__CODE__"+Math.random()+"_";while(a.indexOf(b)>=0);a=a.replace(/\[code[=\]].*?\[\/code\]/ig,function(a){f.push(a);return b+c+++"_"}).replace(/\[flv(?:\s*=\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+)\s*)?)?\](.*?)\[\/flv\]/ig,function(g,b,a,c,f){if(!b)b=320;if(!a)a=240;return''}).replace(/\[rm(?:\s*=\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+)\s*)?)?\](.*?)\[\/rm\]/ig,function(f,b,a,c,e){if(!b)b=320;if(!a)a=240;return''}).replace(/\[mp3\](.*?)\[\/mp3\]/ig,'').replace(/\[img\](.*?)\[\/img\]/ig,"").replace(/\[img(?:=\s*(\d+)\s*,\s*(\d+)\s*)\]\s*([\w_\-\.\/:]*)\s*\[\/img\]/ig,"").replace(/\[(color|size)\s*=\s*([^\]]+)\s*\]/ig,"").replace(/\[\/(color|size)\]/ig,"").replace(/\[bg\s*=\s*([^\]]+)\s*\]/ig,'').replace(/\[\/bg]/ig,"").replace(/\[(left|center|right)]/ig,'
').replace(/\[\/(left|center|right)]/ig,"
").replace(/(?:
|\s)?\[list\](.*?)(
|\s)*\[\/list\]/ig,function(b,a){return"
    "+a.replace(/\(\s| )*\[\*\]/g,"
  • ")+"
"}).replace(/(?:
|\s)?\[numlist\](.*?)(
|\s)*\[\/numlist\]/ig,function(b,a){return"
    "+a.replace(/\(\s| )*\[\*\]/g,"
  1. ")+"
"}).replace(/\[\:(\d+)]/g,'').replace(/\[(\/?(?:b|u|i|s|sup|sub|h[1-6]))\]/ig,"<$1>").replace(/\[url\]\s*(((?!")[\s\S])*?)(?:"[\s\S]*?)?\s*\[\/url\]/ig,'$1').replace(/\[url\s*=\s*([^\]"]+?)(?:"[^\]]*?)?\s*\]\s*([\s\S]*?)\s*\[\/url\]/ig,'$2').replace(/\[email\]\s*(((?!")[\s\S])+?)(?:"[\s\S]*?)?\s*\[\/email\]/ig,'$1').replace(/\[email\s*=\s*([^\]"]+?)(?:"[^\]]*?)?\s*\]\s*([\s\S]+?)\s*\[\/email\]/ig,'$2').replace(/\[qq\]\s*(\d+)\s*\[\/qq\]/ig,'$1').replace(/\[qq\s*=\s*(\d+)\s*\]\s*([\s\S]+?)\s*\[\/qq\]/ig,'$2').replace(/\[quote\]([\s\S]*?)\[\/quote\]/ig,"
$1
");while(/\[table\](((?!\[table)[\s\S])+?)\[\/table\]/i.test(a))a=a.replace(/\[table\](((?!\[table)[\s\S])+?)\[\/table\]/ig,function(b,a){return''+a.replace(/\[(\/?(?:tr|td|th))\]/ig,"<$1>")+"
"});c=-1;a=a.replace(new RegExp(b+"\\d+_","g"),function(){return f[++c]});return a}function html2ubb(h){var e=0,g=[],a=""+h,d="";do d="__CODE__"+Math.random()+"_";while(a.indexOf(d)>=0);a=a.replace(/[\r\n]/g,"").replace(/]*>/ig,"\n");a=a.replace(/\[code[=\]].*?\[\/code\]/ig,function(a){g.push(a);return d+e+++"_"}).replace(/]*)>/ig,function(h,f){var a,d,c="",e="",g="",b=f.toLowerCase();a=/width\s*=\s*\"?([^ \"]+)/i.exec(b);if(a)c="="+a[1];if(c!=""){a=/height\s*=\s*\"?([^ \"]+)/i.exec(b);if(a)e=","+a[1]}if(b.indexOf("vcastr_file")){a=/vcastr_file=([^\"&]+)/.exec(f);d=a[1];if(""!=c){a=/IsAutoPlay=(0|1)/.exec(f);if(a)g=","+a[1]}return"[flv"+c+e+g+"]"+d+"[/flv]"}if(b.indexOf("shockwave-flash")){a=/src\s*=\s*\"?([^ \"]+)/i.exec(b);d=a[1];return"[flash"+c+e+"]"+d+"[/flash]"}if(b.indexOf("realaudio-plugin")){a=/src\s*=\s*\"?([^ \"]+)/i.exec(b);d=a[1];if(""!=c){a=/autostart\s*=\s*\"?(0|1)/.exec(b);if(a)g=","+a[1]}return"[rm"+c+e+"]"+d+"[/rm]"}return""}).replace(//ig,function(f,c){var a,d,e="",g="",h="",b=c.toLowerCase();a=/width\s*=\s*\"?([^ \"]+)/i.exec(b);if(a)e="="+a[1];if(e!=""){a=/height\s*=\s*\"?([^ \"]+)/i.exec(b);if(a)g=","+a[1]}a=/ ]+)"?/i.exec(c);d=a[1];return b.indexOf("mp3player")?"[mp3]"+d+"[/mp3]":f}).replace(/]+)>/ig,function(g,b){var a,e,c="",f="",h="",d=b.toLowerCase();a=/width\s*=\s*\"?([^ \"]+)/i.exec(d);if(a)c="="+a[1];if(c!=""){a=/height\s*=\s*\"?([^ \"]+)/i.exec(d);if(a)f=","+a[1]}a=/emot\s*=\s*"?(\d+)"?/i.exec(b);if(a)return"[:"+a[1]+"]";a=/src\s*=\s*"?([^\"> ]+)"?/i.exec(b);e=a[1];return"[img"+c+f+"]"+e+"[/img]"}).replace(/]*>/ig,"\n[list]").replace(/\s*<\/ul[^>]*>/ig,"\n[/list]").replace(/]*>/ig,"\n[numlist]").replace(/\s*<\/ol[^>]*>/ig,"\n[/numlist]").replace(/\s*]*>/ig,"\n[*]").replace(/<\/li[^>]*>/ig,"").replace(/<(\/?(?:b|u|i|s|sup|sub|table|tr|td|th|h[1-6]))(?![a-z])[^>]*>/ig,"[$1]").replace(/<(\/)?(strong|em|strike|del)(?![a-z])[^>]*>/ig,function(d,a,b){var c=({strong:"b",em:"i",strike:"s",del:"s"})[b.toLowerCase()];if(a!=="/")a="";return"["+a+c+"]"}).replace(/]*?)?>([\s\S]+?)<\/blockquote>/ig,"[quote]$1[/quote]");var i,b,f=function(e,c,b){var a=(e*65536+c*256+b*1).toString(16),d=a.length;while(d++<6)a="0"+a;return"#"+a},c=function(b){var c="",a="";b=b.toLowerCase();if(/align\s*[=:]\s*\"?(left|center|right)/.exec(b)){c+="["+RegExp.$1+"]";a="[/"+RegExp.$1+"]"+a}if(/[^-]size\s*=\s*\"?(\d+\s*(?:px|pc|pt|em|ex|cm|mm)?)/.exec(b)){c+="[size="+RegExp.$1+"]";a="[/size]"+a}if(/[^-]color\s*[:=]\s*\"?rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/.exec(b)){c+="[color="+f(RegExp.$1,RegExp.$2,RegExp.$3)+"]";a="[/color]"+a}else if(/[^-]color\s*[:=]\s*\"?([a-z0-9#]+)/.exec(b)){c+="[color="+RegExp.$1+"]";a="[/color]"+a}if(/background(?:\-color)?\s*:\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/.exec(b)){c+="[bg="+f(RegExp.$1,RegExp.$2,RegExp.$3)+"]";a="[/bg]"+a}else if(/background(?:\-color)?\s*:\s*([a-z0-9#]+)/.exec(b)){c+="[bg="+RegExp.$1+"]";a="[/bg]"+a}return{pre:c,end:a}};while(/]*)>(((?!/i.test(a))a=a.replace(/]*)>(((?!/ig,function(e,a,d){b=c(a);return"\n"+b.pre+d+b.end+"\n"});while(/]*)>(((?!/i.test(a))a=a.replace(/]*)>(((?!/ig,function(e,a,d){b=c(a);return"\n"+b.pre+d+b.end+"\n"});while(/]*)>(((?!/i.test(a))a=a.replace(/]*)>(((?!/ig,function(e,a,d){b=c(a);return b.pre+d+b.end});while(/]*)>(((?!/i.test(a))a=a.replace(/]*)>(((?!/ig,function(e,a,d){b=c(a);return b.pre+d+b.end});e=-1;a=a.replace(/]*>([\s\S]*?)<\/a>/ig,function(e,a,c){var b="url";if("mailto:"==a.substr(0,7).toLowerCase()){b="email";a=a.substr(7,a.length)}else if("tencent:"==a.substr(0,8)){b="qq";var d=/uin=(\d+)/i.exec(a);a=d[1]}return c==a?"["+b+"]"+c+"[/"+b+"]":"["+b+"="+a+"]"+c+"[/"+b+"]"}).replace(/<\/?[a-z][^>]*>/ig,"").replace(new RegExp(d+"\\d+_","g"),function(){return g[++e]}).replace(/( |>|<|")/g,function(a){return({" ":" ",">":">","<":"<",""":'"'})[a]}).replace(/\n\s*\n/g,"\n\n");return a}TQE.formatHTML=function(m){var d=m.replace(/<(strong|b|u|i|em|span|font)[^>]*><\/\1>/ig,""),a="",l=new RegExp("\\s*(<(\\/?)([a-z]\\w*)[^>]*>)[\\r\\n]*","im"),c=[],h={table:1,tbody:1,thead:1,tfoot:1,tr:1,td:1,p:1,caption:1,div:1,object:1,param:1,embed:1,dl:1,dd:1,dt:1,ul:1,ol:1,li:1,hr:1,script:1},f={table:1,tbody:1,thead:1,tfoot:1,tr:1,object:1,dl:1,ul:1,ol:1,div:1,script:1},i={a:1,u:1,i:1,b:1,strong:1,em:1,font:1,span:1,img:1,input:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},k,g,e,j,b;while(null!=(result=l.exec(d))){k=d.substr(0,result.index);g=result[0];e=result[1];j="/"===result[2];b=result[3].toLowerCase();d=d.substr(result.index+g.length);a+=k;if(j){f[b]&&c.pop();if(i[b])a+=g;else if(f[b])a+="\n"+c.join("")+e;else a+=e;if(h[b])a+="\n"}else{if(h[b])a+="\n";if(i[b])a+=g;else if(f[b])a+=c.join("")+e+"\n";else a+=c.join("")+e;if("hr"===b||"br"===b)a+="\n";f[b]&&c.push(" ")}}a+=d;a=a.replace(/\n+/g,"\n").replace(/^[ \n\r\t]+/g,"").replace(/[ \n\r\t]+$/g,"").replace(/]*)>\s+
\s+<\/td>/ig,"
");if("

 

"===a||"
"===a)a="";return a}