(function(e){if(e.xheditor)return false;e.fn.xheditor=function(C){var F=[];this.each(function(){if(e.nodeName(this,"TEXTAREA"))if(C===false){if(this.xheditor){this.xheditor.remove();this.xheditor=null}}else if(!this.xheditor){var G=/({.*})/.exec(e(this).attr("class"));if(G){try{G=eval("("+G[1]+")")}catch(Q){}C=e.extend({},G,C)}G=new e.xheditor(this,C);if(G.init()){this.xheditor=G;F.push(G)}}});if(F.length==0)F=false;if(F.length==1)F=F[0];return F};var Y=0,wa=e.browser.version,D=e.browser.msie,oa=
e.browser.mozilla,Z=e.browser.safari,Xa=e.browser.opera,T=false,pa=true,L,ea,fa,ga,xa,U;e("script[src*=xheditor]").each(function(){var C=this.src;if(C.match(/xheditor[^\/]*\.js/i)){U=C.replace(/[\?#].*$/,"").replace(/(^|[\/\\])[^\/]*$/,"$1");return false}});var Ya={27:"esc",9:"tab",32:"space",13:"enter",8:"backspace",145:"scroll",20:"capslock",144:"numlock",19:"pause",45:"insert",36:"home",46:"del",35:"end",33:"pageup",34:"pagedown",37:"left",38:"up",39:"right",40:"down",112:"f1",113:"f2",114:"f3",
115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12"},Za=["#FFFFFF","#CCCCCC","#C0C0C0","#999999","#666666","#333333","#000000","#FFCCCC","#FF6666","#FF0000","#CC0000","#990000","#660000","#330000","#FFCC99","#FF9966","#FF9900","#FF6600","#CC6600","#993300","#663300","#FFFF99","#FFFF66","#FFCC66","#FFCC33","#CC9933","#996633","#663333","#FFFFCC","#FFFF33","#FFFF00","#FFCC00","#999900","#666600","#333300","#99FF99","#66FF99","#33FF33","#33CC00","#009900","#006600","#003300",
"#99FFFF","#33FFFF","#66CCCC","#00CCCC","#339999","#336666","#003333","#CCFFFF","#66FFFF","#33CCFF","#3366FF","#3333FF","#000099","#000066","#CCCCFF","#9999FF","#6666CC","#6633FF","#6600CC","#333399","#330099","#FFCCFF","#FF99FF","#CC66CC","#CC33CC","#993399","#663366","#330033"],$a=[{n:"p",t:"\u666e\u901a\u6bb5\u843d"},{n:"h1",t:"\u6807\u98981"},{n:"h2",t:"\u6807\u98982"},{n:"h3",t:"\u6807\u98983"},{n:"h4",t:"\u6807\u98984"},{n:"h5",t:"\u6807\u98985"},{n:"h6",t:"\u6807\u98986"},{n:"pre",t:"\u5df2\u7f16\u6392\u683c\u5f0f"},
{n:"address",t:"\u5730\u5740"}],ab=[{n:"\u5b8b\u4f53",c:"SimSun"},{n:"\u4eff\u5b8b\u4f53",c:"FangSong_GB2312"},{n:"\u9ed1\u4f53",c:"SimHei"},{n:"\u6977\u4f53",c:"KaiTi_GB2312"},{n:"\u5fae\u8f6f\u96c5\u9ed1",c:"Microsoft YaHei"},{n:"Arial"},{n:"Arial Narrow"},{n:"Arial Black"},{n:"Comic Sans MS"},{n:"Courier New"},{n:"System"},{n:"Times New Roman"},{n:"Tahoma"},{n:"Verdana"}],N=[{n:"xx-small",wkn:"x-small",s:"8pt",t:"\u6781\u5c0f"},{n:"x-small",wkn:"small",s:"10pt",t:"\u7279\u5c0f"},{n:"small",wkn:"medium",
s:"12pt",t:"\u5c0f"},{n:"medium",wkn:"large",s:"14pt",t:"\u4e2d"},{n:"large",wkn:"x-large",s:"18pt",t:"\u5927"},{n:"x-large",wkn:"xx-large",s:"24pt",t:"\u7279\u5927"},{n:"xx-large",wkn:"-webkit-xxx-large",s:"36pt",t:"\u6781\u5927"}],bb=[{s:"\u5de6\u5bf9\u9f50",v:"justifyleft"},{s:"\u5c45\u4e2d",v:"justifycenter"},{s:"\u53f3\u5bf9\u9f50",v:"justifyright"},{s:"\u4e24\u7aef\u5bf9\u9f50",v:"justifyfull"}],cb=[{s:"\u6570\u5b57\u5217\u8868",v:"insertOrderedList"},{s:"\u7b26\u53f7\u5217\u8868",v:"insertUnorderedList"}],
db={"default":{name:"\u9ed8\u8ba4",width:24,height:24,line:7,list:{smile:"\u5fae\u7b11",tongue:"\u5410\u820c\u5934",titter:"\u5077\u7b11",laugh:"\u5927\u7b11",sad:"\u96be\u8fc7",wronged:"\u59d4\u5c48",fastcry:"\u5feb\u54ed\u4e86",cry:"\u54ed",wail:"\u5927\u54ed",mad:"\u751f\u6c14",knock:"\u6572\u6253",curse:"\u9a82\u4eba",crazy:"\u6293\u72c2",angry:"\u53d1\u706b",ohmy:"\u60ca\u8bb6",awkward:"\u5c34\u5c2c",panic:"\u60ca\u6050",shy:"\u5bb3\u7f9e",cute:"\u53ef\u601c",envy:"\u7fa1\u6155",proud:"\u5f97\u610f",
struggle:"\u594b\u6597",quiet:"\u5b89\u9759",shutup:"\u95ed\u5634",doubt:"\u7591\u95ee",despise:"\u9119\u89c6",sleep:"\u7761\u89c9",bye:"\u518d\u89c1"}}},ha={Cut:{t:"\u526a\u5207 (Ctrl+X)"},Copy:{t:"\u590d\u5236 (Ctrl+C)"},Paste:{t:"\u7c98\u8d34 (Ctrl+V)"},Page:{t:"\u7c98\u8d34"},Pastetext:{t:"\u7c98\u8d34\u6587\u672c",h:D?0:1},Blocktag:{t:"\u6bb5\u843d\u6807\u7b7e",h:1},Fontface:{t:"\u5b57\u4f53",h:1},FontSize:{t:"\u5b57\u4f53\u5927\u5c0f",h:1},Bold:{t:"\u52a0\u7c97 (Ctrl+B)",s:"Ctrl+B"},Italic:{t:"\u659c\u4f53 (Ctrl+I)",
s:"Ctrl+I"},Underline:{t:"\u4e0b\u5212\u7ebf (Ctrl+U)",s:"Ctrl+U"},Strikethrough:{t:"\u5220\u9664\u7ebf (Ctrl+S)",s:"Ctrl+S"},FontColor:{t:"\u5b57\u4f53\u989c\u8272",h:1},BackColor:{t:"\u80cc\u666f\u989c\u8272",h:1},SelectAll:{t:"\u5168\u9009 (Ctrl+A)"},Removeformat:{t:"\u5220\u9664\u6587\u5b57\u683c\u5f0f"},Align:{t:"\u5bf9\u9f50",h:1},List:{t:"\u5217\u8868",h:1},Outdent:{t:"\u51cf\u5c11\u7f29\u8fdb (Shift+Tab)",s:"Shift+Tab"},Indent:{t:"\u589e\u52a0\u7f29\u8fdb (Tab)",s:"Tab"},Link:{t:"\u8d85\u94fe\u63a5 (Ctrl+K)",
s:"Ctrl+K",h:1},Unlink:{t:"\u53d6\u6d88\u8d85\u94fe\u63a5"},Img:{t:"\u56fe\u7247",h:1},Flash:{t:"Flash\u52a8\u753b",h:1},Media:{t:"\u591a\u5a92\u4f53\u6587\u4ef6",h:1},Emot:{t:"\u8868\u60c5",s:"ctrl+e",h:1},Table:{t:"\u8868\u683c",h:1},Source:{t:"\u6e90\u4ee3\u7801"},Print:{t:"\u6253\u5370 (Ctrl+P)",s:"Ctrl+P"},Fullscreen:{t:"\u5168\u5c4f\u7f16\u8f91 (Esc)",s:"Esc"},About:{t:"\u5173\u4e8e xhEditor"}},ya={mini:"Bold,Italic,Underline,Strikethrough,Separator,Align,List,Separator,Link,Img,About",simple:"Blocktag,Fontface,FontSize,Bold,Italic,Underline,Strikethrough,FontColor,BackColor,Separator,Align,List,Outdent,Indent,Separator,Link,Img,Emot,About",
full:"Cut,Copy,Paste,Page,Pastetext,Separator,Blocktag,Fontface,FontSize,Bold,Italic,Underline,Strikethrough,FontColor,BackColor,SelectAll,Removeformat,Separator,Align,List,Outdent,Indent,Separator,Link,Unlink,Img,Flash,Media,Emot,Table,Separator,Source,Print,Fullscreen,About",
newfull:"Cut,Copy,Paste,Page,Pastetext,Separator,Blocktag,Fontface,FontSize,Bold,Italic,Underline,Strikethrough,FontColor,BackColor,SelectAll,Removeformat,Separator,Align,List,Outdent,Indent,Separator,Link,Unlink,Img,Flash,Media,Emot,Table,Separator,Source,Print,Fullscreen,About"};ya.mfull=ya.full.replace(/Separator(,Align)/i,"BtnBr$1");e.xheditor=function(C,F){function G(){setTimeout(b.setSource,10)}function Q(){b.getSource()}function eb(){if(D&&!H){var a;a=xa[0].contentWindow.document.body;a.innerHTML=
"";a.createTextRange().execCommand("Paste");a=a.innerHTML;if(!a.match(/mso-|MsoNormal/i))return true;if(a.indexOf("&nbsp;")==0)a=a.substring(6);a=b.cleanHTML(a);a=b.formatXHTML(a);a=b.cleanWord(a);b.pasteHTML(a);return false}}function za(a){try{b._exec("styleWithCSS",a,true)}catch(c){try{b._exec("useCSS",!a,true)}catch(d){}}}function Aa(){if(Ba&&!H){za(false);try{b._exec("enableObjectResizing",true,true)}catch(a){}if(D)try{b._exec("BackgroundImageCache",true,true)}catch(c){}}}function fb(a){if(H||
a.which!=13||a.shiftKey||a.ctrlKey||a.altKey)return true;a=b.getParent("p,h1,h2,h3,h4,h5,h6,pre,address,div,li");if(a.is("li"))return true;if(b.settings.forcePtag)a.length==0&&b._exec("formatblock","<p>");else{b.pasteHTML("<br />");return false}}function Ca(){if(!oa&&!Z){ia&&O.height("100%").css("height",O.outerHeight()-J.outerHeight());D&&J.hide().show()}}function gb(a){a=a.target;if(a.tagName.match(/(img|embed)/i)){var c=b.getSel(),d=b.getRng();d.selectNode(a);c.removeAllRanges();c.addRange(d)}}
function V(a,c,d){if(!c)return false;var g="_xhe_"+c;d&&a.attr(c,d).removeAttr(g).attr(g,d);return a.attr(g)||a.attr(c)}function Ia(){pa&&b.hidePanel()}function hb(a){if(H)return true;var c=a.which,d=Ya[c];c=d?d:String.fromCharCode(c).toLowerCase();sKey="";sKey+=a.ctrlKey?"ctrl+":"";sKey+=a.altKey?"alt+":"";sKey+=a.shiftKey?"shift+":"";sKey+=c;a=ja[sKey];var g;for(g in a){g=a[g];if(e.isFunction(g)){if(g.call(b)===false)return false}else{b.exec(g);return false}}}function $(a,c){var d=typeof a;if(!c)return d!=
"undefined";if(c=="array"&&a.hasOwnProperty&&a instanceof Array)return true;return d==c}function Da(a,c){var d=location.protocol,g=location.hostname,m=location.port,j=location.pathname.replace(/\\/g,"/").replace(/[^\/]+$/i,"");m=m==""?"80":m;a=e.trim(a);if(d=="file:")c="abs";if(c!="abs")a=a.replace(RegExp(d+"\\/\\/"+g.replace(/\./g,"\\.")+"(?::"+m+")"+(m=="80"?"?":"")+"(/|$)","i"),"/");if(c=="rel")a=a.replace(RegExp("^"+j.replace(/([\/\.\+\[\]\(\)])/g,"\\$1"),"i"),"");if(c!="rel")a.match(/^((https?|file):\/\/|\/)/i)||
(a=j+a);if(c=="abs")a.match(/(https?|file):\/\//i)||(a=d+"//"+location.host+a);return a}function Ja(a){var c=Math.floor(Math.log(a)/Math.log(1024));return(a/Math.pow(1024,Math.floor(c))).toFixed(2)+["Byte","KB","MB","GB","TB","PB"][c]}function W(){return false}var b=this,P=e(C),Ka=P.closest("form"),J,O,R,qa,w,ra,aa,Ba=false,H=false,ia=false,La,ka=false,Ma="",M=null,Ea,la=false,Fa=false,ba=null,X=null,S=0;this.settings=e.extend({},{skin:"default",tools:"full",clickCancelDialog:true,linkTag:false,internalScript:false,
inlineScript:false,internalStyle:true,inlineStyle:true,showBlocktag:false,forcePtag:true,upLinkExt:"zip,rar,txt",upImgExt:"jpg,jpeg,gif,png",upFlashExt:"swf",upMediaExt:"wmv,avi,wma,mp3,mid",modalWidth:350,modalHeight:220,modalTitle:true,defLinkText:"\u70b9\u51fb\u6253\u5f00\u94fe\u63a5",layerShadow:3,emotMark:false,upBtnText:"\u4e0a\u4f20",wordDeepClean:true,hoverExecDelay:100,html5Upload:true,upMultiple:99},F);var sa=b.settings.plugins,ta=[];if(sa){ha=e.extend({},ha,sa);e.each(sa,function(a){ta.push(a)});
ta=ta.join(",")}if(b.settings.tools.match(/^\s*(m?full|simple|mini)\s*$/i)){var Na=ya[e.trim(b.settings.tools)];b.settings.tools=b.settings.tools.match(/m?full/i)&&sa?Na.replace("Table","Table,"+ta):Na}b.settings.tools.match(/(^|,)\s*About\s*(,|$)/i)||(b.settings.tools+=",About");b.settings.tools=b.settings.tools.split(",");U=Da(U,"abs");var Oa="xheCSS_"+b.settings.skin,ma="xhe"+Y+"_container",Pa="xhe"+Y+"_Tool",Qa="xhe"+Y+"_iframearea",Ra="xhe"+Y+"_iframe",ua="xhe"+Y+"_fixffcursor",ca="",Ga=U+"xheditor_skin/"+
b.settings.skin+"/",va=db,Sa=Da(U,"rel")+"xheditor_emot/",Ha="";va=e.extend({},va,b.settings.emots);if(ka=b.settings.showBlocktag)ca+=" showBlocktag";var ja=[];this.init=function(){e("#"+Oa).length==0&&e("head").append('<link id="'+Oa+'" rel="stylesheet" type="text/css" href="'+Ga+'ui.css" />');var a=b.settings.width||C.style.width||P.outerWidth();S=b.settings.height||C.style.height||P.outerHeight();if($(S,"string"))S=S.replace(/[^\d]+/g,"");if(a<=0||S<=0){alert("\u5f53\u524dtextarea\u5904\u4e8e\u9690\u85cf\u72b6\u6001\uff0c\u8bf7\u5c06\u4e4b\u663e\u793a\u540e\u518d\u521d\u59cb\u5316xhEditor\uff0c\u6216\u8005\u76f4\u63a5\u8bbe\u7f6etextarea\u7684width\u548cheight\u6837\u5f0f");
return false}if(/^[0-9\.]+$/i.test(""+a))a+="px";var c=['<span class="xheGStart"/>'],d,g,m=/Separator|BtnBr/i;e.each(b.settings.tools,function(i,f){d=ha[f];f.match(m)&&c.push('<span class="xheGEnd"/>');if(f=="Separator")c.push('<span class="xheSeparator"/>');else if(f=="BtnBr")c.push("<br />");else{g=d.c?d.c:"xheIcon xheBtn"+f;c.push('<span><a href="javascript:void(0);" title="'+d.t+'" name="'+f+'" class="xheButton xheEnabled" tabindex="-1"><span class="'+g+'" unselectable="on" /></a></span>');d.s&&
b.addShortcuts(d.s,f)}f.match(m)&&c.push('<span class="xheGStart"/>')});c.push('<span class="xheGEnd"/><br />');P.after(e('<input type="text" id="'+ua+'" style="position:absolute;display:none;" /><span id="'+ma+'" class="xhe_'+b.settings.skin+'" style="display:none"><table cellspacing="0" cellpadding="0" class="xheLayout" style="width:'+a+";height:"+S+'px;"><tbody><tr><td id="'+Pa+'" class="xheTool" unselectable="on" style="height:1px;"></td></tr><tr><td id="'+Qa+'" class="xheIframeArea"><iframe frameborder="0" id="'+
Ra+'" src="javascript:;" style="width:100%;"></iframe></td></tr></tbody></table></span>'));J=e("#"+Pa);O=e("#"+Qa);a='<html><head><base /><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><link rel="stylesheet" href="'+Ga+'iframe.css"/>';var j=b.settings.loadCSS;if(j)if($(j,"array"))for(var l in j)a+='<link rel="stylesheet" href="'+j[l]+'"/>';else a+=j.match(/\s*<style(\s+[^>]*?)?>[\s\S]+?<\/style>\s*/i)?j:'<link rel="stylesheet" href="'+j+'"/>';a+='</head><body spellcheck="false" dir="ltr" class="editMode'+
ca+'"></body></html>';b.win=R=e("#"+Ra)[0].contentWindow;qa=e(R);try{this.doc=w=R.document;ra=e(w);w.open();w.write(a);w.close();if(D)w.body.contentEditable="true";else w.designMode="On"}catch(h){}setTimeout(Aa,300);b.setSource();R.setInterval=null;J.append(c.join("")).bind("mousedown contextmenu",W).click(function(i){var f=e(i.target).closest("a");if(f.is(".xheEnabled")){M=i;b.exec(f.attr("name"))}return false});J.find(".xheButton").hover(function(i){var f=e(this),k=b.settings.hoverExecDelay,n=X;
X=null;if(k==-1||la||!f.is(".xheEnabled"))return false;if(n&&n>10){la=true;setTimeout(function(){la=false},100);return false}var q=f.attr("name");if(ha[q].h!=1){b.hidePanel();return false}if(Fa)k=0;if(k>=0)Ea=setTimeout(function(){M=i;ba={x:M.clientX,y:M.clientY};b.exec(q)},k)},function(){ba=null;Ea&&clearTimeout(Ea)}).mousemove(function(i){if(ba){var f={x:i.clientX-ba.x,y:i.clientY-ba.y};if(Math.abs(f.x)>1||Math.abs(f.y)>1){if(f.x>0&&f.y>0){f=Math.round(Math.atan(f.y/f.x)/0.017453293);X=X?(X+f)/
2:f}else X=null;ba={x:i.clientX,y:i.clientY}}}});L=e("#xhePanel");ea=e("#xheShadow");fa=e("#xheCntLine");xa=e("#xheTempIframe");if(L.length==0){L=e('<div id="xhePanel"></div>').mousedown(function(i){i.stopPropagation()});ea=e('<div id="xheShadow"></div>');fa=e('<div id="xheCntLine"></div>');setTimeout(function(){e(document.body).append(L).append(ea).append(fa);if(D)e(document.body).append(xa=e('<iframe id="xheTempIframe" class="xheHideArea" />'))},10)}e(document).mousedown(Ia);ra.mousedown(Ia);e("#"+
ma).show();O.css("height",S-J.outerHeight());P.hide();P.focus(b.focus);Ka.submit(Q).bind("reset",G);l=e(window);l.unload(Q).bind("beforeunload",Q);l.resize(Ca);qa.focus(function(){b.settings.focus&&b.settings.focus()}).blur(function(){b.settings.blur&&b.settings.blur()});Z&&qa.click(gb);ra.keydown(hb).keypress(fb).bind("mousedown click",function(i){P.trigger(i.type)});e("body",ra).bind("paste",eb);(l=b.settings.shortcuts)&&e.each(l,function(i,f){b.addShortcuts(i,f)});Y++;Ba=true;if(b.settings.fullscreen)b.toggleFullscreen();
else b.settings.sourceMode&&setTimeout(b.toggleSource,20);return true};this.remove=function(){b.hidePanel();Q();P.unbind("focus",b.focus);Ka.unbind("submit",Q).unbind("reset",G);var a=e(window);a.unbind("unload",Q).unbind("beforeunload",Q);a.unbind("resize",Ca);e("#"+ma).remove();e("#"+ua).remove();P.show();Ba=false};this.saveBookmark=function(){H||(aa=b.getRng())};this.loadBookmark=function(){if(!(H||!aa)){b.focus();if(D)aa.select();else{var a=b.getSel();a.removeAllRanges();a.addRange(aa)}aa=null}};
this.focus=function(){H?e("#sourceCode",w).focus():qa.focus();return false};this.setCursorFirst=function(a){b.focus();R.scrollTo(0,0);var c=b.getRng(),d=w.body,g=d,m;if(a&&g.firstChild&&(m=g.firstChild.tagName)&&m.match(/^p|div|h[1-6]$/i))g=d.firstChild;D?c.moveToElementText(g):c.setStart(g,0);c.collapse(true);if(D)c.select();else{a=b.getSel();a.removeAllRanges();a.addRange(c)}};this.getSel=function(){return R.getSelection?R.getSelection():w.selection};this.getRng=function(){var a=b.getSel(),c;try{c=
a.rangeCount>0?a.getRangeAt(0):a.createRange?a.createRange():w.createRange()}catch(d){}c||(c=D?w.body.createTextRange():w.createRange());return c};this.getParent=function(a){var c=b.getRng(),d;if(D)d=c.item?c.item(0):c.parentElement();else{d=c.commonAncestorContainer;if(!c.collapsed)if(c.startContainer==c.endContainer&&c.startOffset-c.endOffset<2&&c.startContainer.hasChildNodes())d=c.startContainer.childNodes[c.startOffset]}a=a?a:"*";d=e(d);d.is(a)||(d=e(d).closest(a));return d};this.getSelect=function(a){var c=
b.getSel(),d=b.getRng(),g=true;g=!d||d.item?false:!c||d.boundingWidth==0||d.collapsed;if(a=="text")return g?"":d.text||(c.toString?c.toString():"");if(d.cloneContents){a=e("<div></div>");(d=d.cloneContents())&&a.append(d);d=a.html()}else d=$(d.item)?d.item(0).outerHTML:$(d.htmlText)?d.htmlText:d.toString();if(g)d="";d=b.processHTML(d,"read");d=b.cleanHTML(d);return d=b.formatXHTML(d)};this.pasteHTML=function(a,c){if(H)return false;b.focus();a=b.processHTML(a,"write");var d=b.getSel(),g=b.getRng();
if(c!=undefined){if(g.item){var m=g.item(0);g=w.body.createTextRange();g.moveToElementText(m);g.select()}g.collapse(c)}if(g.insertNode){g.deleteContents();m=g.createContextualFragment(a);var j=m.lastChild;g.insertNode(m);g.setEndAfter(j);g.collapse(false);d.removeAllRanges();d.addRange(g)}else{if(d.type.toLowerCase()=="control"){d.clear();g=b.getRng()}g.pasteHTML(a)}};this.pasteText=function(a,c){a||(a="");a=b.domEncode(a);a=a.replace(/\r?\n/g,"<br />");b.pasteHTML(a,c)};this.appendHTML=function(a){if(H)return false;
b.focus();a=b.processHTML(a,"write");e(w.body).append(a)};this.domEncode=function(a){return a.replace(/[<>]/g,function(c){return{"<":"&lt;",">":"&gt;"}[c]})};this.setSource=function(a){aa=null;if(typeof a!="string"&&a!="")a=C.value;if(H)e("#sourceCode",w).val(a);else{if(b.settings.beforeSetSource)a=b.settings.beforeSetSource(a);a=b.cleanHTML(a);a=b.formatXHTML(a);a=b.cleanWord(a);w.body.innerHTML=b.processHTML(a,"write")}};this.processHTML=function(a,c){if(c=="write"){a=a.replace(/<img(?:\s+[^>]*?)?(\s+emot\s*=\s*(["']?)\s*(.*?)\s*\2)(?:\s+[^>]*?)?\/?>/ig,
function(j,l,h,i){i=i.split(",");if(!i[1]){i[1]=i[0];i[0]=""}if(i[0]=="default")i[0]="";return j.replace(/\s+src\s*=\s*(["']?).*?\1(\s|$|\/|>)/i,"$2").replace(l,' src="'+Sa+(i[0]?i[0]:"default")+"/"+i[1]+'.gif"'+(b.settings.emotMark?' emot="'+(i[0]?i[0]+",":"")+i[1]+'" alt="'+i[1]+'"':""))});a=a.replace(/<(\w+(?:\:\w+)?)(?:\s+[^>]*?)?(\s+(src|href)\s*=\s*(["']?)\s*(.*?)\s*\4)(?:\s+[^>]*?)?\/?>/ig,function(j,l,h,i,f,k){return j.replace(h,h+" _xhe_"+i+'="'+k+'"')});a=a.replace(/<(\/?)del(\s+[^>]*?)?>/ig,
"<$1strike$2>");if(oa){a=a.replace(/<(\/?)strong(\s+[^>]*?)?>/ig,"<$1b$2>");a=a.replace(/<(\/?)em(\s+[^>]*?)?>/ig,"<$1i$2>")}else if(Z){a=a.replace(/("|;)\s*font-size\s*:\s*([a-z-]+)(;?)/ig,function(j,l,h,i){for(var f,k=0;k<N.length;k++){j=N[k];if(h==j.n){f=j.wkn;break}}return l+"font-size:"+f+i});a=a.replace(/<strong(\s+[^>]*?)?>/ig,'<span class="Apple-style-span" style="font-weight: bold;"$1>');a=a.replace(/<em(\s+[^>]*?)?>/ig,'<span class="Apple-style-span" style="font-style: italic;"$1>');a=a.replace(/<u(\s+[^>]*?)?>/ig,
'<span class="Apple-style-span" style="text-decoration: underline;"$1>');a=a.replace(/<strike(\s+[^>]*?)?>/ig,'<span class="Apple-style-span" style="text-decoration: line-through;"$1>');a=a.replace(/<\/(strong|em|u|strike)>/ig,"</span>");a=a.replace(/<span((?:\s+[^>]*?)?\s+style="([^"]*;)*\s*(font-family|font-size|color|background-color)\s*:\s*[^;"]+\s*;?"[^>]*)>/ig,'<span class="Apple-style-span"$1>')}else if(D){a=a.replace(/&apos;/ig,"&#39;");a=a.replace(/\s+(disabled|checked|readonly|selected)\s*=\s*[\"\']?(false|0)[\"\']?/ig,
"")}a=a.replace(/<a(\s+[^>]*?)?\/>/,"<a$1></a>");if(!Z){var d=function(j,l,h,i){l="";var f,k;if(f=h.match(/font-family\s*:\s*([^;"]+)/i))l+=' face="'+f[1]+'"';if(f=h.match(/font-size\s*:\s*([^;"]+)/i)){f=f[1].toLowerCase();for(var n=0;n<N.length;n++)if(f==N[n].n||f==N[n].s){k=n+1;break}if(k){l+=' size="'+k+'"';h=h.replace(/(^|;)(\s*font-size\s*:\s*[^;"]+;?)+/ig,"$1")}}if(k=h.match(/(?:^|[\s;])color\s*:\s*([^;"]+)/i)){if(f=k[1].match(/\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i)){k[1]="#";for(n=
1;n<=3;n++)k[1]+=(f[n]-0).toString(16)}k[1]=k[1].replace(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,"#$1$1$2$2$3$3");l+=' color="'+k[1]+'"'}h=h.replace(/(^|;)(\s*(font-family|color)\s*:\s*[^;"]+;?)+/ig,"$1");if(l!=""){if(h)l+=' style="'+h+'"';return"<font"+l+">"+i+"</font>"}else return j};a=a.replace(/<(span)(?:\s+[^>]*?)?\s+style\s*=\s*"((?:[^"]*?;)*\s*(?:font-family|font-size|color)\s*:[^"]*)"(?: [^>]+)?>(((?!<\1(\s+[^>]*?)?>)[\s\S])*?)<\/\1>/ig,d);a=a.replace(/<(span)(?:\s+[^>]*?)?\s+style\s*=\s*"((?:[^"]*?;)*\s*(?:font-family|font-size|color)\s*:[^"]*)"(?: [^>]+)?>(((?!<\1(\s+[^>]*?)?>)[\s\S]|<\1(\s+[^>]*?)?>((?!<\1(\s+[^>]*?)?>)[\s\S])*?<\/\1>)*?)<\/\1>/ig,
d);a=a.replace(/<(span)(?:\s+[^>]*?)?\s+style\s*=\s*"((?:[^"]*?;)*\s*(?:font-family|font-size|color)\s*:[^"]*)"(?: [^>]+)?>(((?!<\1(\s+[^>]*?)?>)[\s\S]|<\1(\s+[^>]*?)?>((?!<\1(\s+[^>]*?)?>)[\s\S]|<\1(\s+[^>]*?)?>((?!<\1(\s+[^>]*?)?>)[\s\S])*?<\/\1>)*?<\/\1>)*?)<\/\1>/ig,d)}}else{var g=b.settings.localUrl;a=a.replace(/<(?:\w+(?:\:\w+)?)(?:\s+[^>]*?)?\s+_xhe_(src|href)\s*=\s*(["']?)\s*(.*?)\s*\2(?:\s+[^>]*?)?\/?>/ig,function(j,l,h,i){if(g)i=Da(i,g);return j.replace(RegExp("\\s+"+l+"\\s*=\\s*([\"']?).*?\\1(\\s|/?>)",
"ig")," "+l+'="'+i.replace(/\$/g,"$$$$")+'"$2')});if(Z){a=a.replace(/("|;)\s*font-size\s*:\s*([a-z-]+)(;?)/ig,function(j,l,h,i){for(var f,k=0;k<N.length;k++){j=N[k];if(h==j.wkn){f=j.n;break}}return l+"font-size:"+f+i});var m=[{r:/font-weight:\sbold/ig,t:"strong"},{r:/font-style:\sitalic/ig,t:"em"},{r:/text-decoration:\sunderline/ig,t:"u"},{r:/text-decoration:\sline-through/ig,t:"strike"}];d=function(j,l,h,i,f){l=h+i;h="";for(i=0;i<m.length;i++)if(l.match(m[i].r)){h=m[i].t;break}return h?"<"+h+">"+
f+"</"+h+">":j};a=a.replace(/<(span)(\s+[^>]*?)?\s+class\s*=\s*"Apple-style-span"(\s+[^>]*?)?>(((?!<\1(\s+[^>]*?)?>)[\s\S])*?)<\/\1>/ig,d);a=a.replace(/<(span)(\s+[^>]*?)?\s+class\s*=\s*"Apple-style-span"(\s+[^>]*?)?>(((?!<\1(\s+[^>]*?)?>)[\s\S]|<\1(\s+[^>]*?)?>((?!<\1(\s+[^>]*?)?>)[\s\S])*?<\/\1>)*?)<\/\1>/ig,d);a=a.replace(/<(span)(\s+[^>]*?)?\s+class\s*=\s*"Apple-style-span"(\s+[^>]*?)?>(((?!<\1(\s+[^>]*?)?>)[\s\S]|<\1(\s+[^>]*?)?>((?!<\1(\s+[^>]*?)?>)[\s\S]|<\1(\s+[^>]*?)?>((?!<\1(\s+[^>]*?)?>)[\s\S])*?<\/\1>)*?<\/\1>)*?)<\/\1>/ig,
d)}a=a.replace(/(<\w+(?:\s+[^>]*?)?)\s+(?:_xhe_|_moz_|_webkit_)[^=]+?\s*=\s*(["']?).*?\2(\s|\/?>)/ig,"$1$3");a=a.replace(/(<\w+[^>]*?)\s+class\s*=\s*(["']?)\s*(?:apple|webkit)\-.+?\s*\2(\s|\/?>)/ig,"$1$3");a=a.replace(/<img(\s+[^>]+?)\/?>/ig,function(j,l){l.match(/\s+alt\s*(["']?).*?\1(\s|$)/i)||(l+=' alt=""');return"<img"+l+" />"})}return a};this.getSource=function(a){var c,d=b.settings.beforeGetSource;if(H){c=e("#sourceCode",w).val();d||(c=c.replace(/(\t*\r?\n\t*)+/g,""))}else{c=b.processHTML(w.body.innerHTML,
"read");c=c.replace(/^\s*(?:<(p|div)(?:\s+[^>]*?)?>)?\s*(<br(?:\s+[^>]*?)?>)*\s*(?:<\/\1>)?\s*$/i,"");c=b.cleanHTML(c);c=b.formatXHTML(c,a);c=b.cleanWord(c);if(d)c=d(c)}return C.value=c};this.cleanWord=function(a){if(a.match(/mso(-|normal)/i)){var c=b.settings.wordDeepClean;a=a.replace(/(<link(?:\s+[^>]*?)?)\s+href\s*=\s*(["']?)\s*file:\/\/.+?\s*\2((?:\s+[^>]*?)?\s*\/?>)/ig,"");a=a.replace(/<!--[\s\S]*?--\>|<!(--)?\[[\s\S]+?\](--)?>|<style(\s+[^>]*?)?>[\s\S]*?<\/style>/ig,"");a=a.replace(/<\/?\w+:[^>]*>/ig,
"");if(c)a=a.replace(/<\/?(span|a|img)(\s+[^>]*?)?>/ig,"");a=a.replace(/(<\w+(?:\s+[^>]*?)?)\s+class\s*=\s*(["']?)\s*mso.+?\s*\2((?:\s+[^>]*?)?\s*\/?>)/ig,"$1$3");a=a.replace(/(<\w+(?:\s+[^>]*?)?)\s+lang\s*=\s*(["']?)\s*.+?\s*\2((?:\s+[^>]*?)?\s*\/?>)/ig,"$1$3");a=a.replace(/(<\w+(?:\s+[^>]*?)?)\s+align\s*=\s*(["']?)\s*left\s*\2((?:\s+[^>]*?)?\s*\/?>)/ig,"$1$3");a=a.replace(/<\w+(?:\s+[^>]*?)?(\s+style\s*=\s*(["']?)\s*([\s\S]*?)\s*\2)(?:\s+[^>]*?)?\s*\/?>/ig,function(d,g,m,j){j=e.trim(j.replace(/\s*(mso-[^:]+:.+?|margin\s*:\s*0cm 0cm 0pt\s*|(text-align|font-variant|line-height)\s*:\s*.+?)(;|$)\s*/ig,
""));return d.replace(g,c?"":j?' style="'+j+'"':"")})}return a};this.cleanHTML=function(a){a=a.replace(/<!?\/?(DOCTYPE|html|body|meta)(\s+[^>]*?)?>/ig,"");var c;a=a.replace(/<head(?:\s+[^>]*?)?>([\s\S]*?)<\/head>/i,function(d,g){c=g.match(/<(script|style)(\s+[^>]*?)?>[\s\S]*?<\/\1>/ig);return""});if(c)a=c.join("")+a;a=a.replace(/<\??xml(:\w+)?(\s+[^>]*?)?>([\s\S]*?<\/xml>)?/ig,"");b.settings.linkTag||(a=a.replace(/<link(\s+[^>]*?)?>/ig,""));b.settings.internalScript||(a=a.replace(/<script(\s+[^>]*?)?>[\s\S]*?<\/script>/ig,
""));b.settings.inlineScript||(a=a.replace(/(<\w+)(\s+[^>]*?)?\s+on(?:click|dblclick|mousedown|mouseup|mousemove|mouseover|mouseout|mouseenter|mouseleave|keydown|keypress|keyup|change|select|submit|reset|blur|focus|load|unload)\s*=\s*(["']?).*?\3((?:\s+[^>]*?)?\/?>)/ig,"$1$2$4"));b.settings.internalStyle||(a=a.replace(/<style(\s+[^>]*?)?>[\s\S]*?<\/style>/ig,""));b.settings.inlineStyle||(a=a.replace(/(<\w+)(\s+[^>]*?)?\s+(style|class)\s*=\s*(["']?).*?\4((?:\s+[^>]*?)?\/?>)/ig,"$1$2$5"));return a=
a.replace(/<\/(strong|b|u|strike|em|i)>((?:\s|<br\/?>|&nbsp;)*?)<\1(\s+[^>]*?)?>/ig,"$2")};this.formatXHTML=function(a,c){function d(p){var x={};p=p.split(",");for(var E=0;E<p.length;E++)x[p[E]]=true;return x}function g(p){if(p){p=p.toLowerCase();var x=o[p];if(x)p=x}else p="";return p}function m(p,x,E){p=g(p);if(k[p])for(;y.last()&&n[y.last()];)j(y.last());q[p]&&y.last()==p&&j(p);(E=f[p]||!!E)||y.push(p);var I=[];I.push("<"+p);x.replace(A,function(Ta,na,Ua,Va,Wa){na=na.toLowerCase();I.push(" "+na+
'="'+(Ua?Ua:Va?Va:Wa?Wa:r[na]?na:"")+'"')});I.push((E?" /":"")+">");l(I.join(""),p,true)}function j(p){if(p){p=g(p);for(x=y.length-1;x>=0;x--)if(y[x]==p)break}else var x=0;if(x>=0){for(p=y.length-1;p>=x;p--)l("</"+y[p]+">",y[p]);y.length=x}}function l(p,x,E){if(c==true){p=p.replace(/(\t*\r?\n\t*)+/g,"");if(!p.match(/^\s*$/)){var I=k[x],Ta=I?x:"";if(I){E&&K++;da==""&&K--}else da&&K++;if(Ta!=da||I)h();B.push(p);x=="br"&&h();if(I&&(f[x]||!E))K--;da=I?x:"";ib=E}}else B.push(p)}function h(){B.push("\r\n");
if(K>0)for(var p=K;p--;)B.push("\t")}function i(p,x,E,I){p="";if(x=E.match(/ face\s*=\s*"\s*([^"]+)\s*"/i))p+="font-family:"+x[1]+";";if(x=E.match(/ size\s*=\s*"\s*(\d+)\s*"/i))p+="font-size:"+N[(x[1]>7?7:x[1]<1?1:x[1])-1].n+";";if(x=E.match(/ color\s*=\s*"\s*([^"]+)\s*"/i))p+="color:"+x[1]+";";if(E=E.match(/ style\s*=\s*"\s*([^"]+)\s*"/i))p+=E[1];if(p)I='<span style="'+p+'">'+I+"</span>";return I}var f=d("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed"),k=d("address,applet,blockquote,button,center,dd,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul"),
n=d("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"),q=d("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),r=d("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),s=d("script,style"),o={b:"strong",i:"em",s:"del",strike:"del"},t=/^<\??(\w+(?:\:\w+)?)((?:\s+[\w-\:]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,
v=/^<\/(\w+(?:\:\w+)?)[^>]*>/,A=/([\w-(?:\:\w+)?]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,u=0,y=[],z=a,B=[],K=-1,da="body",ib;for(y.last=function(){return this[this.length-1]};z.length>0;)if(!y.last()||!s[y.last()]){u=0;if(z.substring(0,4)=="<!--"){u=z.indexOf("--\>");if(u!=-1){u+=3;l(z.substring(0,u))}}else if(z.substring(0,2)=="</"){if(match=z.match(v)){j(match[1]);u=match[0].length}}else if(z.charAt(0)=="<")if(match=z.match(t)){m(match[1],match[2],match[3]);u=match[0].length}if(u==
0){u=z.indexOf("<");if(u==0)u=1;else if(u<0)u=z.length;l(b.domEncode(z.substring(0,u)))}z=z.substring(u)}else{z=z.replace(/^([\s\S]*?)<\/(style|script)>/i,function(p,x){l(x);return""});j(y.last())}j();a=B.join("");B=null;a=a.replace(/<(font)(\s+[^>]*?)?>(((?!<\1(\s+[^>]*?)?>)[\s\S])*?)<\/\1>/ig,i);a=a.replace(/<(font)(\s+[^>]*?)?>(((?!<\1(\s+[^>]*?)?>)[\s\S]|<\1(\s+[^>]*?)?>((?!<\1(\s+[^>]*?)?>)[\s\S])*?<\/\1>)*?)<\/\1>/ig,i);a=a.replace(/<(font)(\s+[^>]*?)?>(((?!<\1(\s+[^>]*?)?>)[\s\S]|<\1(\s+[^>]*?)?>((?!<\1(\s+[^>]*?)?>)[\s\S]|<\1(\s+[^>]*?)?>((?!<\1(\s+[^>]*?)?>)[\s\S])*?<\/\1>)*?<\/\1>)*?)<\/\1>/ig,
i);a=a.replace(/^(\s*\r?\n)+|(\s*\r?\n)+$/g,"");return a=a.replace(/(\t*\r?\n)+/g,"\r\n")};this.toggleShowBlocktag=function(a){if(ka!==a){ka=!ka;a=e(w.body);if(ka){ca+=" showBlocktag";a.addClass("showBlocktag")}else{ca=ca.replace(" showBlocktag","");a.removeClass("showBlocktag")}}};this.toggleSource=function(a){if(H!==a){J.find("[name=Source]").toggleClass("xheEnabled").toggleClass("xheActive");var c=w.body,d=e(c),g,m,j="_xhe_cursor"+(new Date).getTime();a=0;if(H){g=b.getSource();d.find("#sourceCode").remove();
d.removeAttr("scroll").attr("class","editMode"+ca);if(D)c.contentEditable="true";else w.designMode="On";if(oa){b._exec("inserthtml","-");e("#"+ua).show().focus().hide()}}else{b.pasteHTML(j,true);g=b.getSource(true);a=g.indexOf(j);if(!Xa)a=g.substring(0,a).replace(/\r/g,"").length;g=g.replace(j,"");if(D)c.contentEditable="false";else w.designMode="Off";d.attr("scroll","no").attr("class","sourceMode").html('<textarea id="sourceCode" wrap="soft" spellcheck="false" height="100%" />');m=e("#sourceCode",
d).blur(b.getSource)[0]}H=!H;b.setSource(g);if(H){b.focus();if(m.setSelectionRange)m.setSelectionRange(a,a);else{m=m.createTextRange();m.move("character",a);m.select()}}else b.setCursorFirst(true);J.find("[name=Source]").toggleClass("xheEnabled");J.find(".xheButton").not("[name=Source],[name=Fullscreen],[name=About]").toggleClass("xheEnabled");setTimeout(Aa,300)}};this.toggleFullscreen=function(a){if(ia!==a){a=e("#"+ma).find(".xheLayout");var c=e("#"+ma);if(ia){a.attr("style",Ma);O.height(S-J.outerHeight());
setTimeout(function(){e(window).scrollTop(La)},10)}else{La=e(window).scrollTop();Ma=a.attr("style");a.removeAttr("style");O.height("100%");setTimeout(Ca,100)}if(oa){e("#"+ua).show().focus().hide();setTimeout(b.focus,1)}ia=!ia;c.toggleClass("xhe_Fullscreen");e("html").toggleClass("xhe_Fullfix");J.find("[name=Fullscreen]").toggleClass("xheActive");setTimeout(Aa,300)}};this.showMenu=function(a,c){var d=e('<div class="xheMenu"></div>'),g=[];e.each(a,function(m,j){g.push('<a href="javascript:void(0);" title="'+
(j.t?j.t:j.s)+'" v="'+j.v+'">'+j.s+"</a>")});d.append(g.join(""));d.click(function(m){c(e(m.target).closest("a").attr("v"));b.hidePanel();return false}).mousedown(W);b.showPanel(d)};this.showColor=function(a){var c=e('<div class="xheColor"></div>'),d=[],g=0;e.each(Za,function(m,j){if(g%7==0)d.push((g>0?"</div>":"")+"<div>");d.push('<a href="javascript:void(0);" xhev="'+j+'" title="'+j+'" style="background:'+j+'"></a>');g++});d.push("</div>");c.append(d.join(""));c.click(function(m){m=m.target;if(e.nodeName(m,
"A")){a(e(m).attr("xhev"));b.hidePanel();return false}}).mousedown(W);b.showPanel(c)};this.showPastetext=function(){var a=e('<div>\u4f7f\u7528\u952e\u76d8\u5feb\u6377\u952e(Ctrl+V)\u628a\u5185\u5bb9\u7c98\u8d34\u5230\u65b9\u6846\u91cc\uff0c\u6309 \u786e\u5b9a</div><div><textarea id="xhePastetextValue" wrap="soft" spellcheck="false" style="width:300px;height:100px;" /></div><div style="text-align:right;"><input type="button" id="xheSave" value="\u786e\u5b9a" /></div>'),c=e("#xhePastetextValue",a);
e("#xheSave",a).click(function(){b.loadBookmark();var d=c.val();d&&b.pasteText(d);b.hidePanel();return false});b.showDialog(a)};this.showLink=function(){var a=e('<div>\u94fe\u63a5\u5730\u5740: <input type="text" id="xheLinkHref" value="http://" class="xheText" /></div><div>\u6253\u5f00\u65b9\u5f0f: <select id="xheLinkTarget"><option selected="selected" value="">\u9ed8\u8ba4</option><option value="_blank">\u65b0\u7a97\u53e3</option><option value="_self">\u5f53\u524d\u7a97\u53e3</option><option value="_parent">\u7236\u7a97\u53e3</option></select></div><div style="display:none">\u94fe\u63a5\u6587\u5b57: <input type="text" id="xheLinkText" value="" class="xheText" /></div><div style="text-align:right;"><input type="button" id="xheSave" value="\u786e\u5b9a" /></div>'),
c=b.getParent("a"),d=e("#xheLinkText",a),g=e("#xheLinkHref",a),m=e("#xheLinkTarget",a),j=e("#xheSave",a),l=b.getSelect();if(c.length==1){g.val(V(c,"href"));m.attr("value",c.attr("target"))}else l==""&&d.val(b.settings.defLinkText).closest("div").show();b.settings.upLinkUrl&&b.uploadInit(g,b.settings.upLinkUrl,b.settings.upLinkExt);j.click(function(){var h=g.val();b.loadBookmark();if(h==""||c.length==0)b._exec("unlink");if(h!=""&&h!="http://"){var i=h.split(" "),f=m.val(),k=d.val();if(i.length>1){b._exec("unlink");
l=b.getSelect();var n='<a href="xhe_tmpurl"',q=[];if(f!="")n+=' target="'+f+'"';n+=">xhe_tmptext</a>";k=l!=""?l:k?k:h;for(var r in i){h=i[r];if(h!=""){h=h.split("||");f=n;f=f.replace("xhe_tmpurl",h[0]);f=f.replace("xhe_tmptext",h[1]?h[1]:k);q.push(f)}}b.pasteHTML(q.join("&nbsp;"))}else{h=i[0].split("||");k||(k=h[0]);k=h[1]?h[1]:l!=""?"":k?k:h[0];if(c.length==0){k?b.pasteHTML('<a href="#xhe_tmpurl">'+k+"</a>"):b._exec("createlink","#xhe_tmpurl");c=e('a[href$="#xhe_tmpurl"]',w)}V(c,"href",h[0]);f!=
""?c.attr("target",f):c.removeAttr("target");k&&!Z&&c.text(k)}}b.hidePanel();return false});b.showDialog(a)};this.showImg=function(){var a=e('<div>\u56fe\u7247\u6587\u4ef6: <input type="text" id="xheImgSrc" value="http://" class="xheText" /></div><div>\u66ff\u6362\u6587\u672c: <input type="text" id="xheImgAlt" /></div><div>\u5bf9\u9f50\u65b9\u5f0f: <select id="xheImgAlign"><option selected="selected" value="">\u9ed8\u8ba4</option><option value="left">\u5de6\u5bf9\u9f50</option><option value="right">\u53f3\u5bf9\u9f50</option><option value="top">\u9876\u7aef</option><option value="middle">\u5c45\u4e2d</option><option value="baseline">\u57fa\u7ebf</option><option value="bottom">\u5e95\u8fb9</option></select></div><div>\u5bbd\u5ea6\u9ad8\u5ea6: <input type="text" id="xheImgWidth" style="width:40px;" /> x <input type="text" id="xheImgHeight" style="width:40px;" /></div><div>\u8fb9\u6846\u5927\u5c0f: <input type="text" id="xheImgBorder" style="width:40px;" /></div><div>\u6c34\u5e73\u95f4\u8ddd: <input type="text" id="xheImgHspace" style="width:40px;" /> \u5782\u76f4\u95f4\u8ddd: <input type="text" id="xheImgVspace" style="width:40px;" /></div><div style="text-align:right;"><input type="button" id="xheSave" value="\u786e\u5b9a" /></div>'),
c=b.getParent("img"),d=e("#xheImgSrc",a),g=e("#xheImgAlt",a),m=e("#xheImgAlign",a),j=e("#xheImgWidth",a),l=e("#xheImgHeight",a),h=e("#xheImgBorder",a),i=e("#xheImgVspace",a),f=e("#xheImgHspace",a),k=e("#xheSave",a);if(c.length==1){d.val(V(c,"src"));g.val(c.attr("alt"));m.val(c.attr("align"));j.val(c.attr("width"));l.val(c.attr("height"));h.val(c.attr("border"));var n=c.attr("vspace"),q=c.attr("hspace");i.val(n<=0?"":n);f.val(q<=0?"":q)}b.settings.upImgUrl&&b.uploadInit(d,b.settings.upImgUrl,b.settings.upImgExt);
k.click(function(){b.loadBookmark();var r=d.val();if(r!=""&&r!="http://"){var s=r.split(" "),o=g.val(),t=m.val(),v=j.val(),A=l.val(),u=h.val(),y=i.val(),z=f.val();if(s.length>1){var B='<img src="xhe_tmpurl"',K=[];if(o!="")B+=' alt="'+o+'"';if(t!="")B+=' align="'+t+'"';if(v!="")B+=' width="'+v+'"';if(A!="")B+=' height="'+A+'"';if(u!="")B+=' border="'+u+'"';if(y!="")B+=' vspace="'+y+'"';if(z!="")B+=' hspace="'+z+'"';B+=" />";for(var da in s){r=s[da];if(r!=""){r=r.split("||");o=B;o=o.replace("xhe_tmpurl",
r[0]);if(r[1])o='<a href="'+r[1]+'" target="_blank">'+o+"</a>";K.push(o)}}b.pasteHTML(K.join("&nbsp;"))}else if(s.length==1){r=s[0];if(r!=""){r=r.split("||");if(c.length==0){b.pasteHTML('<img src="'+r[0]+'#xhe_tmpurl" />');c=e('img[src$="#xhe_tmpurl"]',w)}V(c,"src",r[0]);o!=""&&c.attr("alt",o);t!=""?c.attr("align",t):c.removeAttr("align");v!=""?c.attr("width",v):c.removeAttr("width");A!=""?c.attr("height",A):c.removeAttr("height");u!=""?c.attr("border",u):c.removeAttr("border");y!=""?c.attr("vspace",
y):c.removeAttr("vspace");z!=""?c.attr("hspace",z):c.removeAttr("hspace");if(r[1]){s=c.parent("a");if(s.length==0){c.wrap("<a></a>");s=c.parent("a")}V(s,"href",r[1]);s.attr("target","_blank")}}}}else c.length==1&&c.remove();b.hidePanel();return false});b.showDialog(a)};this.showEmbed=function(a,c,d,g,m,j,l){c=e(c);var h=b.getParent('embed[type="'+d+'"],embed[classid="'+g+'"]'),i=e("#xhe"+a+"Src",c),f=e("#xhe"+a+"Width",c),k=e("#xhe"+a+"Height",c);a=e("#xheSave",c);j&&b.uploadInit(i,j,l);b.showDialog(c);
if(h.length==1){i.val(V(h,"src"));f.val(h.attr("width"));k.val(h.attr("height"))}a.click(function(){b.loadBookmark();var n=i.val();if(n!=""&&n!="http://"){var q=f.val(),r=k.val(),s=/^[0-9]+$/;s.test(q)||(q=412);s.test(r)||(r=300);var o='<embed type="'+d+'" classid="'+g+'" src="xhe_tmpurl"'+m;s=n.split(" ");if(s.length>1){o=o+"";var t,v=[];o+=' width="xhe_width" height="xhe_height" />';for(var A in s){n=s[A].split("||");t=o;t=t.replace("xhe_tmpurl",n[0]);t=t.replace("xhe_width",n[1]?n[1]:q);t=t.replace("xhe_height",
n[2]?n[2]:r);n!=""&&v.push(t)}b.pasteHTML(v.join("&nbsp;"))}else if(s.length==1){n=s[0].split("||");if(h.length==0){b.pasteHTML(o.replace("xhe_tmpurl",n[0]+"#xhe_tmpurl")+" />");h=e('embed[src$="#xhe_tmpurl"]',w)}V(h,"src",n[0]);h.attr("width",n[1]?n[1]:q);h.attr("height",n[2]?n[2]:r)}}else h.length==1&&h.remove();b.hidePanel();return false})};this.showEmot=function(a){var c=e('<div class="xheEmot"></div>');a=a?a:Ha?Ha:"default";var d=va[a],g=Sa+a+"/",m=0,j=[],l="";l=d.width;var h=d.height,i=d.line,
f=d.count;d=d.list;if(f)for(d=1;d<=f;d++){m++;j.push('<a href="javascript:void(0);" style="background-image:url('+g+d+'.gif);" emot="'+a+","+d+'" xhev="">&nbsp;</a>');m%i==0&&j.push("<br />")}else e.each(d,function(q,r){m++;j.push('<a href="javascript:void(0);" style="background-image:url('+g+q+'.gif);" emot="'+a+","+q+'" title="'+r+'" xhev="'+r+'">&nbsp;</a>');m%i==0&&j.push("<br />")});f=i*(l+12);d=f*0.75;if(Math.ceil(m/i)*(h+12)<=d)d="";l=e("<style>"+(d?".xheEmot div{width:"+(f+20)+"px;height:"+
d+"px;}":"")+".xheEmot div a{width:"+l+"px;height:"+h+"px;}</style><div>"+j.join("")+"</div>").click(function(q){q=q.target;var r=e(q);if(e.nodeName(q,"A")){b.pasteHTML('<img emot="'+r.attr("emot")+'" alt="'+r.attr("xhev")+'">');b.hidePanel();return false}}).mousedown(W);c.append(l);var k=0,n=["<ul>"];e.each(va,function(q,r){k++;n.push("<li"+(a==q?' class="cur"':"")+'><a href="javascript:void(0);" group="'+q+'">'+r.name+"</a></li>")});if(k>1){n.push('</ul><br style="clear:both;" />');l=e(n.join("")).click(function(q){Ha=
e(q.target).attr("group");b.exec("Emot");return false}).mousedown(W);c.append(l)}b.showPanel(c)};this.showTable=function(){var a=e('<div>\u884c\u6570\u5217\u6570: <input type="text" id="xheTableRows" style="width:40px;" value="3" /> x <input type="text" id="xheTableColumns" style="width:40px;" value="2" /></div><div>\u6807\u9898\u5355\u5143: <select id="xheTableHeaders"><option selected="selected" value="">\u65e0</option><option value="row">\u7b2c\u4e00\u884c</option><option value="col">\u7b2c\u4e00\u5217</option><option value="both">\u7b2c\u4e00\u884c\u548c\u7b2c\u4e00\u5217</option></select></div><div>\u5bbd\u5ea6\u9ad8\u5ea6: <input type="text" id="xheTableWidth" style="width:40px;" value="200" /> x <input type="text" id="xheTableHeight" style="width:40px;" value="" /></div><div>\u8fb9\u6846\u5927\u5c0f: <input type="text" id="xheTableBorder" style="width:40px;" value="1" /></div><div>\u8868\u683c\u95f4\u8ddd: <input type="text" id="xheTableCellSpacing" style="width:40px;" value="1" /> \u8868\u683c\u586b\u5145: <input type="text" id="xheTableCellPadding" style="width:40px;" value="1" /></div><div>\u5bf9\u9f50\u65b9\u5f0f: <select id="xheTableAlign"><option selected="selected" value="">\u9ed8\u8ba4</option><option value="left">\u5de6\u5bf9\u9f50</option><option value="center">\u5c45\u4e2d</option><option value="right">\u53f3\u5bf9\u9f50</option></select></div><div>\u8868\u683c\u6807\u9898: <input type="text" id="xheTableCaption" /></div><div style="text-align:right;"><input type="button" id="xheSave" value="\u786e\u5b9a" /></div>'),
c=e("#xheTableRows",a),d=e("#xheTableColumns",a),g=e("#xheTableHeaders",a),m=e("#xheTableWidth",a),j=e("#xheTableHeight",a),l=e("#xheTableBorder",a),h=e("#xheTableCellSpacing",a),i=e("#xheTableCellPadding",a),f=e("#xheTableAlign",a),k=e("#xheTableCaption",a);e("#xheSave",a).click(function(){b.loadBookmark();var n=k.val(),q=l.val(),r=c.val(),s=d.val(),o=g.val(),t=m.val(),v=j.val(),A=h.val(),u=i.val(),y=f.val();q="<table"+(q!=""?' border="'+q+'"':"")+(t!=""?' width="'+t+'"':"")+(v!=""?' width="'+v+
'"':"")+(A!=""?' cellspacing="'+A+'"':"")+(u!=""?' cellpadding="'+u+'"':"")+(y!=""?' align="'+y+'"':"")+">";if(n!="")q+="<caption>"+n+"</caption>";if(o=="row"||o=="both"){q+="<tr>";for(n=0;n<s;n++)q+='<th scope="col">&nbsp;</th>';q+="</tr>";r--}q+="<tbody>";for(n=0;n<r;n++){q+="<tr>";for(t=0;t<s;t++)q+=t==0&&(o=="col"||o=="both")?'<th scope="row">&nbsp;</th>':"<td>&nbsp;</td>";q+="</tr>"}q+="</tbody></table>";b.pasteHTML(q);b.hidePanel();return false});b.showDialog(a)};this.showAbout=function(){var a=
e('<div style="font:12px Arial;width:245px;word-wrap:break-word;word-break:break-all;"><p><span style="font-size:20px;color:#1997DF;">xhEditor</span><br />v1.0.0 Final (build 100701)</p><p>xhEditor\u662f\u57fa\u4e8ejQuery\u5f00\u53d1\u7684\u8de8\u5e73\u53f0\u8f7b\u91cfXHTML\u7f16\u8f91\u5668\uff0c\u57fa\u4e8e<a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">LGPL</a>\u5f00\u6e90\u534f\u8bae\u53d1\u5e03\u3002</p><p>Copyright \u00a9 <a href="http://xheditor.com/" target="_blank">xhEditor.com</a>. All rights reserved.</p></div>');
b.showDialog(a)};this.addShortcuts=function(a,c){a=a.toLowerCase();if(ja[a]==undefined)ja[a]=[];ja[a].push(c)};this.delShortcuts=function(a){delete ja[a]};this.uploadInit=function(a,c,d){function g(){a.closest(".xheDialog").bind("dragenter dragover",W).bind("drop",function(o){o=o.originalEvent.dataTransfer;var t;if(n&&o&&(t=o.files)&&t.length>0)m(t);return false})}function m(o){s=[];var t,v,A=e('<div style="padding:22px 0;text-align:center;line-height:30px;">\u6587\u4ef6\u4e0a\u4f20\u4e2d\uff0c\u8bf7\u7a0d\u5019\u2026\u2026<br /></div>'),
u='<img src="'+Ga+'img/loading.gif">';if(!n||o.nodeType&&!((v=o.files)&&v[0])){if(!j(o.value))return;A.append(u);t=new b.html4Upload(o,c,l)}else{v||(v=o);var y=v.length;if(y>q){alert("\u8bf7\u4e0d\u8981\u4e00\u6b21\u4e0a\u4f20\u8d85\u8fc7"+q+"\u4e2a\u6587\u4ef6");return}for(o=0;o<y;o++)if(!j(v[o].fileName))return;var z=e('<div class="xheProgress"><div><span>0%</span></div></div>');A.append(z);t=new b.html5Upload(i,v,c,l,function(B){if(B.loaded>=0){var K=Math.round(B.loaded*100/B.total)+"%";e("div",
z).css("width",K);e("span",z).text(K+" ( "+Ja(B.loaded)+" / "+Ja(B.total)+" )")}else z.replaceWith(u)})}T=false;b.showModal("\u6587\u4ef6\u4e0a\u4f20\u4e2d(Esc\u53d6\u6d88\u4e0a\u4f20)",A,320,150,function(){T=true;t.remove()});t.start()}function j(o){if(d=="*"||o.match(RegExp(".("+d.replace(/,/g,"|")+")$","i")))return true;else{alert("\u4e0a\u4f20\u6587\u4ef6\u6269\u5c55\u540d\u5fc5\u9700\u4e3a: "+d);return false}}function l(o,t){var v=Object,A=false,u=b.settings.onUpload;try{v=eval("("+o+")")}catch(y){}if(v.err==
undefined||v.msg==undefined)alert(c+" \u4e0a\u4f20\u63a5\u53e3\u53d1\u751f\u9519\u8bef\uff01\r\n\r\n\u8fd4\u56de\u7684\u9519\u8bef\u5185\u5bb9\u4e3a: \r\n\r\n"+o);else if(v.err)alert(v.err);else{s.push(v.msg);A=true}if(!A||t)b.removeModal();if(t&&A){h(s);u&&u(s)}return A}function h(o){if($(o,"string"))o=[o];var t=false,v,A=o.length,u,y=[];for(v=0;v<A;v++){u=o[v];u=$(u,"string")?u:u.url;if(u.substr(0,1)=="!"){t=true;u=u.substr(1)}y.push(u)}a.val(y.join(" "));t&&a.closest(".xheDialog").find("#xheSave").click()}
var i="filedata",f=e('<span class="xheUpload"><input type="text" style="visibility:hidden;" tabindex="-1" /><input type="button" value="'+b.settings.upBtnText+'" class="xheBtn" tabindex="-1" /></span>'),k=e(".xheBtn",f),n=b.settings.html5Upload,q=n?b.settings.upMultiple:1;a.after(f);k.before(a);c=c.replace(/{editorRoot}/ig,U);if(c.substr(0,1)=="!")k.click(function(){T=false;b.showIframeModal("\u4e0a\u4f20\u6587\u4ef6",c.substr(1),h,null,null,function(){T=true})});else{f.append('<input type="file"'+
(q>1?' multiple=""':"")+' class="xheFile" size="13" name="'+i+'" tabindex="-1" />');var r=e(".xheFile",f),s=[];r.change(function(){m(r[0])});setTimeout(g,10)}};this.html4Upload=function(a,c,d){var g="jUploadFrame"+(new Date).getTime(),m=this,j=e('<iframe name="'+g+'" class="xheHideArea" />').appendTo("body"),l=e('<form action="'+c+'" target="'+g+'" method="post" enctype="multipart/form-data" class="xheHideArea"></form>').appendTo("body"),h=e(a),i=h.clone().attr("disabled","true");h.before(i).appendTo(l);
this.remove=function(){if(m!=null){i.before(h).remove();j.remove();l.remove();m=null}};this.onLoad=function(){d(e(j[0].contentWindow.document.body).text(),true)};this.start=function(){l.submit();j.load(m.onLoad)};return this};this.html5Upload=function(a,c,d,g,m){function j(s,o,t,v){h=new XMLHttpRequest;upload=h.upload;h.onreadystatechange=function(){h.readyState==4&&t(h.responseText)};if(upload)upload.onprogress=function(A){v(A.loaded)};else v(-1);h.open("POST",o);h.setRequestHeader("Content-Type",
"application/octet-stream");h.setRequestHeader("Content-Disposition",'attachment; name="'+a+'"; filename="'+s.fileName+'"');h.sendAsBinary?h.sendAsBinary(s.getAsBinary()):h.send(s)}function l(s){m&&m({loaded:k+s,total:n})}for(var h,i=0,f=c.length,k=0,n=0,q=this,r=0;r<f;r++)n+=c[r].fileSize;this.remove=function(){if(h){h.abort();h=null}};this.uploadNext=function(s){if(s){k+=c[i-1].fileSize;l(0)}if((!s||s&&g(s,i==f)==true)&&i<f)j(c[i++],d,q.uploadNext,function(o){l(o)})};this.start=function(){q.uploadNext()}};
this.showIframeModal=function(a,c,d,g,m,j){c=e('<iframe frameborder="0" src="'+c.replace(/{editorRoot}/ig,U)+'" style="width:100%;height:100%;display:none;" /><div class="xheModalIfmWait"></div>');var l=e(c[0]),h=e(c[1]);b.showModal(a,c,g,m,j);l.load(function(){var i=l[0].contentWindow,f=e(i.document);i.callback=function(k){b.removeModal();d(k)};f.keydown(b.modalEscCheck);l.show();h.remove()})};this.showModal=function(a,c,d,g,m){if(e(".xheModal").length==1)return false;var j,l,h,i,f;d=d?d:b.settings.modalWidth;
g=g?g:b.settings.modalHeight;i=b.settings.layerShadow;j=e('<div class="xheModal" style="width:'+(d-1)+"px;height:"+g+"px;margin-left:-"+Math.ceil(d/2)+"px;"+(D&&wa<=7?"":"margin-top:-"+Math.ceil(g/2)+"px")+'">'+(b.settings.modalTitle?'<div class="xheModalTitle"><span class="xheModalClose" title="\u5173\u95ed (Esc)"></span>'+a+"</div>":"")+'<div class="xheModalContent"></div></div>').appendTo("body");h=e('<div class="xheModalOverlay"></div>').appendTo("body");if(i>0)l=e('<div class="xheModalShadow" style="width:'+
j.outerWidth()+"px;height:"+j.outerHeight()+"px;margin-left:-"+(Math.ceil(d/2)-i-2)+"px;"+(D&&wa<=7?"":"margin-top:-"+(Math.ceil(g/2)-i-2)+"px")+'"></div>').appendTo("body");e(".xheModalContent",j).css("height",g-(b.settings.modalTitle?e(".xheModalTitle").outerHeight():0)).html(c);if(D&&wa==6)f=e("select:visible").css("visibility","hidden");this.removeModal=function(){f&&f.css("visibility","visible");e(document).unbind("keydown",b.modalEscCheck);j.remove();i>0&&l.remove();h.remove();m&&m()};this.modalEscCheck=
function(k){if(k.which==27){b.removeModal();return false}};e(document).keydown(b.modalEscCheck);e(".xheModalClose",j).click(b.removeModal);h.show();i>0&&l.show();j.show()};this.showDialog=function(a){var c=e('<div class="xheDialog"></div>');a=e(a);var d=e("#xheSave",a);if(d.length==1){a.find("input[type=text],select").keypress(function(j){if(j.which==13){d.click();return false}});a.find("textarea").keydown(function(j){if(j.ctrlKey&&j.which==13){d.click();return false}});d.after(' <input type="button" id="xheCancel" value="\u53d6\u6d88" />');
e("#xheCancel",a).click(b.hidePanel);if(!b.settings.clickCancelDialog){pa=false;var g=e('<div class="xheFixCancel"></div>').appendTo("body").mousedown(W),m=O.offset();g.css({left:m.left,top:m.top,width:O.outerWidth(),height:O.outerHeight()})}c.mousedown(function(){la=true})}c.append(a);b.showPanel(c);D||setTimeout(function(){c.find("input[type=text],textarea").filter(":visible").filter(function(){return e(this).css("visibility")!="hidden"}).eq(0).focus()},10)};this.showPanel=function(a){if(!M.target)return false;
L.empty().append(a).css("left",-999).css("top",-999);ga=e(M.target).closest("a").addClass("xheActive");var c=ga.offset();a=c.left;c=c.top;c+=ga.outerHeight()-1;fa.css({left:a+1,top:c}).show();if(a+L.outerWidth()>document.body.clientWidth)a-=L.outerWidth()-ga.outerWidth();var d=b.settings.layerShadow;d>0&&ea.css({left:a+d,top:c+d,width:L.outerWidth(),height:L.outerHeight()}).show();L.css("left",a).css("top",c).show();Fa=T=true};this.hidePanel=function(){if(T){ga.removeClass("xheActive");ea.hide();
fa.hide();L.hide();T=false;if(!pa){e(".xheFixCancel").remove();pa=true}Fa=la=false;X=null}};this.exec=function(a){b.hidePanel();b.saveBookmark();var c=ha[a];if(!c)return false;if(M==null){M={};var d=J.find(".xheButton[name="+a+"]");if(d.length==1)M.target=d}if(c.e)c.e.call(b);else{a=a.toLowerCase();switch(a){case "cut":try{w.execCommand(a);if(!w.queryCommandSupported(a))throw"Error";}catch(g){alert("\u60a8\u7684\u6d4f\u89c8\u5668\u5b89\u5168\u8bbe\u7f6e\u4e0d\u5141\u8bb8\u4f7f\u7528\u526a\u5207\u64cd\u4f5c\uff0c\u8bf7\u4f7f\u7528\u952e\u76d8\u5feb\u6377\u952e(Ctrl + X)\u6765\u5b8c\u6210")}break;
case "copy":try{w.execCommand(a);if(!w.queryCommandSupported(a))throw"Error";}catch(m){alert("\u60a8\u7684\u6d4f\u89c8\u5668\u5b89\u5168\u8bbe\u7f6e\u4e0d\u5141\u8bb8\u4f7f\u7528\u590d\u5236\u64cd\u4f5c\uff0c\u8bf7\u4f7f\u7528\u952e\u76d8\u5feb\u6377\u952e(Ctrl + C)\u6765\u5b8c\u6210")}break;case "paste":try{w.execCommand(a);if(!w.queryCommandSupported(a))throw"Error";}catch(j){alert("\u60a8\u7684\u6d4f\u89c8\u5668\u5b89\u5168\u8bbe\u7f6e\u4e0d\u5141\u8bb8\u4f7f\u7528\u7c98\u8d34\u64cd\u4f5c\uff0c\u8bf7\u4f7f\u7528\u952e\u76d8\u5feb\u6377\u952e(Ctrl + V)\u6765\u5b8c\u6210")}break;case "Page":b.pasteHTML('<hr />');
case "pastetext":window.clipboardData?b.pasteText(window.clipboardData.getData("Text",true)):b.showPastetext();break;case "blocktag":var l=[];e.each($a,function(f,k){l.push({s:"<"+k.n+">"+k.t+"</"+k.n+">",v:"<"+k.n+">",t:k.t})});b.showMenu(l,function(f){b._exec("formatblock",f)});break;case "fontface":var h=[];e.each(ab,function(f,k){k.c=k.c?k.c:k.n;h.push({s:'<span style="font-family:'+k.c+'">'+k.n+"</span>",v:k.c,t:k.n})});b.showMenu(h,function(f){b._exec("fontname",f)});break;case "fontsize":var i=
[];e.each(N,function(f,k){i.push({s:'<span style="font-size:'+k.s+';">'+k.t+"("+k.s+")</span>",v:f+1,t:k.t})});b.showMenu(i,function(f){b._exec("fontsize",f)});break;case "fontcolor":b.showColor(function(f){b._exec("forecolor",f)});break;case "backcolor":b.showColor(function(f){if(D)b._exec("backcolor",f);else{za(true);b._exec("hilitecolor",f);za(false)}});break;case "align":b.showMenu(bb,function(f){b._exec(f)});break;case "list":b.showMenu(cb,function(f){b._exec(f)});break;case "link":b.showLink();
break;case "img":b.showImg();break;case "flash":b.showEmbed("Flash",'<div>\u52a8\u753b\u6587\u4ef6: <input type="text" id="xheFlashSrc" value="http://" class="xheText" /></div><div>\u5bbd\u5ea6\u9ad8\u5ea6: <input type="text" id="xheFlashWidth" style="width:40px;" value="480" /> x <input type="text" id="xheFlashHeight" style="width:40px;" value="400" /></div><div style="text-align:right;"><input type="button" id="xheSave" value="\u786e\u5b9a" /></div>',"application/x-shockwave-flash","clsid:d27cdb6e-ae6d-11cf-96b8-4445535400000",
' wmode="opaque" quality="high" menu="false" play="true" loop="true" allowfullscreen="true"',b.settings.upFlashUrl,b.settings.upFlashExt);break;case "media":b.showEmbed("Media",'<div>\u5a92\u4f53\u6587\u4ef6: <input type="text" id="xheMediaSrc" value="http://" class="xheText" /></div><div>\u5bbd\u5ea6\u9ad8\u5ea6: <input type="text" id="xheMediaWidth" style="width:40px;" value="480" /> x <input type="text" id="xheMediaHeight" style="width:40px;" value="400" /></div><div style="text-align:right;"><input type="button" id="xheSave" value="\u786e\u5b9a" /></div>',
"application/x-mplayer2","clsid:6bf52a52-394a-11d3-b153-00c04f79faa6",' enablecontextmenu="false" autostart="false"',b.settings.upMediaUrl,b.settings.upMediaExt);break;case "emot":b.showEmot();break;case "table":b.showTable();break;case "source":b.toggleSource();break;case "print":R.print();break;case "fullscreen":b.toggleFullscreen();break;case "about":b.showAbout();break;default:b._exec(a);break}}M=null};this._exec=function(a,c,d){d||b.focus();return c!=undefined?w.execCommand(a,false,c):w.execCommand(a,
false,null)}};e(function(){e.fn.oldVal=e.fn.val;e.fn.val=function(C){var F=this,G;if(C===undefined)return this[0]&&(G=this[0].xheditor)?G.getSource():F.oldVal(C);return this.each(function(){(G=this.xheditor)?G.setSource(C):F.oldVal(C)})};e("textarea").each(function(){var C=e(this),F=C.attr("class").match(/(?:^|\s)xheditor(?:\-(m?full|simple|mini))?(?:\s|$)/i);if(F)C.xheditor(F[1]?{tools:F[1]}:null)})})})(jQuery);
