var tinymce={majorVersion:"3",minorVersion:"1.1",releaseDate:"2008-08-18",_init:function(){var L=this,I=document,J=window,H=navigator,B=H.userAgent,G,A,F,E,D,K;L.isOpera=J.opera&&opera.buildNumber;L.isWebKit=/WebKit/.test(B);L.isOldWebKit=L.isWebKit&&!J.getSelection().getRangeAt;L.isIE=!L.isWebKit&&!L.isOpera&&(/MSIE/gi).test(B)&&(/Explorer/gi).test(H.appName);L.isIE6=L.isIE&&/MSIE [56]/.test(B);L.isGecko=!L.isWebKit&&/Gecko/.test(B);L.isMac=B.indexOf("Mac")!=-1;if(J.tinyMCEPreInit){L.suffix=tinyMCEPreInit.suffix;
L.baseURL=tinyMCEPreInit.base;L.query=tinyMCEPreInit.query;return }L.suffix="";A=I.getElementsByTagName("base");for(G=0;G<A.length;G++){if(K=A[G].href){if(/^https?:\/\/[^\/]+$/.test(K)){K+="/"}E=K?K.match(/.*\//)[0]:""}}function C(M){if(M.src&&/tiny_mce(|_dev|_src|_gzip|_jquery|_prototype).js/.test(M.src)){if(/_(src|dev)\.js/g.test(M.src)){L.suffix="_src"}if((D=M.src.indexOf("?"))!=-1){L.query=M.src.substring(D+1)}L.baseURL=M.src.substring(0,M.src.lastIndexOf("/"));if(E&&L.baseURL.indexOf("://")==-1){L.baseURL=E+L.baseURL
}return L.baseURL}return null}A=I.getElementsByTagName("script");for(G=0;G<A.length;G++){if(C(A[G])){return }}F=I.getElementsByTagName("head")[0];if(F){A=F.getElementsByTagName("script");for(G=0;G<A.length;G++){if(C(A[G])){return }}}return },is:function(B,A){var C=typeof (B);if(!A){return C!="undefined"}if(A=="array"&&(B instanceof Array)){return true}return C==A},each:function(D,A,C){var E,B;if(!D){return 0}C=C||D;if(typeof (D.length)!="undefined"){for(E=0,B=D.length;E<B;E++){if(A.call(C,D[E],E,D)===false){return 0
}}}else{for(E in D){if(D.hasOwnProperty(E)){if(A.call(C,D[E],E,D)===false){return 0}}}}return 1},map:function(A,B){var C=[];tinymce.each(A,function(D){C.push(B(D))});return C},grep:function(A,B){var C=[];tinymce.each(A,function(D){if(!B||B(D)){C.push(D)}});return C},inArray:function(B,C){var D,A;if(B){for(D=0,A=B.length;D<A;D++){if(B[D]===C){return D}}}return -1},extend:function(D,C){var B,A=arguments;for(B=1;B<A.length;B++){C=A[B];tinymce.each(C,function(E,F){if(typeof (E)!=="undefined"){D[F]=E}})
}return D},trim:function(A){return(A?""+A:"").replace(/^\s*|\s*$/g,"")},create:function(I,A){var H=this,B,D,E,F,C,G=0;I=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(I);E=I[3].match(/(^|\.)(\w+)$/i)[2];D=H.createNS(I[3].replace(/\.\w+$/,""));if(D[E]){return }if(I[2]=="static"){D[E]=A;if(this.onCreate){this.onCreate(I[2],I[3],D[E])}return }if(!A[E]){A[E]=function(){};G=1}D[E]=A[E];H.extend(D[E].prototype,A);if(I[5]){B=H.resolve(I[5]).prototype;F=I[5].match(/\.(\w+)$/i)[1];C=D[E];if(G){D[E]=function(){return B[F].apply(this,arguments)
}}else{D[E]=function(){this.parent=B[F];return C.apply(this,arguments)}}D[E].prototype[E]=D[E];H.each(B,function(J,K){D[E].prototype[K]=B[K]});H.each(A,function(J,K){if(B[K]){D[E].prototype[K]=function(){this.parent=B[K];return J.apply(this,arguments)}}else{if(K!=E){D[E].prototype[K]=J}}})}H.each(A["static"],function(J,K){D[E][K]=J});if(this.onCreate){this.onCreate(I[2],I[3],D[E].prototype)}},walk:function(C,B,D,A){A=A||this;if(C){if(D){C=C[D]}tinymce.each(C,function(F,E){if(B.call(A,F,E,D)===false){return false
}tinymce.walk(F,B,D,A)})}},createNS:function(D,C){var B,A;C=C||window;D=D.split(".");for(B=0;B<D.length;B++){A=D[B];if(!C[A]){C[A]={}}C=C[A]}return C},resolve:function(D,C){var B,A;C=C||window;D=D.split(".");for(B=0,A=D.length;B<A;B++){C=C[D[B]];if(!C){break}}return C},addUnload:function(E,D){var C=this,A=window;E={func:E,scope:D||this};if(!C.unloads){function B(){var G=C.unloads,H,I;if(G){for(I in G){H=G[I];if(H&&H.func){H.func.call(H.scope,1)}}if(A.detachEvent){A.detachEvent("onbeforeunload",F);
A.detachEvent("onunload",B)}else{if(A.removeEventListener){A.removeEventListener("unload",B,false)}}C.unloads=H=G=A=B=null;if(window.CollectGarbage){window.CollectGarbage()}}}function F(){var H=document;if(H.readyState=="interactive"){function G(){H.detachEvent("onstop",G);B();H=null}H.attachEvent("onstop",G);window.setTimeout(function(){H.detachEvent("onstop",G)},0)}}if(A.attachEvent){A.attachEvent("onunload",B);A.attachEvent("onbeforeunload",F)}else{if(A.addEventListener){A.addEventListener("unload",B,false)
}}C.unloads=[E]}else{C.unloads.push(E)}return E},removeUnload:function(C){var A=this.unloads,B=null;tinymce.each(A,function(E,D){if(E&&E.func==C){A.splice(D,1);B=C;return false}});return B},explode:function(A,B){return A?tinymce.map(A.split(B||","),tinymce.trim):A},_addVer:function(B){var A;if(!this.query){return B}A=(B.indexOf("?")==-1?"?":"&")+this.query;if(B.indexOf("#")==-1){return B+A}return B.replace("#",A+"#")}};window.tinymce=tinymce;tinymce._init();tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,Dispatcher:function(A){this.scope=A||this;
this.listeners=[]},add:function(A,B){this.listeners.push({cb:A,scope:B||this.scope});return A},addToTop:function(A,B){this.listeners.unshift({cb:A,scope:B||this.scope});return A},remove:function(A){var B=this.listeners,C=null;tinymce.each(B,function(E,D){if(A==E.cb){C=A;B.splice(D,1);return false}});return C},dispatch:function(){var D,B=arguments,C,A=this.listeners,E;for(C=0;C<A.length;C++){E=A[C];D=E.cb.apply(E.scope,B);if(D===false){break}}return D}});(function(){var A=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(D,F){var E=this,G,C,B;
F=E.settings=F||{};if(/^(mailto|news|javascript|about):/i.test(D)||/^\s*#/.test(D)){E.source=D;return }if(D.indexOf("/")===0&&D.indexOf("//")!==0){D=(F.base_uri?F.base_uri.protocol||"http":"http")+"://mce_host"+D}if(D.indexOf("://")===-1&&D.indexOf("//")!==0){D=(F.base_uri.protocol||"http")+"://mce_host"+E.toAbsPath(F.base_uri.path,D)}D=D.replace(/@@/g,"(mce_at)");D=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(D);
A(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(H,I){var J=D[I];if(J){J=J.replace(/\(mce_at\)/g,"@@")}E[H]=J});if(B=F.base_uri){if(!E.protocol){E.protocol=B.protocol}if(!E.userInfo){E.userInfo=B.userInfo}if(!E.port&&E.host=="mce_host"){E.port=B.port}if(!E.host||E.host=="mce_host"){E.host=B.host}E.source=""}},setPath:function(C){var B=this;C=/^(.*?)\/?(\w+)?$/.exec(C);B.path=C[0];B.directory=C[1];B.file=C[2];
B.source="";B.getURI()},toRelative:function(B){var C=this,D;B=new tinymce.util.URI(B,{base_uri:C});if((B.host!="mce_host"&&C.host!=B.host&&B.host)||C.port!=B.port||C.protocol!=B.protocol){return B.getURI()}D=C.toRelPath(C.path,B.path);if(B.query){D+="?"+B.query}if(B.anchor){D+="#"+B.anchor}return D},toAbsolute:function(B,C){var B=new tinymce.util.URI(B,{base_uri:this});return B.getURI(this.host==B.host?C:0)},toRelPath:function(F,G){var B,E=0,C="",D;F=F.substring(0,F.lastIndexOf("/"));F=F.split("/");
B=G.split("/");if(F.length>=B.length){for(D=0;D<F.length;D++){if(D>=B.length||F[D]!=B[D]){E=D+1;break}}}if(F.length<B.length){for(D=0;D<B.length;D++){if(D>=F.length||F[D]!=B[D]){E=D+1;break}}}if(E==1){return G}for(D=0;D<F.length-(E-1);D++){C+="../"}for(D=E-1;D<B.length;D++){if(D!=E-1){C+="/"+B[D]}else{C+=B[D]}}return C},toAbsPath:function(D,E){var C,B=0,F=[];D=D.split("/");E=E.split("/");A(D,function(G){if(G){F.push(G)}});D=F;for(C=E.length-1,F=[];C>=0;C--){if(E[C].length==0||E[C]=="."){continue}if(E[C]==".."){B++;
continue}if(B>0){B--;continue}F.push(E[C])}C=D.length-B;if(C<=0){return"/"+F.reverse().join("/")}return"/"+D.slice(0,C).join("/")+"/"+F.reverse().join("/")},getURI:function(D){var C,B=this;if(!B.source||D){C="";if(!D){if(B.protocol){C+=B.protocol+"://"}if(B.userInfo){C+=B.userInfo+"@"}if(B.host){C+=B.host}if(B.port){C+=":"+B.port}}if(B.path){C+=B.path}if(B.query){C+="?"+B.query}if(B.anchor){C+="#"+B.anchor}B.source=C}return B.source}})})();(function(){var A=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(D){var B=this.get(D),C;
if(B){A(B.split("&"),function(E){E=E.split("=");C=C||{};C[unescape(E[0])]=unescape(E[1])})}return C},setHash:function(H,B,E,D,G,C){var F="";A(B,function(J,I){F+=(!F?"":"&")+escape(I)+"="+escape(J)});this.set(H,F,E,D,G,C)},get:function(F){var E=document.cookie,D,C=F+"=",B;if(!E){return }B=E.indexOf("; "+C);if(B==-1){B=E.indexOf(C);if(B!=0){return null}}else{B+=2}D=E.indexOf(";",B);if(D==-1){D=E.length}return unescape(E.substring(B+C.length,D))},set:function(G,B,E,D,F,C){document.cookie=G+"="+escape(B)+((E)?"; expires="+E.toGMTString():"")+((D)?"; path="+escape(D):"")+((F)?"; domain="+F:"")+((C)?"; secure":"")
},remove:function(D,B){var C=new Date();C.setTime(C.getTime()-1000);this.set(D,"",C,B,C)}})})();tinymce.create("static tinymce.util.JSON",{serialize:function(E){var C,A,D=tinymce.util.JSON.serialize,B;if(E==null){return"null"}B=typeof E;if(B=="string"){A="\bb\tt\nn\ff\rr\"\"''\\\\";return'"'+E.replace(/([\u0080-\uFFFF\x00-\x1f\"\'])/g,function(G,F){C=A.indexOf(F);if(C+1){return"\\"+A.charAt(C+1)}G=F.charCodeAt().toString(16);return"\\u"+"0000".substring(G.length)+G})+'"'}if(B=="object"){if(E instanceof Array){for(C=0,A="[";
C<E.length;C++){A+=(C>0?",":"")+D(E[C])}return A+"]"}A="{";for(C in E){A+=typeof E[C]!="function"?(A.length>1?',"':'"')+C+'":'+D(E[C]):""}return A+"}"}return""+E},parse:function(s){try{return eval("("+s+")")}catch(ex){}}});tinymce.create("static tinymce.util.XHR",{send:function(F){var A,D,B=window,G=0;F.scope=F.scope||this;F.success_scope=F.success_scope||F.scope;F.error_scope=F.error_scope||F.scope;F.async=F.async===false?false:true;F.data=F.data||"";function C(I){A=0;try{A=new ActiveXObject(I)}catch(H){}return A
}A=B.XMLHttpRequest?new XMLHttpRequest():C("Microsoft.XMLHTTP")||C("Msxml2.XMLHTTP");if(A){if(A.overrideMimeType){A.overrideMimeType(F.content_type)}A.open(F.type||(F.data?"POST":"GET"),F.url,F.async);if(F.content_type){A.setRequestHeader("Content-Type",F.content_type)}A.send(F.data);function E(){if(!F.async||A.readyState==4||G++>10000){if(F.success&&G<10000&&A.status==200){F.success.call(F.success_scope,""+A.responseText,A,F)}else{if(F.error){F.error.call(F.error_scope,G>10000?"TIMED_OUT":"GENERAL",A,F)
}}A=null}else{B.setTimeout(E,10)}}if(!F.async){return E()}D=B.setTimeout(E,10)}}});(function(){var C=tinymce.extend,B=tinymce.util.JSON,A=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(D){this.settings=C({},D);this.count=0},send:function(F){var E=F.error,D=F.success;F=C(this.settings,F);F.success=function(H,G){H=B.parse(H);if(typeof (H)=="undefined"){H={error:"JSON Parse error."}}if(H.error){E.call(F.error_scope||F.scope,H.error,G)}else{D.call(F.success_scope||F.scope,H.result)
}};F.error=function(H,G){E.call(F.error_scope||F.scope,H,G)};F.data=B.serialize({id:F.id||"c"+(this.count++),method:F.method,params:F.params});F.content_type="application/json";A.send(F)},"static":{sendRPC:function(D){return new tinymce.util.JSONRequest().send(D)}}})}());(function(){var each=tinymce.each,is=tinymce.is;var isWebKit=tinymce.isWebKit,isIE=tinymce.isIE;tinymce.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,listeners:{},pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,cache:{},idPattern:/^#[\w]+$/,elmPattern:/^[\w_*]+$/,elmClassPattern:/^([\w_]*)\.([\w_]+)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value"},DOMUtils:function(d,s){var t=this;
t.doc=d;t.win=window;t.files={};t.cssFlicker=false;t.counter=0;t.boxModel=!tinymce.isIE||d.compatMode=="CSS1Compat";t.stdMode=d.documentMode===8;this.settings=s=tinymce.extend({keep_values:false,hex_colors:1,process_html:1},s);if(tinymce.isIE6){try{d.execCommand("BackgroundImageCache",false,true)}catch(e){t.cssFlicker=true}}tinymce.addUnload(t.destroy,t)},getRoot:function(){var t=this,s=t.settings;return(s&&t.get(s.root_element))||t.doc.body},getViewPort:function(w){var d,b;w=!w?this.win:w;d=w.document;
b=this.boxModel?d.documentElement:d.body;return{x:w.pageXOffset||b.scrollLeft,y:w.pageYOffset||b.scrollTop,w:w.innerWidth||b.clientWidth,h:w.innerHeight||b.clientHeight}},getRect:function(e){var p,t=this,sr;e=t.get(e);p=t.getPos(e);sr=t.getSize(e);return{x:p.x,y:p.y,w:sr.w,h:sr.h}},getSize:function(e){var t=this,w,h;e=t.get(e);w=t.getStyle(e,"width");h=t.getStyle(e,"height");if(w.indexOf("px")===-1){w=0}if(h.indexOf("px")===-1){h=0}return{w:parseInt(w)||e.offsetWidth||e.clientWidth,h:parseInt(h)||e.offsetHeight||e.clientHeight}
},getParent:function(n,f,r){var na,se=this.settings;n=this.get(n);if(se.strict_root){r=r||this.getRoot()}if(is(f,"string")){na=f.toUpperCase();f=function(n){var s=false;if(n.nodeType==1&&na==="*"){s=true;return false}each(na.split(","),function(v){if(n.nodeType==1&&((se.strict&&n.nodeName.toUpperCase()==v)||n.nodeName.toUpperCase()==v)){s=true;return false}});return s}}while(n){if(n==r){return null}if(f(n)){return n}n=n.parentNode}return null},get:function(e){var n;if(e&&this.doc&&typeof (e)=="string"){n=e;
e=this.doc.getElementById(e);if(e&&e.id!==n){return this.doc.getElementsByName(n)[1]}}return e},select:function(pa,s){var t=this,cs,c,pl,o=[],x,i,l,n;s=t.get(s)||t.doc;if(s.querySelectorAll){if(s!=t.doc){i=s.id;s.id="_mc_tmp";pa="#_mc_tmp "+pa}l=tinymce.grep(s.querySelectorAll(pa));s.id=i;return l}if(t.settings.strict){function get(s,n){return s.getElementsByTagName(n.toLowerCase())}}else{function get(s,n){return s.getElementsByTagName(n)}}if(t.elmPattern.test(pa)){x=get(s,pa);for(i=0,l=x.length;
i<l;i++){o.push(x[i])}return o}if(t.elmClassPattern.test(pa)){pl=t.elmClassPattern.exec(pa);x=get(s,pl[1]||"*");c=" "+pl[2]+" ";for(i=0,l=x.length;i<l;i++){n=x[i];if(n.className&&(" "+n.className+" ").indexOf(c)!==-1){o.push(n)}}return o}function collect(n){if(!n.mce_save){n.mce_save=1;o.push(n)}}function collectIE(n){if(!n.getAttribute("mce_save")){n.setAttribute("mce_save","1");o.push(n)}}function find(n,f,r){var i,l,nl=get(r,n);for(i=0,l=nl.length;i<l;i++){f(nl[i])}}each(pa.split(","),function(v,i){v=tinymce.trim(v);
if(t.elmPattern.test(v)){each(get(s,v),function(n){collect(n)});return }if(t.elmClassPattern.test(v)){x=t.elmClassPattern.exec(v);each(get(s,x[1]),function(n){if(t.hasClass(n,x[2])){collect(n)}});return }if(!(cs=t.cache[pa])){cs="x=(function(cf, s) {";pl=v.split(" ");each(pl,function(v){var p=/^([\w\\*]+)?(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@([\w\\]+)([\^\$\*!]?=)([\w\\]+)\])?(?:\:([\w\\]+))?/i.exec(v);p[1]=p[1]||"*";cs+='find("'+p[1]+'", function(n) {';if(p[2]){cs+='if (n.id !== "'+p[2]+'") return;'
}if(p[3]){cs+='var c = " " + n.className + " ";';cs+="if (";c="";each(p[3].split("."),function(v){if(v){c+=(c?"||":"")+'c.indexOf(" '+v+' ") === -1'}});cs+=c+") return;"}});cs+="cf(n);";for(i=pl.length-1;i>=0;i--){cs+="}, "+(i?"n":"s")+");"}cs+="})";t.cache[pa]=cs=eval(cs)}cs(isIE?collectIE:collect,s)});each(o,function(n){if(isIE){n.removeAttribute("mce_save")}else{delete n.mce_save}});return o},add:function(p,n,a,h,c){var t=this;return this.run(p,function(p){var e,k;e=is(n,"string")?t.doc.createElement(n):n;
if(a){for(k in a){if(a.hasOwnProperty(k)&&!is(a[k],"object")){t.setAttrib(e,k,""+a[k])}}if(a.style&&!is(a.style,"string")){each(a.style,function(v,n){t.setStyle(e,n,v)})}}if(h){if(h.nodeType){e.appendChild(h)}else{t.setHTML(e,h)}}return !c?p.appendChild(e):e})},create:function(n,a,h){return this.add(this.doc.createElement(n),n,a,h,1)},createHTML:function(n,a,h){var o="",t=this,k;o+="<"+n;for(k in a){if(a.hasOwnProperty(k)){o+=" "+k+'="'+t.encode(a[k])+'"'}}if(tinymce.is(h)){return o+">"+h+"</"+n+">"
}return o+" />"},remove:function(n,k){return this.run(n,function(n){var p,g;p=n.parentNode;if(!p){return null}if(k){each(n.childNodes,function(c){p.insertBefore(c.cloneNode(true),n)})}return p.removeChild(n)})},setStyle:function(n,na,v){var t=this;return t.run(n,function(e){var s,i;s=e.style;na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase()});if(t.pixelStyles.test(na)&&(tinymce.is(v,"number")||/^[\-0-9\.]+$/.test(v))){v+="px"}switch(na){case"opacity":if(isIE){s.filter=v===""?"":"alpha(opacity="+(v*100)+")";
if(!n.currentStyle||!n.currentStyle.hasLayout){s.display="inline-block"}}s[na]=s["-moz-opacity"]=s["-khtml-opacity"]=v||"";break;case"float":isIE?s.styleFloat=v:s.cssFloat=v;break;default:s[na]=v||""}if(t.settings.update_styles){t.setAttrib(e,"mce_style")}})},getStyle:function(n,na,c){n=this.get(n);if(!n){return false}if(this.doc.defaultView&&c){na=na.replace(/[A-Z]/g,function(a){return"-"+a});try{return this.doc.defaultView.getComputedStyle(n,null).getPropertyValue(na)}catch(ex){return null}}na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase()
});if(na=="float"){na=isIE?"styleFloat":"cssFloat"}if(n.currentStyle&&c){return n.currentStyle[na]}return n.style[na]},setStyles:function(e,o){var t=this,s=t.settings,ol;ol=s.update_styles;s.update_styles=0;each(o,function(v,n){t.setStyle(e,n,v)});s.update_styles=ol;if(s.update_styles){t.setAttrib(e,s.cssText)}},setAttrib:function(e,n,v){var t=this;if(!e||!n){return }if(t.settings.strict){n=n.toLowerCase()}return this.run(e,function(e){var s=t.settings;switch(n){case"style":if(s.keep_values){if(v&&!t._isRes(v)){e.setAttribute("mce_style",v,2)
}else{e.removeAttribute("mce_style",2)}}e.style.cssText=v;break;case"class":e.className=v||"";break;case"src":case"href":if(s.keep_values){if(s.url_converter){v=s.url_converter.call(s.url_converter_scope||t,v,n,e)}t.setAttrib(e,"mce_"+n,v,2)}break;case"shape":e.setAttribute("mce_style",v);break}if(is(v)&&v!==null&&v.length!==0){e.setAttribute(n,""+v,2)}else{e.removeAttribute(n,2)}})},setAttribs:function(e,o){var t=this;return this.run(e,function(e){each(o,function(v,n){t.setAttrib(e,n,v)})})},getAttrib:function(e,n,dv){var v,t=this;
e=t.get(e);if(!e||e.nodeType!==1){return false}if(!is(dv)){dv=""}if(/^(src|href|style|coords|shape)$/.test(n)){v=e.getAttribute("mce_"+n);if(v){return v}}if(isIE&&t.props[n]){v=e[t.props[n]];v=v&&v.nodeValue?v.nodeValue:v}if(!v){v=e.getAttribute(n,2)}if(n==="style"){v=v||e.style.cssText;if(v){v=t.serializeStyle(t.parseStyle(v));if(t.settings.keep_values&&!t._isRes(v)){e.setAttribute("mce_style",v)}}}if(isWebKit&&n==="class"&&v){v=v.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(isIE){switch(n){case"rowspan":case"colspan":if(v===1){v=""
}break;case"size":if(v==="+0"||v===20){v=""}break;case"width":case"height":case"vspace":if(v===0){v=""}break;case"hspace":if(v===-1){v=""}break;case"maxlength":case"tabindex":if(v===32768||v===2147483647){v=""}break;case"compact":case"noshade":if(v===65535){return n}return dv;case"shape":v=v.toLowerCase();break;default:if(n.indexOf("on")===0&&v){v=(""+v).replace(/^function\s+anonymous\(\)\s+\{\s+(.*)\s+\}$/,"$1")}}}return(v!==undefined&&v!==null&&v!=="")?""+v:dv},getPos:function(n){var t=this,x=0,y=0,e,d=t.doc,r;
n=t.get(n);if(n&&isIE){n=n.getBoundingClientRect();e=t.boxModel?d.documentElement:d.body;x=t.getStyle(t.select("html")[0],"borderWidth");x=(x=="medium"||t.boxModel&&!t.isIE6)&&2||x;n.top+=t.win.self!=t.win.top?2:0;return{x:n.left+e.scrollLeft-x,y:n.top+e.scrollTop-x}}r=n;while(r){x+=r.offsetLeft||0;y+=r.offsetTop||0;r=r.offsetParent}r=n;while(r){if(!/^table-row|inline.*/i.test(t.getStyle(r,"display",1))){x-=r.scrollLeft||0;y-=r.scrollTop||0}r=r.parentNode;if(r==d.body){break}}return{x:x,y:y}},parseStyle:function(st){var t=this,s=t.settings,o={};
if(!st){return o}function compress(p,s,ot){var t,r,b,l;t=o[p+"-top"+s];if(!t){return }r=o[p+"-right"+s];if(t!=r){return }b=o[p+"-bottom"+s];if(r!=b){return }l=o[p+"-left"+s];if(b!=l){return }o[ot]=l;delete o[p+"-top"+s];delete o[p+"-right"+s];delete o[p+"-bottom"+s];delete o[p+"-left"+s]}function compress2(ta,a,b,c){var t;t=o[a];if(!t){return }t=o[b];if(!t){return }t=o[c];if(!t){return }o[ta]=o[a]+" "+o[b]+" "+o[c];delete o[a];delete o[b];delete o[c]}st=st.replace(/&(#?[a-z0-9]+);/g,"&$1_MCE_SEMI_");
each(st.split(";"),function(v){var sv,ur=[];if(v){v=v.replace(/_MCE_SEMI_/g,";");v=v.replace(/url\([^\)]+\)/g,function(v){ur.push(v);return"url("+ur.length+")"});v=v.split(":");sv=tinymce.trim(v[1]);sv=sv.replace(/url\(([^\)]+)\)/g,function(a,b){return ur[parseInt(b)-1]});sv=sv.replace(/rgb\([^\)]+\)/g,function(v){return t.toHex(v)});if(s.url_converter){sv=sv.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(x,c){return"url("+s.url_converter.call(s.url_converter_scope||t,t.decode(c),"style",null)+")"
})}o[tinymce.trim(v[0]).toLowerCase()]=sv}});compress("border","","border");compress("border","-width","border-width");compress("border","-color","border-color");compress("border","-style","border-style");compress("padding","","padding");compress("margin","","margin");compress2("border","border-width","border-style","border-color");if(isIE){if(o.border=="medium none"){o.border=""}}return o},serializeStyle:function(o){var s="";each(o,function(v,k){if(k&&v){if(tinymce.isGecko&&k.indexOf("-moz-")===0){return 
}switch(k){case"color":case"background-color":v=v.toLowerCase();break}s+=(s?" ":"")+k+": "+v+";"}});return s},loadCSS:function(u){var t=this,d=t.doc;if(!u){u=""}each(u.split(","),function(u){if(t.files[u]){return }t.files[u]=true;t.add(t.select("head")[0],"link",{rel:"stylesheet",href:tinymce._addVer(u)})})},addClass:function(e,c){return this.run(e,function(e){var o;if(!c){return 0}if(this.hasClass(e,c)){return e.className}o=this.removeClass(e,c);return e.className=(o!=""?(o+" "):"")+c})},removeClass:function(e,c){var t=this,re;
return t.run(e,function(e){var v;if(t.hasClass(e,c)){if(!re){re=new RegExp("(^|\\s+)"+c+"(\\s+|$)","g")}v=e.className.replace(re," ");return e.className=tinymce.trim(v!=" "?v:"")}return e.className})},hasClass:function(n,c){n=this.get(n);if(!n||!c){return false}return(" "+n.className+" ").indexOf(" "+c+" ")!==-1},show:function(e){return this.setStyle(e,"display","block")},hide:function(e){return this.setStyle(e,"display","none")},isHidden:function(e){e=this.get(e);return e.style.display=="none"||this.getStyle(e,"display")=="none"
},uniqueId:function(p){return(!p?"mce_":p)+(this.counter++)},setHTML:function(e,h){var t=this;return this.run(e,function(e){var x,i,nl,n,p,x;h=t.processHTML(h);if(isIE){function set(){try{e.innerHTML="<br />"+h;e.removeChild(e.firstChild)}catch(ex){while(e.firstChild){e.firstChild.removeNode()}x=t.create("div");x.innerHTML="<br />"+h;each(x.childNodes,function(n,i){if(i){e.appendChild(n)}})}}if(t.settings.fix_ie_paragraphs){h=h.replace(/<p><\/p>|<p([^>]+)><\/p>|<p[^\/+]\/>/gi,'<p$1 mce_keep="true">&nbsp;</p>')
}set();if(t.settings.fix_ie_paragraphs){nl=e.getElementsByTagName("p");for(i=nl.length-1,x=0;i>=0;i--){n=nl[i];if(!n.hasChildNodes()){if(!n.mce_keep){x=1;break}n.removeAttribute("mce_keep")}}}if(x){h=h.replace(/<p([^>]+)>|<p>/g,'<div$1 mce_tmp="1">');h=h.replace(/<\/p>/g,"</div>");set();if(t.settings.fix_ie_paragraphs){nl=e.getElementsByTagName("DIV");for(i=nl.length-1;i>=0;i--){n=nl[i];if(n.mce_tmp){p=t.doc.createElement("p");n.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(a,b){var v;
if(b!=="mce_tmp"){v=n.getAttribute(b);if(!v&&b==="class"){v=n.className}p.setAttribute(b,v)}});for(x=0;x<n.childNodes.length;x++){p.appendChild(n.childNodes[x].cloneNode(true))}n.swapNode(p)}}}}}else{e.innerHTML=h}return h})},processHTML:function(h){var t=this,s=t.settings;if(!s.process_html){return h}if(tinymce.isGecko){h=h.replace(/<(\/?)strong>|<strong( [^>]+)>/gi,"<$1b$2>");h=h.replace(/<(\/?)em>|<em( [^>]+)>/gi,"<$1i$2>")}else{if(isIE){h=h.replace(/&apos;/g,"&#39;")}}h=h.replace(/<a( )([^>]+)\/>|<a\/>/gi,"<a$1$2></a>");
if(s.keep_values){h=h.replace(/<!\[CDATA\[([\s\S]+)\]\]>/g,"<!--[CDATA[$1]]-->");if(/<script|style/.test(h)){function trim(s){s=s.replace(/^[\r\n]*|[\r\n]*$/g,"");s=s.replace(/^\s*(\/\/\s*<!--|\/\/\s*<\[CDATA\[|<!--|<\[CDATA\[)[\r\n]*/g,"");s=s.replace(/\s*(\/\/\s*\]\]>|\/\/\s*-->|\]\]>|-->)\s*$/g,"");return s}h=h.replace(/<script([^>]+|)>([\s\S]*?)<\/script>/g,function(v,a,b){b=trim(b);if(!a){a=' type="text/javascript"'}if(b){b="<!--\n"+b+"\n// -->"}return"<mce:script"+a+">"+b+"</mce:script>"});
h=h.replace(/<style([^>]+|)>([\s\S]*?)<\/style>/g,function(v,a,b){b=trim(b);return"<mce:style"+a+"><!--\n"+b+"\n--></mce:style><style"+a+' mce_bogus="1">'+b+"</style>"})}h=h.replace(/<([\w:]+) [^>]*(src|href|style|shape|coords)[^>]*>/gi,function(a,n){function handle(m,b,c){var u=c;if(a.indexOf("mce_"+b)!=-1){return m}if(b=="style"){if(t._isRes(c)){return m}if(s.hex_colors){u=u.replace(/rgb\([^\)]+\)/g,function(v){return t.toHex(v)})}if(s.url_converter){u=u.replace(/url\([\'\"]?([^\)\'\"]+)\)/g,function(x,c){return"url("+t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),b,n))+")"
})}}else{if(b!="coords"&&b!="shape"){if(s.url_converter){u=t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),b,n))}}}return" "+b+'="'+c+'" mce_'+b+'="'+u+'"'}a=a.replace(/ (src|href|style|coords|shape)=[\"]([^\"]+)[\"]/gi,handle);a=a.replace(/ (src|href|style|coords|shape)=[\']([^\']+)[\']/gi,handle);return a.replace(/ (src|href|style|coords|shape)=([^\s\"\'>]+)/gi,handle)})}return h},getOuterHTML:function(e){var d;e=this.get(e);if(!e){return null}if(isIE){return e.outerHTML}d=(e.ownerDocument||this.doc).createElement("body");
d.appendChild(e.cloneNode(true));return d.innerHTML},setOuterHTML:function(e,h,d){var t=this;return this.run(e,function(e){var n,tp;e=t.get(e);d=d||e.ownerDocument||t.doc;if(isIE&&e.nodeType==1){e.outerHTML=h}else{tp=d.createElement("body");tp.innerHTML=h;n=tp.lastChild;while(n){t.insertAfter(n.cloneNode(true),e);n=n.previousSibling}t.remove(e)}})},decode:function(s){var e;if(/&[^;]+;/.test(s)){e=this.doc.createElement("div");e.innerHTML=s;return !e.firstChild?s:e.firstChild.nodeValue}return s},encode:function(s){return s?(""+s).replace(/[<>&\"]/g,function(c,b){switch(c){case"&":return"&amp;";
case'"':return"&quot;";case"<":return"&lt;";case">":return"&gt;"}return c}):s},insertAfter:function(n,r){var t=this;r=t.get(r);return this.run(n,function(n){var p,ns;p=r.parentNode;ns=r.nextSibling;if(ns){p.insertBefore(n,ns)}else{p.appendChild(n)}return n})},isBlock:function(n){if(n.nodeType&&n.nodeType!==1){return false}n=n.nodeName||n;return/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(n)},replace:function(n,o,k){if(is(o,"array")){n=n.cloneNode(true)
}return this.run(o,function(o){if(k){each(o.childNodes,function(c){n.appendChild(c.cloneNode(true))})}return o.parentNode.replaceChild(n,o)})},toHex:function(s){var c=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(s);function hex(s){s=parseInt(s).toString(16);return s.length>1?s:"0"+s}if(c){s="#"+hex(c[1])+hex(c[2])+hex(c[3]);return s}return s},getClasses:function(){var t=this,cl=[],i,lo={},f=t.settings.class_filter,ov;if(t.classes){return t.classes}function addClasses(s){each(s.imports,function(r){addClasses(r)
});each(s.cssRules||s.rules,function(r){switch(r.type||1){case 1:if(r.selectorText){each(r.selectorText.split(","),function(v){v=v.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(v)||!/\.[\w\-]+$/.test(v)){return }ov=v;v=v.replace(/.*\.([a-z0-9_\-]+).*/i,"$1");if(f&&!(v=f(v,ov))){return }if(!lo[v]){cl.push({"class":v});lo[v]=1}})}break;case 3:addClasses(r.styleSheet);break}})}try{each(t.doc.styleSheets,addClasses)}catch(ex){}if(cl.length>0){t.classes=cl}return cl},run:function(e,f,s){var t=this,o;
if(t.doc&&typeof (e)==="string"){e=t.doc.getElementById(e)}if(!e){return false}s=s||this;if(!e.nodeType&&(e.length||e.length===0)){o=[];each(e,function(e,i){if(e){if(typeof (e)=="string"){e=t.doc.getElementById(e)}o.push(f.call(s,e,i))}});return o}return f.call(s,e)},getAttribs:function(n){var o;n=this.get(n);if(!n){return[]}if(isIE){o=[];if(n.nodeName=="OBJECT"){return n.attributes}n.cloneNode(false).outerHTML.replace(/([a-z0-9\:\-_]+)=/gi,function(a,b){o.push({specified:1,nodeName:b})});return o
}return n.attributes},destroy:function(s){var t=this;t.win=t.doc=t.root=null;if(!s){tinymce.removeUnload(t.destroy)}},_isRes:function(c){return/^(top|left|bottom|right|width|height)/i.test(c)||/;\s*(top|left|bottom|right|width|height)/i.test(c)}});tinymce.DOM=new tinymce.dom.DOMUtils(document,{process_html:0})})();(function(){var E=tinymce.each,C=tinymce.DOM,B=tinymce.isIE,D=tinymce.isWebKit,A;tinymce.create("static tinymce.dom.Event",{inits:[],events:[],add:function(L,M,K,I){var F,G=this,H=G.events,J;
if(L&&L instanceof Array){J=[];E(L,function(N){N=C.get(N);J.push(G.add(N,M,K,I))});return J}L=C.get(L);if(!L){return }F=function(N){N=N||window.event;if(N&&!N.target&&B){N.target=N.srcElement}if(!I){return K(N)}return K.call(I,N)};if(M=="unload"){tinymce.unloads.unshift({func:F});return F}if(M=="init"){if(G.domLoaded){F()}else{G.inits.push(F)}return F}H.push({obj:L,name:M,func:K,cfunc:F,scope:I});G._add(L,M,F);return K},remove:function(K,L,J){var G=this,F=G.events,H=false,I;if(K&&K instanceof Array){I=[];
E(K,function(M){M=C.get(M);I.push(G.remove(M,L,J))});return I}K=C.get(K);E(F,function(N,M){if(N.obj==K&&N.name==L&&(!J||(N.func==J||N.cfunc==J))){F.splice(M,1);G._remove(K,L,N.cfunc);H=true;return false}});return H},clear:function(J){var H=this,F=H.events,G,I;if(J){J=C.get(J);for(G=F.length-1;G>=0;G--){I=F[G];if(I.obj===J){H._remove(I.obj,I.name,I.cfunc);I.obj=I.cfunc=null;F.splice(G,1)}}}},cancel:function(F){if(!F){return false}this.stop(F);return this.prevent(F)},stop:function(F){if(F.stopPropagation){F.stopPropagation()
}else{F.cancelBubble=true}return false},prevent:function(F){if(F.preventDefault){F.preventDefault()}else{F.returnValue=false}return false},_unload:function(){var F=A;E(F.events,function(H,G){F._remove(H.obj,H.name,H.cfunc);H.obj=H.cfunc=null});F.events=[];F=null},_add:function(G,H,F){if(G.attachEvent){G.attachEvent("on"+H,F)}else{if(G.addEventListener){G.addEventListener(H,F,false)}else{G["on"+H]=F}}},_remove:function(H,I,G){if(H){try{if(H.detachEvent){H.detachEvent("on"+I,G)}else{if(H.removeEventListener){H.removeEventListener(I,G,false)
}else{H["on"+I]=null}}}catch(F){}}},_pageInit:function(){var F=A;F._remove(window,"DOMContentLoaded",F._pageInit);F.domLoaded=true;E(F.inits,function(G){G()});F.inits=[]},_wait:function(){var F;if(window.tinyMCE_GZ&&tinyMCE_GZ.loaded){A.domLoaded=1;return }if(B&&document.location.protocol!="https:"){document.write("<script id=__ie_onload defer src='javascript:\"\"';><\/script>");C.get("__ie_onload").onreadystatechange=function(){if(this.readyState=="complete"){A._pageInit();C.get("__ie_onload").onreadystatechange=null
}}}else{A._add(window,"DOMContentLoaded",A._pageInit,A);if(B||D){F=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(F);A._pageInit()}},10)}}}});A=tinymce.dom.Event;A._wait();tinymce.addUnload(A._unload)})();(function(){var A=tinymce.each;tinymce.create("tinymce.dom.Element",{Element:function(F,D){var B=this,E,C;D=D||{};B.id=F;B.dom=E=D.dom||tinymce.DOM;B.settings=D;if(!tinymce.isIE){C=B.dom.get(B.id)}A(["getPos","getRect","getParent","add","setStyle","getStyle","setStyles","setAttrib","setAttribs","getAttrib","addClass","removeClass","hasClass","getOuterHTML","setOuterHTML","remove","show","hide","isHidden","setHTML","get"],function(G){B[G]=function(){var H=arguments,I;
if(tinymce.isOpera){H=[F];A(arguments,function(J){H.push(J)})}else{Array.prototype.unshift.call(H,C||F)}I=E[G].apply(E,H);B.update(G);return I}})},on:function(D,C,B){return tinymce.dom.Event.add(this.id,D,C,B)},getXY:function(){return{x:parseInt(this.getStyle("left")),y:parseInt(this.getStyle("top"))}},getSize:function(){var B=this.dom.get(this.id);return{w:parseInt(this.getStyle("width")||B.clientWidth),h:parseInt(this.getStyle("height")||B.clientHeight)}},moveTo:function(B,C){this.setStyles({left:B,top:C})
},moveBy:function(B,D){var C=this.getXY();this.moveTo(C.x+B,C.y+D)},resizeTo:function(B,C){this.setStyles({width:B,height:C})},resizeBy:function(B,D){var C=this.getSize();this.resizeTo(C.w+B,C.h+D)},update:function(C){var D=this,B,E=D.dom;if(tinymce.isIE6&&D.settings.blocker){C=C||"";if(C.indexOf("get")===0||C.indexOf("has")===0||C.indexOf("is")===0){return }if(C=="remove"){E.remove(D.blocker);return }if(!D.blocker){D.blocker=E.uniqueId();B=E.add(D.settings.container||E.getRoot(),"iframe",{id:D.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'});
E.setStyle(B,"opacity",0)}else{B=E.get(D.blocker)}E.setStyle(B,"left",D.getStyle("left",1));E.setStyle(B,"top",D.getStyle("top",1));E.setStyle(B,"width",D.getStyle("width",1));E.setStyle(B,"height",D.getStyle("height",1));E.setStyle(B,"display",D.getStyle("display",1));E.setStyle(B,"zIndex",parseInt(D.getStyle("zIndex",1)||0)-1)}}})})();(function(){function D(E){return E.replace(/[\n\r]+/g,"")}var B=tinymce.is,A=tinymce.isIE,C=tinymce.each;tinymce.create("tinymce.dom.Selection",{Selection:function(H,G,F){var E=this;
E.dom=H;E.win=G;E.serializer=F;tinymce.addUnload(E.destroy,E)},getContent:function(F){var E=this,G=E.getRng(),K=E.dom.create("body"),I=E.getSel(),H,J,L;F=F||{};H=J="";F.get=true;F.format=F.format||"html";if(F.format=="text"){return E.isCollapsed()?"":(G.text||(I.toString?I.toString():""))}if(G.cloneContents){L=G.cloneContents();if(L){K.appendChild(L)}}else{if(B(G.item)||B(G.htmlText)){K.innerHTML=G.item?G.item(0).outerHTML:G.htmlText}else{K.innerHTML=G.toString()}}if(/^\s/.test(K.innerHTML)){H=" "
}if(/\s+$/.test(K.innerHTML)){J=" "}F.getInner=true;return E.isCollapsed()?"":H+E.serializer.serialize(K,F)+J},setContent:function(G,F){var E=this,H=E.getRng(),J,I=E.win.document;F=F||{format:"html"};F.set=true;G=E.dom.processHTML(G);if(H.insertNode){G+='<span id="__caret">_</span>';H.deleteContents();H.insertNode(E.getRng().createContextualFragment(G));J=E.dom.get("__caret");H=I.createRange();H.setStartBefore(J);H.setEndAfter(J);E.setRng(H);I.execCommand("Delete",false,null);E.dom.remove("__caret")
}else{if(H.item){I.execCommand("Delete",false,null);H=E.getRng()}H.pasteHTML(G)}},getStart:function(){var E=this,F=E.getRng(),G;if(A){if(F.item){return F.item(0)}F=F.duplicate();F.collapse(1);G=F.parentElement();if(G&&G.nodeName=="BODY"){return G.firstChild}return G}else{G=F.startContainer;if(G.nodeName=="BODY"){return G.firstChild}return E.dom.getParent(G,function(H){return H.nodeType==1})}},getEnd:function(){var E=this,F=E.getRng(),G;if(A){if(F.item){return F.item(0)}F=F.duplicate();F.collapse(0);
G=F.parentElement();if(G&&G.nodeName=="BODY"){return G.lastChild}return G}else{G=F.endContainer;if(G.nodeName=="BODY"){return G.lastChild}return E.dom.getParent(G,function(H){return H.nodeType==1})}},getBookmark:function(T){var I=this,L=I.getRng(),E,M,K,Q=I.dom.getViewPort(I.win),R,O,V,N,S=-16777215,J,G=I.dom.getRoot(),F=0,H=0,U;M=Q.x;K=Q.y;if(T=="simple"){return{rng:L,scrollX:M,scrollY:K}}if(A){if(L.item){R=L.item(0);C(I.dom.select(R.nodeName),function(X,W){if(R==X){O=W;return false}});return{tag:R.nodeName,index:O,scrollX:M,scrollY:K}
}E=I.dom.doc.body.createTextRange();E.moveToElementText(G);E.collapse(true);V=Math.abs(E.move("character",S));E=L.duplicate();E.collapse(true);O=Math.abs(E.move("character",S));E=L.duplicate();E.collapse(false);N=Math.abs(E.move("character",S))-O;return{start:O-V,length:N,scrollX:M,scrollY:K}}R=I.getNode();J=I.getSel();if(!J){return null}if(R&&R.nodeName=="IMG"){return{scrollX:M,scrollY:K}}function P(Y,b,X){var W=I.dom.doc.createTreeWalker(Y,NodeFilter.SHOW_TEXT,null,false),c,Z=0,a={};while((c=W.nextNode())!=null){if(c==b){a.start=Z
}if(c==X){a.end=Z;return a}Z+=D(c.nodeValue||"").length}return null}if(J.anchorNode==J.focusNode&&J.anchorOffset==J.focusOffset){R=P(G,J.anchorNode,J.focusNode);if(!R){return{scrollX:M,scrollY:K}}D(J.anchorNode.nodeValue||"").replace(/^\s+/,function(W){F=W.length});return{start:Math.max(R.start+J.anchorOffset-F,0),end:Math.max(R.end+J.focusOffset-F,0),scrollX:M,scrollY:K,beg:J.anchorOffset-F==0}}else{R=P(G,L.startContainer,L.endContainer);if(!R){return{scrollX:M,scrollY:K}}return{start:Math.max(R.start+L.startOffset-F,0),end:Math.max(R.end+L.endOffset-H,0),scrollX:M,scrollY:K,beg:L.startOffset-F==0}
}},moveToBookmark:function(M){var N=this,F=N.getRng(),O=N.getSel(),I=N.dom.getRoot(),L,G,J;function H(P,R,Z){var X=N.dom.doc.createTreeWalker(P,NodeFilter.SHOW_TEXT,null,false),T,Q=0,W={},S,Y,V,U;while((T=X.nextNode())!=null){V=U=0;J=T.nodeValue||"";G=D(J).length;Q+=G;if(Q>=R&&!W.startNode){S=R-(Q-G);if(M.beg&&S>=G){continue}W.startNode=T;W.startOffset=S+U}if(Q>=Z){W.endNode=T;W.endOffset=Z-(Q-G)+U;return W}}return null}if(!M){return false}N.win.scrollTo(M.scrollX,M.scrollY);if(A){if(F=M.rng){try{F.select()
}catch(K){}return true}N.win.focus();if(M.tag){F=I.createControlRange();C(N.dom.select(M.tag),function(Q,P){if(P==M.index){F.addElement(Q)}})}else{try{if(M.start<0){return true}F=O.createRange();F.moveToElementText(I);F.collapse(true);F.moveStart("character",M.start);F.moveEnd("character",M.length)}catch(E){return true}}try{F.select()}catch(K){}return true}if(!O){return false}if(M.rng){O.removeAllRanges();O.addRange(M.rng)}else{if(B(M.start)&&B(M.end)){try{L=H(I,M.start,M.end);if(L){F=N.dom.doc.createRange();
F.setStart(L.startNode,L.startOffset);F.setEnd(L.endNode,L.endOffset);O.removeAllRanges();O.addRange(F)}if(!tinymce.isOpera){N.win.focus()}}catch(K){}}}},select:function(F,K){var O=this,E=O.getRng(),P=O.getSel(),M,L,J,I=O.win.document;function G(Q){return Q?I.createTreeWalker(Q,NodeFilter.SHOW_TEXT,null,false).nextNode():null}function N(T){var S,R,Q;if(!T){return null}Q=I.createTreeWalker(T,NodeFilter.SHOW_TEXT,null,false);while(S=Q.nextNode()){R=S}return R}if(A){try{M=I.body;if(/^(IMG|TABLE)$/.test(F.nodeName)){E=M.createControlRange();
E.addElement(F)}else{E=M.createTextRange();E.moveToElementText(F)}E.select()}catch(H){}}else{if(K){L=G(F);J=N(F);if(L&&J){E=I.createRange();E.setStart(L,0);E.setEnd(J,J.nodeValue.length)}else{E.selectNode(F)}}else{E.selectNode(F)}O.setRng(E)}return F},isCollapsed:function(){var E=this,G=E.getRng(),F=E.getSel();if(!G||G.item){return false}return !F||G.boundingWidth==0||G.collapsed},collapse:function(E){var F=this,G=F.getRng(),H;if(G.item){H=G.item(0);G=this.win.document.body.createTextRange();G.moveToElementText(H)
}G.collapse(!!E);F.setRng(G)},getSel:function(){var F=this,E=this.win;return E.getSelection?E.getSelection():E.document.selection},getRng:function(){var F=this,G=F.getSel(),H;try{if(G){H=G.rangeCount>0?G.getRangeAt(0):(G.createRange?G.createRange():F.win.document.createRange())}}catch(E){}if(!H){H=A?F.win.document.body.createTextRange():F.win.document.createRange()}return H},setRng:function(G){var F;if(!A){F=this.getSel();if(F){F.removeAllRanges();F.addRange(G)}}else{try{G.select()}catch(E){}}},setNode:function(F){var E=this;
E.setContent(E.dom.getOuterHTML(F));return F},getNode:function(){var E=this,G=E.getRng(),F=E.getSel(),H;if(!A){if(!G){return E.dom.getRoot()}H=G.commonAncestorContainer;if(!G.collapsed){if(tinymce.isWebKit&&F.anchorNode&&F.anchorNode.nodeType==1){return F.anchorNode.childNodes[F.anchorOffset]}if(G.startContainer==G.endContainer){if(G.startOffset-G.endOffset<2){if(G.startContainer.hasChildNodes()){H=G.startContainer.childNodes[G.startOffset]}}}}return E.dom.getParent(H,function(I){return I.nodeType==1
})}return G.item?G.item(0):G.parentElement()},destroy:function(F){var E=this;E.win=null;if(!F){tinymce.removeUnload(E.destroy)}}})})();(function(){tinymce.create("tinymce.dom.XMLWriter",{node:null,XMLWriter:function(B){function A(){var D=document.implementation;if(!D||!D.createDocument){try{return new ActiveXObject("MSXML2.DOMDocument")}catch(C){}try{return new ActiveXObject("Microsoft.XmlDom")}catch(C){}}else{return D.createDocument("","",null)}}this.doc=A();this.valid=tinymce.isOpera||tinymce.isWebKit;
this.reset()},reset:function(){var A=this,B=A.doc;if(B.firstChild){B.removeChild(B.firstChild)}A.node=B.appendChild(B.createElement("html"))},writeStartElement:function(B){var A=this;A.node=A.node.appendChild(A.doc.createElement(B))},writeAttribute:function(B,A){if(this.valid){A=A.replace(/>/g,"%MCGT%")}this.node.setAttribute(B,A)},writeEndElement:function(){this.node=this.node.parentNode},writeFullEndElement:function(){var A=this,B=A.node;B.appendChild(A.doc.createTextNode(""));A.node=B.parentNode
},writeText:function(A){if(this.valid){A=A.replace(/>/g,"%MCGT%")}this.node.appendChild(this.doc.createTextNode(A))},writeCDATA:function(A){this.node.appendChild(this.doc.createCDATA(A))},writeComment:function(A){this.node.appendChild(this.doc.createComment(A.replace(/\-\-/g," ")))},getContent:function(){var A;A=this.doc.xml||new XMLSerializer().serializeToString(this.doc);A=A.replace(/<\?[^?]+\?>|<html>|<\/html>|<html\/>|<!DOCTYPE[^>]+>/g,"");A=A.replace(/ ?\/>/g," />");if(this.valid){A=A.replace(/\%MCGT%/g,"&gt;")
}return A}})})();(function(){tinymce.create("tinymce.dom.StringWriter",{str:null,tags:null,count:0,settings:null,indent:null,StringWriter:function(A){this.settings=tinymce.extend({indent_char:" ",indentation:1},A);this.reset()},reset:function(){this.indent="";this.str="";this.tags=[];this.count=0},writeStartElement:function(A){this._writeAttributesEnd();this.writeRaw("<"+A);this.tags.push(A);this.inAttr=true;this.count++;this.elementCount=this.count},writeAttribute:function(C,A){var B=this;B.writeRaw(" "+B.encode(C)+'="'+B.encode(A)+'"')
},writeEndElement:function(){var A;if(this.tags.length>0){A=this.tags.pop();if(this._writeAttributesEnd(1)){this.writeRaw("</"+A+">")}if(this.settings.indentation>0){this.writeRaw("\n")}}},writeFullEndElement:function(){if(this.tags.length>0){this._writeAttributesEnd();this.writeRaw("</"+this.tags.pop()+">");if(this.settings.indentation>0){this.writeRaw("\n")}}},writeText:function(A){this._writeAttributesEnd();this.writeRaw(this.encode(A));this.count++},writeCDATA:function(A){this._writeAttributesEnd();
this.writeRaw("<![CDATA["+A+"]]>");this.count++},writeComment:function(A){this._writeAttributesEnd();this.writeRaw("<!-- "+A+"-->");this.count++},writeRaw:function(A){this.str+=A},encode:function(A){return A.replace(/[<>&"]/g,function(B){switch(B){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";case'"':return"&quot;"}return B})},getContent:function(){return this.str},_writeAttributesEnd:function(A){if(!this.inAttr){return }this.inAttr=false;if(A&&this.elementCount==this.count){this.writeRaw(" />");
return false}this.writeRaw(">");return true}})})();(function(){var G=tinymce.extend,E=tinymce.each,B=tinymce.util.Dispatcher,D=tinymce.isIE,A=tinymce.isGecko;function F(I){var H=[];if(I.nodeName=="OBJECT"){return I.attributes}I.cloneNode(false).outerHTML.replace(/([a-z0-9\:\-_]+)=/gi,function(K,J){H.push({specified:1,nodeName:J})});return H}function C(H){return H.replace(/([?+*])/g,".$1")}tinymce.create("tinymce.dom.Serializer",{Serializer:function(J){var I=this;I.key=0;I.onPreProcess=new B(I);I.onPostProcess=new B(I);
if(tinymce.relaxedDomain&&tinymce.isGecko){I.writer=new tinymce.dom.StringWriter()}else{try{I.writer=new tinymce.dom.XMLWriter()}catch(H){I.writer=new tinymce.dom.StringWriter()}}I.settings=J=G({dom:tinymce.DOM,valid_nodes:0,node_filter:0,attr_filter:0,invalid_attrs:/^(mce_|_moz_)/,closed:/(br|hr|input|meta|img|link|param)/,entity_encoding:"named",entities:"160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro",valid_elements:"*[*]",extended_valid_elements:0,valid_child_elements:0,invalid_elements:0,fix_table_elements:0,fix_list_elements:true,fix_content_duplication:true,convert_fonts_to_spans:false,font_size_classes:0,font_size_style_values:0,apply_source_formatting:0,indent_mode:"simple",indent_char:"\t",indent_levels:1,remove_linebreaks:1,remove_redundant_brs:1},J);
I.dom=J.dom;if(J.remove_redundant_brs){I.onPostProcess.add(function(K,L){L.content=L.content.replace(/<br \/>(\s*<\/li>)/g,"$1")})}if(J.fix_list_elements){I.onPreProcess.add(function(R,O){var L,T,S=["ol","ul"],Q,P,N,K=/^(OL|UL)$/,U;function M(X,Y){var V=Y.split(","),W;while((X=X.previousSibling)!=null){for(W=0;W<V.length;W++){if(X.nodeName==V[W]){return X}}}return null}for(T=0;T<S.length;T++){L=I.dom.select(S[T],O.node);for(Q=0;Q<L.length;Q++){P=L[Q];N=P.parentNode;if(K.test(N.nodeName)){U=M(P,"LI");
if(!U){U=I.dom.create("li");U.innerHTML="&nbsp;";U.appendChild(P);N.insertBefore(U,N.firstChild)}else{U.appendChild(P)}}}}})}if(J.fix_table_elements){I.onPreProcess.add(function(K,L){E(I.dom.select("table",L.node),function(S){var R=I.dom.getParent(S,"H1,H2,H3,H4,H5,H6,P"),N,T,M,Q=[],O,P;if(R){N=R.cloneNode(false);Q.push(S);for(T=S;T=T.parentNode;){Q.push(T);if(T==R){break}}M=N;for(O=Q.length-1;O>=0;O--){if(O==Q.length-1){while(P=Q[O-1].nextSibling){M.appendChild(P.parentNode.removeChild(P))}}else{T=Q[O].cloneNode(false);
if(O!=0){while(P=Q[O-1].nextSibling){T.appendChild(P.parentNode.removeChild(P))}}M=M.appendChild(T)}}S=I.dom.insertAfter(S.parentNode.removeChild(S),R);I.dom.insertAfter(S,R);I.dom.insertAfter(N,S)}})})}},setEntities:function(N){var L=this,I,K,H={},M="",J;if(L.entityLookup){return }I=N.split(",");for(K=0;K<I.length;K+=2){J=I[K];if(J==34||J==38||J==60||J==62){continue}H[String.fromCharCode(I[K])]=I[K+1];J=parseInt(I[K]).toString(16);M+="\\u"+"0000".substring(J.length)+J}if(!M){L.settings.entity_encoding="raw";
return }L.entitiesRE=new RegExp("["+M+"]","g");L.entityLookup=H},setValidChildRules:function(H){this.childRules=null;this.addValidChildRules(H)},addValidChildRules:function(K){var J=this,L,H,I;if(!K){return }L="A|BR|SPAN|BDO|MAP|OBJECT|IMG|TT|I|B|BIG|SMALL|EM|STRONG|DFN|CODE|Q|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|SUB|SUP|#text|#comment";H="A|BR|SPAN|BDO|OBJECT|APPLET|IMG|MAP|IFRAME|TT|I|B|U|S|STRIKE|BIG|SMALL|FONT|BASEFONT|EM|STRONG|DFN|CODE|Q|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|SUB|SUP|INPUT|SELECT|TEXTAREA|LABEL|BUTTON|#text|#comment";
I="H[1-6]|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|FORM|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP";E(K.split(","),function(N){var O=N.split(/\[|\]/),M;N="";E(O[1].split("|"),function(P){if(N){N+="|"}switch(P){case"%itrans":P=H;break;case"%itrans_na":P=H.substring(2);break;case"%istrict":P=L;break;case"%istrict_na":P=L.substring(2);break;case"%btrans":P=I;break;case"%bstrict":P=I;break}N+=P});M=new RegExp("^("+N.toLowerCase()+")$","i");E(O[0].split("/"),function(P){J.childRules=J.childRules||{};
J.childRules[P]=M})});K="";E(J.childRules,function(N,M){if(K){K+="|"}K+=M});J.parentElementsRE=new RegExp("^("+K.toLowerCase()+")$","i")},setRules:function(I){var H=this;H._setup();H.rules={};H.wildRules=[];H.validElements={};return H.addRules(I)},addRules:function(I){var H=this,J;if(!I){return }H._setup();E(I.split(","),function(M){var P=M.split(/\[|\]/),L=P[0].split("/"),Q,K,O,N=[];if(J){K=tinymce.extend([],J.attribs)}if(P.length>1){E(P[1].split("|"),function(T){var R={},S;K=K||[];T=T.replace(/::/g,"~");
T=/^([!\-])?([\w*.?~_\-]+|)([=:<])?(.+)?$/.exec(T);T[2]=T[2].replace(/~/g,":");if(T[1]=="!"){Q=Q||[];Q.push(T[2])}if(T[1]=="-"){for(S=0;S<K.length;S++){if(K[S].name==T[2]){K.splice(S,1);return }}}switch(T[3]){case"=":R.defaultVal=T[4]||"";break;case":":R.forcedVal=T[4];break;case"<":R.validVals=T[4].split("?");break}if(/[*.?]/.test(T[2])){O=O||[];R.nameRE=new RegExp("^"+C(T[2])+"$");O.push(R)}else{R.name=T[2];K.push(R)}N.push(T[2])})}E(L,function(U,T){var V=U.charAt(0),S=1,R={};if(J){if(J.noEmpty){R.noEmpty=J.noEmpty
}if(J.fullEnd){R.fullEnd=J.fullEnd}if(J.padd){R.padd=J.padd}}switch(V){case"-":R.noEmpty=true;break;case"+":R.fullEnd=true;break;case"#":R.padd=true;break;default:S=0}L[T]=U=U.substring(S);H.validElements[U]=1;if(/[*.?]/.test(L[0])){R.nameRE=new RegExp("^"+C(L[0])+"$");H.wildRules=H.wildRules||{};H.wildRules.push(R)}else{R.name=L[0];if(L[0]=="@"){J=R}H.rules[U]=R}R.attribs=K;if(Q){R.requiredAttribs=Q}if(O){U="";E(N,function(W){if(U){U+="|"}U+="("+C(W)+")"});R.validAttribsRE=new RegExp("^"+U.toLowerCase()+"$");
R.wildAttribs=O}})});I="";E(H.validElements,function(L,K){if(I){I+="|"}if(K!="@"){I+=K}});H.validElementsRE=new RegExp("^("+C(I.toLowerCase())+")$")},findRule:function(L){var I=this,K=I.rules,H,J;I._setup();J=K[L];if(J){return J}K=I.wildRules;for(H=0;H<K.length;H++){if(K[H].nameRE.test(L)){return K[H]}}return null},findAttribRule:function(H,K){var I,J=H.wildAttribs;for(I=0;I<J.length;I++){if(J[I].nameRE.test(K)){return J[I]}}return null},serialize:function(K,J){var I,H=this;H._setup();J=J||{};J.format=J.format||"html";
H.processObj=J;K=K.cloneNode(true);H.key=""+(parseInt(H.key)+1);if(!J.no_events){J.node=K;H.onPreProcess.dispatch(H,J)}H.writer.reset();H._serializeNode(K,J.getInner);J.content=H.writer.getContent();if(!J.no_events){H.onPostProcess.dispatch(H,J)}H._postProcess(J);J.node=null;return tinymce.trim(J.content)},_postProcess:function(M){var H=this,J=H.settings,I=M.content,L=[],K;if(M.format=="html"){K=H._protect({content:I,patterns:[{pattern:/(<script[^>]*>)(.*?)(<\/script>)/g},{pattern:/(<style[^>]*>)(.*?)(<\/style>)/g},{pattern:/(<pre[^>]*>)(.*?)(<\/pre>)/g,encode:1},{pattern:/(<!--\[CDATA\[)(.*?)(\]\]-->)/g}]});
I=K.content;if(J.entity_encoding!=="raw"){I=H._encode(I)}if(!M.set){I=I.replace(/<p>\s+<\/p>|<p([^>]+)>\s+<\/p>/g,J.entity_encoding=="numeric"?"<p$1>&#160;</p>":"<p$1>&nbsp;</p>");if(J.remove_linebreaks){I=I.replace(/\r?\n|\r/g," ");I=I.replace(/(<[^>]+>)\s+/g,"$1 ");I=I.replace(/\s+(<\/[^>]+>)/g," $1");I=I.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object) ([^>]+)>\s+/g,"<$1 $2>");I=I.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>\s+/g,"<$1>");
I=I.replace(/\s+<\/(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>/g,"</$1>")}if(J.apply_source_formatting&&J.indent_mode=="simple"){I=I.replace(/<(\/?)(ul|hr|table|meta|link|tbody|tr|object|body|head|html|map)(|[^>]+)>\s*/g,"\n<$1$2$3>\n");I=I.replace(/\s*<(p|h[1-6]|blockquote|div|title|style|pre|script|td|li|area)(|[^>]+)>/g,"\n<$1$2>");I=I.replace(/<\/(p|h[1-6]|blockquote|div|title|style|pre|script|td|li)>\s*/g,"</$1>\n");I=I.replace(/\n\n/g,"\n")
}}I=H._unprotect(I,K);I=I.replace(/<!--\[CDATA\[([\s\S]+)\]\]-->/g,"<![CDATA[$1]]>");if(J.entity_encoding=="raw"){I=I.replace(/<p>&nbsp;<\/p>|<p([^>]+)>&nbsp;<\/p>/g,"<p$1>\u00a0</p>")}}M.content=I},_serializeNode:function(V,K){var R=this,S=R.settings,P=R.writer,M,I,O,X,W,Y,T,H,Q,J,N,U,L;if(!S.node_filter||S.node_filter(V)){switch(V.nodeType){case 1:if(V.hasAttribute?V.hasAttribute("mce_bogus"):V.getAttribute("mce_bogus")){return }L=false;M=V.hasChildNodes();J=V.getAttribute("mce_name")||V.nodeName.toLowerCase();
if(D){if(V.scopeName!=="HTML"&&V.scopeName!=="html"){J=V.scopeName+":"+J}}if(J.indexOf("mce:")===0){J=J.substring(4)}if(!R.validElementsRE.test(J)||(R.invalidElementsRE&&R.invalidElementsRE.test(J))||K){L=true;break}if(D){if(S.fix_content_duplication){if(V.mce_serialized==R.key){return }V.mce_serialized=R.key}if(J.charAt(0)=="/"){J=J.substring(1)}}else{if(A){if(V.nodeName==="BR"&&V.getAttribute("type")=="_moz"){return }}}if(R.childRules){if(R.parentElementsRE.test(R.elementName)){if(!R.childRules[R.elementName].test(J)){L=true;
break}}R.elementName=J}N=R.findRule(J);J=N.name||J;if((!M&&N.noEmpty)||(D&&!J)){L=true;break}if(N.requiredAttribs){Y=N.requiredAttribs;for(X=Y.length-1;X>=0;X--){if(this.dom.getAttrib(V,Y[X])!==""){break}}if(X==-1){L=true;break}}P.writeStartElement(J);if(N.attribs){for(X=0,T=N.attribs,W=T.length;X<W;X++){Y=T[X];Q=R._getAttrib(V,Y);if(Q!==null){P.writeAttribute(Y.name,Q)}}}if(N.validAttribsRE){T=D?F(V):V.attributes;for(X=T.length-1;X>-1;X--){H=T[X];if(H.specified){Y=H.nodeName.toLowerCase();if(S.invalid_attrs.test(Y)||!N.validAttribsRE.test(Y)){continue
}U=R.findAttribRule(N,Y);Q=R._getAttrib(V,U,Y);if(Q!==null){P.writeAttribute(Y,Q)}}}}if(!M&&N.padd){P.writeText("\u00a0")}break;case 3:if(R.childRules&&R.parentElementsRE.test(R.elementName)){if(!R.childRules[R.elementName].test(V.nodeName)){return }}return P.writeText(V.nodeValue);case 4:return P.writeCDATA(V.nodeValue);case 8:return P.writeComment(V.nodeValue)}}else{if(V.nodeType==1){M=V.hasChildNodes()}}if(M){O=V.firstChild;while(O){R._serializeNode(O);R.elementName=J;O=O.nextSibling}}if(!L){if(M||!S.closed.test(J)){P.writeFullEndElement()
}else{P.writeEndElement()}}},_protect:function(J){var I=this;J.items=J.items||[];function H(L){return L.replace(/[\r\n\\]/g,function(M){if(M==="\n"){return"\\n"}else{if(M==="\\"){return"\\\\"}}return"\\r"})}function K(L){return L.replace(/\\[\\rn]/g,function(M){if(M==="\\n"){return"\n"}else{if(M==="\\\\"){return"\\"}}return"\r"})}E(J.patterns,function(L){J.content=K(H(J.content).replace(L.pattern,function(N,O,M,P){M=K(M);if(L.encode){M=I._encode(M)}J.items.push(M);return O+"<!--mce:"+(J.items.length-1)+"-->"+P
}))});return J},_unprotect:function(H,I){H=H.replace(/\<!--mce:([0-9]+)--\>/g,function(K,J){return I.items[parseInt(J)]});I.items=[];return H},_encode:function(K){var I=this,J=I.settings,H;if(J.entity_encoding!=="raw"){if(J.entity_encoding.indexOf("named")!=-1){I.setEntities(J.entities);H=I.entityLookup;K=K.replace(I.entitiesRE,function(L){var M;if(M=H[L]){L="&"+M+";"}return L})}if(J.entity_encoding.indexOf("numeric")!=-1){K=K.replace(/[\u007E-\uFFFF]/g,function(L){return"&#"+L.charCodeAt(0)+";"})
}}return K},_setup:function(){var H=this,I=this.settings;if(H.done){return }H.done=1;H.setRules(I.valid_elements);H.addRules(I.extended_valid_elements);H.addValidChildRules(I.valid_child_elements);if(I.invalid_elements){H.invalidElementsRE=new RegExp("^("+C(I.invalid_elements.replace(/,/g,"|").toLowerCase())+")$")}if(I.attrib_value_filter){H.attribValueFilter=I.attribValueFilter}},_getAttrib:function(L,I,H){var K,J;H=H||I.name;if(I.forcedVal&&(J=I.forcedVal)){if(J==="{$uid}"){return this.dom.uniqueId()
}return J}J=this.dom.getAttrib(L,H);switch(H){case"rowspan":case"colspan":if(J=="1"){J=""}break}if(this.attribValueFilter){J=this.attribValueFilter(H,J,L)}if(I.validVals){for(K=I.validVals.length-1;K>=0;K--){if(J==I.validVals[K]){break}}if(K==-1){return null}}if(J===""&&typeof (I.defaultVal)!="undefined"){J=I.defaultVal;if(J==="{$uid}"){return this.dom.uniqueId()}return J}else{if(H=="class"&&this.processObj.get){J=J.replace(/\s?mceItem\w+\s?/g,"")}}if(J===""){return null}return J}})})();(function(){var each=tinymce.each;
tinymce.create("tinymce.dom.ScriptLoader",{ScriptLoader:function(s){this.settings=s||{};this.queue=[];this.lookup={}},isDone:function(u){return this.lookup[u]?this.lookup[u].state==2:0},markDone:function(u){this.lookup[u]={state:2,url:u}},add:function(u,cb,s,pr){var t=this,lo=t.lookup,o;if(o=lo[u]){if(cb&&o.state==2){cb.call(s||this)}return o}o={state:0,url:u,func:cb,scope:s||this};if(pr){t.queue.unshift(o)}else{t.queue.push(o)}lo[u]=o;return o},load:function(u,cb,s){var t=this,o;if(o=t.lookup[u]){if(cb&&o.state==2){cb.call(s||t)
}return o}function loadScript(u){if(tinymce.dom.Event.domLoaded||t.settings.strict_mode){tinymce.util.XHR.send({url:tinymce._addVer(u),error:t.settings.error,async:false,success:function(co){t.eval(co)}})}else{document.write('<script type="text/javascript" src="'+tinymce._addVer(u)+'"><\/script>')}}if(!tinymce.is(u,"string")){each(u,function(u){loadScript(u)});if(cb){cb.call(s||t)}}else{loadScript(u);if(cb){cb.call(s||t)}}},loadQueue:function(cb,s){var t=this;if(!t.queueLoading){t.queueLoading=1;
t.queueCallbacks=[];t.loadScripts(t.queue,function(){t.queueLoading=0;if(cb){cb.call(s||t)}each(t.queueCallbacks,function(o){o.func.call(o.scope)})})}else{if(cb){t.queueCallbacks.push({func:cb,scope:s||t})}}},eval:function(co){var w=window;if(!w.execScript){try{eval.call(w,co)}catch(ex){eval(co,w)}}else{w.execScript(co)}},loadScripts:function(sc,cb,s){var t=this,lo=t.lookup;function done(o){o.state=2;if(o.func){o.func.call(o.scope||t)}}function allDone(){var l;l=sc.length;each(sc,function(o){o=lo[o.url];
if(o.state===2){done(o);l--}else{load(o)}});if(l===0&&cb){cb.call(s||t);cb=0}}function load(o){if(o.state>0){return }o.state=1;tinymce.util.XHR.send({url:o.url,error:t.settings.error,success:function(co){t.eval(co);done(o);allDone()}})}each(sc,function(o){var u=o.url;if(!lo[u]){lo[u]=o;t.queue.push(o)}else{o=lo[u]}if(o.state>0){return }if(!tinymce.dom.Event.domLoaded&&!t.settings.strict_mode){var ix,ol="";if(cb||o.func){o.state=1;ix=tinymce.dom.ScriptLoader._addOnLoad(function(){done(o);allDone()
});if(tinymce.isIE){ol=' onreadystatechange="'}else{ol=' onload="'}ol+="tinymce.dom.ScriptLoader._onLoad(this,'"+u+"',"+ix+');"'}document.write('<script type="text/javascript" src="'+tinymce._addVer(u)+'"'+ol+"><\/script>");if(!o.func){done(o)}}else{load(o)}});allDone()},"static":{_addOnLoad:function(f){var t=this;t._funcs=t._funcs||[];t._funcs.push(f);return t._funcs.length-1},_onLoad:function(e,u,ix){if(!tinymce.isIE||e.readyState=="complete"){this._funcs[ix].call(this)}}}});tinymce.ScriptLoader=new tinymce.dom.ScriptLoader()
})();(function(){var B=tinymce.DOM,A=tinymce.is;tinymce.create("tinymce.ui.Control",{Control:function(D,C){this.id=D;this.settings=C=C||{};this.rendered=false;this.onRender=new tinymce.util.Dispatcher(this);this.classPrefix="";this.scope=C.scope||this;this.disabled=0;this.active=0},setDisabled:function(C){var D;if(C!=this.disabled){D=B.get(this.id);if(D&&this.settings.unavailable_prefix){if(C){this.prevTitle=D.title;D.title=this.settings.unavailable_prefix+": "+D.title}else{D.title=this.prevTitle
}}this.setState("Disabled",C);this.setState("Enabled",!C);this.disabled=C}},isDisabled:function(){return this.disabled},setActive:function(C){if(C!=this.active){this.setState("Active",C);this.active=C}},isActive:function(){return this.active},setState:function(E,C){var D=B.get(this.id);E=this.classPrefix+E;if(C){B.addClass(D,E)}else{B.removeClass(D,E)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(C){B.setHTML(C,this.renderHTML())},postRender:function(){var D=this,C;
if(A(D.disabled)){C=D.disabled;D.disabled=-1;D.setDisabled(C)}if(A(D.active)){C=D.active;D.active=-1;D.setActive(C)}},remove:function(){B.remove(this.id);this.destroy()},destroy:function(){tinymce.dom.Event.clear(this.id)}})})();tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(B,A){this.parent(B,A);this.controls=[];this.lookup={}},add:function(A){this.lookup[A.id]=A;this.controls.push(A);return A},get:function(A){return this.lookup[A]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(B,A){this.parent(B,A);
this.classPrefix="mceSeparator"},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix})}});(function(){var C=tinymce.is,B=tinymce.DOM,D=tinymce.each,A=tinymce.walk;tinymce.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(F,E){this.parent(F,E);this.classPrefix="mceMenuItem"},setSelected:function(E){this.setState("Selected",E);this.selected=E},isSelected:function(){return this.selected},postRender:function(){var E=this;E.parent();if(C(E.selected)){E.setSelected(E.selected)
}}})})();(function(){var C=tinymce.is,B=tinymce.DOM,D=tinymce.each,A=tinymce.walk;tinymce.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(G,F){var E=this;E.parent(G,F);E.items={};E.collapsed=false;E.menuCount=0;E.onAddItem=new tinymce.util.Dispatcher(this)},expand:function(F){var E=this;if(F){A(E,function(G){if(G.expand){G.expand()}},"items",E)}E.collapsed=false},collapse:function(F){var E=this;if(F){A(E,function(G){if(G.collapse){G.collapse()}},"items",E)}E.collapsed=true},isCollapsed:function(){return this.collapsed
},add:function(E){if(!E.settings){E=new tinymce.ui.MenuItem(E.id||B.uniqueId(),E)}this.onAddItem.dispatch(this,E);return this.items[E.id]=E},addSeparator:function(){return this.add({separator:true})},addMenu:function(E){if(!E.collapse){E=this.createMenu(E)}this.menuCount++;return this.add(E)},hasMenus:function(){return this.menuCount!==0},remove:function(E){delete this.items[E.id]},removeAll:function(){var E=this;A(E,function(F){if(F.removeAll){F.removeAll()}else{F.remove()}F.destroy()},"items",E);
E.items={}},createMenu:function(F){var E=new tinymce.ui.Menu(F.id||B.uniqueId(),F);E.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return E}})})();(function(){var D=tinymce.is,C=tinymce.DOM,E=tinymce.each,A=tinymce.dom.Event,B=tinymce.dom.Element;tinymce.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(G,F){F=F||{};F.container=F.container||C.doc.body;F.offset_x=F.offset_x||0;F.offset_y=F.offset_y||0;F.vp_offset_x=F.vp_offset_x||0;F.vp_offset_y=F.vp_offset_y||0;if(D(F.icons)&&!F.icons){F["class"]+=" mceNoIcons"
}this.parent(G,F);this.onShowMenu=new tinymce.util.Dispatcher(this);this.onHideMenu=new tinymce.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(I){var G=this,H=G.settings,F;I.container=I.container||H.container;I.parent=G;I.constrain=I.constrain||H.constrain;I["class"]=I["class"]||H["class"];I.vp_offset_x=I.vp_offset_x||H.vp_offset_x;I.vp_offset_y=I.vp_offset_y||H.vp_offset_y;F=new tinymce.ui.DropMenu(I.id||C.uniqueId(),I);F.onAddItem.add(G.onAddItem.dispatch,G.onAddItem);return F
},update:function(){var H=this,I=H.settings,F=C.get("menu_"+H.id+"_tbl"),K=C.get("menu_"+H.id+"_co"),G,J;G=I.max_width?Math.min(F.clientWidth,I.max_width):F.clientWidth;J=I.max_height?Math.min(F.clientHeight,I.max_height):F.clientHeight;if(!C.boxModel){H.element.setStyles({width:G+2,height:J+2})}else{H.element.setStyles({width:G,height:J})}if(I.max_width){C.setStyle(K,"width",G)}if(I.max_height){C.setStyle(K,"height",J);if(F.clientHeight<I.max_height){C.setStyle(K,"overflow","hidden")}}},showMenu:function(N,L,P){var S=this,T=S.settings,M,F=C.getViewPort(),Q,J,R,O,G=2,I,H,K=S.classPrefix;
S.collapse(1);if(S.isMenuVisible){return }if(!S.rendered){M=C.add(S.settings.container,S.renderNode());E(S.items,function(U){U.postRender()});S.element=new B("menu_"+S.id,{blocker:1,container:T.container})}else{M=C.get("menu_"+S.id)}if(!tinymce.isOpera){C.setStyles(M,{left:-65535,top:-65535})}C.show(M);S.update();N+=T.offset_x||0;L+=T.offset_y||0;F.w-=4;F.h-=4;if(T.constrain){Q=M.clientWidth-G;J=M.clientHeight-G;R=F.x+F.w;O=F.y+F.h;if((N+T.vp_offset_x+Q)>R){N=P?P-Q:Math.max(0,(R-T.vp_offset_x)-Q)
}if((L+T.vp_offset_y+J)>O){L=Math.max(0,(O-T.vp_offset_y)-J)}}C.setStyles(M,{left:N,top:L});S.element.update();S.isMenuVisible=1;S.mouseClickFunc=A.add(M,"click",function(V){var U;V=V.target;if(V&&(V=C.getParent(V,"TR"))&&!C.hasClass(V,K+"ItemSub")){U=S.items[V.id];if(U.isDisabled()){return }I=S;while(I){if(I.hideMenu){I.hideMenu()}I=I.settings.parent}if(U.settings.onclick){U.settings.onclick(V)}return A.cancel(V)}});if(S.hasMenus()){S.mouseOverFunc=A.add(M,"mouseover",function(X){var U,W,V;X=X.target;
if(X&&(X=C.getParent(X,"TR"))){U=S.items[X.id];if(S.lastMenu){S.lastMenu.collapse(1)}if(U.isDisabled()){return }if(X&&C.hasClass(X,K+"ItemSub")){W=C.getRect(X);U.showMenu((W.x+W.w-G),W.y-G,W.x);S.lastMenu=U;C.addClass(C.get(U.id).firstChild,K+"ItemActive")}}})}S.onShowMenu.dispatch(S);if(T.keyboard_focus){A.add(M,"keydown",S._keyHandler,S);C.select("a","menu_"+S.id)[0].focus();S._focusIdx=0}},hideMenu:function(I){var F=this,H=C.get("menu_"+F.id),G;if(!F.isMenuVisible){return }A.remove(H,"mouseover",F.mouseOverFunc);
A.remove(H,"click",F.mouseClickFunc);A.remove(H,"keydown",F._keyHandler);C.hide(H);F.isMenuVisible=0;if(!I){F.collapse(1)}if(F.element){F.element.hide()}if(G=C.get(F.id)){C.removeClass(G.firstChild,F.classPrefix+"ItemActive")}F.onHideMenu.dispatch(F)},add:function(H){var F=this,G;H=F.parent(H);if(F.isRendered&&(G=C.get("menu_"+F.id))){F._add(C.select("tbody",G)[0],H)}return H},collapse:function(F){this.parent(F);this.hideMenu(1)},remove:function(F){C.remove(F.id);this.destroy();return this.parent(F)
},destroy:function(){var F=this,G=C.get("menu_"+F.id);A.remove(G,"mouseover",F.mouseOverFunc);A.remove(G,"click",F.mouseClickFunc);if(F.element){F.element.remove()}C.remove(G)},renderNode:function(){var H=this,I=H.settings,K,G,J,F;F=C.create("div",{id:"menu_"+H.id,"class":I["class"],style:"position:absolute;left:0;top:0;z-index:200000"});J=C.add(F,"div",{id:"menu_"+H.id+"_co","class":H.classPrefix+(I["class"]?" "+I["class"]:"")});H.element=new B("menu_"+H.id,{blocker:1,container:I.container});if(I.menu_line){C.add(J,"span",{"class":H.classPrefix+"Line"})
}K=C.add(J,"table",{id:"menu_"+H.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});G=C.add(K,"tbody");E(H.items,function(L){H._add(G,L)});H.rendered=true;return F},_keyHandler:function(I){var H=this,G=I.keyCode;function F(L){var J=H._focusIdx+L,K=C.select("a","menu_"+H.id)[J];if(K){H._focusIdx=J;K.focus()}}switch(G){case 38:F(-1);return ;case 40:F(1);return ;case 13:return ;case 27:return this.hideMenu()}},_add:function(G,L){var M,I=L.settings,F,J,H,K=this.classPrefix;if(I.separator){J=C.add(G,"tr",{id:L.id,"class":K+"ItemSeparator"});
C.add(J,"td",{"class":K+"ItemSeparator"});if(M=J.previousSibling){C.addClass(M,"mceLast")}return }M=J=C.add(G,"tr",{id:L.id,"class":K+"Item "+K+"ItemEnabled"});M=H=C.add(M,"td");M=F=C.add(M,"a",{href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});C.addClass(H,I["class"]);C.add(M,"span",{"class":"mceIcon"+(I.icon?" mce_"+I.icon:"")});M=C.add(M,I.element||"span",{"class":"mceText",title:L.settings.title},L.settings.title);if(L.settings.style){C.setAttrib(M,"style",L.settings.style)
}if(G.childNodes.length==1){C.addClass(J,"mceFirst")}if((M=J.previousSibling)&&C.hasClass(M,K+"ItemSeparator")){C.addClass(J,"mceFirst")}if(L.collapse){C.addClass(J,K+"ItemSub")}if(M=J.previousSibling){C.removeClass(M,"mceLast")}C.addClass(J,"mceLast")}})})();(function(){var A=tinymce.DOM;tinymce.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(C,B){this.parent(C,B);this.classPrefix="mceButton"},renderHTML:function(){var E=this.classPrefix,D=this.settings,C,B;B=A.encode(D.label||"");
C='<a id="'+this.id+'" href="javascript:;" class="'+E+" "+E+"Enabled "+D["class"]+(B?" "+E+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" title="'+A.encode(D.title)+'">';if(D.image){C+='<img class="mceIcon" src="'+D.image+'" />'+B+"</a>"}else{C+='<span class="mceIcon '+D["class"]+'"></span>'+(B?'<span class="'+E+'Label">'+B+"</span>":"")+"</a>"}return C},postRender:function(){var B=this,C=B.settings;tinymce.dom.Event.add(B.id,"click",function(D){if(!B.isDisabled()){return C.onclick.call(C.scope,D)
}})}})})();(function(){var C=tinymce.DOM,B=tinymce.dom.Event,D=tinymce.each,A=tinymce.util.Dispatcher;tinymce.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(G,F){var E=this;E.parent(G,F);E.items=[];E.onChange=new A(E);E.onPostRender=new A(E);E.onAdd=new A(E);E.onRenderMenu=new tinymce.util.Dispatcher(this);E.classPrefix="mceListBox"},select:function(E){var F=this,H,G;if(E!=F.selectedValue){H=C.get(F.id+"_text");F.selectedValue=E;D(F.items,function(I){if(I.value==E){C.setHTML(H,C.encode(I.title));
G=1;return false}});if(!G){C.setHTML(H,C.encode(F.settings.title));C.addClass(H,"mceTitle");H=0;return }else{C.removeClass(H,"mceTitle")}}H=0},add:function(H,E,G){var F=this;G=G||{};G=tinymce.extend(G,{title:H,value:E});F.items.push(G);F.onAdd.dispatch(F,G)},getLength:function(){return this.items.length},renderHTML:function(){var G="",E=this,F=E.settings,H=E.classPrefix;G='<table id="'+E.id+'" cellpadding="0" cellspacing="0" class="'+H+" "+H+"Enabled"+(F["class"]?(" "+F["class"]):"")+'"><tbody><tr>';
G+="<td>"+C.createHTML("a",{id:E.id+"_text",href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},C.encode(E.settings.title))+"</td>";G+="<td>"+C.createHTML("a",{id:E.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},"<span></span>")+"</td>";G+="</tr></tbody></table>";return G},showMenu:function(){var F=this,I,H,G=C.get(this.id),E;if(F.isDisabled()||F.items.length==0){return }if(F.menu&&F.menu.isMenuVisible){return F.hideMenu()
}if(!F.isMenuRendered){F.renderMenu();F.isMenuRendered=true}I=C.getPos(this.settings.menu_container);H=C.getPos(G);E=F.menu;E.settings.offset_x=H.x;E.settings.offset_y=H.y;E.settings.keyboard_focus=!tinymce.isOpera;if(F.oldID){E.items[F.oldID].setSelected(0)}D(F.items,function(J){if(J.value===F.selectedValue){E.items[J.id].setSelected(1);F.oldID=J.id}});E.showMenu(0,G.clientHeight);B.add(C.doc,"mousedown",F.hideMenu,F);C.addClass(F.id,F.classPrefix+"Selected")},hideMenu:function(F){var E=this;if(F&&F.type=="mousedown"&&(F.target.id==E.id+"_text"||F.target.id==E.id+"_open")){return 
}if(!F||!C.getParent(F.target,function(G){return C.hasClass(G,"mceMenu")})){C.removeClass(E.id,E.classPrefix+"Selected");B.remove(C.doc,"mousedown",E.hideMenu,E);if(E.menu){E.menu.hideMenu()}}},renderMenu:function(){var F=this,E;E=F.settings.control_manager.createDropMenu(F.id+"_menu",{menu_line:1,"class":F.classPrefix+"Menu mceNoIcons",max_width:150,max_height:150});E.onHideMenu.add(F.hideMenu,F);E.add({title:F.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(F.settings.onselect("")!==false){F.select("")
}}});D(F.items,function(G){G.id=C.uniqueId();G.onclick=function(){if(F.settings.onselect(G.value)!==false){F.select(G.value)}};E.add(G)});F.onRenderMenu.dispatch(F,E);F.menu=E},postRender:function(){var E=this,F=E.classPrefix;B.add(E.id,"click",E.showMenu,E);B.add(E.id+"_text","focus",function(G){if(!E._focused){E.keyDownHandler=B.add(E.id+"_text","keydown",function(K){var H=-1,I,J=K.keyCode;D(E.items,function(L,M){if(E.selectedValue==L.value){H=M}});if(J==38){I=E.items[H-1]}else{if(J==40){I=E.items[H+1]
}else{if(J==13){I=E.selectedValue;E.selectedValue=null;E.settings.onselect(I);return B.cancel(K)}}}if(I){E.hideMenu();E.select(I.value)}})}E._focused=1});B.add(E.id+"_text","blur",function(){B.remove(E.id+"_text","keydown",E.keyDownHandler);E._focused=0});if(tinymce.isIE6||!C.boxModel){B.add(E.id,"mouseover",function(){if(!C.hasClass(E.id,F+"Disabled")){C.addClass(E.id,F+"Hover")}});B.add(E.id,"mouseout",function(){if(!C.hasClass(E.id,F+"Disabled")){C.removeClass(E.id,F+"Hover")}})}E.onPostRender.dispatch(E,C.get(E.id))
},destroy:function(){this.parent();B.clear(this.id+"_text")}})})();(function(){var C=tinymce.DOM,B=tinymce.dom.Event,D=tinymce.each,A=tinymce.util.Dispatcher;tinymce.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(F,E){this.parent(F,E);this.classPrefix="mceNativeListBox"},setDisabled:function(E){C.get(this.id).disabled=E},isDisabled:function(){return C.get(this.id).disabled},select:function(E){var G=C.get(this.id),F=G.options;E=""+(E||"");G.selectedIndex=0;D(F,function(I,H){if(I.value==E){G.selectedIndex=H;
return false}})},add:function(I,F,E){var H,G=this;E=E||{};E.value=F;if(G.isRendered()){C.add(C.get(this.id),"option",E,I)}H={title:I,value:F,attribs:E};G.items.push(H);G.onAdd.dispatch(G,H)},getLength:function(){return C.get(this.id).options.length-1},renderHTML:function(){var F,E=this;F=C.createHTML("option",{value:""},"-- "+E.settings.title+" --");D(E.items,function(G){F+=C.createHTML("option",{value:G.value},G.title)});F=C.createHTML("select",{id:E.id,"class":"mceNativeListBox"},F);return F},postRender:function(){var F=this,G;
F.rendered=true;function E(I){var H=I.target.options[I.target.selectedIndex].value;F.onChange.dispatch(F,H);if(F.settings.onselect){F.settings.onselect(H)}}B.add(F.id,"change",E);B.add(F.id,"keydown",function(I){var H;B.remove(F.id,"change",G);H=B.add(F.id,"blur",function(){B.add(F.id,"change",E);B.remove(F.id,"blur",H)});if(I.keyCode==13||I.keyCode==32){E(I);return B.cancel(I)}});F.onPostRender.dispatch(F,C.get(F.id))}})})();(function(){var B=tinymce.DOM,A=tinymce.dom.Event,C=tinymce.each;tinymce.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(E,D){this.parent(E,D);
this.onRenderMenu=new tinymce.util.Dispatcher(this);D.menu_container=D.menu_container||B.doc.body},showMenu:function(){var E=this,H,G,F=B.get(E.id),D;if(E.isDisabled()){return }if(!E.isMenuRendered){E.renderMenu();E.isMenuRendered=true}if(E.isMenuVisible){return E.hideMenu()}H=B.getPos(E.settings.menu_container);G=B.getPos(F);D=E.menu;D.settings.offset_x=G.x;D.settings.offset_y=G.y;D.settings.vp_offset_x=G.x;D.settings.vp_offset_y=G.y;D.settings.keyboard_focus=E._focused;D.showMenu(0,F.clientHeight);
A.add(B.doc,"mousedown",E.hideMenu,E);E.setState("Selected",1);E.isMenuVisible=1},renderMenu:function(){var E=this,D;D=E.settings.control_manager.createDropMenu(E.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:E.settings.icons});D.onHideMenu.add(E.hideMenu,E);E.onRenderMenu.dispatch(E,D);E.menu=D},hideMenu:function(E){var D=this;if(E&&E.type=="mousedown"&&B.getParent(E.target,function(F){return F.id===D.id||F.id===D.id+"_open"})){return }if(!E||!B.getParent(E.target,function(F){return B.hasClass(F,"mceMenu")
})){D.setState("Selected",0);A.remove(B.doc,"mousedown",D.hideMenu,D);if(D.menu){D.menu.hideMenu()}}D.isMenuVisible=0},postRender:function(){var D=this,E=D.settings;A.add(D.id,"click",function(){if(!D.isDisabled()){if(E.onclick){E.onclick(D.value)}D.showMenu()}})}})})();(function(){var B=tinymce.DOM,A=tinymce.dom.Event,C=tinymce.each;tinymce.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(E,D){this.parent(E,D);this.classPrefix="mceSplitButton"},renderHTML:function(){var G,E=this,F=E.settings,D;
G="<tbody><tr>";if(F.image){D=B.createHTML("img ",{src:F.image,"class":"mceAction "+F["class"]})}else{D=B.createHTML("span",{"class":"mceAction "+F["class"]},"")}G+="<td>"+B.createHTML("a",{id:E.id+"_action",href:"javascript:;","class":"mceAction "+F["class"],onclick:"return false;",onmousedown:"return false;",title:F.title},D)+"</td>";D=B.createHTML("span",{"class":"mceOpen "+F["class"]});G+="<td>"+B.createHTML("a",{id:E.id+"_open",href:"javascript:;","class":"mceOpen "+F["class"],onclick:"return false;",onmousedown:"return false;",title:F.title},D)+"</td>";
G+="</tr></tbody>";return B.createHTML("table",{id:E.id,"class":"mceSplitButton mceSplitButtonEnabled "+F["class"],cellpadding:"0",cellspacing:"0",onmousedown:"return false;",title:F.title},G)},postRender:function(){var D=this,E=D.settings;if(E.onclick){A.add(D.id+"_action","click",function(){if(!D.isDisabled()){E.onclick(D.value)}})}A.add(D.id+"_open","click",D.showMenu,D);A.add(D.id+"_open","focus",function(){D._focused=1});A.add(D.id+"_open","blur",function(){D._focused=0});if(tinymce.isIE6||!B.boxModel){A.add(D.id,"mouseover",function(){if(!B.hasClass(D.id,"mceSplitButtonDisabled")){B.addClass(D.id,"mceSplitButtonHover")
}});A.add(D.id,"mouseout",function(){if(!B.hasClass(D.id,"mceSplitButtonDisabled")){B.removeClass(D.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();A.clear(this.id+"_action");A.clear(this.id+"_open")}})})();(function(){var C=tinymce.DOM,A=tinymce.dom.Event,B=tinymce.is,D=tinymce.each;tinymce.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(G,F){var E=this;E.parent(G,F);E.settings=F=tinymce.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},E.settings);
E.onShowMenu=new tinymce.util.Dispatcher(E);E.onHideMenu=new tinymce.util.Dispatcher(E);E.value=F.default_color},showMenu:function(){var E=this,F,I,H,G;if(E.isDisabled()){return }if(!E.isMenuRendered){E.renderMenu();E.isMenuRendered=true}if(E.isMenuVisible){return E.hideMenu()}H=C.get(E.id);C.show(E.id+"_menu");C.addClass(H,"mceSplitButtonSelected");G=C.getPos(H);C.setStyles(E.id+"_menu",{left:G.x,top:G.y+H.clientHeight,zIndex:200000});H=0;A.add(C.doc,"mousedown",E.hideMenu,E);if(E._focused){E._keyHandler=A.add(E.id+"_menu","keydown",function(J){if(J.keyCode==27){E.hideMenu()
}});C.select("a",E.id+"_menu")[0].focus()}E.onShowMenu.dispatch(E);E.isMenuVisible=1},hideMenu:function(F){var E=this;if(F&&F.type=="mousedown"&&C.getParent(F.target,function(G){return G.id===E.id+"_open"})){return }if(!F||!C.getParent(F.target,function(G){return C.hasClass(G,"mceSplitButtonMenu")})){C.removeClass(E.id,"mceSplitButtonSelected");A.remove(C.doc,"mousedown",E.hideMenu,E);A.remove(E.id+"_menu","keydown",E._keyHandler);C.hide(E.id+"_menu")}E.onHideMenu.dispatch(E);E.isMenuVisible=0},renderMenu:function(){var I=this,E,H=0,J=I.settings,L,G,K,F;
F=C.add(J.menu_container,"div",{id:I.id+"_menu","class":J.menu_class+" "+J["class"],style:"position:absolute;left:0;top:-1000px;"});E=C.add(F,"div",{"class":J["class"]+" mceSplitButtonMenu"});C.add(E,"span",{"class":"mceMenuLine"});L=C.add(E,"table",{"class":"mceColorSplitMenu"});G=C.add(L,"tbody");H=0;D(B(J.colors,"array")?J.colors:J.colors.split(","),function(M){M=M.replace(/^#/,"");if(!H--){K=C.add(G,"tr");H=J.grid_width-1}L=C.add(K,"td");L=C.add(L,"a",{href:"javascript:;",style:{backgroundColor:"#"+M},mce_color:"#"+M})
});if(J.more_colors_func){L=C.add(G,"tr");L=C.add(L,"td",{colspan:J.grid_width,"class":"mceMoreColors"});L=C.add(L,"a",{id:I.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},J.more_colors_title);A.add(L,"click",function(M){J.more_colors_func.call(J.more_colors_scope||this);return A.cancel(M)})}C.addClass(E,"mceColorSplitMenu");A.add(I.id+"_menu","click",function(M){var N;M=M.target;if(M.nodeName=="A"&&(N=M.getAttribute("mce_color"))){I.setColor(N)}return A.cancel(M)
});return F},setColor:function(F){var E=this;C.setStyle(E.id+"_preview","backgroundColor",F);E.value=F;E.hideMenu();E.settings.onselect(F)},postRender:function(){var E=this,F=E.id;E.parent();C.add(F+"_action","div",{id:F+"_preview","class":"mceColorPreview"})},destroy:function(){this.parent();A.clear(this.id+"_menu");A.clear(this.id+"_more");C.remove(this.id+"_menu")}})})();tinymce.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var I=this,D="",F,G,B=tinymce.DOM,J=I.settings,C,A,E,H;
H=I.controls;for(C=0;C<H.length;C++){G=H[C];A=H[C-1];E=H[C+1];if(C===0){F="mceToolbarStart";if(G.Button){F+=" mceToolbarStartButton"}else{if(G.SplitButton){F+=" mceToolbarStartSplitButton"}else{if(G.ListBox){F+=" mceToolbarStartListBox"}}}D+=B.createHTML("td",{"class":F},B.createHTML("span",null,"<!-- IE -->"))}if(A&&G.ListBox){if(A.Button||A.SplitButton){D+=B.createHTML("td",{"class":"mceToolbarEnd"},B.createHTML("span",null,"<!-- IE -->"))}}if(B.stdMode){D+='<td style="position: relative">'+G.renderHTML()+"</td>"
}else{D+="<td>"+G.renderHTML()+"</td>"}if(E&&G.ListBox){if(E.Button||E.SplitButton){D+=B.createHTML("td",{"class":"mceToolbarStart"},B.createHTML("span",null,"<!-- IE -->"))}}}F="mceToolbarEnd";if(G.Button){F+=" mceToolbarEndButton"}else{if(G.SplitButton){F+=" mceToolbarEndSplitButton"}else{if(G.ListBox){F+=" mceToolbarEndListBox"}}}D+=B.createHTML("td",{"class":F},B.createHTML("span",null,"<!-- IE -->"));return B.createHTML("table",{id:I.id,"class":"mceToolbar"+(J["class"]?" "+J["class"]:""),cellpadding:"0",cellspacing:"0",align:I.settings.align||""},"<tbody><tr>"+D+"</tr></tbody>")
}});(function(){var A=tinymce.util.Dispatcher,B=tinymce.each;tinymce.create("tinymce.AddOnManager",{items:[],urls:{},lookup:{},onAdd:new A(this),get:function(C){return this.lookup[C]},requireLangPack:function(E){var C,D=tinymce.EditorManager.settings;if(D&&D.language){C=this.urls[E]+"/langs/"+D.language+".js";if(!tinymce.dom.Event.domLoaded&&!D.strict_mode){tinymce.ScriptLoader.load(C)}else{tinymce.ScriptLoader.add(C)}}},add:function(D,C){this.items.push(C);this.lookup[D]=C;this.onAdd.dispatch(this,D,C);
return C},load:function(G,D,C,F){var E=this;if(E.urls[G]){return }if(D.indexOf("/")!=0&&D.indexOf("://")==-1){D=tinymce.baseURL+"/"+D}E.urls[G]=D.substring(0,D.lastIndexOf("/"));tinymce.ScriptLoader.add(D,C,F)}});tinymce.PluginManager=new tinymce.AddOnManager();tinymce.ThemeManager=new tinymce.AddOnManager()}());(function(){var F=tinymce.each,G=tinymce.extend,E=tinymce.DOM,A=tinymce.dom.Event,C=tinymce.ThemeManager,B=tinymce.PluginManager,D=tinymce.explode;tinymce.create("static tinymce.EditorManager",{editors:{},i18n:{},activeEditor:null,preInit:function(){var H=this,I=window.location;
tinymce.documentBaseURL=I.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(tinymce.documentBaseURL)){tinymce.documentBaseURL+="/"}tinymce.baseURL=new tinymce.util.URI(tinymce.documentBaseURL).toAbsolute(tinymce.baseURL);tinymce.EditorManager.baseURI=new tinymce.util.URI(tinymce.baseURL);if(document.domain&&I.hostname!=document.domain){tinymce.relaxedDomain=document.domain}if(!tinymce.relaxedDomain&&tinymce.EditorManager.baseURI.host!=I.hostname&&I.hostname){document.domain=tinymce.relaxedDomain=I.hostname.replace(/.*\.(.+\..+)$/,"$1")
}H.onBeforeUnload=new tinymce.util.Dispatcher(H);A.add(window,"beforeunload",function(J){H.onBeforeUnload.dispatch(H,J)})},init:function(P){var O=this,K,J=tinymce.ScriptLoader,N,M,H=[],L;function I(S,T,Q){var R=S[T];if(!R){return }if(tinymce.is(R,"string")){Q=R.replace(/\.\w+$/,"");Q=Q?tinymce.resolve(Q):0;R=tinymce.resolve(R)}return R.apply(Q||this,Array.prototype.slice.call(arguments,2))}P=G({theme:"simple",language:"en",strict_loading_mode:document.contentType=="application/xhtml+xml"},P);O.settings=P;
if(!A.domLoaded&&!P.strict_loading_mode){if(P.language){J.add(tinymce.baseURL+"/langs/"+P.language+".js")}if(P.theme&&P.theme.charAt(0)!="-"&&!C.urls[P.theme]){C.load(P.theme,"themes/"+P.theme+"/editor_template"+tinymce.suffix+".js")}if(P.plugins){K=D(P.plugins);if(tinymce.inArray(K,"compat2x")!=-1){B.load("compat2x","plugins/compat2x/editor_plugin"+tinymce.suffix+".js")}F(K,function(Q){if(Q&&Q.charAt(0)!="-"&&!B.urls[Q]){if(!tinymce.isWebKit&&Q=="safari"){return }B.load(Q,"plugins/"+Q+"/editor_plugin"+tinymce.suffix+".js")
}})}J.loadQueue()}A.add(document,"init",function(){var Q,S;I(P,"onpageload");if(P.browsers){Q=false;F(D(P.browsers),function(T){switch(T){case"ie":case"msie":if(tinymce.isIE){Q=true}break;case"gecko":if(tinymce.isGecko){Q=true}break;case"safari":case"webkit":if(tinymce.isWebKit){Q=true}break;case"opera":if(tinymce.isOpera){Q=true}break}});if(!Q){return }}switch(P.mode){case"exact":Q=P.elements||"";if(Q.length>0){F(D(Q),function(T){if(E.get(T)){L=new tinymce.Editor(T,P);H.push(L);L.render(1)}else{N=0;
F(document.forms,function(U){F(U.elements,function(V){if(V.name===T){T="mce_editor_"+N;E.setAttrib(V,"id",T);L=new tinymce.Editor(T,P);H.push(L);L.render(1)}})})}})}break;case"textareas":case"specific_textareas":function R(U,T){return T.constructor===RegExp?T.test(U.className):E.hasClass(U,T)}F(E.select("textarea"),function(T){if(P.editor_deselector&&R(T,P.editor_deselector)){return }if(!P.editor_selector||R(T,P.editor_selector)){M=E.get(T.name);if(!T.id&&!M){T.id=T.name}if(!T.id||O.get(T.id)){T.id=E.uniqueId()
}L=new tinymce.Editor(T.id,P);H.push(L);L.render(1)}});break}if(P.oninit){Q=S=0;F(H,function(T){S++;if(!T.initialized){T.onInit.add(function(){Q++;if(Q==S){I(P,"oninit")}})}else{Q++}if(Q==S){I(P,"oninit")}})}})},get:function(H){return this.editors[H]},getInstanceById:function(H){return this.get(H)},add:function(H){this.editors[H.id]=H;this._setActive(H);return H},remove:function(I){var H=this;if(!H.editors[I.id]){return null}delete H.editors[I.id];if(H.activeEditor==I){F(H.editors,function(J){H._setActive(J);
return false})}I.destroy();return I},execCommand:function(N,L,K){var M=this,J=M.get(K),H;switch(N){case"mceFocus":J.focus();return true;case"mceAddEditor":case"mceAddControl":if(!M.get(K)){new tinymce.Editor(K,M.settings).render()}return true;case"mceAddFrameControl":H=K.window;H.tinyMCE=tinyMCE;H.tinymce=tinymce;tinymce.DOM.doc=H.document;tinymce.DOM.win=H;J=new tinymce.Editor(K.element_id,K);J.render();if(tinymce.isIE){function I(){J.destroy();H.detachEvent("onunload",I);H=H.tinyMCE=H.tinymce=null
}H.attachEvent("onunload",I)}K.page_window=null;return true;case"mceRemoveEditor":case"mceRemoveControl":J.remove();return true;case"mceToggleEditor":if(!J){M.execCommand("mceAddControl",0,K);return true}if(J.isHidden()){J.show()}else{J.hide()}return true}if(M.activeEditor){return M.activeEditor.execCommand(N,L,K)}return false},execInstanceCommand:function(L,K,J,I){var H=this.get(L);if(H){return H.execCommand(K,J,I)}return false},triggerSave:function(){F(this.editors,function(H){H.save()})},addI18n:function(J,K){var H,I=this.i18n;
if(!tinymce.is(J,"string")){F(J,function(M,L){F(M,function(O,N){F(O,function(Q,P){if(N==="common"){I[L+"."+P]=Q}else{I[L+"."+N+"."+P]=Q}})})})}else{F(K,function(M,L){I[J+"."+L]=M})}},_setActive:function(H){this.selectedInstance=this.activeEditor=H}});tinymce.EditorManager.preInit()})();var tinyMCE=window.tinyMCE=tinymce.EditorManager;(function(){var N=tinymce.DOM,K=tinymce.dom.Event,F=tinymce.extend,L=tinymce.util.Dispatcher;var J=tinymce.each,A=tinymce.isGecko,B=tinymce.isIE,E=tinymce.isWebKit;var D=tinymce.is,H=tinymce.ThemeManager,C=tinymce.PluginManager,I=tinymce.EditorManager;
var O=tinymce.inArray,M=tinymce.grep,G=tinymce.explode;tinymce.create("tinymce.Editor",{Editor:function(R,Q){var P=this;P.id=P.editorId=R;P.execCommands={};P.queryStateCommands={};P.queryValueCommands={};P.plugins={};J(["onPreInit","onBeforeRenderUI","onPostRender","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState"],function(S){P[S]=new L(P)
});P.settings=Q=F({id:R,language:"en",docs_language:"en",theme:"simple",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:tinymce.documentBaseURL,add_form_submit_trigger:1,submit_patch:1,add_unload_trigger:1,convert_urls:1,relative_urls:1,remove_script_host:1,table_inline_editing:0,object_resizing:1,cleanup:1,accessibility_focus:1,custom_shortcuts:1,custom_undo_redo_keyboard_shortcuts:1,custom_undo_redo_restore_selection:1,custom_undo_redo:1,doctype:'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">',visual_table_class:"mceItemTable",visual:1,inline_styles:true,convert_fonts_to_spans:true,font_size_style_values:"8pt,10pt,12pt,14pt,16pt,24pt,36pt",font_size_classes:"fontSize1,fontSize2,fontSize3,fontSize4,fontSize5,fontSize6,fontSize7",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",valid_elements:"@[id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur],strong/b,em/i,strike,u,#p[align],-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,-blockquote[cite],-table[border=0|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],object[classid|width|height|codebase|*],param[name|value],embed[type|width|height|src|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value|tabindex|accesskey],kbd,label[for],legend,noscript,optgroup[label|disabled],option[disabled|label|selected|value],q[cite],samp,select[disabled|multiple|name|size],small,textarea[cols|rows|disabled|name|readonly],tt,var,big",hidden_input:1,padd_empty_editor:1,render_ui:1,init_theme:1,force_p_newlines:1,indentation:"30px"},Q);
P.documentBaseURI=new tinymce.util.URI(Q.document_base_url||tinymce.documentBaseURL,{base_uri:tinyMCE.baseURI});P.baseURI=I.baseURI;P.execCallback("setup",P)},render:function(R){var S=this,T=S.settings,U=S.id,P=tinymce.ScriptLoader;if(!K.domLoaded){K.add(document,"init",function(){S.render()});return }if(!R){T.strict_loading_mode=1;tinyMCE.settings=T}if(!S.getElement()){return }if(T.strict_loading_mode){P.settings.strict_mode=T.strict_loading_mode;tinymce.DOM.settings.strict=1}if(!/TEXTAREA|INPUT/i.test(S.getElement().nodeName)&&T.hidden_input&&N.getParent(U,"form")){N.insertAfter(N.create("input",{type:"hidden",name:U}),U)
}S.windowManager=new tinymce.WindowManager(S);if(T.encoding=="xml"){S.onGetContent.add(function(V,W){if(W.save){W.content=N.encode(W.content)}})}if(T.add_form_submit_trigger){S.onSubmit.addToTop(function(){if(S.initialized){S.save();S.isNotDirty=1}})}if(T.add_unload_trigger&&!T.ask){S._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(S.initialized&&!S.destroyed&&!S.isHidden()){S.save({format:"raw",no_events:true})}})}tinymce.addUnload(S.destroy,S);if(T.submit_patch){S.onBeforeRenderUI.add(function(){var V=S.getElement().form;
if(!V){return }if(V._mceOldSubmit){return }if(!V.submit.nodeType&&!V.submit.length){S.formElement=V;V._mceOldSubmit=V.submit;V.submit=function(){I.triggerSave();S.isNotDirty=1;return this._mceOldSubmit(this)}}V=null})}function Q(){if(T.language){P.add(tinymce.baseURL+"/langs/"+T.language+".js")}if(T.theme.charAt(0)!="-"&&!H.urls[T.theme]){H.load(T.theme,"themes/"+T.theme+"/editor_template"+tinymce.suffix+".js")}J(G(T.plugins),function(V){if(V&&V.charAt(0)!="-"&&!C.urls[V]){if(!E&&V=="safari"){return 
}C.load(V,"plugins/"+V+"/editor_plugin"+tinymce.suffix+".js")}});P.loadQueue(function(){if(T.ask){function V(){window.setTimeout(function(){K.remove(S.id,"focus",V);S.windowManager.confirm(S.getLang("edit_confirm"),function(W){if(W){S.init()}})},0)}K.add(S.id,"focus",V);return }if(!S.removed){S.init()}})}if(T.plugins.indexOf("compat2x")!=-1){C.load("compat2x","plugins/compat2x/editor_plugin"+tinymce.suffix+".js");P.loadQueue(Q)}else{Q()}},init:function(){var R,a=this,b=a.settings,X,U,W=a.getElement(),Q,P,Y,T,V,Z;
I.add(a);b.theme=b.theme.replace(/-/,"");Q=H.get(b.theme);a.theme=new Q();if(a.theme.init&&b.init_theme){a.theme.init(a,H.urls[b.theme]||tinymce.documentBaseURL.replace(/\/$/,""))}J(G(b.plugins.replace(/\-/g,"")),function(f){var g=C.get(f),e=C.urls[f]||tinymce.documentBaseURL.replace(/\/$/,""),d;if(g){d=new g(a,e);a.plugins[f]=d;if(d.init){d.init(a,e)}}});if(b.popup_css){b.popup_css=a.documentBaseURI.toAbsolute(b.popup_css)}else{b.popup_css=a.baseURI.toAbsolute("themes/"+b.theme+"/skins/"+b.skin+"/dialog.css")
}if(b.popup_css_add){b.popup_css+=","+a.documentBaseURI.toAbsolute(b.popup_css_add)}a.controlManager=new tinymce.ControlManager(a);a.undoManager=new tinymce.UndoManager(a);a.undoManager.onAdd.add(function(d,c){if(!c.initial){return a.onChange.dispatch(a,c,d)}});a.undoManager.onUndo.add(function(d,c){return a.onUndo.dispatch(a,c,d)});a.undoManager.onRedo.add(function(d,c){return a.onRedo.dispatch(a,c,d)});if(b.custom_undo_redo){a.onExecCommand.add(function(d,f,e,g,c){if(f!="Undo"&&f!="Redo"&&f!="mceRepaint"&&(!c||!c.skip_undo)){a.undoManager.add()
}})}a.onExecCommand.add(function(d,e){if(!/^(FontName|FontSize)$/.test(e)){a.nodeChanged()}});if(A){function S(c,d){if(!d||!d.initial){a.execCommand("mceRepaint")}}a.onUndo.add(S);a.onRedo.add(S);a.onSetContent.add(S)}a.onBeforeRenderUI.dispatch(a,a.controlManager);if(b.render_ui){X=b.width||W.style.width||W.offsetWidth;U=b.height||W.style.height||W.offsetHeight;a.orgDisplay=W.style.display;Z=/^[0-9\.]+(|px)$/i;if(Z.test(""+X)){X=Math.max(parseInt(X)+(Q.deltaWidth||0),100)}if(Z.test(""+U)){U=Math.max(parseInt(U)+(Q.deltaHeight||0),100)
}Q=a.theme.renderUI({targetNode:W,width:X,height:U,deltaWidth:b.delta_width,deltaHeight:b.delta_height});a.editorContainer=Q.editorContainer}N.setStyles(Q.sizeContainer||Q.editorContainer,{width:X,height:U});U=(Q.iframeHeight||U)+((U+"").indexOf("%")==-1?(Q.deltaHeight||0):"");if(U<100){U=100}a.iframeHTML=b.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml"><base href="'+a.documentBaseURI.getURI()+'" />';a.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
if(tinymce.relaxedDomain){a.iframeHTML+='<script type="text/javascript">document.domain = "'+tinymce.relaxedDomain+'";<\/script>'}T=b.body_id||"tinymce";if(T.indexOf("=")!=-1){T=a.getParam("body_id","","hash");T=T[a.id]||T}V=b.body_class||"";if(V.indexOf("=")!=-1){V=a.getParam("body_class","","hash");V=V[a.id]||""}a.iframeHTML+='</head><body id="'+T+'" class="mceContentBody '+V+'"></body></html>';if(tinymce.relaxedDomain){if(B||(tinymce.isOpera&&parseFloat(opera.version())>=9.5)){Y='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+a.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'
}else{if(tinymce.isOpera){Y='javascript:(function(){document.open();document.domain="'+document.domain+'";document.close();ed.setupIframe();})()'}}}R=N.add(Q.iframeContainer,"iframe",{id:a.id+"_ifr",src:Y||'javascript:""',frameBorder:"0",style:{width:"100%",height:U}});a.contentAreaContainer=Q.iframeContainer;N.get(Q.editorContainer).style.display=a.orgDisplay;N.get(a.id).style.display="none";if(tinymce.isOldWebKit){K.add(R,"load",a.setupIframe,a);R.src=tinymce.baseURL+"/plugins/safari/blank.htm"
}else{if(!B||!tinymce.relaxedDomain){a.setupIframe()}W=R=Q=null}},setupIframe:function(){var S=this,U=S.settings,V=N.get(S.id),W=S.getDoc(),T,Q;if(!B||!tinymce.relaxedDomain){W.open();W.write(S.iframeHTML);W.close()}if(!B){try{if(!U.readonly){W.designMode="On"}}catch(R){}}if(B){Q=S.getBody();N.hide(Q);if(!U.readonly){Q.contentEditable=true}N.show(Q)}S.dom=new tinymce.DOM.DOMUtils(S.getDoc(),{keep_values:true,url_converter:S.convertURL,url_converter_scope:S,hex_colors:U.force_hex_style_colors,class_filter:U.class_filter,update_styles:1,fix_ie_paragraphs:1});
S.serializer=new tinymce.dom.Serializer({entity_encoding:U.entity_encoding,entities:U.entities,valid_elements:U.verify_html===false?"*[*]":U.valid_elements,extended_valid_elements:U.extended_valid_elements,valid_child_elements:U.valid_child_elements,invalid_elements:U.invalid_elements,fix_table_elements:U.fix_table_elements,fix_list_elements:U.fix_list_elements,fix_content_duplication:U.fix_content_duplication,convert_fonts_to_spans:U.convert_fonts_to_spans,font_size_classes:U.font_size_classes,font_size_style_values:U.font_size_style_values,apply_source_formatting:U.apply_source_formatting,remove_linebreaks:U.remove_linebreaks,dom:S.dom});
S.selection=new tinymce.dom.Selection(S.dom,S.getWin(),S.serializer);S.forceBlocks=new tinymce.ForceBlocks(S,{forced_root_block:U.forced_root_block});S.editorCommands=new tinymce.EditorCommands(S);S.serializer.onPreProcess.add(function(X,Y){return S.onPreProcess.dispatch(S,Y,X)});S.serializer.onPostProcess.add(function(X,Y){return S.onPostProcess.dispatch(S,Y,X)});S.onPreInit.dispatch(S);if(!U.gecko_spellcheck){S.getBody().spellcheck=0}if(!U.readonly){S._addEvents()}S.controlManager.onPostRender.dispatch(S,S.controlManager);
S.onPostRender.dispatch(S);if(U.directionality){S.getBody().dir=U.directionality}if(U.nowrap){S.getBody().style.whiteSpace="nowrap"}if(U.auto_resize){S.onNodeChange.add(S.resizeToContent,S)}if(U.custom_elements){function P(X,Y){J(G(U.custom_elements),function(Z){var a;if(Z.indexOf("~")===0){Z=Z.substring(1);a="span"}else{a="div"}Y.content=Y.content.replace(new RegExp("<("+Z+")([^>]*)>","g"),"<"+a+' mce_name="$1"$2>');Y.content=Y.content.replace(new RegExp("</("+Z+")>","g"),"</"+a+">")})}S.onBeforeSetContent.add(P);
S.onPostProcess.add(function(X,Y){if(Y.set){P(X,Y)}})}if(U.handle_node_change_callback){S.onNodeChange.add(function(Y,X,Z){S.execCallback("handle_node_change_callback",S.id,Z,-1,-1,true,S.selection.isCollapsed())})}if(U.save_callback){S.onSaveContent.add(function(X,Z){var Y=S.execCallback("save_callback",S.id,Z.content,S.getBody());if(Y){Z.content=Y}})}if(U.onchange_callback){S.onChange.add(function(Y,X){S.execCallback("onchange_callback",S,X)})}if(U.convert_newlines_to_brs){S.onBeforeSetContent.add(function(X,Y){if(Y.initial){Y.content=Y.content.replace(/\r?\n/g,"<br />")
}})}if(U.fix_nesting&&B){S.onBeforeSetContent.add(function(X,Y){Y.content=S._fixNesting(Y.content)})}if(U.preformatted){S.onPostProcess.add(function(X,Y){Y.content=Y.content.replace(/^\s*<pre.*?>/,"");Y.content=Y.content.replace(/<\/pre>\s*$/,"");if(Y.set){Y.content='<pre class="mceItemHidden">'+Y.content+"</pre>"}})}if(U.verify_css_classes){S.serializer.attribValueFilter=function(a,Y){var Z,X;if(a=="class"){if(!S.classesRE){X=S.dom.getClasses();if(X.length>0){Z="";J(X,function(b){Z+=(Z?"|":"")+b["class"]
});S.classesRE=new RegExp("("+Z+")","gi")}}return !S.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(Y)||S.classesRE.test(Y)?Y:""}return Y}}if(U.convert_fonts_to_spans){S._convertFonts()}if(U.inline_styles){S._convertInlineElements()}if(U.cleanup_callback){S.onBeforeSetContent.add(function(X,Y){Y.content=S.execCallback("cleanup_callback","insert_to_editor",Y.content,Y)});S.onPreProcess.add(function(X,Y){if(Y.set){S.execCallback("cleanup_callback","insert_to_editor_dom",Y.node,Y)}if(Y.get){S.execCallback("cleanup_callback","get_from_editor_dom",Y.node,Y)
}});S.onPostProcess.add(function(X,Y){if(Y.set){Y.content=S.execCallback("cleanup_callback","insert_to_editor",Y.content,Y)}if(Y.get){Y.content=S.execCallback("cleanup_callback","get_from_editor",Y.content,Y)}})}if(U.save_callback){S.onGetContent.add(function(X,Y){if(Y.save){Y.content=S.execCallback("save_callback",S.id,Y.content,S.getBody())}})}if(U.handle_event_callback){S.onEvent.add(function(X,Y,Z){if(S.execCallback("handle_event_callback",Y,X,Z)===false){K.cancel(Y)}})}S.onSetContent.add(function(){S.addVisual(S.getBody())
});if(U.padd_empty_editor){S.onPostProcess.add(function(X,Y){Y.content=Y.content.replace(/^(<p>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")})}if(A&&!U.readonly){try{W.designMode="Off";W.designMode="On"}catch(R){}}setTimeout(function(){if(S.removed){return }S.load({initial:true,format:(U.cleanup_on_startup?"html":"raw")});S.startContent=S.getContent({format:"raw"});S.undoManager.add({initial:true});S.initialized=true;S.onInit.dispatch(S);S.execCallback("setupcontent_callback",S.id,S.getBody(),S.getDoc());
S.execCallback("init_instance_callback",S);S.focus(true);S.nodeChanged({initial:1});if(U.content_css){tinymce.each(G(U.content_css),function(X){S.dom.loadCSS(S.documentBaseURI.toAbsolute(X))})}if(U.auto_focus){setTimeout(function(){var X=I.get(U.auto_focus);X.selection.select(X.getBody(),1);X.selection.collapse(1);X.getWin().focus()},100)}},1);V=null},focus:function(Q){var S,P=this,R=P.settings.content_editable;if(!Q){if(!R&&(!B||P.selection.getNode().ownerDocument!=P.getDoc())){P.getWin().focus()
}}if(I.activeEditor!=P){if((S=I.activeEditor)!=null){S.onDeactivate.dispatch(S,P)}P.onActivate.dispatch(P,S)}I._setActive(P)},execCallback:function(S){var P=this,R=P.settings[S],Q;if(!R){return }if(P.callbackLookup&&(Q=P.callbackLookup[S])){R=Q.func;Q=Q.scope}if(D(R,"string")){Q=R.replace(/\.\w+$/,"");Q=Q?tinymce.resolve(Q):0;R=tinymce.resolve(R);P.callbackLookup=P.callbackLookup||{};P.callbackLookup[S]={func:R,scope:Q}}return R.apply(Q||P,Array.prototype.slice.call(arguments,1))},translate:function(P){var R=this.getParam("language","en"),Q=I.i18n;
if(!this.getParam("translate",true)){return P}if(!P){return""}return Q[R+"."+P]||P.replace(/\{\#([^}]+)\}/g,function(T,S){return Q[R+"."+S]||"{#"+S+"}"})},getLang:function(Q,P){return I.i18n[(this.settings.language||"en")+"."+Q]||(D(P)?P:"{#"+Q+"}")},getParam:function(U,R,P){var S=tinymce.trim,Q=D(this.settings[U])?this.settings[U]:R,T;if(P==="hash"){T={};if(D(Q,"string")){J(Q.indexOf("=")>0?Q.split(/[;,](?![^=;,]*(?:[;,]|$))/):Q.split(","),function(V){V=V.split("=");if(V.length>1){T[S(V[0])]=S(V[1])
}else{T[S(V[0])]=S(V)}})}else{T=Q}return T}return Q},nodeChanged:function(R){var P=this,Q=P.selection,S=Q.getNode()||P.getBody();if(P.initialized){P.onNodeChange.dispatch(P,R?R.controlManager||P.controlManager:P.controlManager,B&&S.ownerDocument!=P.getDoc()?P.getBody():S,Q.isCollapsed(),R)}},addButton:function(R,Q){var P=this;P.buttons=P.buttons||{};P.buttons[R]=Q},addCommand:function(R,Q,P){this.execCommands[R]={func:Q,scope:P||this}},addQueryStateHandler:function(R,Q,P){this.queryStateCommands[R]={func:Q,scope:P||this}
},addQueryValueHandler:function(R,Q,P){this.queryValueCommands[R]={func:Q,scope:P||this}},addShortcut:function(R,T,P,S){var Q=this,U;if(!Q.settings.custom_shortcuts){return false}Q.shortcuts=Q.shortcuts||{};if(D(P,"string")){U=P;P=function(){Q.execCommand(U,false,null)}}if(D(P,"object")){U=P;P=function(){Q.execCommand(U[0],U[1],U[2])}}J(G(R),function(V){var W={func:P,scope:S||this,desc:T,alt:false,ctrl:false,shift:false};J(G(V,"+"),function(X){switch(X){case"alt":case"ctrl":case"shift":W[X]=true;
break;default:W.charCode=X.charCodeAt(0);W.keyCode=X.toUpperCase().charCodeAt(0)}});Q.shortcuts[(W.ctrl?"ctrl":"")+","+(W.alt?"alt":"")+","+(W.shift?"shift":"")+","+W.keyCode]=W});return true},execCommand:function(U,T,W,P){var R=this,S=0,V,Q;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(U)&&(!P||!P.skip_focus)){R.focus()}V={};R.onBeforeExecCommand.dispatch(R,U,T,W,V);if(V.terminate){return false}if(R.execCallback("execcommand_callback",R.id,R.selection.getNode(),U,T,W)){R.onExecCommand.dispatch(R,U,T,W,P);
return true}if(V=R.execCommands[U]){Q=V.func.call(V.scope,T,W);if(Q!==true){R.onExecCommand.dispatch(R,U,T,W,P);return Q}}J(R.plugins,function(X){if(X.execCommand&&X.execCommand(U,T,W)){R.onExecCommand.dispatch(R,U,T,W,P);S=1;return false}});if(S){return true}if(R.theme.execCommand&&R.theme.execCommand(U,T,W)){R.onExecCommand.dispatch(R,U,T,W,P);return true}if(R.editorCommands.execCommand(U,T,W)){R.onExecCommand.dispatch(R,U,T,W,P);return true}R.getDoc().execCommand(U,T,W);R.onExecCommand.dispatch(R,U,T,W,P)
},queryCommandState:function(T){var Q=this,S,R;if(Q._isHidden()){return }if(S=Q.queryStateCommands[T]){R=S.func.call(S.scope);if(R!==true){return R}}S=Q.editorCommands.queryCommandState(T);if(S!==-1){return S}try{return this.getDoc().queryCommandState(T)}catch(P){}},queryCommandValue:function(T){var Q=this,S,R;if(Q._isHidden()){return }if(S=Q.queryValueCommands[T]){R=S.func.call(S.scope);if(R!==true){return R}}S=Q.editorCommands.queryCommandValue(T);if(D(S)){return S}try{return this.getDoc().queryCommandValue(T)
}catch(P){}},show:function(){var P=this;N.show(P.getContainer());N.hide(P.id);P.load()},hide:function(){var P=this,Q=P.getDoc();if(B&&Q){Q.execCommand("SelectAll")}P.save();N.hide(P.getContainer());N.setStyle(P.id,"display",P.orgDisplay)},isHidden:function(){return !N.isHidden(this.id)},setProgressState:function(P,Q,R){this.onSetProgressState.dispatch(this,P,Q,R);return P},resizeToContent:function(){var P=this;N.setStyle(P.id+"_ifr","height",P.getBody().scrollHeight)},load:function(S){var P=this,R=P.getElement(),Q;
S=S||{};S.load=true;Q=P.setContent(D(R.value)?R.value:R.innerHTML,S);S.element=R;if(!S.no_events){P.onLoadContent.dispatch(P,S)}S.element=R=null;return Q},save:function(T){var P=this,S=P.getElement(),Q,R;if(!P.initialized){return }T=T||{};T.save=true;if(!T.no_events){P.undoManager.typing=0;P.undoManager.add()}T.element=S;Q=T.content=P.getContent(T);if(!T.no_events){P.onSaveContent.dispatch(P,T)}Q=T.content;if(!/TEXTAREA|INPUT/i.test(S.nodeName)){S.innerHTML=Q;if(R=N.getParent(P.id,"form")){J(R.elements,function(U){if(U.name==P.id){U.value=Q;
return false}})}}else{S.value=Q}T.element=S=null;return Q},setContent:function(Q,R){var P=this;R=R||{};R.format=R.format||"html";R.set=true;R.content=Q;if(!R.no_events){P.onBeforeSetContent.dispatch(P,R)}if(!tinymce.isIE&&(Q.length===0||/^\s+$/.test(Q))){R.content=P.dom.setHTML(P.getBody(),'<br mce_bogus="1" />');R.format="raw"}R.content=P.dom.setHTML(P.getBody(),tinymce.trim(R.content));if(R.format!="raw"&&P.settings.cleanup){R.getInner=true;R.content=P.dom.setHTML(P.getBody(),P.serializer.serialize(P.getBody(),R))
}if(!R.no_events){P.onSetContent.dispatch(P,R)}return R.content},getContent:function(R){var P=this,Q;R=R||{};R.format=R.format||"html";R.get=true;if(!R.no_events){P.onBeforeGetContent.dispatch(P,R)}if(R.format!="raw"&&P.settings.cleanup){R.getInner=true;Q=P.serializer.serialize(P.getBody(),R)}else{Q=P.getBody().innerHTML}Q=Q.replace(/^\s*|\s*$/g,"");R.content=Q;if(!R.no_events){P.onGetContent.dispatch(P,R)}return R.content},isDirty:function(){var P=this;return tinymce.trim(P.startContent)!=tinymce.trim(P.getContent({format:"raw",no_events:1}))&&!P.isNotDirty
},getContainer:function(){var P=this;if(!P.container){P.container=N.get(P.editorContainer||P.id+"_parent")}return P.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return N.get(this.settings.content_element||this.id)},getWin:function(){var P=this,Q;if(!P.contentWindow){Q=N.get(P.id+"_ifr");if(Q){P.contentWindow=Q.contentWindow}}return P.contentWindow},getDoc:function(){var Q=this,P;if(!Q.contentDocument){P=Q.getWin();if(P){Q.contentDocument=P.document
}}return Q.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(P,T,S){var Q=this,R=Q.settings;if(R.urlconverter_callback){return Q.execCallback("urlconverter_callback",P,S,true,T)}if(!R.convert_urls||(S&&S.nodeName=="LINK")||P.indexOf("file:")===0){return P}if(R.relative_urls){return Q.documentBaseURI.toRelative(P)}P=Q.documentBaseURI.toAbsolute(P,R.remove_script_host);return P},addVisual:function(R){var P=this,Q=P.settings;R=R||P.getBody();if(!D(P.hasVisual)){P.hasVisual=Q.visual
}J(P.dom.select("table,a",R),function(T){var S;switch(T.nodeName){case"TABLE":S=P.dom.getAttrib(T,"border");if(!S||S=="0"){if(P.hasVisual){P.dom.addClass(T,Q.visual_table_class)}else{P.dom.removeClass(T,Q.visual_table_class)}}return ;case"A":S=P.dom.getAttrib(T,"name");if(S){if(P.hasVisual){P.dom.addClass(T,"mceItemAnchor")}else{P.dom.removeClass(T,"mceItemAnchor")}}return }});P.onVisualAid.dispatch(P,R,P.hasVisual)},remove:function(){var P=this,Q=P.getContainer();P.removed=1;P.hide();P.execCallback("remove_instance_callback",P);
P.onRemove.dispatch(P);P.onExecCommand.listeners=[];I.remove(P);N.remove(Q)},destroy:function(Q){var P=this;if(P.destroyed){return }if(!Q){tinymce.removeUnload(P.destroy);tinyMCE.onBeforeUnload.remove(P._beforeUnload);if(P.theme.destroy){P.theme.destroy()}P.controlManager.destroy();P.selection.destroy();P.dom.destroy();if(!P.settings.content_editable){K.clear(P.getWin());K.clear(P.getDoc())}K.clear(P.getBody());K.clear(P.formElement)}if(P.formElement){P.formElement.submit=P.formElement._mceOldSubmit;
P.formElement._mceOldSubmit=null}P.contentAreaContainer=P.formElement=P.container=P.settings.content_element=P.bodyElement=P.contentDocument=P.contentWindow=null;if(P.selection){P.selection=P.selection.win=P.selection.dom=P.selection.dom.doc=null}P.destroyed=1},_addEvents:function(){var W=this,Q,X=W.settings,T={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};
function P(a,b){var Z=a.type;if(W.removed){return }if(W.onEvent.dispatch(W,a,b)!==false){W[T[a.fakeType||a.type]].dispatch(W,a,b)}}J(T,function(a,Z){switch(Z){case"contextmenu":if(tinymce.isOpera){K.add(W.getBody(),"mousedown",function(b){if(b.ctrlKey){b.fakeType="contextmenu";P(b)}})}else{K.add(W.getBody(),Z,P)}break;case"paste":K.add(W.getBody(),Z,function(g){var b,d,c,f;if(g.clipboardData){b=g.clipboardData.getData("text/plain")}else{if(tinymce.isIE){b=W.getWin().clipboardData.getData("Text")}}P(g,{text:b,html:d})
});break;case"submit":case"reset":K.add(W.getElement().form||N.getParent(W.id,"form"),Z,P);break;default:K.add(X.content_editable?W.getBody():W.getDoc(),Z,P)}});K.add(X.content_editable?W.getBody():(A?W.getDoc():W.getWin()),"focus",function(Z){W.focus(true)});if(tinymce.isGecko){K.add(W.getDoc(),"DOMNodeInserted",function(a){var Z;a=a.target;if(a.nodeType===1&&a.nodeName==="IMG"&&(Z=a.getAttribute("mce_src"))){a.src=W.documentBaseURI.toAbsolute(Z)}})}if(A){function R(){var a=this,c=a.getDoc(),b=a.settings;
if(A&&!b.readonly){if(a._isHidden()){try{if(!b.content_editable){c.designMode="On"}}catch(Z){}}try{c.execCommand("styleWithCSS",0,false)}catch(Z){if(!a._isHidden()){try{c.execCommand("useCSS",0,true)}catch(Z){}}}if(!b.table_inline_editing){try{c.execCommand("enableInlineTableEditing",false,false)}catch(Z){}}if(!b.object_resizing){try{c.execCommand("enableObjectResizing",false,false)}catch(Z){}}}}W.onBeforeExecCommand.add(R);W.onMouseDown.add(R)}W.onMouseUp.add(W.nodeChanged);W.onClick.add(W.nodeChanged);
W.onKeyUp.add(function(Z,a){var b=a.keyCode;if((b>=33&&b<=36)||(b>=37&&b<=40)||b==13||b==45||b==46||b==8||(tinymce.isMac&&b>=91&&b<=93)||a.ctrlKey){W.nodeChanged()}});W.onReset.add(function(){W.setContent(W.startContent,{format:"raw"})});if(W.getParam("tab_focus")){function Y(Z,a){if(a.keyCode===9){return K.cancel(a)}}function U(b,h){var Z,c,g,d,a;function j(e){g=N.getParent(b.id,"form");d=g.elements;if(g){J(d,function(k,f){if(k.id==b.id){Z=f;return false}});if(e>0){for(c=Z+1;c<d.length;c++){if(d[c].type!="hidden"){return d[c]
}}}else{for(c=Z-1;c>=0;c--){if(d[c].type!="hidden"){return d[c]}}}}return null}if(h.keyCode===9){a=G(b.getParam("tab_focus"));if(a.length==1){a[1]=a[0];a[0]=":prev"}if(h.shiftKey){if(a[0]==":prev"){d=j(-1)}else{d=N.get(a[0])}}else{if(a[1]==":next"){d=j(1)}else{d=N.get(a[1])}}if(d){if(b=I.get(d.id||d.name)){b.focus()}else{window.setTimeout(function(){window.focus();d.focus()},10)}return K.cancel(h)}}}W.onKeyUp.add(Y);if(A){W.onKeyPress.add(U);W.onKeyDown.add(Y)}else{W.onKeyDown.add(U)}}if(X.custom_shortcuts){if(X.custom_undo_redo_keyboard_shortcuts){W.addShortcut("ctrl+z",W.getLang("undo_desc"),"Undo");
W.addShortcut("ctrl+y",W.getLang("redo_desc"),"Redo")}if(A){W.addShortcut("ctrl+b",W.getLang("bold_desc"),"Bold");W.addShortcut("ctrl+i",W.getLang("italic_desc"),"Italic");W.addShortcut("ctrl+u",W.getLang("underline_desc"),"Underline")}for(Q=1;Q<=6;Q++){W.addShortcut("ctrl+"+Q,"",["FormatBlock",false,"<h"+Q+">"])}W.addShortcut("ctrl+7","",["FormatBlock",false,"<p>"]);W.addShortcut("ctrl+8","",["FormatBlock",false,"<div>"]);W.addShortcut("ctrl+9","",["FormatBlock",false,"<address>"]);function S(a){var Z=null;
if(!a.altKey&&!a.ctrlKey&&!a.metaKey){return Z}J(W.shortcuts,function(b){if(b.ctrl!=a.ctrlKey&&(!tinymce.isMac||b.ctrl==a.metaKey)){return }if(b.alt!=a.altKey){return }if(b.shift!=a.shiftKey){return }if(a.keyCode==b.keyCode||(a.charCode&&a.charCode==b.charCode)){Z=b;return false}});return Z}W.onKeyUp.add(function(Z,a){var b=S(a);if(b){return K.cancel(a)}});W.onKeyPress.add(function(Z,a){var b=S(a);if(b){return K.cancel(a)}});W.onKeyDown.add(function(Z,a){var b=S(a);if(b){b.func.call(b.scope);return K.cancel(a)
}})}if(tinymce.isIE){K.add(W.getDoc(),"controlselect",function(b){var a=W.resizeInfo,Z;b=b.target;if(b.nodeName!=="IMG"){return }if(a){K.remove(a.node,a.ev,a.cb)}if(!W.dom.hasClass(b,"mceItemNoResize")){ev="resizeend";Z=K.add(b,ev,function(d){var c;d=d.target;if(c=W.dom.getStyle(d,"width")){W.dom.setAttrib(d,"width",c.replace(/[^0-9%]+/g,""));W.dom.setStyle(d,"width","")}if(c=W.dom.getStyle(d,"height")){W.dom.setAttrib(d,"height",c.replace(/[^0-9%]+/g,""));W.dom.setStyle(d,"height","")}})}else{ev="resizestart";
Z=K.add(b,"resizestart",K.cancel,K)}a=W.resizeInfo={node:b,ev:ev,cb:Z}});W.onKeyDown.add(function(Z,a){switch(a.keyCode){case 8:if(W.selection.getRng().item){W.selection.getRng().item(0).removeNode();return K.cancel(a)}}})}if(tinymce.isOpera){W.onClick.add(function(Z,a){K.prevent(a)})}if(X.custom_undo_redo){function V(){W.undoManager.typing=0;W.undoManager.add()}if(tinymce.isIE){K.add(W.getWin(),"blur",function(Z){var a;if(W.selection){a=W.selection.getNode();if(!W.removed&&a.ownerDocument&&a.ownerDocument!=W.getDoc()){V()
}}})}else{K.add(W.getDoc(),"blur",function(){if(W.selection&&!W.removed){V()}})}W.onMouseDown.add(V);W.onKeyUp.add(function(Z,a){if((a.keyCode>=33&&a.keyCode<=36)||(a.keyCode>=37&&a.keyCode<=40)||a.keyCode==13||a.keyCode==45||a.ctrlKey){W.undoManager.typing=0;W.undoManager.add()}});W.onKeyDown.add(function(Z,a){if((a.keyCode>=33&&a.keyCode<=36)||(a.keyCode>=37&&a.keyCode<=40)||a.keyCode==13||a.keyCode==45){if(W.undoManager.typing){W.undoManager.add();W.undoManager.typing=0}return }if(!W.undoManager.typing){W.undoManager.add();
W.undoManager.typing=1}})}},_convertInlineElements:function(){var V=this,X=V.settings,Q=V.dom,U,S,R,W,P;function T(Y,Z){if(!X.inline_styles){return }if(Z.get){J(V.dom.select("table,u,strike",Z.node),function(a){switch(a.nodeName){case"TABLE":if(U=Q.getAttrib(a,"height")){Q.setStyle(a,"height",U);Q.setAttrib(a,"height","")}break;case"U":case"STRIKE":a.style.textDecoration=a.nodeName=="U"?"underline":"line-through";Q.setAttrib(a,"mce_style","");Q.setAttrib(a,"mce_name","span");break}})}else{if(Z.set){J(V.dom.select("table,span",Z.node).reverse(),function(a){if(a.nodeName=="TABLE"){if(U=Q.getStyle(a,"height")){Q.setAttrib(a,"height",U.replace(/[^0-9%]+/g,""))
}}else{if(a.style.textDecoration=="underline"){R="u"}else{if(a.style.textDecoration=="line-through"){R="strike"}else{R=""}}if(R){a.style.textDecoration="";Q.setAttrib(a,"mce_style","");S=Q.create(R,{style:Q.getAttrib(a,"style")});Q.replace(S,a,1)}}})}}}V.onPreProcess.add(T);if(!X.cleanup_on_startup){V.onSetContent.add(function(Y,Z){if(Z.initial){T(V,{node:V.getBody(),set:1})}})}},_convertFonts:function(){var U=this,V=U.settings,W=U.dom,T,Q,P,S;if(!V.inline_styles){return }T=[8,10,12,14,18,24,36];
Q=["xx-small","x-small","small","medium","large","x-large","xx-large"];if(P=V.font_size_style_values){P=G(P)}if(S=V.font_size_classes){S=G(S)}function R(d){var e,c,Y,X,b,Z,a;if(tinymce.isWebKit||!V.inline_styles){return }Y=U.dom.select("span",d);for(X=Y.length-1;X>=0;X--){e=Y[X];c=W.create("font",{color:W.toHex(W.getStyle(e,"color")),face:W.getStyle(e,"fontFamily"),style:W.getAttrib(e,"style"),"class":W.getAttrib(e,"class")});a=c.style;if(a.color||a.fontFamily){a.color=a.fontFamily="";W.setAttrib(c,"mce_style","")
}if(P){b=O(P,W.getStyle(e,"fontSize"));if(b!=-1){W.setAttrib(c,"size",""+(b+1||1))}}else{if(S){b=O(S,W.getAttrib(e,"class"));Z=W.getStyle(e,"fontSize");if(b==-1&&Z.indexOf("pt")>0){b=O(T,parseInt(Z))}if(b==-1){b=O(Q,Z)}if(b!=-1){W.setAttrib(c,"size",""+(b+1||1));c.style.fontSize=""}}}if(c.color||c.face||c.size){c.style.fontFamily="";W.setAttrib(c,"mce_style","");W.replace(c,e,1)}c=e=null}}U.onSetContent.add(function(X,Y){R(X.getBody())});U.onPreProcess.add(function(Z,b){var c,a,Y,X;if(!V.inline_styles){return 
}if(b.get){Y=U.dom.select("font",b.node);for(X=Y.length-1;X>=0;X--){c=Y[X];a=W.create("span",{style:W.getAttrib(c,"style"),"class":W.getAttrib(c,"class")});W.setStyles(a,{fontFamily:W.getAttrib(c,"face"),color:W.getAttrib(c,"color"),backgroundColor:c.style.backgroundColor});if(c.size){if(P){W.setStyle(a,"fontSize",P[parseInt(c.size)-1])}else{W.setAttrib(a,"class",S[parseInt(c.size)-1])}}W.setAttrib(a,"mce_style","");W.replace(a,c,1)}}})},_isHidden:function(){var P;if(!A){return 0}P=this.selection.getSel();
return(!P||!P.rangeCount||P.rangeCount==0)},_fixNesting:function(Q){var R=[],P;Q=Q.replace(/<(\/)?([^\s>]+)[^>]*?>/g,function(T,S,V){var U;if(S==="/"){if(!R.length){return""}if(V!==R[R.length-1].tag){for(P=R.length-1;P>=0;P--){if(R[P].tag===V){R[P].close=1;break}}return""}else{R.pop();if(R.length&&R[R.length-1].close){T=T+"</"+R[R.length-1].tag+">";R.pop()}}}else{if(/^(br|hr|input|meta|img|link|param)$/i.test(V)){return T}if(/\/>$/.test(T)){return T}R.push({tag:V})}return T});for(P=R.length-1;P>=0;
P--){Q+="</"+R[P].tag+">"}return Q}})})();(function(){var E=tinymce.each,C=tinymce.isIE,A=tinymce.isGecko,B=tinymce.isOpera,D=tinymce.isWebKit;tinymce.create("tinymce.EditorCommands",{EditorCommands:function(F){this.editor=F},execCommand:function(K,J,L){var H=this,F=H.editor,I;switch(K){case"Cut":case"Copy":case"Paste":try{F.getDoc().execCommand(K,J,L)}catch(G){if(A){F.windowManager.confirm(F.getLang("clipboard_msg"),function(M){if(M){window.open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","mceExternal")
}})}else{F.windowManager.alert(F.getLang("clipboard_no_support"))}}return true;case"mceResetDesignMode":case"mceBeginUndoLevel":return true;case"unlink":H.UnLink();return true;case"JustifyLeft":case"JustifyCenter":case"JustifyRight":case"JustifyFull":H.mceJustify(K,K.substring(7).toLowerCase());return true;case"mceEndUndoLevel":case"mceAddUndoLevel":F.undoManager.add();return true;default:I=this[K];if(I){I.call(this,J,L);return true}}return false},Indent:function(){var F=this.editor,K=F.dom,I=F.selection,J,G,H;
G=F.settings.indentation;H=/[a-z%]+$/i.exec(G);G=parseInt(G);if(F.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){E(this._getSelectedBlocks(),function(L){K.setStyle(L,"paddingLeft",(parseInt(L.style.paddingLeft||0)+G)+H)});return }F.getDoc().execCommand("Indent",false,null);if(C){K.getParent(I.getNode(),function(L){if(L.nodeName=="BLOCKQUOTE"){L.dir=L.style.cssText=""}})}},Outdent:function(){var G=this.editor,L=G.dom,J=G.selection,K,F,H,I;H=G.settings.indentation;
I=/[a-z%]+$/i.exec(H);H=parseInt(H);if(G.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){E(this._getSelectedBlocks(),function(M){F=Math.max(0,parseInt(M.style.paddingLeft||0)-H);L.setStyle(M,"paddingLeft",F?F+I:"")});return }G.getDoc().execCommand("Outdent",false,null)},mceSetAttribute:function(H,G){var F=this.editor,J=F.dom,I;if(I=J.getParent(F.selection.getNode(),J.isBlock)){J.setAttrib(I,G.name,G.value)}},mceSetContent:function(G,F){this.editor.setContent(F)
},mceToggleVisualAid:function(){var F=this.editor;F.hasVisual=!F.hasVisual;F.addVisual()},mceReplaceContent:function(G,F){var H=this.editor.selection;H.setContent(F.replace(/\{\$selection\}/g,H.getContent({format:"text"})))},mceInsertLink:function(H,G){var F=this.editor,I=F.selection,J=F.dom.getParent(I.getNode(),"A");if(tinymce.is(G,"string")){G={href:G}}function K(L){E(G,function(N,M){F.dom.setAttrib(L,M,N)})}if(!J){F.execCommand("CreateLink",false,"javascript:mctmp(0);");E(F.dom.select("a"),function(L){if(L.href=="javascript:mctmp(0);"){K(L)
}})}else{if(G.href){K(J)}else{F.dom.remove(J,1)}}},UnLink:function(){var F=this.editor,G=F.selection;if(G.isCollapsed()){G.select(G.getNode())}F.getDoc().execCommand("unlink",false,null);G.collapse(0)},FontName:function(H,G){var I=this,F=I.editor,J=F.selection,K;if(!G){if(J.isCollapsed()){J.select(J.getNode())}I.RemoveFormat()}else{F.getDoc().execCommand("FontName",false,G)}},FontSize:function(I,H){var G=this.editor,L=G.settings,J=tinymce.explode(L.font_size_style_values),F=tinymce.explode(L.font_size_classes),K,M;
E(G.dom.select("font"),function(N){N.style.fontSize=""});G.getDoc().execCommand("FontSize",false,H);if(L.inline_styles){E(G.dom.select("font"),function(N){if(N.parentNode.nodeName=="FONT"&&N.size==N.parentNode.size){if(!M){M=G.selection.getBookmark()}G.dom.remove(N,1);return }if(H=N.size){if(F&&F.length>0){G.dom.setAttrib(N,"class",F[parseInt(H)-1])}else{G.dom.setStyle(N,"fontSize",J[parseInt(H)-1])}}})}G.selection.moveToBookmark(M)},queryCommandValue:function(G){var F=this["queryValue"+G];if(F){return F.call(this,G)
}return false},queryCommandState:function(G){var F;switch(G){case"JustifyLeft":case"JustifyCenter":case"JustifyRight":case"JustifyFull":return this.queryStateJustify(G,G.substring(7).toLowerCase());default:if(F=this["queryState"+G]){return F.call(this,G)}}return -1},_queryState:function(G){try{return this.editor.getDoc().queryCommandState(G)}catch(F){}},_queryVal:function(G){try{return this.editor.getDoc().queryCommandValue(G)}catch(F){}},queryValueFontSize:function(){var G=this.editor,F=0,H;if(B||D){if(H=G.dom.getParent(G.selection.getNode(),"FONT")){F=H.size
}return F}return this._queryVal("FontSize")},queryValueFontName:function(){var G=this.editor,F=0,H;if(H=G.dom.getParent(G.selection.getNode(),"FONT")){F=H.face}if(!F){F=this._queryVal("FontName")}return F},mceJustify:function(M,N){var J=this.editor,L=J.selection,F=L.getNode(),O=F.nodeName,G,I,H=J.dom,K;if(J.settings.inline_styles&&this.queryStateJustify(M,N)){K=1}G=H.getParent(F,J.dom.isBlock);if(O=="IMG"){if(N=="full"){return }if(K){if(N=="center"){H.setStyle(G||F.parentNode,"textAlign","")}H.setStyle(F,"float","");
this.mceRepaint();return }if(N=="center"){if(G&&/^(TD|TH)$/.test(G.nodeName)){G=0}if(!G||G.childNodes.length>1){I=H.create("p");I.appendChild(F.cloneNode(false));if(G){H.insertAfter(I,G)}else{H.insertAfter(I,F)}H.remove(F);F=I.firstChild;G=I}H.setStyle(G,"textAlign",N);H.setStyle(F,"float","")}else{H.setStyle(F,"float",N);H.setStyle(G||F.parentNode,"textAlign","")}this.mceRepaint();return }if(J.settings.inline_styles&&J.settings.forced_root_block){if(K){N=""}E(this._getSelectedBlocks(H.getParent(L.getStart(),H.isBlock),H.getParent(L.getEnd(),H.isBlock)),function(P){H.setAttrib(P,"align","");
H.setStyle(P,"textAlign",N=="full"?"justify":N)});return }else{if(!K){J.getDoc().execCommand(M,false,null)}}if(J.settings.inline_styles){if(K){H.getParent(J.selection.getNode(),function(P){if(P.style&&P.style.textAlign){H.setStyle(P,"textAlign","")}});return }E(H.select("*"),function(Q){var P=Q.align;if(P){if(P=="full"){P="justify"}H.setStyle(Q,"textAlign",P);H.setAttrib(Q,"align","")}})}},mceSetCSSClass:function(G,F){this.mceSetStyleInfo(0,{command:"setattrib",name:"class",value:F})},getSelectedElement:function(){var T=this,N=T.editor,M=N.dom,Q=N.selection,G=Q.getRng(),K,J,R,O,I,F,P,H,U,S;
if(Q.isCollapsed()||G.item){return Q.getNode()}S=N.settings.merge_styles_invalid_parents;if(tinymce.is(S,"string")){S=new RegExp(S,"i")}if(C){K=G.duplicate();K.collapse(true);R=K.parentElement();J=G.duplicate();J.collapse(false);O=J.parentElement();if(R!=O){K.move("character",1);R=K.parentElement()}if(R==O){K=G.duplicate();K.moveToElementText(R);if(K.compareEndPoints("StartToStart",G)==0&&K.compareEndPoints("EndToEnd",G)==0){return S&&S.test(R.nodeName)?null:R}}}else{function L(V){return M.getParent(V,function(W){return W.nodeType==1
})}R=G.startContainer;O=G.endContainer;I=G.startOffset;F=G.endOffset;if(!G.collapsed){if(R==O){if(I-F<2){if(R.hasChildNodes()){H=R.childNodes[I];return S&&S.test(H.nodeName)?null:H}}}}if(R.nodeType!=3||O.nodeType!=3){return null}if(I==0){H=L(R);if(H&&H.firstChild!=R){H=null}}if(I==R.nodeValue.length){P=R.nextSibling;if(P&&P.nodeType==1){H=R.nextSibling}}if(F==0){P=O.previousSibling;if(P&&P.nodeType==1){U=P}}if(F==O.nodeValue.length){U=L(O);if(U&&U.lastChild!=O){U=null}}if(H==U){return S&&H&&S.test(H.nodeName)?null:H
}}return null},InsertHorizontalRule:function(){if(A||C){this.editor.selection.setContent("<hr />")}else{this.editor.getDoc().execCommand("InsertHorizontalRule",false,"")}},RemoveFormat:function(){var H=this,G=H.editor,I=G.selection,F;if(D){I.setContent(I.getContent({format:"raw"}).replace(/(<(span|b|i|strong|em|strike) [^>]+>|<(span|b|i|strong|em|strike)>|<\/(span|b|i|strong|em|strike)>|)/g,""),{format:"raw"})}else{G.getDoc().execCommand("RemoveFormat",false,null)}H.mceSetStyleInfo(0,{command:"removeformat"});
G.addVisual()},mceSetStyleInfo:function(M,L){var P=this,G=P.editor,I=G.getDoc(),F=G.dom,H,J,Q=G.selection,O=L.wrapper||"span",J=Q.getBookmark(),N;function K(S,R){if(S.nodeType==1){switch(L.command){case"setattrib":return F.setAttrib(S,L.name,L.value);case"setstyle":return F.setStyle(S,L.name,L.value);case"removeformat":return F.setAttrib(S,"class","")}}}N=G.settings.merge_styles_invalid_parents;if(tinymce.is(N,"string")){N=new RegExp(N,"i")}if((H=P.getSelectedElement())&&!G.settings.force_span_wrappers){K(H,1)
}else{I.execCommand("FontName",false,"__");E(D?F.select("span"):F.select("font"),function(T){var R,S;if(F.getAttrib(T,"face")=="__"||T.style.fontFamily==="__"){R=F.create(O,{mce_new:"1"});K(R);E(T.childNodes,function(U){R.appendChild(U.cloneNode(true))});F.replace(R,T)}})}E(F.select(O).reverse(),function(S){var R=S.parentNode;if(!F.getAttrib(S,"mce_new")){R=F.getParent(S,function(T){return T.nodeType==1&&F.getAttrib(T,"mce_new")});if(R){F.remove(S,1)}}});E(F.select(O).reverse(),function(S){var R=S.parentNode;
if(!R||!F.getAttrib(S,"mce_new")){return }if(G.settings.force_span_wrappers&&R.nodeName!="SPAN"){return }if(R.nodeName==O.toUpperCase()&&R.childNodes.length==1){return F.remove(R,1)}if(S.nodeType==1&&(!N||!N.test(R.nodeName))&&R.childNodes.length==1){K(R);F.setAttrib(S,"class","")}});E(F.select(O).reverse(),function(R){if(F.getAttrib(R,"mce_new")||(F.getAttribs(R).length<=1&&R.className==="")){if(!F.getAttrib(R,"class")&&!F.getAttrib(R,"style")){return F.remove(R,1)}F.setAttrib(R,"mce_new","")}});
Q.moveToBookmark(J)},queryStateJustify:function(J,G){var F=this.editor,I=F.selection.getNode(),H=F.dom;if(I&&I.nodeName=="IMG"){if(H.getStyle(I,"float")==G){return 1}return I.parentNode.style.textAlign==G}I=H.getParent(F.selection.getStart(),function(K){return K.nodeType==1&&K.style.textAlign});if(G=="full"){G="justify"}if(F.settings.inline_styles){return(I&&I.style.textAlign==G)}return this._queryState(J)},HiliteColor:function(H,J){var G=this,F=G.editor,I=F.getDoc();function K(M){if(!A){return }try{I.execCommand("styleWithCSS",0,M)
}catch(L){I.execCommand("useCSS",0,!M)}}if(A||B){K(true);I.execCommand("hilitecolor",false,J);K(false)}else{I.execCommand("BackColor",false,J)}},Undo:function(){var F=this.editor;if(F.settings.custom_undo_redo){F.undoManager.undo();F.nodeChanged()}else{F.getDoc().execCommand("Undo",false,null)}},Redo:function(){var F=this.editor;if(F.settings.custom_undo_redo){F.undoManager.redo();F.nodeChanged()}else{F.getDoc().execCommand("Redo",false,null)}},FormatBlock:function(M,G){var N=this,K=N.editor,O=K.selection,I=K.dom,F,J,L;
function H(P){return/^(P|DIV|H[1-6]|ADDRESS|BLOCKQUOTE|PRE)$/.test(P.nodeName)}F=I.getParent(O.getNode(),function(P){return H(P)});if(F){if((C&&H(F.parentNode))||F.nodeName=="DIV"){J=K.dom.create(G);E(I.getAttribs(F),function(P){I.setAttrib(J,P.nodeName,I.getAttrib(F,P.nodeName))});L=O.getBookmark();I.replace(J,F,1);O.moveToBookmark(L);K.nodeChanged();return }}G=K.settings.forced_root_block?(G||"<p>"):G;if(G.indexOf("<")==-1){G="<"+G+">"}if(tinymce.isGecko){G=G.replace(/<(div|blockquote|code|dt|dd|dl|samp)>/gi,"$1")
}K.getDoc().execCommand("FormatBlock",false,G)},mceCleanup:function(){var G=this.editor,H=G.selection,F=H.getBookmark();G.setContent(G.getContent());H.moveToBookmark(F)},mceRemoveNode:function(I,J){var G=this.editor,H=G.selection,F,K=J||H.getNode();if(K==G.getBody()){return }F=H.getBookmark();G.dom.remove(K,1);H.moveToBookmark(F);G.nodeChanged()},mceSelectNodeDepth:function(H,I){var F=this.editor,G=F.selection,J=0;F.dom.getParent(G.getNode(),function(K){if(K.nodeType==1&&J++==I){G.select(K);F.nodeChanged();
return false}},F.getBody())},mceSelectNode:function(G,F){this.editor.selection.select(F)},mceInsertContent:function(F,G){this.editor.selection.setContent(G)},mceInsertRawHTML:function(G,H){var F=this.editor;F.selection.setContent("tiny_mce_marker");F.setContent(F.getContent().replace(/tiny_mce_marker/g,H))},mceRepaint:function(){var H,F,I=this.editor;if(tinymce.isGecko){try{H=I.selection;F=H.getBookmark(true);if(H.getSel()){H.getSel().selectAllChildren(I.getBody())}H.collapse(true);H.moveToBookmark(F)
}catch(G){}}},queryStateUnderline:function(){var F=this.editor,G=F.selection.getNode();if(G&&G.nodeName=="A"){return false}return this._queryState("Underline")},queryStateOutdent:function(){var F=this.editor,G;if(F.settings.inline_styles){if((G=F.dom.getParent(F.selection.getStart(),F.dom.isBlock))&&parseInt(G.style.paddingLeft)>0){return true}if((G=F.dom.getParent(F.selection.getEnd(),F.dom.isBlock))&&parseInt(G.style.paddingLeft)>0){return true}}else{return !!F.dom.getParent(F.selection.getNode(),"BLOCKQUOTE")
}return this.queryStateInsertUnorderedList()||this.queryStateInsertOrderedList()},queryStateInsertUnorderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),"UL")},queryStateInsertOrderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),"OL")},queryStatemceBlockQuote:function(){return !!this.editor.dom.getParent(this.editor.selection.getStart(),function(F){return F.nodeName==="BLOCKQUOTE"})},mceBlockQuote:function(){var Q=this,M=Q.editor,S=M.selection,J=M.dom,O,N,I,H,R,G,P,L,F;
function K(T){return J.getParent(T,function(U){return U.nodeName==="BLOCKQUOTE"})}O=J.getParent(S.getStart(),J.isBlock);N=J.getParent(S.getEnd(),J.isBlock);if(R=K(O)){if(O!=N||O.childNodes.length>1||(O.childNodes.length==1&&O.firstChild.nodeName!="BR")){H=S.getBookmark()}if(K(N)){P=R.cloneNode(false);while(I=N.nextSibling){P.appendChild(I.parentNode.removeChild(I))}}if(P){J.insertAfter(P,R)}F=Q._getSelectedBlocks(O,N);for(L=F.length-1;L>=0;L--){J.insertAfter(F[L],R)}if(/^\s*$/.test(R.innerHTML)){J.remove(R,1)
}if(P&&/^\s*$/.test(P.innerHTML)){J.remove(P,1)}if(!H){if(!C){G=M.getDoc().createRange();G.setStart(O,0);G.setEnd(O,0);S.setRng(G)}else{S.select(O);S.collapse(0);if(J.getParent(S.getStart(),J.isBlock)!=O){G=S.getRng();G.move("character",-1);G.select()}}}else{Q.editor.selection.moveToBookmark(H)}return }if(C&&!O&&!N){Q.editor.getDoc().execCommand("Indent");I=K(S.getNode());I.style.margin=I.dir="";return }if(!O||!N){return }if(O!=N||O.childNodes.length>1||(O.childNodes.length==1&&O.firstChild.nodeName!="BR")){H=S.getBookmark()
}E(Q._getSelectedBlocks(K(S.getStart()),K(S.getEnd())),function(T){if(T.nodeName=="BLOCKQUOTE"&&!R){R=T;return }if(!R){R=J.create("blockquote");T.parentNode.insertBefore(R,T)}if(T.nodeName=="BLOCKQUOTE"&&R){I=T.firstChild;while(I){R.appendChild(I.cloneNode(true));I=I.nextSibling}J.remove(T);return }R.appendChild(J.remove(T))});if(!H){if(!C){G=M.getDoc().createRange();G.setStart(O,0);G.setEnd(O,0);S.setRng(G)}else{S.select(O);S.collapse(1)}}else{S.moveToBookmark(H)}},_getSelectedBlocks:function(M,F){var J=this.editor,I=J.dom,N=J.selection,L,K,H,G=[];
L=I.getParent(M||N.getStart(),I.isBlock);K=I.getParent(F||N.getEnd(),I.isBlock);if(L){G.push(L)}if(L&&K&&L!=K){H=L;while((H=H.nextSibling)&&H!=K){if(I.isBlock(H)){G.push(H)}}}if(K&&L!=K){G.push(K)}return G}})})();tinymce.create("tinymce.UndoManager",{index:0,data:null,typing:0,UndoManager:function(B){var C=this,A=tinymce.util.Dispatcher;C.editor=B;C.data=[];C.onAdd=new A(this);C.onUndo=new A(this);C.onRedo=new A(this)},add:function(B){var E=this,D,C=E.editor,A,F=C.settings,G;B=B||{};B.content=B.content||C.getContent({format:"raw",no_events:1});
B.content=B.content.replace(/^\s*|\s*$/g,"");G=E.data[E.index>0&&(E.index==0||E.index==E.data.length)?E.index-1:E.index];if(!B.initial&&G&&B.content==G.content){return null}if(F.custom_undo_redo_levels){if(E.data.length>F.custom_undo_redo_levels){for(D=0;D<E.data.length-1;D++){E.data[D]=E.data[D+1]}E.data.length--;E.index=E.data.length}}if(F.custom_undo_redo_restore_selection&&!B.initial){B.bookmark=A=B.bookmark||C.selection.getBookmark()}if(E.index<E.data.length){E.index++}if(E.data.length===0&&!B.initial){return null
}E.data.length=E.index+1;E.data[E.index++]=B;if(B.initial){E.index=0}if(E.data.length==2&&E.data[0].initial){E.data[0].bookmark=A}E.onAdd.dispatch(E,B);C.isNotDirty=0;return B},undo:function(){var D=this,B=D.editor,A=A,C;if(D.typing){D.add();D.typing=0}if(D.index>0){if(D.index==D.data.length&&D.index>1){C=D.index;D.typing=0;if(!D.add()){D.index=C}--D.index}A=D.data[--D.index];B.setContent(A.content,{format:"raw"});B.selection.moveToBookmark(A.bookmark);D.onUndo.dispatch(D,A)}return A},redo:function(){var C=this,B=C.editor,A=null;
if(C.index<C.data.length-1){A=C.data[++C.index];B.setContent(A.content,{format:"raw"});B.selection.moveToBookmark(A.bookmark);C.onRedo.dispatch(C,A)}return A},clear:function(){var A=this;A.data=[];A.index=0;A.typing=0;A.add({initial:true})},hasUndo:function(){return this.index!=0||this.typing},hasRedo:function(){return this.index<this.data.length-1}});(function(){var B,D,A,C,E,F;B=tinymce.dom.Event;D=tinymce.isIE;A=tinymce.isGecko;C=tinymce.isOpera;E=tinymce.each;F=tinymce.extend;tinymce.create("tinymce.ForceBlocks",{ForceBlocks:function(H){var I=this,J=H.settings,K;
I.editor=H;I.dom=H.dom;K=(J.forced_root_block||"p").toLowerCase();J.element=K.toUpperCase();H.onPreInit.add(I.setup,I);I.reOpera=new RegExp("(\\u00a0|&#160;|&nbsp;)</"+K+">","gi");I.rePadd=new RegExp("<p( )([^>]+)><\\/p>|<p( )([^>]+)\\/>|<p( )([^>]+)>\\s+<\\/p>|<p><\\/p>|<p\\/>|<p>\\s+<\\/p>".replace(/p/g,K),"gi");I.reNbsp2BR1=new RegExp("<p( )([^>]+)>[\\s\\u00a0]+<\\/p>|<p>[\\s\\u00a0]+<\\/p>".replace(/p/g,K),"gi");I.reNbsp2BR2=new RegExp("<p( )([^>]+)>(&nbsp;|&#160;)<\\/p>|<p>(&nbsp;|&#160;)<\\/p>".replace(/p/g,K),"gi");
I.reBR2Nbsp=new RegExp("<p( )([^>]+)>\\s*<br \\/>\\s*<\\/p>|<p>\\s*<br \\/>\\s*<\\/p>".replace(/p/g,K),"gi");I.reTrailBr=new RegExp("\\s*<br \\/>\\s*<\\/p>".replace(/p/g,K),"gi");function G(L,M){if(C){M.content=M.content.replace(I.reOpera,"</"+K+">")}M.content=M.content.replace(I.rePadd,"<"+K+"$1$2$3$4$5$6>\u00a0</"+K+">");if(!D&&!C&&M.set){M.content=M.content.replace(I.reNbsp2BR1,"<"+K+"$1$2><br /></"+K+">");M.content=M.content.replace(I.reNbsp2BR2,"<"+K+"$1$2><br /></"+K+">")}else{M.content=M.content.replace(I.reBR2Nbsp,"<"+K+"$1$2>\u00a0</"+K+">");
M.content=M.content.replace(I.reTrailBr,"</"+K+">")}}H.onBeforeSetContent.add(G);H.onPostProcess.add(G);if(J.forced_root_block){H.onInit.add(I.forceRoots,I);H.onSetContent.add(I.forceRoots,I);H.onBeforeGetContent.add(I.forceRoots,I)}},setup:function(){var H=this,G=H.editor,I=G.settings;if(I.forced_root_block){G.onKeyUp.add(H.forceRoots,H);G.onPreProcess.add(H.forceRoots,H)}if(I.force_br_newlines){if(D){G.onKeyPress.add(function(K,M){var N,L=K.selection;if(M.keyCode==13&&L.getNode().nodeName!="LI"){L.setContent('<br id="__" /> ',{format:"raw"});
N=K.dom.get("__");N.removeAttribute("id");L.select(N);L.collapse();return B.cancel(M)}})}return }if(!D&&I.force_p_newlines){G.onKeyPress.add(function(K,L){if(L.keyCode==13&&!L.shiftKey){if(!H.insertPara(L)){B.cancel(L)}}});if(A){G.onKeyDown.add(function(K,L){if((L.keyCode==8||L.keyCode==46)&&!L.shiftKey){H.backspaceDelete(L,L.keyCode==8)}})}}function J(L,K){var M=G.dom.create(K);E(L.attributes,function(N){if(N.specified&&N.nodeValue){M.setAttribute(N.nodeName.toLowerCase(),N.nodeValue)}});E(L.childNodes,function(N){M.appendChild(N.cloneNode(true))
});L.parentNode.replaceChild(M,L);return M}if(D&&I.element!="P"){G.onKeyPress.add(function(K,L){H.lastElm=K.selection.getNode().nodeName});G.onKeyUp.add(function(L,N){var P,M=L.selection,O=M.getNode(),K=L.getBody();if(K.childNodes.length===1&&O.nodeName=="P"){O=J(O,I.element);M.select(O);M.collapse();L.nodeChanged()}else{if(N.keyCode==13&&!N.shiftKey&&H.lastElm!="P"){P=L.dom.getParent(O,"P");if(P){J(P,I.element);L.nodeChanged()}}}})}},find:function(L,I,J){var H=this.editor,G=H.getDoc().createTreeWalker(L,4,null,false),K=-1;
while(L=G.nextNode()){K++;if(I==0&&L==J){return K}if(I==1&&K==J){return L}}return -1},forceRoots:function(L,U){var M=this,L=M.editor,Y=L.getBody(),V=L.getDoc(),f=L.selection,N=f.getSel(),O=f.getRng(),Z=-2,K,S,G,H,W=-16777215;var X,I,a,R,P,J=Y.childNodes,Q;if(U&&U.keyCode==13){return true}for(Q=J.length-1;Q>=0;Q--){X=J[Q];if(X.nodeType==3||(!M.dom.isBlock(X)&&X.nodeType!=8)){if(!I){if(X.nodeType!=3||/[^\s]/g.test(X.nodeValue)){if(Z==-2&&O){if(!D){if(L.dom.getParent(O.startContainer,function(b){return b===Y
})){S=O.startOffset;G=O.endOffset;Z=M.find(Y,0,O.startContainer);K=M.find(Y,0,O.endContainer)}}else{H=V.body.createTextRange();H.moveToElementText(Y);H.collapse(1);a=H.move("character",W)*-1;H=O.duplicate();H.collapse(1);R=H.move("character",W)*-1;H=O.duplicate();H.collapse(0);P=(H.move("character",W)*-1)-R;Z=R-a;K=P}}I=L.dom.create(L.settings.forced_root_block);I.appendChild(X.cloneNode(1));X.parentNode.replaceChild(I,X)}}else{if(I.hasChildNodes()){I.insertBefore(X,I.firstChild)}else{I.appendChild(X)
}}}else{I=null}}if(Z!=-2){if(!D){I=Y.getElementsByTagName(L.settings.element)[0];O=V.createRange();if(Z!=-1){O.setStart(M.find(Y,1,Z),S)}else{O.setStart(I,0)}if(K!=-1){O.setEnd(M.find(Y,1,K),G)}else{O.setEnd(I,0)}if(N){N.removeAllRanges();N.addRange(O)}}else{try{O=N.createRange();O.moveToElementText(Y);O.collapse(1);O.moveStart("character",Z);O.moveEnd("character",K);O.select()}catch(T){}}}},getParentBlock:function(H){var G=this.dom;return G.getParent(H,G.isBlock)},insertPara:function(i){var S=this,L=S.editor,c=L.dom,j=L.getDoc(),m=L.settings,U=L.selection.getSel(),V=U.getRangeAt(0),l=j.body;
var Y,Z,W,g,f,J,H,K,N,G,Q,k,I,M,X,a=c.getViewPort(L.getWin()),P,R;function T(b){b=b.innerHTML;b=b.replace(/<(img|hr|table)/gi,"-");b=b.replace(/<[^>]+>/g,"");return b.replace(/[ \t\r\n]+/g,"")==""}Y=j.createRange();Y.setStart(U.anchorNode,U.anchorOffset);Y.collapse(true);Z=j.createRange();Z.setStart(U.focusNode,U.focusOffset);Z.collapse(true);W=Y.compareBoundaryPoints(Y.START_TO_END,Z)<0;g=W?U.anchorNode:U.focusNode;f=W?U.anchorOffset:U.focusOffset;J=W?U.focusNode:U.anchorNode;H=W?U.focusOffset:U.anchorOffset;
if(g===J&&/^(TD|TH)$/.test(g.nodeName)){c.remove(g.firstChild);L.dom.add(g,m.element,null,"<br />");k=L.dom.add(g,m.element,null,"<br />");V=j.createRange();V.selectNodeContents(k);V.collapse(1);L.selection.setRng(V);return false}if(g==l&&J==l&&l.firstChild&&L.dom.isBlock(l.firstChild)){g=J=g.firstChild;f=H=0;Y=j.createRange();Y.setStart(g,0);Z=j.createRange();Z.setStart(J,0)}g=g.nodeName=="HTML"?j.body:g;g=g.nodeName=="BODY"?g.firstChild:g;J=J.nodeName=="HTML"?j.body:J;J=J.nodeName=="BODY"?J.firstChild:J;
K=S.getParentBlock(g);N=S.getParentBlock(J);G=K?K.nodeName:m.element;if(S.dom.getParent(K,function(b){return/OL|UL|PRE/.test(b.nodeName)})){return true}if(K&&(K.nodeName=="CAPTION"||/absolute|relative|static/gi.test(K.style.position))){G=m.element;K=null}if(N&&(N.nodeName=="CAPTION"||/absolute|relative|static/gi.test(N.style.position))){G=m.element;N=null}if(/(TD|TABLE|TH|CAPTION)/.test(G)||(K&&G=="DIV"&&/left|right/gi.test(K.style.cssFloat))){G=m.element;K=N=null}Q=(K&&K.nodeName==G)?K.cloneNode(0):L.dom.create(G);
k=(N&&N.nodeName==G)?N.cloneNode(0):L.dom.create(G);k.removeAttribute("id");if(/^(H[1-6])$/.test(G)&&g.nodeValue&&f==g.nodeValue.length){k=L.dom.create(m.element)}X=I=g;do{if(X==l||X.nodeType==9||S.dom.isBlock(X)||/(TD|TABLE|TH|CAPTION)/.test(X.nodeName)){break}I=X}while((X=X.previousSibling?X.previousSibling:X.parentNode));X=M=J;do{if(X==l||X.nodeType==9||S.dom.isBlock(X)||/(TD|TABLE|TH|CAPTION)/.test(X.nodeName)){break}M=X}while((X=X.nextSibling?X.nextSibling:X.parentNode));if(I.nodeName==G){Y.setStart(I,0)
}else{Y.setStartBefore(I)}Y.setEnd(g,f);Q.appendChild(Y.cloneContents()||j.createTextNode(""));try{Z.setEndAfter(M)}catch(h){}Z.setStart(J,H);k.appendChild(Z.cloneContents()||j.createTextNode(""));V=j.createRange();if(!I.previousSibling&&I.parentNode.nodeName==G){V.setStartBefore(I.parentNode)}else{if(Y.startContainer.nodeName==G&&Y.startOffset==0){V.setStartBefore(Y.startContainer)}else{V.setStart(Y.startContainer,Y.startOffset)}}if(!M.nextSibling&&M.parentNode.nodeName==G){V.setEndAfter(M.parentNode)
}else{V.setEnd(Z.endContainer,Z.endOffset)}V.deleteContents();if(C){L.getWin().scrollTo(0,a.y)}if(Q.firstChild&&Q.firstChild.nodeName==G){Q.innerHTML=Q.firstChild.innerHTML}if(k.firstChild&&k.firstChild.nodeName==G){k.innerHTML=k.firstChild.innerHTML}if(T(Q)){Q.innerHTML="<br />"}if(T(k)){k.innerHTML=C?"&nbsp;":"<br />"}if(C&&parseFloat(opera.version())<9.5){V.insertNode(Q);V.insertNode(k)}else{V.insertNode(k);V.insertNode(Q)}k.normalize();Q.normalize();function O(b){return j.createTreeWalker(b,NodeFilter.SHOW_TEXT,null,false).nextNode()||b
}V=j.createRange();V.selectNodeContents(A?O(k):k);V.collapse(1);U.removeAllRanges();U.addRange(V);P=L.dom.getPos(k).y;R=k.clientHeight;if(P<a.y||P+R>a.y+a.h){L.getWin().scrollTo(0,P<a.y?P:P-a.h+25)}return false},backspaceDelete:function(J,P){var R=this,I=R.editor,M=I.getBody(),H,K=I.selection,G=K.getRng(),L=G.startContainer,H,N,O;if(L&&I.dom.isBlock(L)&&!/^(TD|TH)$/.test(L.nodeName)&&P){if(L.childNodes.length==0||(L.childNodes.length==1&&L.firstChild.nodeName=="BR")){H=L;while((H=H.previousSibling)&&!I.dom.isBlock(H)){}if(H){if(L!=M.firstChild){N=I.dom.doc.createTreeWalker(H,NodeFilter.SHOW_TEXT,null,false);
while(O=N.nextNode()){H=O}G=I.getDoc().createRange();G.setStart(H,H.nodeValue?H.nodeValue.length:0);G.setEnd(H,H.nodeValue?H.nodeValue.length:0);K.setRng(G);I.dom.remove(L)}return B.cancel(J)}}}function Q(S){var T;S=S.target;if(S&&S.parentNode&&S.nodeName=="BR"&&(H=R.getParentBlock(S))){T=S.previousSibling;B.remove(M,"DOMNodeInserted",Q);if(T&&T.nodeType==3&&/\s+$/.test(T.nodeValue)){return }if(S.previousSibling||S.nextSibling){I.dom.remove(S)}}}B._add(M,"DOMNodeInserted",Q);window.setTimeout(function(){B._remove(M,"DOMNodeInserted",Q)
},1)}})})();(function(){var B=tinymce.DOM,A=tinymce.dom.Event,C=tinymce.each,D=tinymce.extend;tinymce.create("tinymce.ControlManager",{ControlManager:function(E,H){var G=this,F;H=H||{};G.editor=E;G.controls={};G.onAdd=new tinymce.util.Dispatcher(G);G.onPostRender=new tinymce.util.Dispatcher(G);G.prefix=H.prefix||E.id+"_";G._cls={};G.onPostRender.add(function(){C(G.controls,function(I){I.postRender()})})},get:function(E){return this.controls[this.prefix+E]||this.controls[E]},setActive:function(G,E){var F=null;
if(F=this.get(G)){F.setActive(E)}return F},setDisabled:function(G,E){var F=null;if(F=this.get(G)){F.setDisabled(E)}return F},add:function(F){var E=this;if(F){E.controls[F.id]=F;E.onAdd.dispatch(F,E)}return F},createControl:function(H){var G,F=this,E=F.editor;C(E.plugins,function(I){if(I.createControl){G=I.createControl(H,F);if(G){return false}}});switch(H){case"|":case"separator":return F.createSeparator()}if(!G&&E.buttons&&(G=E.buttons[H])){return F.createButton(H,G)}return F.add(G)},createDropMenu:function(E,M,G){var L=this,H=L.editor,I,F,J,K;
M=D({"class":"mceDropDown",constrain:H.settings.constrain_menus},M);M["class"]=M["class"]+" "+H.getParam("skin")+"Skin";if(J=H.getParam("skin_variant")){M["class"]+=" "+H.getParam("skin")+"Skin"+J.substring(0,1).toUpperCase()+J.substring(1)}E=L.prefix+E;K=G||L._cls.dropmenu||tinymce.ui.DropMenu;I=L.controls[E]=new K(E,M);I.onAddItem.add(function(P,O){var N=O.settings;N.title=H.getLang(N.title,N.title);if(!N.onclick){N.onclick=function(Q){H.execCommand(N.cmd,N.ui||false,N.value)}}});H.onRemove.add(function(){I.destroy()
});if(tinymce.isIE){I.onShowMenu.add(function(){F=H.selection.getBookmark(1)});I.onHideMenu.add(function(){if(F){H.selection.moveToBookmark(F)}})}return L.add(I)},createListBox:function(L,H,K){var G=this,F=G.editor,I,J,E;if(G.get(L)){return null}H.title=F.translate(H.title);H.scope=H.scope||F;if(!H.onselect){H.onselect=function(M){F.execCommand(H.cmd,H.ui||false,M||H.value)}}H=D({title:H.title,"class":"mce_"+L,scope:H.scope,control_manager:G},H);L=G.prefix+L;if(F.settings.use_native_selects){J=new tinymce.ui.NativeListBox(L,H)
}else{E=K||G._cls.listbox||tinymce.ui.ListBox;J=new E(L,H)}G.controls[L]=J;if(tinymce.isWebKit){J.onPostRender.add(function(N,M){A.add(M,"mousedown",function(){F.bookmark=F.selection.getBookmark("simple")});A.add(M,"focus",function(){F.selection.moveToBookmark(F.bookmark);F.bookmark=null})})}if(J.hideMenu){F.onMouseDown.add(J.hideMenu,J)}return G.add(J)},createButton:function(L,H,K){var G=this,F=G.editor,I,J,E;if(G.get(L)){return null}H.title=F.translate(H.title);H.label=F.translate(H.label);H.scope=H.scope||F;
if(!H.onclick&&!H.menu_button){H.onclick=function(){F.execCommand(H.cmd,H.ui||false,H.value)}}H=D({title:H.title,"class":"mce_"+L,unavailable_prefix:F.getLang("unavailable",""),scope:H.scope,control_manager:G},H);L=G.prefix+L;if(H.menu_button){E=K||G._cls.menubutton||tinymce.ui.MenuButton;J=new E(L,H);F.onMouseDown.add(J.hideMenu,J)}else{E=G._cls.button||tinymce.ui.Button;J=new E(L,H)}return G.add(J)},createMenuButton:function(F,E){E=E||{};E.menu_button=1;return this.createButton(F,E)},createSplitButton:function(L,H,K){var G=this,F=G.editor,I,J,E;
if(G.get(L)){return null}H.title=F.translate(H.title);H.scope=H.scope||F;if(!H.onclick){H.onclick=function(M){F.execCommand(H.cmd,H.ui||false,M||H.value)}}if(!H.onselect){H.onselect=function(M){F.execCommand(H.cmd,H.ui||false,M||H.value)}}H=D({title:H.title,"class":"mce_"+L,scope:H.scope,control_manager:G},H);L=G.prefix+L;E=K||G._cls.splitbutton||tinymce.ui.SplitButton;J=G.add(new E(L,H));F.onMouseDown.add(J.hideMenu,J);return J},createColorSplitButton:function(E,M,G){var K=this,I=K.editor,H,J,L,F;
if(K.get(E)){return null}M.title=I.translate(M.title);M.scope=M.scope||I;if(!M.onclick){M.onclick=function(N){I.execCommand(M.cmd,M.ui||false,N||M.value)}}if(!M.onselect){M.onselect=function(N){I.execCommand(M.cmd,M.ui||false,N||M.value)}}M=D({title:M.title,"class":"mce_"+E,menu_class:I.getParam("skin")+"Skin",scope:M.scope,more_colors_title:I.getLang("more_colors")},M);E=K.prefix+E;L=G||K._cls.colorsplitbutton||tinymce.ui.ColorSplitButton;J=new L(E,M);I.onMouseDown.add(J.hideMenu,J);I.onRemove.add(function(){J.destroy()
});if(tinymce.isIE){J.onShowMenu.add(function(){F=I.selection.getBookmark(1)});J.onHideMenu.add(function(){if(F){I.selection.moveToBookmark(F);F=0}})}return K.add(J)},createToolbar:function(J,G,I){var H,F=this,E;J=F.prefix+J;E=I||F._cls.toolbar||tinymce.ui.Toolbar;H=new E(J,G);if(F.get(J)){return null}return F.add(H)},createSeparator:function(F){var E=F||this._cls.separator||tinymce.ui.Separator;return new E()},setControlType:function(F,E){return this._cls[F.toLowerCase()]=E},destroy:function(){C(this.controls,function(E){E.destroy()
});this.controls=null}})})();(function(){var A=tinymce.util.Dispatcher,D=tinymce.each,C=tinymce.isIE,B=tinymce.isOpera;tinymce.create("tinymce.WindowManager",{WindowManager:function(E){var F=this;F.editor=E;F.onOpen=new A(F);F.onClose=new A(F);F.params={};F.features={}},open:function(Q,F){var P=this,I="",L,K,G=P.editor.settings.dialog_type=="modal",N,M,H,E=tinymce.DOM.getViewPort(),O;Q=Q||{};F=F||{};M=B?E.w:screen.width;H=B?E.h:screen.height;Q.name=Q.name||"mc_"+new Date().getTime();Q.width=parseInt(Q.width||320);
Q.height=parseInt(Q.height||240);Q.resizable=true;Q.left=Q.left||parseInt(M/2)-(Q.width/2);Q.top=Q.top||parseInt(H/2)-(Q.height/2);F.inline=false;F.mce_width=Q.width;F.mce_height=Q.height;F.mce_auto_focus=Q.auto_focus;if(G){if(C){Q.center=true;Q.help=false;Q.dialogWidth=Q.width+"px";Q.dialogHeight=Q.height+"px";Q.scroll=Q.scrollbars||false}}D(Q,function(S,R){if(tinymce.is(S,"boolean")){S=S?"yes":"no"}if(!/^(name|url)$/.test(R)){if(C&&G){I+=(I?";":"")+R+":"+S}else{I+=(I?",":"")+R+"="+S}}});P.features=Q;
P.params=F;P.onOpen.dispatch(P,Q,F);O=Q.url||Q.file;if(tinymce.relaxedDomain){O+=(O.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}O=tinymce._addVer(O);try{if(C&&G){N=1;window.showModalDialog(O,window,I)}else{N=window.open(O,Q.name,I)}}catch(J){}if(!N){alert(P.editor.getLang("popup_blocked"))}},close:function(E){E.close();this.onClose.dispatch(this)},createInstance:function(G,F,E,K,J,I){var H=tinymce.resolve(G);return new H(F,E,K,J,I)},confirm:function(G,E,H,F){F=F||window;E.call(H||this,F.confirm(this._decode(this.editor.getLang(G,G))))
},alert:function(G,E,I,F){var H=this;F=F||window;F.alert(H._decode(H.editor.getLang(G,G)));if(E){E.call(I||H)}},_decode:function(E){return tinymce.DOM.decode(E).replace(/\\n/g,"\n")}})}());