(function(n){var q=/^\s*|\s*$/g,r={majorVersion:"3",minorVersion:"3.2",releaseDate:"2010-03-25",_init:function(){function g(v){if(v.src&&/tiny_mce(|_gzip|_jquery|_prototype)(_dev|_src)?.js/.test(v.src)){if(/_(src|dev)\.js/g.test(v.src))i.suffix="_src";if((t=v.src.indexOf("?"))!=-1)i.query=v.src.substring(t+1);i.baseURL=v.src.substring(0,v.src.lastIndexOf("/"));if(o&&i.baseURL.indexOf("://")==-1&&i.baseURL.indexOf("/")!==0)i.baseURL=o+i.baseURL;return i.baseURL}return null}var i=this,a=document,h=
navigator,e=h.userAgent,o,t,u;i.isOpera=n.opera&&opera.buildNumber;i.isWebKit=/WebKit/.test(e);i.isIE=!i.isWebKit&&!i.isOpera&&/MSIE/gi.test(e)&&/Explorer/gi.test(h.appName);i.isIE6=i.isIE&&/MSIE [56]/.test(e);i.isGecko=!i.isWebKit&&/Gecko/.test(e);i.isMac=e.indexOf("Mac")!=-1;i.isAir=/adobeair/i.test(e);if(n.tinyMCEPreInit){i.suffix=tinyMCEPreInit.suffix;i.baseURL=tinyMCEPreInit.base;i.query=tinyMCEPreInit.query}else{i.suffix="";e=a.getElementsByTagName("base");for(h=0;h<e.length;h++)if(u=e[h].href){if(/^https?:\/\/[^\/]+$/.test(u))u+=
"/";o=u?u.match(/.*\//)[0]:""}e=a.getElementsByTagName("script");for(h=0;h<e.length;h++)if(g(e[h]))return;if(a=a.getElementsByTagName("head")[0]){e=a.getElementsByTagName("script");for(h=0;h<e.length;h++)if(g(e[h]))return}}},is:function(g,i){if(!i)return g!==void 0;if(i=="array"&&g.hasOwnProperty&&g instanceof Array)return true;return typeof g==i},each:function(g,i,a){var h,e;if(!g)return 0;a=a||g;if(g.length!==void 0){h=0;for(e=g.length;h<e;h++)if(i.call(a,g[h],h,g)===false)return 0}else for(h in g)if(g.hasOwnProperty(h))if(i.call(a,
g[h],h,g)===false)return 0;return 1},map:function(g,i){var a=[];r.each(g,function(h){a.push(i(h))});return a},grep:function(g,i){var a=[];r.each(g,function(h){if(!i||i(h))a.push(h)});return a},inArray:function(g,i){var a,h;if(g){a=0;for(h=g.length;a<h;a++)if(g[a]===i)return a}return-1},extend:function(g,i){var a,h,e=arguments;a=1;for(h=e.length;a<h;a++){i=e[a];r.each(i,function(o,t){if(o!==void 0)g[t]=o})}return g},trim:function(g){return(g?""+g:"").replace(q,"")},create:function(g,i){var a,h,e,o,
t,u=0;g=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(g);e=g[3].match(/(^|\.)(\w+)$/i)[2];h=this.createNS(g[3].replace(/\.\w+$/,""));if(!h[e])if(g[2]=="static"){h[e]=i;this.onCreate&&this.onCreate(g[2],g[3],h[e])}else{if(!i[e]){i[e]=function(){};u=1}h[e]=i[e];this.extend(h[e].prototype,i);if(g[5]){a=this.resolve(g[5]).prototype;o=g[5].match(/\.(\w+)$/i)[1];t=h[e];h[e]=u?function(){return a[o].apply(this,arguments)}:function(){this.parent=a[o];return t.apply(this,arguments)};h[e].prototype[e]=h[e];this.each(a,
function(v,j){h[e].prototype[j]=a[j]});this.each(i,function(v,j){if(a[j])h[e].prototype[j]=function(){this.parent=a[j];return v.apply(this,arguments)};else if(j!=e)h[e].prototype[j]=v})}this.each(i["static"],function(v,j){h[e][j]=v});this.onCreate&&this.onCreate(g[2],g[3],h[e].prototype)}},walk:function(g,i,a,h){h=h||this;if(g){if(a)g=g[a];r.each(g,function(e,o){if(i.call(h,e,o,a)===false)return false;r.walk(e,i,a,h)})}},createNS:function(g,i){var a,h;i=i||n;g=g.split(".");for(a=0;a<g.length;a++){h=
g[a];i[h]||(i[h]={});i=i[h]}return i},resolve:function(g,i){var a,h;i=i||n;g=g.split(".");a=0;for(h=g.length;a<h;a++){i=i[g[a]];if(!i)break}return i},addUnload:function(g,i){var a=this;g={func:g,scope:i||this};if(a.unloads)a.unloads.push(g);else{var h=function(){var o=a.unloads,t,u;if(o){for(u in o)(t=o[u])&&t.func&&t.func.call(t.scope,1);if(n.detachEvent){n.detachEvent("onbeforeunload",e);n.detachEvent("onunload",h)}else n.removeEventListener&&n.removeEventListener("unload",h,false);a.unloads=w=
h=0;n.CollectGarbage&&CollectGarbage()}},e=function(){var o=document;if(o.readyState=="interactive"){var t=function(){o.detachEvent("onstop",t);h&&h();o=0};o&&o.attachEvent("onstop",t);n.setTimeout(function(){o&&o.detachEvent("onstop",t)},0)}};if(n.attachEvent){n.attachEvent("onunload",h);n.attachEvent("onbeforeunload",e)}else n.addEventListener&&n.addEventListener("unload",h,false);a.unloads=[g]}return g},removeUnload:function(g){var i=this.unloads,a=null;r.each(i,function(h,e){if(h&&h.func==g){i.splice(e,
1);a=g;return false}});return a},explode:function(g,i){return g?r.map(g.split(i||","),r.trim):g},_addVer:function(g){var i;if(!this.query)return g;i=(g.indexOf("?")==-1?"?":"&")+this.query;if(g.indexOf("#")==-1)return g+i;return g.replace("#",i+"#")}};r._init();n.tinymce=n.tinyMCE=r})(window);
tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,Dispatcher:function(n){this.scope=n||this;this.listeners=[]},add:function(n,q){this.listeners.push({cb:n,scope:q||this.scope});return n},addToTop:function(n,q){this.listeners.unshift({cb:n,scope:q||this.scope});return n},remove:function(n){var q=this.listeners,r=null;tinymce.each(q,function(g,i){if(n==g.cb){r=n;q.splice(i,1);return false}});return r},dispatch:function(){var n,q=arguments,r,g=this.listeners;for(r=0;r<g.length;r++){n=
g[r];n=n.cb.apply(n.scope,q);if(n===false)break}return n}});
(function(){var n=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(q,r){var g=this;q=tinymce.trim(q);r=g.settings=r||{};if(/^(mailto|tel|news|javascript|about|data):/i.test(q)||/^\s*#/.test(q))g.source=q;else{if(q.indexOf("/")===0&&q.indexOf("//")!==0)q=(r.base_uri?r.base_uri.protocol||"http":"http")+"://mce_host"+q;/^\w*:?\/\//.test(q)||(q=(r.base_uri.protocol||"http")+"://mce_host"+g.toAbsPath(r.base_uri.path,q));q=q.replace(/@@/g,"(mce_at)");q=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(q);
n(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(i,a){if(a=q[a])a=a.replace(/\(mce_at\)/g,"@@");g[i]=a});if(r=r.base_uri){if(!g.protocol)g.protocol=r.protocol;if(!g.userInfo)g.userInfo=r.userInfo;if(!g.port&&g.host=="mce_host")g.port=r.port;if(!g.host||g.host=="mce_host")g.host=r.host;g.source=""}}},setPath:function(q){q=/^(.*?)\/?(\w+)?$/.exec(q);this.path=q[0];this.directory=q[1];this.file=q[2];this.source=
"";this.getURI()},toRelative:function(q){var r;if(q==="./")return q;q=new tinymce.util.URI(q,{base_uri:this});if(q.host!="mce_host"&&this.host!=q.host&&q.host||this.port!=q.port||this.protocol!=q.protocol)return q.getURI();r=this.toRelPath(this.path,q.path);if(q.query)r+="?"+q.query;if(q.anchor)r+="#"+q.anchor;return r},toAbsolute:function(q,r){q=new tinymce.util.URI(q,{base_uri:this});return q.getURI(this.host==q.host&&this.protocol==q.protocol?r:0)},toRelPath:function(q,r){var g,i=0,a="",h,e;q=
q.substring(0,q.lastIndexOf("/"));q=q.split("/");g=r.split("/");if(q.length>=g.length){h=0;for(e=q.length;h<e;h++)if(h>=g.length||q[h]!=g[h]){i=h+1;break}}if(q.length<g.length){h=0;for(e=g.length;h<e;h++)if(h>=q.length||q[h]!=g[h]){i=h+1;break}}if(i==1)return r;h=0;for(e=q.length-(i-1);h<e;h++)a+="../";h=i-1;for(e=g.length;h<e;h++)a+=h!=i-1?"/"+g[h]:g[h];return a},toAbsPath:function(q,r){var g,i=0,a=[],h;h=/\/$/.test(r)?"/":"";q=q.split("/");r=r.split("/");n(q,function(e){e&&a.push(e)});q=a;g=r.length-
1;for(a=[];g>=0;g--)if(!(r[g].length==0||r[g]=="."))if(r[g]=="..")i++;else if(i>0)i--;else a.push(r[g]);g=q.length-i;q=g<=0?a.reverse().join("/"):q.slice(0,g).join("/")+"/"+a.reverse().join("/");if(q.indexOf("/")!==0)q="/"+q;if(h&&q.lastIndexOf("/")!==q.length-1)q+=h;return q},getURI:function(q){var r;if(!this.source||q){r="";if(!q){if(this.protocol)r+=this.protocol+"://";if(this.userInfo)r+=this.userInfo+"@";if(this.host)r+=this.host;if(this.port)r+=":"+this.port}if(this.path)r+=this.path;if(this.query)r+=
"?"+this.query;if(this.anchor)r+="#"+this.anchor;this.source=r}return this.source}})})();
(function(){var n=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(q){q=this.get(q);var r;q&&n(q.split("&"),function(g){g=g.split("=");r=r||{};r[unescape(g[0])]=unescape(g[1])});return r},setHash:function(q,r,g,i,a,h){var e="";n(r,function(o,t){e+=(!e?"":"&")+escape(t)+"="+escape(o)});this.set(q,e,g,i,a,h)},get:function(q){var r=document.cookie,g=q+"=",i;if(r){i=r.indexOf("; "+g);if(i==-1){i=r.indexOf(g);if(i!=0)return null}else i+=2;q=r.indexOf(";",i);if(q==-1)q=r.length;
return unescape(r.substring(i+g.length,q))}},set:function(q,r,g,i,a,h){document.cookie=q+"="+escape(r)+(g?"; expires="+g.toGMTString():"")+(i?"; path="+escape(i):"")+(a?"; domain="+a:"")+(h?"; secure":"")},remove:function(q,r){var g=new Date;g.setTime(g.getTime()-1E3);this.set(q,"",g,r,g)}})})();
tinymce.create("static tinymce.util.JSON",{serialize:function(n){var q,r,g=tinymce.util.JSON.serialize,i;if(n==null)return"null";i=typeof n;if(i=="string"){r="\u0008b\tt\nn\u000cf\rr\"\"''\\\\";return'"'+n.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(a,h){q=r.indexOf(h);if(q+1)return"\\"+r.charAt(q+1);a=h.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+'"'}if(i=="object"){if(n.hasOwnProperty&&n instanceof Array){q=0;for(r="[";q<n.length;q++)r+=(q>0?",":"")+g(n[q]);return r+
"]"}r="{";for(q in n)r+=typeof n[q]!="function"?(r.length>1?',"':'"')+q+'":'+g(n[q]):"";return r+"}"}return""+n},parse:function(n){try{return eval("("+n+")")}catch(q){}}});
tinymce.create("static tinymce.util.XHR",{send:function(n){function q(h){r=0;try{r=new ActiveXObject(h)}catch(e){}return r}var r,g=window,i=0;n.scope=n.scope||this;n.success_scope=n.success_scope||n.scope;n.error_scope=n.error_scope||n.scope;n.async=n.async===false?false:true;n.data=n.data||"";if(r=g.XMLHttpRequest?new XMLHttpRequest:q("Microsoft.XMLHTTP")||q("Msxml2.XMLHTTP")){r.overrideMimeType&&r.overrideMimeType(n.content_type);r.open(n.type||(n.data?"POST":"GET"),n.url,n.async);n.content_type&&
r.setRequestHeader("Content-Type",n.content_type);r.setRequestHeader("X-Requested-With","XMLHttpRequest");r.send(n.data);var a=function(){if(!n.async||r.readyState==4||i++>1E4){if(n.success&&i<1E4&&r.status==200)n.success.call(n.success_scope,""+r.responseText,r,n);else if(n.error)n.error.call(n.error_scope,i>1E4?"TIMED_OUT":"GENERAL",r,n);r=null}else g.setTimeout(a,10)};if(!n.async)return a();g.setTimeout(a,10)}}});
(function(){var n=tinymce.extend,q=tinymce.util.JSON,r=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(g){this.settings=n({},g);this.count=0},send:function(g){var i=g.error,a=g.success;g=n(this.settings,g);g.success=function(h,e){h=q.parse(h);if(typeof h=="undefined")h={error:"JSON Parse error."};h.error?i.call(g.error_scope||g.scope,h.error,e):a.call(g.success_scope||g.scope,h.result)};g.error=function(h,e){i.call(g.error_scope||g.scope,h,e)};g.data=q.serialize({id:g.id||
"c"+this.count++,method:g.method,params:g.params});g.content_type="application/json";r.send(g)},"static":{sendRPC:function(g){return(new tinymce.util.JSONRequest).send(g)}}})})();
(function(n){function q(c){var k={},b;c=c.split(",");for(b=c.length;b>=0;b--)k[c[b]]=1;return k}var r=n.each,g=n.is,i=n.isWebKit,a=n.isIE,h=/^(H[1-6R]|P|DIV|ADDRESS|PRE|FORM|T(ABLE|BODY|HEAD|FOOT|H|R|D)|LI|OL|UL|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|MENU|ISINDEX|SAMP)$/,e=q("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),o=q("src,href,style,coords,shape"),t={"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"},u=/[<>&\"]/g,v=
/^([a-z0-9],?)+$/i,j=/<(\w+)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)(\s*\/?)>/g,f=/(\w+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;n.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",
type:"type"},DOMUtils:function(c,k){var b=this;b.doc=c;b.win=window;b.files={};b.cssFlicker=false;b.counter=0;b.boxModel=!n.isIE||c.compatMode=="CSS1Compat";b.stdMode=c.documentMode===8;b.settings=k=n.extend({keep_values:false,hex_colors:1,process_html:1},k);if(n.isIE6)try{c.execCommand("BackgroundImageCache",false,true)}catch(d){b.cssFlicker=true}if(k.valid_styles){b._styles={};r(k.valid_styles,function(m,l){b._styles[l]=n.explode(m)})}n.addUnload(b.destroy,b)},getRoot:function(){var c=this.settings;
return c&&this.get(c.root_element)||this.doc.body},getViewPort:function(c){var k;c=!c?this.win:c;k=c.document;k=this.boxModel?k.documentElement:k.body;return{x:c.pageXOffset||k.scrollLeft,y:c.pageYOffset||k.scrollTop,w:c.innerWidth||k.clientWidth,h:c.innerHeight||k.clientHeight}},getRect:function(c){var k;c=this.get(c);k=this.getPos(c);c=this.getSize(c);return{x:k.x,y:k.y,w:c.w,h:c.h}},getSize:function(c){var k,b;c=this.get(c);k=this.getStyle(c,"width");b=this.getStyle(c,"height");if(k.indexOf("px")===
-1)k=0;if(b.indexOf("px")===-1)b=0;return{w:parseInt(k)||c.offsetWidth||c.clientWidth,h:parseInt(b)||c.offsetHeight||c.clientHeight}},getParent:function(c,k,b){return this.getParents(c,k,b,false)},getParents:function(c,k,b,d){var m=this,l,s=m.settings,p=[];c=m.get(c);d=d===undefined;if(s.strict_root)b=b||m.getRoot();if(g(k,"string")){l=k;k=k==="*"?function(z){return z.nodeType==1}:function(z){return m.is(z,l)}}for(;c;){if(c==b||!c.nodeType||c.nodeType===9)break;if(!k||k(c))if(d)p.push(c);else return c;
c=c.parentNode}return d?p:null},get:function(c){var k;if(c&&this.doc&&typeof c=="string"){k=c;if((c=this.doc.getElementById(c))&&c.id!==k)return this.doc.getElementsByName(k)[1]}return c},getNext:function(c,k){return this._findSib(c,k,"nextSibling")},getPrev:function(c,k){return this._findSib(c,k,"previousSibling")},select:function(c,k){return n.dom.Sizzle(c,this.get(k)||this.get(this.settings.root_element)||this.doc,[])},is:function(c,k){var b;if(c.length===undefined){if(k==="*")return c.nodeType==
1;if(v.test(k)){k=k.toLowerCase().split(/,/);c=c.nodeName.toLowerCase();for(b=k.length-1;b>=0;b--)if(k[b]==c)return true;return false}}return n.dom.Sizzle.matches(k,c.nodeType?[c]:c).length>0},add:function(c,k,b,d,m){var l=this;return this.run(c,function(s){var p;p=g(k,"string")?l.doc.createElement(k):k;l.setAttribs(p,b);if(d)d.nodeType?p.appendChild(d):l.setHTML(p,d);return!m?s.appendChild(p):p})},create:function(c,k,b){return this.add(this.doc.createElement(c),c,k,b,1)},createHTML:function(c,k,
b){var d="",m;d+="<"+c;for(m in k)if(k.hasOwnProperty(m))d+=" "+m+'="'+this.encode(k[m])+'"';if(n.is(b))return d+">"+b+"</"+c+">";return d+" />"},remove:function(c,k){return this.run(c,function(b){var d,m;d=b.parentNode;if(!d)return null;if(k)for(;m=b.firstChild;)m.nodeType!==3||m.nodeValue?d.insertBefore(m,b):b.removeChild(m);return d.removeChild(b)})},setStyle:function(c,k,b){var d=this;return d.run(c,function(m){var l;l=m.style;k=k.replace(/-(\D)/g,function(s,p){return p.toUpperCase()});if(d.pixelStyles.test(k)&&
(n.is(b,"number")||/^[\-0-9\.]+$/.test(b)))b+="px";switch(k){case "opacity":if(a){l.filter=b===""?"":"alpha(opacity="+b*100+")";if(!c.currentStyle||!c.currentStyle.hasLayout)l.display="inline-block"}l[k]=l["-moz-opacity"]=l["-khtml-opacity"]=b||"";break;case "float":a?(l.styleFloat=b):(l.cssFloat=b);break;default:l[k]=b||""}d.settings.update_styles&&d.setAttrib(m,"_mce_style")})},getStyle:function(c,k,b){c=this.get(c);if(!c)return false;if(this.doc.defaultView&&b){k=k.replace(/[A-Z]/g,function(m){return"-"+
m});try{return this.doc.defaultView.getComputedStyle(c,null).getPropertyValue(k)}catch(d){return null}}k=k.replace(/-(\D)/g,function(m,l){return l.toUpperCase()});if(k=="float")k=a?"styleFloat":"cssFloat";if(c.currentStyle&&b)return c.currentStyle[k];return c.style[k]},setStyles:function(c,k){var b=this,d=b.settings,m;m=d.update_styles;d.update_styles=0;r(k,function(l,s){b.setStyle(c,s,l)});d.update_styles=m;d.update_styles&&b.setAttrib(c,d.cssText)},setAttrib:function(c,k,b){var d=this;if(c&&k){if(d.settings.strict)k=
k.toLowerCase();return this.run(c,function(m){var l=d.settings;switch(k){case "style":if(!g(b,"string")){r(b,function(s,p){d.setStyle(m,p,s)});return}if(l.keep_values)b&&!d._isRes(b)?m.setAttribute("_mce_style",b,2):m.removeAttribute("_mce_style",2);m.style.cssText=b;break;case "class":m.className=b||"";break;case "src":case "href":if(l.keep_values){if(l.url_converter)b=l.url_converter.call(l.url_converter_scope||d,b,k,m);d.setAttrib(m,"_mce_"+k,b,2)}break;case "shape":m.setAttribute("_mce_style",
b);break}g(b)&&b!==null&&b.length!==0?m.setAttribute(k,""+b,2):m.removeAttribute(k,2)})}},setAttribs:function(c,k){var b=this;return this.run(c,function(d){r(k,function(m,l){b.setAttrib(d,l,m)})})},getAttrib:function(c,k,b){var d;c=this.get(c);if(!c||c.nodeType!==1)return false;g(b)||(b="");if(/^(src|href|style|coords|shape)$/.test(k))if(d=c.getAttribute("_mce_"+k))return d;if(a&&this.props[k])d=(d=c[this.props[k]])&&d.nodeValue?d.nodeValue:d;d||(d=c.getAttribute(k,2));if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(k)){if(c[this.props[k]]===
true&&d==="")return k;return d?k:""}if(c.nodeName==="FORM"&&c.getAttributeNode(k))return c.getAttributeNode(k).nodeValue;if(k==="style")if(d=d||c.style.cssText){d=this.serializeStyle(this.parseStyle(d),c.nodeName);this.settings.keep_values&&!this._isRes(d)&&c.setAttribute("_mce_style",d)}if(i&&k==="class"&&d)d=d.replace(/(apple|webkit)\-[a-z\-]+/gi,"");if(a)switch(k){case "rowspan":case "colspan":if(d===1)d="";break;case "size":if(d==="+0"||d===20||d===0)d="";break;case "width":case "height":case "vspace":case "checked":case "disabled":case "readonly":if(d===
0)d="";break;case "hspace":if(d===-1)d="";break;case "maxlength":case "tabindex":if(d===32768||d===2147483647||d==="32768")d="";break;case "multiple":case "compact":case "noshade":case "nowrap":if(d===65535)return k;return b;case "shape":d=d.toLowerCase();break;default:if(k.indexOf("on")===0&&d)d=(""+d).replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1")}return d!==undefined&&d!==null&&d!==""?""+d:b},getPos:function(c,k){var b=0,d=0,m=this.doc;c=this.get(c);k=k||m.body;if(c){if(a&&!this.stdMode){c=
c.getBoundingClientRect();k=this.boxModel?m.documentElement:m.body;b=this.getStyle(this.select("html")[0],"borderWidth");b=(b=="medium"||this.boxModel&&!this.isIE6)&&2||b;c.top+=this.win.self!=this.win.top?2:0;return{x:c.left+k.scrollLeft-b,y:c.top+k.scrollTop-b}}for(m=c;m&&m!=k&&m.nodeType;){b+=m.offsetLeft||0;d+=m.offsetTop||0;m=m.offsetParent}for(m=c.parentNode;m&&m!=k&&m.nodeType;){b-=m.scrollLeft||0;d-=m.scrollTop||0;m=m.parentNode}}return{x:b,y:d}},parseStyle:function(c){function k(s,p,z){var G,
F;if(G=l[s+"-top"+p]){F=l[s+"-right"+p];if(G==F){G=l[s+"-bottom"+p];if(F==G){F=l[s+"-left"+p];if(G==F){l[z]=F;delete l[s+"-top"+p];delete l[s+"-right"+p];delete l[s+"-bottom"+p];delete l[s+"-left"+p]}}}}}function b(s,p,z,G){var F;if(F=l[p])if(F=l[z])if(F=l[G]){l[s]=l[p]+" "+l[z]+" "+l[G];delete l[p];delete l[z];delete l[G]}}var d=this,m=d.settings,l={};if(!c)return l;c=c.replace(/&(#?[a-z0-9]+);/g,"&$1_MCE_SEMI_");r(c.split(";"),function(s){var p,z=[];if(s){s=s.replace(/_MCE_SEMI_/g,";");s=s.replace(/url\([^\)]+\)/g,
function(G){z.push(G);return"url("+z.length+")"});s=s.split(":");p=n.trim(s[1]);p=p.replace(/url\(([^\)]+)\)/g,function(G,F){return z[parseInt(F)-1]});p=p.replace(/rgb\([^\)]+\)/g,function(G){return d.toHex(G)});if(m.url_converter)p=p.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(G,F){return"url("+m.url_converter.call(m.url_converter_scope||d,d.decode(F),"style",null)+")"});l[n.trim(s[0]).toLowerCase()]=p}});k("border","","border");k("border","-width","border-width");k("border","-color","border-color");
k("border","-style","border-style");k("padding","","padding");k("margin","","margin");b("border","border-width","border-style","border-color");if(a)if(l.border=="medium none")l.border="";return l},serializeStyle:function(c,k){function b(m,l){if(l&&m)if(l.indexOf("-")!==0){switch(l){case "font-weight":if(m==700)m="bold";break;case "color":case "background-color":m=m.toLowerCase();break}d+=(d?" ":"")+l+": "+m+";"}}var d="";if(k&&this._styles){r(this._styles["*"],function(m){b(c[m],m)});r(this._styles[k.toLowerCase()],
function(m){b(c[m],m)})}else r(c,b);return d},loadCSS:function(c){var k=this,b=k.doc,d;c||(c="");d=k.select("head")[0];r(c.split(","),function(m){var l;if(!k.files[m]){k.files[m]=true;l=k.create("link",{rel:"stylesheet",href:n._addVer(m)});if(a&&b.documentMode)l.onload=function(){b.recalc();l.onload=null};d.appendChild(l)}})},addClass:function(c,k){return this.run(c,function(b){var d;if(!k)return 0;if(this.hasClass(b,k))return b.className;d=this.removeClass(b,k);return b.className=(d!=""?d+" ":"")+
k})},removeClass:function(c,k){var b=this,d;return b.run(c,function(m){var l;if(b.hasClass(m,k)){d||(d=new RegExp("(^|\\s+)"+k+"(\\s+|$)","g"));l=m.className.replace(d," ");l=n.trim(l!=" "?l:"");m.className=l;if(!l){m.removeAttribute("class");m.removeAttribute("className")}return l}return m.className})},hasClass:function(c,k){c=this.get(c);if(!c||!k)return false;return(" "+c.className+" ").indexOf(" "+k+" ")!==-1},show:function(c){return this.setStyle(c,"display","block")},hide:function(c){return this.setStyle(c,
"display","none")},isHidden:function(c){c=this.get(c);return!c||c.style.display=="none"||this.getStyle(c,"display")=="none"},uniqueId:function(c){return(!c?"mce_":c)+this.counter++},setHTML:function(c,k){var b=this;return this.run(c,function(d){var m,l,s,p,z;k=b.processHTML(k);if(a){var G=function(){for(;d.firstChild;)d.firstChild.removeNode();try{d.innerHTML="<br />"+k;d.removeChild(d.firstChild)}catch(F){m=b.create("div");m.innerHTML="<br />"+k;r(m.childNodes,function(M,R){R&&d.appendChild(M)})}};
if(b.settings.fix_ie_paragraphs)k=k.replace(/<p><\/p>|<p([^>]+)><\/p>|<p[^\/+]\/>/gi,'<p$1 _mce_keep="true">&nbsp;</p>');G();if(b.settings.fix_ie_paragraphs){s=d.getElementsByTagName("p");l=s.length-1;for(m=0;l>=0;l--){p=s[l];if(!p.hasChildNodes()){if(!p._mce_keep){m=1;break}p.removeAttribute("_mce_keep")}}}if(m){k=k.replace(/<p ([^>]+)>|<p>/ig,'<div $1 _mce_tmp="1">');k=k.replace(/<\/p>/g,"</div>");G();if(b.settings.fix_ie_paragraphs){s=d.getElementsByTagName("DIV");for(l=s.length-1;l>=0;l--){p=
s[l];if(p._mce_tmp){z=b.doc.createElement("p");p.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(F,M){if(M!=="_mce_tmp"){F=p.getAttribute(M);if(!F&&M==="class")F=p.className;z.setAttribute(M,F)}});for(m=0;m<p.childNodes.length;m++)z.appendChild(p.childNodes[m].cloneNode(true));p.swapNode(z)}}}}}else d.innerHTML=k;return k})},processHTML:function(c){var k=this,b=k.settings,d=[];if(!b.process_html)return c;if(a){c=c.replace(/&apos;/g,"&#39;");c=c.replace(/\s+(disabled|checked|readonly|selected)\s*=\s*[\"\']?(false|0)[\"\']?/gi,
"")}c=c.replace(/<a( )([^>]+)\/>|<a\/>/gi,"<a$1$2></a>");if(b.keep_values){if(/<script|noscript|style/i.test(c)){var m=function(l){l=l.replace(/(<!--\[CDATA\[|\]\]--\>)/g,"\n");l=l.replace(/^[\r\n]*|[\r\n]*$/g,"");l=l.replace(/^\s*(\/\/\s*<!--|\/\/\s*<!\[CDATA\[|<!--|<!\[CDATA\[)[\r\n]*/g,"");return l=l.replace(/\s*(\/\/\s*\]\]>|\/\/\s*--\>|\]\]>|--\>|\]\]--\>)\s*$/g,"")};c=c.replace(/<script([^>]+|)>([\s\S]*?)<\/script>/gi,function(l,s,p){s||(s=' type="text/javascript"');s=s.replace(/src=\"([^\"]+)\"?/i,
function(z,G){if(b.url_converter)G=k.encode(b.url_converter.call(b.url_converter_scope||k,k.decode(G),"src","script"));return'_mce_src="'+G+'"'});if(n.trim(p)){d.push(m(p));p="<!--\nMCE_SCRIPT:"+(d.length-1)+"\n// --\>"}return"<mce:script"+s+">"+p+"</mce:script>"});c=c.replace(/<style([^>]+|)>([\s\S]*?)<\/style>/gi,function(l,s,p){if(p){d.push(m(p));p="<!--\nMCE_SCRIPT:"+(d.length-1)+"\n--\>"}return"<mce:style"+s+">"+p+"</mce:style><style "+s+' _mce_bogus="1">'+p+"</style>"});c=c.replace(/<noscript([^>]+|)>([\s\S]*?)<\/noscript>/g,
function(l,s,p){return"<mce:noscript"+s+"><!--"+k.encode(p).replace(/--/g,"&#45;&#45;")+"--\></mce:noscript>"})}c=c.replace(/<!\[CDATA\[([\s\S]+)\]\]>/g,"<!--[CDATA[$1]]--\>");c=function(l){return l.replace(j,function(s,p,z,G){return"<"+p+z.replace(f,function(F,M,R,U,W){M=M.toLowerCase();R=R||U||W||"";if(e[M]){if(R==="false"||R==="0")return;return M+'="'+M+'"'}if(o[M]&&z.indexOf("_mce_"+M)==-1){F=k.decode(R);if(b.url_converter&&(M=="src"||M=="href"))F=b.url_converter.call(b.url_converter_scope||k,
F,M,p);if(M=="style")F=k.serializeStyle(k.parseStyle(F),M);return M+'="'+R+'" _mce_'+M+'="'+k.encode(F)+'"'}return F})+G+">"})}(c);c=c.replace(/MCE_SCRIPT:([0-9]+)/g,function(l,s){return d[s]})}return c},getOuterHTML:function(c){var k;c=this.get(c);if(!c)return null;if(c.outerHTML!==undefined)return c.outerHTML;k=(c.ownerDocument||this.doc).createElement("body");k.appendChild(c.cloneNode(true));return k.innerHTML},setOuterHTML:function(c,k,b){function d(l,s,p){p=p.createElement("body");p.innerHTML=
s;for(s=p.lastChild;s;){m.insertAfter(s.cloneNode(true),l);s=s.previousSibling}m.remove(l)}var m=this;return this.run(c,function(l){l=m.get(l);if(l.nodeType==1){b=b||l.ownerDocument||m.doc;if(a)try{if(a&&l.nodeType==1)l.outerHTML=k;else d(l,k,b)}catch(s){d(l,k,b)}else d(l,k,b)}})},decode:function(c){var k,b;if(/&[\w#]+;/.test(c)){k=this.doc.createElement("div");k.innerHTML=c;k=k.firstChild;b="";if(k){do b+=k.nodeValue;while(k=k.nextSibling)}return b||c}return c},encode:function(c){return(""+c).replace(u,
function(k){return t[k]})},insertAfter:function(c,k){k=this.get(k);return this.run(c,function(b){var d,m;d=k.parentNode;(m=k.nextSibling)?d.insertBefore(b,m):d.appendChild(b);return b})},isBlock:function(c){if(c.nodeType&&c.nodeType!==1)return false;c=c.nodeName||c;return h.test(c)},replace:function(c,k,b){if(g(k,"array"))c=c.cloneNode(true);return this.run(k,function(d){b&&r(n.grep(d.childNodes),function(m){c.appendChild(m)});return d.parentNode.replaceChild(c,d)})},rename:function(c,k){var b=this,
d;if(c.nodeName!=k.toUpperCase()){d=b.create(k);r(b.getAttribs(c),function(m){b.setAttrib(d,m.nodeName,b.getAttrib(c,m.nodeName))});b.replace(d,c,1)}return d||c},findCommonAncestor:function(c,k){for(var b=c,d;b;){for(d=k;d&&b!=d;)d=d.parentNode;if(b==d)break;b=b.parentNode}if(!b&&c.ownerDocument)return c.ownerDocument.documentElement;return b},toHex:function(c){function k(d){d=parseInt(d).toString(16);return d.length>1?d:"0"+d}var b=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(c);
if(b)return c="#"+k(b[1])+k(b[2])+k(b[3]);return c},getClasses:function(){function c(s){r(s.imports,function(p){c(p)});r(s.cssRules||s.rules,function(p){switch(p.type||1){case 1:p.selectorText&&r(p.selectorText.split(","),function(z){z=z.replace(/^\s*|\s*$|^\s\./g,"");if(!(/\.mce/.test(z)||!/\.[\w\-]+$/.test(z))){m=z;z=z.replace(/.*\.([a-z0-9_\-]+).*/i,"$1");if(!(d&&!(z=d(z,m))))if(!b[z]){k.push({"class":z});b[z]=1}}});break;case 3:c(p.styleSheet);break}})}var k=[],b={},d=this.settings.class_filter,
m;if(this.classes)return this.classes;try{r(this.doc.styleSheets,c)}catch(l){}if(k.length>0)this.classes=k;return k},run:function(c,k,b){var d=this,m;if(d.doc&&typeof c==="string")c=d.get(c);if(!c)return false;b=b||this;if(!c.nodeType&&(c.length||c.length===0)){m=[];r(c,function(l,s){if(l){if(typeof l=="string")l=d.doc.getElementById(l);m.push(k.call(b,l,s))}});return m}return k.call(b,c)},getAttribs:function(c){var k;c=this.get(c);if(!c)return[];if(a){k=[];if(c.nodeName=="OBJECT")return c.attributes;
c.nodeName==="OPTION"&&this.getAttrib(c,"selected")&&k.push({specified:1,nodeName:"selected"});c.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(b){k.push({specified:1,nodeName:b})});return k}return c.attributes},destroy:function(c){this.events&&this.events.destroy();this.win=this.doc=this.root=this.events=null;c||n.removeUnload(this.destroy)},createRng:function(){var c=this.doc;return c.createRange?c.createRange():new n.dom.Range(this)},
nodeIndex:function(c,k){var b=0,d,m;if(c){d=c.nodeType;for(c=c.previousSibling;c;c=c.previousSibling){m=c.nodeType;if(!k||m!=3||d!=m&&c.nodeValue.length)b++;d=m}}return b},split:function(c,k,b){function d(z){var G,F=z.childNodes;if(!(z.nodeType==1&&z.getAttribute("_mce_type")=="bookmark")){for(G=F.length-1;G>=0;G--)d(F[G]);if(z.nodeType!=9){if(z.nodeType==3&&z.nodeValue.length>0)return;if(z.nodeType==1){F=z.childNodes;F.length==1&&F[0]&&F[0].nodeType==1&&F[0].getAttribute("_mce_type")=="bookmark"&&
z.parentNode.insertBefore(F[0],z);if(F.length||/^(br|hr|input|img)$/i.test(z.nodeName))return}m.remove(z)}return z}}var m=this,l=m.createRng(),s,p;if(c&&k){l.setStart(c.parentNode,m.nodeIndex(c));l.setEnd(k.parentNode,m.nodeIndex(k));s=l.extractContents();l=m.createRng();l.setStart(k.parentNode,m.nodeIndex(k)+1);l.setEnd(c.parentNode,m.nodeIndex(c)+1);l=l.extractContents();p=c.parentNode;p.insertBefore(d(s),c);b?p.replaceChild(b,k):p.insertBefore(k,c);p.insertBefore(d(l),c);m.remove(c);return b||
k}},bind:function(c,k,b,d){if(!this.events)this.events=new n.dom.EventUtils;return this.events.add(c,k,b,d||this)},unbind:function(c,k,b){if(!this.events)this.events=new n.dom.EventUtils;return this.events.remove(c,k,b)},_findSib:function(c,k,b){var d=this,m=k;if(c){if(g(m,"string"))m=function(l){return d.is(l,k)};for(c=c[b];c;c=c[b])if(m(c))return c}return null},_isRes:function(c){return/^(top|left|bottom|right|width|height)/i.test(c)||/;\s*(top|left|bottom|right|width|height)/i.test(c)}});n.DOM=
new n.dom.DOMUtils(document,{process_html:0})})(tinymce);
(function(n){function q(r){function g(x,y){z(ba,x,y)}function i(x,y){z(ca,x,y)}function a(x){g(x.parentNode,E(x))}function h(x){g(x.parentNode,E(x)+1)}function e(x){i(x.parentNode,E(x))}function o(x){i(x.parentNode,E(x)+1)}function t(x){if(x){I[ga]=I[V];I[Y]=I[X]}else{I[V]=I[ga];I[X]=I[Y]}I.collapsed=ba}function u(x){a(x);o(x)}function v(x){g(x,0);i(x,x.nodeType===1?x.childNodes.length:x.nodeValue.length)}function j(x){var y=I[V],B=I[X],A=I[ga],D=I[Y];if(x===0)return p(y,B,y,B);if(x===1)return p(y,
B,A,D);if(x===2)return p(A,D,A,D);if(x===3)return p(A,D,y,B)}function f(){G(da)}function c(){return G(la)}function k(){return G(aa)}function b(x){var y=this[V],B=this[X],A;if((y.nodeType===3||y.nodeType===4)&&y.nodeValue)if(B)if(B>=y.nodeValue.length)r.insertAfter(x,y);else{B=y.splitText(B);y.parentNode.insertBefore(x,B)}else y.parentNode.insertBefore(x,y);else{if(y.childNodes.length>0)A=y.childNodes[B];A?y.insertBefore(x,A):y.appendChild(x)}}function d(x){var y=I.extractContents();I.insertNode(x);
x.appendChild(y);I.selectNode(x)}function m(){return C(new q(r),{startContainer:I[V],startOffset:I[X],endContainer:I[ga],endOffset:I[Y],collapsed:I.collapsed,commonAncestorContainer:I.commonAncestorContainer})}function l(x,y){var B;if(x.nodeType==3)return x;if(y<0)return x;for(B=x.firstChild;B&&y>0;){--y;B=B.nextSibling}if(B)return B;return x}function s(){return I[V]==I[ga]&&I[X]==I[Y]}function p(x,y,B,A){var D,H;if(x==B){if(y==A)return 0;if(y<A)return-1;return 1}for(D=B;D&&D.parentNode!=x;)D=D.parentNode;
if(D){H=0;for(B=x.firstChild;B!=D&&H<y;){H++;B=B.nextSibling}if(y<=H)return-1;return 1}for(D=x;D&&D.parentNode!=B;)D=D.parentNode;if(D){H=0;for(B=B.firstChild;B!=D&&H<A;){H++;B=B.nextSibling}if(H<A)return-1;return 1}y=r.findCommonAncestor(x,B);for(x=x;x&&x.parentNode!=y;)x=x.parentNode;x||(x=y);for(A=B;A&&A.parentNode!=y;)A=A.parentNode;A||(A=y);if(x==A)return 0;for(B=y.firstChild;B;){if(B==x)return-1;if(B==A)return 1;B=B.nextSibling}}function z(x,y,B){if(x){I[V]=y;I[X]=B}else{I[ga]=y;I[Y]=B}for(y=
I[ga];y.parentNode;)y=y.parentNode;for(B=I[V];B.parentNode;)B=B.parentNode;if(B==y)p(I[V],I[X],I[ga],I[Y])>0&&I.collapse(x);else I.collapse(x);I.collapsed=s();I.commonAncestorContainer=r.findCommonAncestor(I[V],I[ga])}function G(x){var y,B=0,A=0,D;if(I[V]==I[ga])return F(x);y=I[ga];for(D=y.parentNode;D;y=D,D=D.parentNode){if(D==I[V])return M(y,x);++B}y=I[V];for(D=y.parentNode;D;y=D,D=D.parentNode){if(D==I[ga])return R(y,x);++A}A=A-B;for(y=I[V];A>0;){y=y.parentNode;A--}for(B=I[ga];A<0;){B=B.parentNode;
A++}A=y.parentNode;for(D=B.parentNode;A!=D;A=A.parentNode,D=D.parentNode){y=A;B=D}return U(y,B,x)}function F(x){var y,B,A,D;if(x!=da)y=ia.createDocumentFragment();if(I[X]==I[Y])return y;if(I[V].nodeType==3){B=I[V].nodeValue;B=B.substring(I[X],I[Y]);if(x!=aa){I[V].deleteData(I[X],I[Y]-I[X]);I.collapse(ba)}if(x==da)return;y.appendChild(ia.createTextNode(B));return y}A=l(I[V],I[X]);for(B=I[Y]-I[X];B>0;){D=A.nextSibling;A=Q(A,x);y&&y.appendChild(A);--B;A=D}x!=aa&&I.collapse(ba);return y}function M(x,
y){var B,A,D,H;if(y!=da)B=ia.createDocumentFragment();A=W(x,y);B&&B.appendChild(A);D=E(x)-I[X];if(D<=0){if(y!=aa){I.setEndBefore(x);I.collapse(ca)}return B}for(A=x.previousSibling;D>0;){H=A.previousSibling;A=Q(A,y);B&&B.insertBefore(A,B.firstChild);--D;A=H}if(y!=aa){I.setEndBefore(x);I.collapse(ca)}return B}function R(x,y){var B,A,D,H;if(y!=da)B=ia.createDocumentFragment();D=S(x,y);B&&B.appendChild(D);A=E(x);++A;A=I[Y]-A;for(D=x.nextSibling;A>0;){H=D.nextSibling;D=Q(D,y);B&&B.appendChild(D);--A;D=
H}if(y!=aa){I.setStartAfter(x);I.collapse(ba)}return B}function U(x,y,B){var A,D,H,J;if(B!=da)D=ia.createDocumentFragment();A=S(x,B);D&&D.appendChild(A);H=E(x);J=E(y);++H;H=J-H;for(A=x.nextSibling;H>0;){J=A.nextSibling;A=Q(A,B);D&&D.appendChild(A);A=J;--H}A=W(y,B);D&&D.appendChild(A);if(B!=aa){I.setStartAfter(x);I.collapse(ba)}return D}function W(x,y){var B=l(I[ga],I[Y]-1),A,D,H,J=B!=I[ga];if(B==x)return K(B,J,ca,y);A=B.parentNode;for(D=K(A,ca,ca,y);A;){for(;B;){H=B.previousSibling;B=K(B,J,ca,y);
y!=da&&D.insertBefore(B,D.firstChild);J=ba;B=H}if(A==x)return D;B=A.previousSibling;A=A.parentNode;H=K(A,ca,ca,y);y!=da&&H.appendChild(D);D=H}}function S(x,y){var B=l(I[V],I[X]),A=B!=I[V],D,H,J;if(B==x)return K(B,A,ba,y);D=B.parentNode;for(H=K(D,ca,ba,y);D;){for(;B;){J=B.nextSibling;B=K(B,A,ba,y);y!=da&&H.appendChild(B);A=ba;B=J}if(D==x)return H;B=D.nextSibling;D=D.parentNode;J=K(D,ca,ba,y);y!=da&&J.appendChild(H);H=J}}function K(x,y,B,A){var D;if(y)return Q(x,A);if(x.nodeType==3){y=x.nodeValue;if(B){D=
I[X];B=y.substring(D);y=y.substring(0,D)}else{D=I[Y];B=y.substring(0,D);y=y.substring(D)}if(A!=aa)x.nodeValue=y;if(A==da)return;x=x.cloneNode(ca);x.nodeValue=B;return x}if(A!=da)return x.cloneNode(ca)}function Q(x,y){if(y!=da)return y==aa?x.cloneNode(ba):x;x.parentNode.removeChild(x)}var I=this,ia=r.doc,la=0,aa=1,da=2,ba=true,ca=false,X="startOffset",V="startContainer",ga="endContainer",Y="endOffset",C=tinymce.extend,E=r.nodeIndex;C(I,{startContainer:ia,startOffset:0,endContainer:ia,endOffset:0,collapsed:ba,
commonAncestorContainer:ia,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:g,setEnd:i,setStartBefore:a,setStartAfter:h,setEndBefore:e,setEndAfter:o,collapse:t,selectNode:u,selectNodeContents:v,compareBoundaryPoints:j,deleteContents:f,extractContents:c,cloneContents:k,insertNode:b,surroundContents:d,cloneRange:m})}n.Range=q})(tinymce.dom);
(function(){function n(q){function r(v,j){if(v&&j){if(v.item&&j.item&&v.item(0)===j.item(0))return t;if(v.isEqual&&j.isEqual&&j.isEqual(v))return t}return u}function g(){function v(d){var m,l,s,p;s=o.get("_mce_"+(d?"start":"end"));if((p=s.previousSibling)&&p.nodeType==3){m=p;l=m.nodeValue.length;o.remove(s);if((p=m.nextSibling)&&p.nodeType==3){b=t;m.appendData(p.nodeValue);o.remove(p)}}else{if((p=s.nextSibling)&&p.nodeType==3){m=p;l=0}else{l=p?o.nodeIndex(p)-1:o.nodeIndex(s);m=s.parentNode}o.remove(s)}d&&
f.setStart(m,l);if(!d||k)f.setEnd(m,l)}var j=q.getRng(),f=o.createRng(),c,k,b;c=j.item?j.item(0):j.parentElement();if(c.ownerDocument!=o.doc)return f;if(j.item||!c.hasChildNodes()){f.setStart(c.parentNode,o.nodeIndex(c));f.setEnd(f.startContainer,f.startOffset+1);return f}c=j.duplicate();k=q.isCollapsed();j.collapse();j.pasteHTML('<span id="_mce_start" style="display:none;line-height:0">'+a+"</span>");if(!k){c.collapse(u);c.pasteHTML('<span id="_mce_end" style="display:none;line-height:0">'+a+"</span>")}v(t);
k||v(u);b&&i.addRange(f);return f}var i=this,a="\ufeff",h,e,o=q.dom,t=true,u=false;this.addRange=function(v){var j,f,c=q.dom.doc;f=c.body;var k,b,d,m,l,s;this.destroy();k=v.startContainer;b=v.startOffset;d=v.endContainer;m=v.endOffset;f.createTextRange();if(k==c||d==c){j=f.createTextRange();j.collapse();j.select()}else{if(k.nodeType==1&&k.hasChildNodes()){j=k.childNodes.length-1;if(b>j){l=1;k=k.childNodes[j]}else k=k.childNodes[b];if(k.nodeType==3)b=0}if(d.nodeType==1&&d.hasChildNodes()){j=d.childNodes.length-
1;if(m==0){s=1;d=d.childNodes[0]}else{d=d.childNodes[Math.min(j,m-1)];if(d.nodeType==3)m=d.nodeValue.length}}if(k==d&&k.nodeType==1){if(/^(IMG|TABLE)$/.test(k.nodeName)&&b!=m){j=f.createControlRange();j.addElement(k)}else{j=f.createTextRange();if(!k.hasChildNodes()&&k.canHaveHTML)k.innerHTML=a;j.moveToElementText(k);if(k.innerHTML==a){j.collapse(t);k.removeChild(k.firstChild)}}b==m&&j.collapse(m<=v.endContainer.childNodes.length-1)}else{j=f.createTextRange();v=c.createElement("span");v.innerHTML=
" ";if(k.nodeType==3){l?o.insertAfter(v,k):k.parentNode.insertBefore(v,k);j.moveToElementText(v);v.parentNode.removeChild(v);j.move("character",b)}else{j.moveToElementText(k);l&&j.collapse(u)}if(k==d&&k.nodeType==3)j.moveEnd("character",m-b);else{f=f.createTextRange();if(d.nodeType==3){d.parentNode.insertBefore(v,d);f.moveToElementText(v);v.parentNode.removeChild(v);f.move("character",m);j.setEndPoint("EndToStart",f)}else{f.moveToElementText(d);f.collapse(!!s);j.setEndPoint("EndToEnd",f)}}}j.select();
j.scrollIntoView()}};this.getRangeAt=function(){if(!h||!r(e,q.getRng())){h=g();e=q.getRng()}return h};this.destroy=function(){e=h=null};q.dom.boxModel&&function(){function v(m,l){var s=k.createTextRange();try{s.moveToPoint(m,l)}catch(p){s=null}return s}function j(m){if(m.button){if(m=v(m.x,m.y)){m.compareEndPoints("StartToStart",d)>0?m.setEndPoint("StartToStart",d):m.setEndPoint("EndToEnd",d);m.select()}}else f()}function f(){o.unbind(c,"mouseup",f);o.unbind(c,"mousemove",j);b=0}var c=o.doc,k=c.body,
b,d;c.documentElement.unselectable=t;o.bind(c,"mousedown",function(m){if(m.target.nodeName==="HTML"){b&&f();b=1;if(d=v(m.x,m.y)){o.bind(c,"mouseup",f);o.bind(c,"mousemove",j);d.select()}}})}()}tinymce.dom.TridentSelection=n})();
(function(){function n(b,d,m,l,s,p){s=b=="previousSibling"&&!p;for(var z=0,G=l.length;z<G;z++){var F=l[z];if(F){if(s&&F.nodeType===1){F.sizcache=m;F.sizset=z}F=F[b];for(var M=false;F;){if(F.sizcache===m){M=l[F.sizset];break}if(F.nodeType===1&&!p){F.sizcache=m;F.sizset=z}if(F.nodeName===d){M=F;break}F=F[b]}l[z]=M}}}function q(b,d,m,l,s,p){s=b=="previousSibling"&&!p;for(var z=0,G=l.length;z<G;z++){var F=l[z];if(F){if(s&&F.nodeType===1){F.sizcache=m;F.sizset=z}F=F[b];for(var M=false;F;){if(F.sizcache===
m){M=l[F.sizset];break}if(F.nodeType===1){if(!p){F.sizcache=m;F.sizset=z}if(typeof d!=="string"){if(F===d){M=true;break}}else if(h.filter(d,[F]).length>0){M=F;break}}F=F[b]}l[z]=M}}}var r=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,g=0,i=Object.prototype.toString,a=false,h=function(b,d,m,l){m=m||[];var s=d=d||document;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return m;var p=[],z,G,F,M,R=true,U=c(d);
for(r.lastIndex=0;(z=r.exec(b))!==null;){p.push(z[1]);if(z[2]){M=RegExp.rightContext;break}}if(p.length>1&&o.exec(b))if(p.length===2&&e.relative[p[0]])G=k(p[0]+p[1],d);else for(G=e.relative[p[0]]?[d]:h(p.shift(),d);p.length;){b=p.shift();if(e.relative[b])b+=p.shift();G=k(b,G)}else{if(!l&&p.length>1&&d.nodeType===9&&!U&&e.match.ID.test(p[0])&&!e.match.ID.test(p[p.length-1])){z=h.find(p.shift(),d,U);d=z.expr?h.filter(z.expr,z.set)[0]:z.set[0]}if(d){z=l?{expr:p.pop(),set:u(l)}:h.find(p.pop(),p.length===
1&&(p[0]==="~"||p[0]==="+")&&d.parentNode?d.parentNode:d,U);G=z.expr?h.filter(z.expr,z.set):z.set;if(p.length>0)F=u(G);else R=false;for(;p.length;){var W=p.pop();z=W;if(e.relative[W])z=p.pop();else W="";if(z==null)z=d;e.relative[W](F,z,U)}}else F=[]}F||(F=G);if(!F)throw"Syntax error, unrecognized expression: "+(W||b);if(i.call(F)==="[object Array]")if(R)if(d&&d.nodeType===1)for(b=0;F[b]!=null;b++){if(F[b]&&(F[b]===true||F[b].nodeType===1&&f(d,F[b])))m.push(G[b])}else for(b=0;F[b]!=null;b++)F[b]&&
F[b].nodeType===1&&m.push(G[b]);else m.push.apply(m,F);else u(F,m);if(M){h(M,s,m,l);h.uniqueSort(m)}return m};h.uniqueSort=function(b){if(j){a=false;b.sort(j);if(a)for(var d=1;d<b.length;d++)b[d]===b[d-1]&&b.splice(d--,1)}};h.matches=function(b,d){return h(b,null,null,d)};h.find=function(b,d,m){var l,s;if(!b)return[];for(var p=0,z=e.order.length;p<z;p++){var G=e.order[p];if(s=e.match[G].exec(b)){var F=RegExp.leftContext;if(F.substr(F.length-1)!=="\\"){s[1]=(s[1]||"").replace(/\\/g,"");l=e.find[G](s,
d,m);if(l!=null){b=b.replace(e.match[G],"");break}}}}l||(l=d.getElementsByTagName("*"));return{set:l,expr:b}};h.filter=function(b,d,m,l){for(var s=b,p=[],z=d,G,F,M=d&&d[0]&&c(d[0]);b&&d.length;){for(var R in e.filter)if((G=e.match[R].exec(b))!=null){var U=e.filter[R],W,S;F=false;if(z==p)p=[];if(e.preFilter[R])if(G=e.preFilter[R](G,z,m,p,l,M)){if(G===true)continue}else F=W=true;if(G)for(var K=0;(S=z[K])!=null;K++)if(S){W=U(S,G,K,z);var Q=l^!!W;if(m&&W!=null)if(Q)F=true;else z[K]=false;else if(Q){p.push(S);
F=true}}if(W!==undefined){m||(z=p);b=b.replace(e.match[R],"");if(!F)return[];break}}if(b==s)if(F==null)throw"Syntax error, unrecognized expression: "+b;else break;s=b}return z};var e=h.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(b){return b.getAttribute("href")}},relative:{"+":function(b,d,m){var l=typeof d==="string",s=l&&!/\W/.test(d);l=l&&!s;if(s&&!m)d=d.toUpperCase();m=0;s=b.length;for(var p;m<s;m++)if(p=b[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);b[m]=l||p&&p.nodeName===d?p||false:p===d}l&&
h.filter(d,b,true)},">":function(b,d,m){var l=typeof d==="string";if(l&&!/\W/.test(d)){d=m?d:d.toUpperCase();m=0;for(var s=b.length;m<s;m++){var p=b[m];if(p){l=p.parentNode;b[m]=l.nodeName===d?l:false}}}else{m=0;for(s=b.length;m<s;m++)if(p=b[m])b[m]=l?p.parentNode:p.parentNode===d;l&&h.filter(d,b,true)}},"":function(b,d,m){var l=g++,s=q;if(!d.match(/\W/)){var p=d=m?d:d.toUpperCase();s=n}s("parentNode",d,l,b,p,m)},"~":function(b,d,m){var l=g++,s=q;if(typeof d==="string"&&!d.match(/\W/)){var p=d=m?
d:d.toUpperCase();s=n}s("previousSibling",d,l,b,p,m)}},find:{ID:function(b,d,m){if(typeof d.getElementById!=="undefined"&&!m)return(b=d.getElementById(b[1]))?[b]:[]},NAME:function(b,d){if(typeof d.getElementsByName!=="undefined"){var m=[];d=d.getElementsByName(b[1]);for(var l=0,s=d.length;l<s;l++)d[l].getAttribute("name")===b[1]&&m.push(d[l]);return m.length===0?null:m}},TAG:function(b,d){return d.getElementsByTagName(b[1])}},preFilter:{CLASS:function(b,d,m,l,s,p){b=" "+b[1].replace(/\\/g,"")+" ";
if(p)return b;p=0;for(var z;(z=d[p])!=null;p++)if(z)if(s^(z.className&&(" "+z.className+" ").indexOf(b)>=0))m||l.push(z);else if(m)d[p]=false;return false},ID:function(b){return b[1].replace(/\\/g,"")},TAG:function(b,d){for(var m=0;d[m]===false;m++);return d[m]&&c(d[m])?b[1]:b[1].toUpperCase()},CHILD:function(b){if(b[1]=="nth"){var d=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(b[2]=="even"&&"2n"||b[2]=="odd"&&"2n+1"||!/\D/.test(b[2])&&"0n+"+b[2]||b[2]);b[2]=d[1]+(d[2]||1)-0;b[3]=d[3]-0}b[0]=g++;return b},ATTR:function(b,
d,m,l,s,p){d=b[1].replace(/\\/g,"");if(!p&&e.attrMap[d])b[1]=e.attrMap[d];if(b[2]==="~=")b[4]=" "+b[4]+" ";return b},PSEUDO:function(b,d,m,l,s){if(b[1]==="not")if(b[3].match(r).length>1||/^\w/.test(b[3]))b[3]=h(b[3],null,null,d);else{b=h.filter(b[3],d,m,true^s);m||l.push.apply(l,b);return false}else if(e.match.POS.test(b[0])||e.match.CHILD.test(b[0]))return true;return b},POS:function(b){b.unshift(true);return b}},filters:{enabled:function(b){return b.disabled===false&&b.type!=="hidden"},disabled:function(b){return b.disabled===
true},checked:function(b){return b.checked===true},selected:function(b){return b.selected===true},parent:function(b){return!!b.firstChild},empty:function(b){return!b.firstChild},has:function(b,d,m){return!!h(m[3],b).length},header:function(b){return/h\d/i.test(b.nodeName)},text:function(b){return"text"===b.type},radio:function(b){return"radio"===b.type},checkbox:function(b){return"checkbox"===b.type},file:function(b){return"file"===b.type},password:function(b){return"password"===b.type},submit:function(b){return"submit"===
b.type},image:function(b){return"image"===b.type},reset:function(b){return"reset"===b.type},button:function(b){return"button"===b.type||b.nodeName.toUpperCase()==="BUTTON"},input:function(b){return/input|select|textarea|button/i.test(b.nodeName)}},setFilters:{first:function(b,d){return d===0},last:function(b,d,m,l){return d===l.length-1},even:function(b,d){return d%2===0},odd:function(b,d){return d%2===1},lt:function(b,d,m){return d<m[3]-0},gt:function(b,d,m){return d>m[3]-0},nth:function(b,d,m){return m[3]-
0==d},eq:function(b,d,m){return m[3]-0==d}},filter:{PSEUDO:function(b,d,m,l){var s=d[1],p=e.filters[s];if(p)return p(b,m,d,l);else if(s==="contains")return(b.textContent||b.innerText||"").indexOf(d[3])>=0;else if(s==="not"){d=d[3];m=0;for(l=d.length;m<l;m++)if(d[m]===b)return false;return true}},CHILD:function(b,d){var m=d[1],l=b;switch(m){case "only":case "first":for(;l=l.previousSibling;)if(l.nodeType===1)return false;if(m=="first")return true;l=b;case "last":for(;l=l.nextSibling;)if(l.nodeType===
1)return false;return true;case "nth":m=d[2];var s=d[3];if(m==1&&s==0)return true;d=d[0];var p=b.parentNode;if(p&&(p.sizcache!==d||!b.nodeIndex)){var z=0;for(l=p.firstChild;l;l=l.nextSibling)if(l.nodeType===1)l.nodeIndex=++z;p.sizcache=d}b=b.nodeIndex-s;return m==0?b==0:b%m==0&&b/m>=0}},ID:function(b,d){return b.nodeType===1&&b.getAttribute("id")===d},TAG:function(b,d){return d==="*"&&b.nodeType===1||b.nodeName===d},CLASS:function(b,d){return(" "+(b.className||b.getAttribute("class"))+" ").indexOf(d)>
-1},ATTR:function(b,d){var m=d[1];b=e.attrHandle[m]?e.attrHandle[m](b):b[m]!=null?b[m]:b.getAttribute(m);m=b+"";var l=d[2];d=d[4];return b==null?l==="!=":l==="="?m===d:l==="*="?m.indexOf(d)>=0:l==="~="?(" "+m+" ").indexOf(d)>=0:!d?m&&b!==false:l==="!="?m!=d:l==="^="?m.indexOf(d)===0:l==="$="?m.substr(m.length-d.length)===d:l==="|="?m===d||m.substr(0,d.length+1)===d+"-":false},POS:function(b,d,m,l){var s=e.setFilters[d[2]];if(s)return s(b,m,d,l)}}},o=e.match.POS;for(var t in e.match)e.match[t]=new RegExp(e.match[t].source+
/(?![^\[]*\])(?![^\(]*\))/.source);var u=function(b,d){b=Array.prototype.slice.call(b);if(d){d.push.apply(d,b);return d}return b};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(v){u=function(b,d){d=d||[];if(i.call(b)==="[object Array]")Array.prototype.push.apply(d,b);else if(typeof b.length==="number")for(var m=0,l=b.length;m<l;m++)d.push(b[m]);else for(m=0;b[m];m++)d.push(b[m]);return d}}var j;if(document.documentElement.compareDocumentPosition)j=function(b,d){b=b.compareDocumentPosition(d)&
4?-1:b===d?0:1;if(b===0)a=true;return b};else if("sourceIndex"in document.documentElement)j=function(b,d){b=b.sourceIndex-d.sourceIndex;if(b===0)a=true;return b};else if(document.createRange)j=function(b,d){var m=b.ownerDocument.createRange(),l=d.ownerDocument.createRange();m.setStart(b,0);m.setEnd(b,0);l.setStart(d,0);l.setEnd(d,0);b=m.compareBoundaryPoints(Range.START_TO_END,l);if(b===0)a=true;return b};(function(){var b=document.createElement("div"),d="script"+(new Date).getTime();b.innerHTML=
"<a name='"+d+"'/>";var m=document.documentElement;m.insertBefore(b,m.firstChild);if(document.getElementById(d)){e.find.ID=function(l,s,p){if(typeof s.getElementById!=="undefined"&&!p)return(s=s.getElementById(l[1]))?s.id===l[1]||typeof s.getAttributeNode!=="undefined"&&s.getAttributeNode("id").nodeValue===l[1]?[s]:undefined:[]};e.filter.ID=function(l,s){var p=typeof l.getAttributeNode!=="undefined"&&l.getAttributeNode("id");return l.nodeType===1&&p&&p.nodeValue===s}}m.removeChild(b)})();(function(){var b=
document.createElement("div");b.appendChild(document.createComment(""));if(b.getElementsByTagName("*").length>0)e.find.TAG=function(d,m){m=m.getElementsByTagName(d[1]);if(d[1]==="*"){d=[];for(var l=0;m[l];l++)m[l].nodeType===1&&d.push(m[l]);m=d}return m};b.innerHTML="<a href='#'></a>";if(b.firstChild&&typeof b.firstChild.getAttribute!=="undefined"&&b.firstChild.getAttribute("href")!=="#")e.attrHandle.href=function(d){return d.getAttribute("href",2)}})();document.querySelectorAll&&function(){var b=
h,d=document.createElement("div");d.innerHTML="<p class='TEST'></p>";if(!(d.querySelectorAll&&d.querySelectorAll(".TEST").length===0)){h=function(l,s,p,z){s=s||document;if(!z&&s.nodeType===9&&!c(s))try{return u(s.querySelectorAll(l),p)}catch(G){}return b(l,s,p,z)};for(var m in b)h[m]=b[m]}}();document.getElementsByClassName&&document.documentElement.getElementsByClassName&&function(){var b=document.createElement("div");b.innerHTML="<div class='test e'></div><div class='test'></div>";if(b.getElementsByClassName("e").length!==
0){b.lastChild.className="e";if(b.getElementsByClassName("e").length!==1){e.order.splice(1,0,"CLASS");e.find.CLASS=function(d,m,l){if(typeof m.getElementsByClassName!=="undefined"&&!l)return m.getElementsByClassName(d[1])}}}}();var f=document.compareDocumentPosition?function(b,d){return b.compareDocumentPosition(d)&16}:function(b,d){return b!==d&&(b.contains?b.contains(d):true)},c=function(b){return b.nodeType===9&&b.documentElement.nodeName!=="HTML"||!!b.ownerDocument&&b.ownerDocument.documentElement.nodeName!==
"HTML"},k=function(b,d){var m=[],l="",s;for(d=d.nodeType?[d]:d;s=e.match.PSEUDO.exec(b);){l+=s[0];b=b.replace(e.match.PSEUDO,"")}b=e.relative[b]?b+"*":b;s=0;for(var p=d.length;s<p;s++)h(b,d[s],m);return h.filter(l,m)};window.tinymce.dom.Sizzle=h})();
(function(n){var q=n.each,r=n.DOM,g=n.isIE,i;n.create("tinymce.dom.EventUtils",{EventUtils:function(){this.inits=[];this.events=[]},add:function(a,h,e,o){var t,u=this,v=u.events,j;if(h instanceof Array){j=[];q(h,function(f){j.push(u.add(a,f,e,o))});return j}if(a&&a.hasOwnProperty&&a instanceof Array){j=[];q(a,function(f){f=r.get(f);j.push(u.add(f,h,e,o))});return j}if(a=r.get(a)){t=function(f){if(!u.disabled){if((f=f||window.event)&&g){if(!f.target)f.target=f.srcElement;n.extend(f,u._stoppers)}if(!o)return e(f);
return e.call(o,f)}};if(h=="unload"){n.unloads.unshift({func:t});return t}if(h=="init"){u.domLoaded?t():u.inits.push(t);return t}v.push({obj:a,name:h,func:e,cfunc:t,scope:o});u._add(a,h,t);return e}},remove:function(a,h,e){var o=this,t=o.events,u=false,v;if(a&&a.hasOwnProperty&&a instanceof Array){v=[];q(a,function(j){j=r.get(j);v.push(o.remove(j,h,e))});return v}a=r.get(a);q(t,function(j,f){if(j.obj==a&&j.name==h&&(!e||j.func==e||j.cfunc==e)){t.splice(f,1);o._remove(a,h,j.cfunc);u=true;return false}});
return u},clear:function(a){var h=this.events,e,o;if(a){a=r.get(a);for(e=h.length-1;e>=0;e--){o=h[e];if(o.obj===a){this._remove(o.obj,o.name,o.cfunc);o.obj=o.cfunc=null;h.splice(e,1)}}}},cancel:function(a){if(!a)return false;this.stop(a);return this.prevent(a)},stop:function(a){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;return false},prevent:function(a){if(a.preventDefault)a.preventDefault();else a.returnValue=false;return false},destroy:function(){var a=this;q(a.events,function(h){a._remove(h.obj,
h.name,h.cfunc);h.obj=h.cfunc=null});a.events=[];a=null},_add:function(a,h,e){if(a.attachEvent)a.attachEvent("on"+h,e);else if(a.addEventListener)a.addEventListener(h,e,false);else a["on"+h]=e},_remove:function(a,h,e){if(a)try{if(a.detachEvent)a.detachEvent("on"+h,e);else if(a.removeEventListener)a.removeEventListener(h,e,false);else a["on"+h]=null}catch(o){}},_pageInit:function(){if(!this.domLoaded){this.domLoaded=true;q(this.inits,function(a){a()});this.inits=[]}},_wait:function(a){var h=this,e=
a.document;if(a.tinyMCE_GZ&&tinyMCE_GZ.loaded)h.domLoaded=1;else{if(e.attachEvent){e.attachEvent("onreadystatechange",function(){if(e.readyState==="complete"){e.detachEvent("onreadystatechange",arguments.callee);h._pageInit(a)}});e.documentElement.doScroll&&a==a.top&&function(){if(!h.domLoaded){try{e.documentElement.doScroll("left")}catch(o){setTimeout(arguments.callee,0);return}h._pageInit(a)}}()}else e.addEventListener&&h._add(a,"DOMContentLoaded",function(){h._pageInit(a)});h._add(a,"load",function(){h._pageInit(a)})}},
_stoppers:{preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}}});i=n.dom.Event=new n.dom.EventUtils;i._wait(window);n.addUnload(function(){i.destroy()})})(tinymce);
(function(n){n.dom.Element=function(q,r){var g=this,i;g.settings=r=r||{};g.id=q;g.dom=i=r.dom||n.DOM;n.isIE||i.get(g.id);n.each("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get".split(/,/),function(a){g[a]=function(){var h=[q],e;for(e=0;e<arguments.length;e++)h.push(arguments[e]);h=i[a].apply(i,h);g.update(a);return h}});n.extend(g,{on:function(a,h,e){return n.dom.Event.add(g.id,
a,h,e)},getXY:function(){return{x:parseInt(g.getStyle("left")),y:parseInt(g.getStyle("top"))}},getSize:function(){var a=i.get(g.id);return{w:parseInt(g.getStyle("width")||a.clientWidth),h:parseInt(g.getStyle("height")||a.clientHeight)}},moveTo:function(a,h){g.setStyles({left:a,top:h})},moveBy:function(a,h){var e=g.getXY();g.moveTo(e.x+a,e.y+h)},resizeTo:function(a,h){g.setStyles({width:a,height:h})},resizeBy:function(a,h){var e=g.getSize();g.resizeTo(e.w+a,e.h+h)},update:function(a){if(n.isIE6&&r.blocker){a=
a||"";if(!(a.indexOf("get")===0||a.indexOf("has")===0||a.indexOf("is")===0))if(a=="remove")i.remove(g.blocker);else{if(g.blocker)a=i.get(g.blocker);else{g.blocker=i.uniqueId();a=i.add(r.container||i.getRoot(),"iframe",{id:g.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'});i.setStyle(a,"opacity",0)}i.setStyles(a,{left:g.getStyle("left",1),top:g.getStyle("top",1),width:g.getStyle("width",1),height:g.getStyle("height",1),display:g.getStyle("display",1),zIndex:parseInt(g.getStyle("zIndex",
1)||0)-1})}}}})}})(tinymce);
(function(n){var q=n.is,r=n.each;n.create("tinymce.dom.Selection",{Selection:function(g,i,a){var h=this;h.dom=g;h.win=i;h.serializer=a;r(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(e){h[e]=new n.util.Dispatcher(h)});if(!h.win.getSelection)h.tridentSel=new n.dom.TridentSelection(h);n.addUnload(h.destroy,h)},getContent:function(g){var i=this.getRng(),a=this.dom.create("body"),h=this.getSel(),e,o;g=g||{};e=o="";g.get=true;g.format=g.format||"html";this.onBeforeGetContent.dispatch(this,
g);if(g.format=="text")return this.isCollapsed()?"":i.text||(h.toString?h.toString():"");if(i.cloneContents)(i=i.cloneContents())&&a.appendChild(i);else a.innerHTML=q(i.item)||q(i.htmlText)?i.item?i.item(0).outerHTML:i.htmlText:i.toString();if(/^\s/.test(a.innerHTML))e=" ";if(/\s+$/.test(a.innerHTML))o=" ";g.getInner=true;g.content=this.isCollapsed()?"":e+this.serializer.serialize(a,g)+o;this.onGetContent.dispatch(this,g);return g.content},setContent:function(g,i){var a=this.getRng(),h=this.win.document;
i=i||{format:"html"};i.set=true;i.content=this.dom.processHTML(g);this.onBeforeSetContent.dispatch(this,i);g=i.content;if(a.insertNode){g+='<span id="__caret">_</span>';if(a.startContainer==h&&a.endContainer==h)h.body.innerHTML=g;else{a.deleteContents();a.insertNode(this.getRng().createContextualFragment(g))}g=this.dom.get("__caret");a=h.createRange();a.setStartBefore(g);a.setEndBefore(g);this.setRng(a);this.dom.remove("__caret")}else{if(a.item){h.execCommand("Delete",false,null);a=this.getRng()}a.pasteHTML(g)}this.onSetContent.dispatch(this,
i)},getStart:function(){var g=this.getRng(),i;if(g.duplicate||g.item){if(g.item)return g.item(0);g=g.duplicate();g.collapse(1);if((i=g.parentElement())&&i.nodeName=="BODY")return i.firstChild||i}else{i=g.startContainer;if(i.nodeType==1&&i.hasChildNodes())i=i.childNodes[Math.min(i.childNodes.length-1,g.startOffset)];if(i&&i.nodeType==3)return i.parentNode}return i},getEnd:function(){var g=this.getRng(),i;if(g.duplicate||g.item){if(g.item)return g.item(0);g=g.duplicate();g.collapse(0);if((i=g.parentElement())&&
i.nodeName=="BODY")return i.lastChild||i}else{i=g.endContainer;g=g.endOffset;if(i.nodeType==1&&i.hasChildNodes())i=i.childNodes[g>0?g-1:g];if(i&&i.nodeType==3)return i.parentNode}return i},getBookmark:function(g,i){function a(j,f){var c=0;r(e.select(j),function(k,b){if(k==f)c=b});return c}var h=this,e=h.dom,o,t,u,v;if(g==2)return function(){function j(b,d){var m=b[d?"startContainer":"endContainer"];b=b[d?"startOffset":"endOffset"];d=[];var l,s=0;if(m.nodeType==3){if(i)for(l=m.previousSibling;l&&l.nodeType==
3;l=l.previousSibling)b+=l.nodeValue.length;d.push(b)}else{l=m.childNodes;if(b>=l.length){s=1;b=l.length-1}d.push(h.dom.nodeIndex(l[b],i)+s)}for(;m&&m!=c;m=m.parentNode)d.push(h.dom.nodeIndex(m,i));return d}var f=h.getRng(true),c=e.getRoot(),k={};k.start=j(f,true);if(!h.isCollapsed())k.end=j(f);return k}();if(g)return{rng:h.getRng()};g=h.getRng();t=e.uniqueId();u=tinyMCE.activeEditor.selection.isCollapsed();if(g.duplicate||g.item)if(g.item){v=g.item(0);o=v.nodeName;return{name:o,index:a(o,v)}}else{o=
g.duplicate();g.collapse();g.pasteHTML('<span _mce_type="bookmark" id="'+t+'_start" style="overflow:hidden;line-height:0px">\ufeff</span>');if(!u){o.collapse(false);o.pasteHTML('<span _mce_type="bookmark" id="'+t+'_end" style="overflow:hidden;line-height:0px">\ufeff</span>')}}else{v=h.getNode();o=v.nodeName;if(o=="IMG")return{name:o,index:a(o,v)};o=g.cloneRange();if(!u){o.collapse(false);o.insertNode(e.create("span",{_mce_type:"bookmark",id:t+"_end",style:"overflow:hidden;line-height:0px"},"\ufeff"))}g.collapse(true);
g.insertNode(e.create("span",{_mce_type:"bookmark",id:t+"_start",style:"overflow:hidden;line-height:0px"},"\ufeff"))}h.moveToBookmark({id:t,keep:1});return{id:t}},moveToBookmark:function(g){var i=this.dom,a,h;this.tridentSel&&this.tridentSel.destroy();if(g)if(g.start){a=i.createRng();h=i.getRoot();var e=function(o){var t=g[o?"start":"end"],u,v;if(t){v=h;for(u=t.length-1;u>=1;u--)v=v.childNodes[t[u]];o?a.setStart(v,t[0]):a.setEnd(v,t[0])}};e(true);e();this.setRng(a)}else if(g.id){a=i.createRng();e=
function(o){var t=i.get(g.id+"_"+o),u,v,j;j=g.keep;if(t){u=t.parentNode;if(o=="start"){if(j){u=t;v=1}else v=i.nodeIndex(t);a.setStart(u,v)}else if(j){u=t;v=1}else v=i.nodeIndex(t);a.setEnd(u,v);if(!j){j=t.previousSibling;u=t.nextSibling;for(r(n.grep(t.childNodes),function(f){if(f.nodeType==3)f.nodeValue=f.nodeValue.replace(/\uFEFF/g,"")});t=i.get(g.id+"_"+o);)i.remove(t,1);if(j&&u&&j.nodeType==u.nodeType&&j.nodeType==3){v=j.nodeValue.length;j.appendData(u.nodeValue);i.remove(u);o=="start"&&a.setStart(j,
v);a.setEnd(j,v)}}}};e("start");e("end");this.setRng(a)}else if(g.name)this.select(i.select(g.name)[g.index]);else g.rng&&this.setRng(g.rng)},select:function(g,i){var a=this.dom,h=a.createRng();a=a.nodeIndex(g);h.setStart(g.parentNode,a);h.setEnd(g.parentNode,a+1);if(i){i=function(e,o){var t=new n.dom.TreeWalker(e,e);do{if(e.nodeType==3&&n.trim(e.nodeValue).length!=0){o?h.setStart(e,0):h.setEnd(e,e.nodeValue.length);return}if(e.nodeName=="BR"){o?h.setStartBefore(e):h.setEndBefore(e);return}}while(e=
o?t.next():t.prev())};i(g,1);i(g)}this.setRng(h);return g},isCollapsed:function(){var g=this.getRng(),i=this.getSel();if(!g||g.item)return false;if(g.compareEndPoints)return g.compareEndPoints("StartToEnd",g)===0;return!i||g.collapsed},collapse:function(g){var i=this.getRng(),a;if(i.item){a=i.item(0);i=this.win.document.body.createTextRange();i.moveToElementText(a)}i.collapse(!!g);this.setRng(i)},getSel:function(){var g=this.win;return g.getSelection?g.getSelection():g.document.selection},getRng:function(g){var i,
a;if(g&&this.tridentSel)return this.tridentSel.getRangeAt(0);try{if(i=this.getSel())a=i.rangeCount>0?i.getRangeAt(0):i.createRange?i.createRange():this.win.document.createRange()}catch(h){}a||(a=this.win.document.createRange?this.win.document.createRange():this.win.document.body.createTextRange());return a},setRng:function(g){var i;if(this.tridentSel)if(g.cloneRange)this.tridentSel.addRange(g);else try{g.select()}catch(a){}else if(i=this.getSel()){i.removeAllRanges();i.addRange(g)}},setNode:function(g){this.setContent(this.dom.getOuterHTML(g));
return g},getNode:function(){var g=this.getRng(),i=this.getSel(),a;if(g.setStart){if(!g)return this.dom.getRoot();a=g.commonAncestorContainer;if(!g.collapsed){if(g.startContainer==g.endContainer)if(g.startOffset-g.endOffset<2)if(g.startContainer.hasChildNodes())a=g.startContainer.childNodes[g.startOffset];if(n.isWebKit&&i.anchorNode&&i.anchorNode.nodeType==1)return i.anchorNode.childNodes[i.anchorOffset]}if(a&&a.nodeType==3)return a.parentNode;return a}return g.item?g.item(0):g.parentElement()},getSelectedBlocks:function(g,
i){var a=this.dom,h,e=[];g=a.getParent(g||this.getStart(),a.isBlock);i=a.getParent(i||this.getEnd(),a.isBlock);g&&e.push(g);if(g&&i&&g!=i)for(h=g;(h=h.nextSibling)&&h!=i;)a.isBlock(h)&&e.push(h);i&&g!=i&&e.push(i);return e},destroy:function(g){this.win=null;this.tridentSel&&this.tridentSel.destroy();g||n.removeUnload(this.destroy)}})})(tinymce);
(function(n){n.create("tinymce.dom.XMLWriter",{node:null,XMLWriter:function(){function q(){var r=document.implementation;if(!r||!r.createDocument){try{return new ActiveXObject("MSXML2.DOMDocument")}catch(g){}try{return new ActiveXObject("Microsoft.XmlDom")}catch(i){}}else return r.createDocument("","",null)}this.doc=q();this.valid=n.isOpera||n.isWebKit;this.reset()},reset:function(){var q=this.doc;q.firstChild&&q.removeChild(q.firstChild);this.node=q.appendChild(q.createElement("html"))},writeStartElement:function(q){this.node=
this.node.appendChild(this.doc.createElement(q))},writeAttribute:function(q,r){if(this.valid)r=r.replace(/>/g,"%MCGT%");this.node.setAttribute(q,r)},writeEndElement:function(){this.node=this.node.parentNode},writeFullEndElement:function(){var q=this.node;q.appendChild(this.doc.createTextNode(""));this.node=q.parentNode},writeText:function(q){if(this.valid)q=q.replace(/>/g,"%MCGT%");this.node.appendChild(this.doc.createTextNode(q))},writeCDATA:function(q){this.node.appendChild(this.doc.createCDATASection(q))},
writeComment:function(q){if(n.isIE)q=q.replace(/^\-|\-$/g," ");this.node.appendChild(this.doc.createComment(q.replace(/\-\-/g," ")))},getContent:function(){var q;q=this.doc.xml||(new XMLSerializer).serializeToString(this.doc);q=q.replace(/<\?[^?]+\?>|<html>|<\/html>|<html\/>|<!DOCTYPE[^>]+>/g,"");q=q.replace(/ ?\/>/g," />");if(this.valid)q=q.replace(/\%MCGT%/g,"&gt;");return q}})})(tinymce);
(function(n){n.create("tinymce.dom.StringWriter",{str:null,tags:null,count:0,settings:null,indent:null,StringWriter:function(q){this.settings=n.extend({indent_char:" ",indentation:0},q);this.reset()},reset:function(){this.str=this.indent="";this.tags=[];this.count=0},writeStartElement:function(q){this._writeAttributesEnd();this.writeRaw("<"+q);this.tags.push(q);this.inAttr=true;this.count++;this.elementCount=this.count},writeAttribute:function(q,r){this.writeRaw(" "+this.encode(q)+'="'+this.encode(r)+
'"')},writeEndElement:function(){var q;if(this.tags.length>0){q=this.tags.pop();this._writeAttributesEnd(1)&&this.writeRaw("</"+q+">");this.settings.indentation>0&&this.writeRaw("\n")}},writeFullEndElement:function(){if(this.tags.length>0){this._writeAttributesEnd();this.writeRaw("</"+this.tags.pop()+">");this.settings.indentation>0&&this.writeRaw("\n")}},writeText:function(q){this._writeAttributesEnd();this.writeRaw(this.encode(q));this.count++},writeCDATA:function(q){this._writeAttributesEnd();
this.writeRaw("<![CDATA["+q+"]]\>");this.count++},writeComment:function(q){this._writeAttributesEnd();this.writeRaw("<!-- "+q+"--\>");this.count++},writeRaw:function(q){this.str+=q},encode:function(q){return q.replace(/[<>&"]/g,function(r){switch(r){case "<":return"&lt;";case ">":return"&gt;";case "&":return"&amp;";case '"':return"&quot;"}return r})},getContent:function(){return this.str},_writeAttributesEnd:function(q){if(this.inAttr){this.inAttr=false;if(q&&this.elementCount==this.count){this.writeRaw(" />");
return false}this.writeRaw(">");return true}}})})(tinymce);
(function(n){function q(e){return e.replace(/([?+*])/g,".$1")}var r=n.extend,g=n.each,i=n.util.Dispatcher,a=n.isIE,h=n.isGecko;n.create("tinymce.dom.Serializer",{Serializer:function(e){var o=this;o.key=0;o.onPreProcess=new i(o);o.onPostProcess=new i(o);try{o.writer=new n.dom.XMLWriter}catch(t){o.writer=new n.dom.StringWriter}o.settings=e=r({dom:n.DOM,valid_nodes:0,node_filter:0,attr_filter:0,invalid_attrs:/^(_mce_|_moz_|sizset|sizcache)/,closed:/^(br|hr|input|meta|img|link|param|area)$/,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,invalid_elements:0,fix_table_elements:1,fix_list_elements:true,fix_content_duplication:true,convert_fonts_to_spans:false,font_size_classes:0,apply_source_formatting:0,indent_mode:"simple",indent_char:"\t",indent_levels:1,remove_linebreaks:1,remove_redundant_brs:1,element_format:"xhtml"},e);o.dom=e.dom;o.schema=e.schema;if(e.entity_encoding=="named"&&!e.entities)e.entity_encoding="raw";e.remove_redundant_brs&&o.onPostProcess.add(function(u,v){v.content=
v.content.replace(/(<br \/>\s*)+<\/(p|h[1-6]|div|li)>/gi,function(j,f,c){if(/^<br \/>\s*<\//.test(j))return"</"+c+">";return j})});e.element_format=="html"&&o.onPostProcess.add(function(u,v){v.content=v.content.replace(/<([^>]+) \/>/g,"<$1>")});e.fix_list_elements&&o.onPreProcess.add(function(u,v){function j(s,p){p=p.split(",");for(var z;(s=s.previousSibling)!=null;)for(z=0;z<p.length;z++)if(s.nodeName==p[z])return s;return null}var f,c=["ol","ul"],k,b,d,m=/^(OL|UL)$/,l;for(f=0;f<c.length;f++){u=
o.dom.select(c[f],v.node);for(k=0;k<u.length;k++){b=u[k];d=b.parentNode;if(m.test(d.nodeName))if(l=j(b,"LI"))l.appendChild(b);else{l=o.dom.create("li");l.innerHTML="&nbsp;";l.appendChild(b);d.insertBefore(l,d.firstChild)}}}});e.fix_table_elements&&o.onPreProcess.add(function(u,v){if(!n.isOpera||opera.buildNumber()>=1767)g(o.dom.select("p table",v.node).reverse(),function(j){var f=o.dom.getParent(j.parentNode,"table,p");if(f.nodeName!="TABLE")try{o.dom.split(f,j)}catch(c){}})})},setEntities:function(e){var o,
t={},u;if(!this.entityLookup){e=e.split(",");for(o=0;o<e.length;o+=2){u=e[o];if(!(u==34||u==38||u==60||u==62)){t[String.fromCharCode(e[o])]=e[o+1];parseInt(e[o]).toString(16)}}this.entityLookup=t}},setRules:function(e){this._setup();this.rules={};this.wildRules=[];this.validElements={};return this.addRules(e)},addRules:function(e){var o=this,t;if(e){o._setup();g(e.split(","),function(u){u=u.split(/\[|\]/);var v=u[0].split("/"),j,f,c,k=[];if(t)f=n.extend([],t.attribs);u.length>1&&g(u[1].split("|"),
function(b){var d={},m;f=f||[];b=b.replace(/::/g,"~");b=/^([!\-])?([\w*.?~_\-]+|)([=:<])?(.+)?$/.exec(b);b[2]=b[2].replace(/~/g,":");if(b[1]=="!"){j=j||[];j.push(b[2])}if(b[1]=="-")for(m=0;m<f.length;m++)if(f[m].name==b[2]){f.splice(m,1);return}switch(b[3]){case "=":d.defaultVal=b[4]||"";break;case ":":d.forcedVal=b[4];break;case "<":d.validVals=b[4].split("?");break}if(/[*.?]/.test(b[2])){c=c||[];d.nameRE=new RegExp("^"+q(b[2])+"$");c.push(d)}else{d.name=b[2];f.push(d)}k.push(b[2])});g(v,function(b,
d){var m=b.charAt(0),l=1,s={};if(t){if(t.noEmpty)s.noEmpty=t.noEmpty;if(t.fullEnd)s.fullEnd=t.fullEnd;if(t.padd)s.padd=t.padd}switch(m){case "-":s.noEmpty=true;break;case "+":s.fullEnd=true;break;case "#":s.padd=true;break;default:l=0}v[d]=b=b.substring(l);o.validElements[b]=1;if(/[*.?]/.test(v[0])){s.nameRE=new RegExp("^"+q(v[0])+"$");o.wildRules=o.wildRules||{};o.wildRules.push(s)}else{s.name=v[0];if(v[0]=="@")t=s;o.rules[b]=s}s.attribs=f;if(j)s.requiredAttribs=j;if(c){b="";g(k,function(p){if(b)b+=
"|";b+="("+q(p)+")"});s.validAttribsRE=new RegExp("^"+b.toLowerCase()+"$");s.wildAttribs=c}})});e="";g(o.validElements,function(u,v){if(e)e+="|";if(v!="@")e+=v});o.validElementsRE=new RegExp("^("+q(e.toLowerCase())+")$")}},findRule:function(e){var o=this.rules,t;this._setup();if(o=o[e])return o;o=this.wildRules;for(t=0;t<o.length;t++)if(o[t].nameRE.test(e))return o[t];return null},findAttribRule:function(e,o){var t=e.wildAttribs;for(e=0;e<t.length;e++)if(t[e].nameRE.test(o))return t[e];return null},
serialize:function(e,o){var t=this,u,v,j,f;t._setup();o=o||{};o.format=o.format||"html";t.processObj=o;if(a){f=[];g(e.getElementsByTagName("option"),function(c){c=t.dom.getAttrib(c,"selected");f.push(c?c:null)})}e=e.cloneNode(true);a&&g(e.getElementsByTagName("option"),function(c,k){t.dom.setAttrib(c,"selected",f[k])});j=e.ownerDocument.implementation;if(j.createHTMLDocument&&n.isOpera&&opera.buildNumber()>=1767){u=j.createHTMLDocument("");g(e.nodeName=="BODY"?e.childNodes:[e],function(c){u.body.appendChild(u.importNode(c,
true))});e=e.nodeName!="BODY"?u.body.firstChild:u.body;v=t.dom.doc;t.dom.doc=u}t.key=""+(parseInt(t.key)+1);if(!o.no_events){o.node=e;t.onPreProcess.dispatch(t,o)}t.writer.reset();t._info=o;t._serializeNode(e,o.getInner);o.content=t.writer.getContent();if(v)t.dom.doc=v;o.no_events||t.onPostProcess.dispatch(t,o);t._postProcess(o);o.node=null;return n.trim(o.content)},_postProcess:function(e){var o=this,t=o.settings,u=e.content,v;if(e.format=="html"){v=o._protect({content:u,patterns:[{pattern:/(<script[^>]*>)(.*?)(<\/script>)/g},
{pattern:/(<noscript[^>]*>)(.*?)(<\/noscript>)/g},{pattern:/(<style[^>]*>)(.*?)(<\/style>)/g},{pattern:/(<pre[^>]*>)(.*?)(<\/pre>)/g,encode:1},{pattern:/(<!--\[CDATA\[)(.*?)(\]\]--\>)/g}]});u=v.content;if(t.entity_encoding!=="raw")u=o._encode(u);if(!e.set){u=u.replace(/<p>\s+<\/p>|<p([^>]+)>\s+<\/p>/g,t.entity_encoding=="numeric"?"<p$1>&#160;</p>":"<p$1>&nbsp;</p>");if(t.remove_linebreaks){u=u.replace(/\r?\n|\r/g," ");u=u.replace(/(<[^>]+>)\s+/g,"$1 ");u=u.replace(/\s+(<\/[^>]+>)/g," $1");u=u.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>");u=u.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>");u=u.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(t.apply_source_formatting&&t.indent_mode=="simple"){u=u.replace(/<(\/?)(ul|hr|table|meta|link|tbody|tr|object|body|head|html|map)(|[^>]+)>\s*/g,"\n<$1$2$3>\n");u=u.replace(/\s*<(p|h[1-6]|blockquote|div|title|style|pre|script|td|li|area)(|[^>]+)>/g,
"\n<$1$2>");u=u.replace(/<\/(p|h[1-6]|blockquote|div|title|style|pre|script|td|li)>\s*/g,"</$1>\n");u=u.replace(/\n\n/g,"\n")}}u=o._unprotect(u,v);u=u.replace(/<!--\[CDATA\[([\s\S]+)\]\]--\>/g,"<![CDATA[$1]]\>");if(t.entity_encoding=="raw")u=u.replace(/<p>&nbsp;<\/p>|<p([^>]+)>&nbsp;<\/p>/g,"<p$1>\u00a0</p>");u=u.replace(/<noscript([^>]+|)>([\s\S]*?)<\/noscript>/g,function(j,f,c){return"<noscript"+f+">"+o.dom.decode(c.replace(/<!--|--\>/g,""))+"</noscript>"})}e.content=u},_serializeNode:function(e,
o){var t=this.settings,u=this.writer,v,j,f,c,k,b,d,m,l,s,p,z;if(!t.node_filter||t.node_filter(e))switch(e.nodeType){case 1:if(e.hasAttribute?e.hasAttribute("_mce_bogus"):e.getAttribute("_mce_bogus"))return;l=p=false;v=e.hasChildNodes();d=e.getAttribute("_mce_name")||e.nodeName.toLowerCase();if(z=e.getAttribute("_mce_type"))if(this._info.cleanup)p=1;else return;if(a)if(e.scopeName!=="HTML"&&e.scopeName!=="html")d=e.scopeName+":"+d;if(d.indexOf("mce:")===0)d=d.substring(4);if(!p)if(!this.validElementsRE||
!this.validElementsRE.test(d)||this.invalidElementsRE&&this.invalidElementsRE.test(d)||o){l=true;break}if(a){if(t.fix_content_duplication){if(e._mce_serialized==this.key)return;e._mce_serialized=this.key}if(d.charAt(0)=="/")d=d.substring(1)}else if(h)if(e.nodeName==="BR"&&e.getAttribute("type")=="_moz")return;if(t.validate_children){if(this.elementName&&!this.schema.isValid(this.elementName,d)){l=true;break}this.elementName=d}m=this.findRule(d);if(!m){l=true;break}d=m.name||d;s=t.closed.test(d);if(!v&&
m.noEmpty||a&&!d){l=true;break}if(m.requiredAttribs){c=m.requiredAttribs;for(o=c.length-1;o>=0;o--)if(this.dom.getAttrib(e,c[o])!=="")break;if(o==-1){l=true;break}}u.writeStartElement(d);if(m.attribs){o=0;k=m.attribs;for(f=k.length;o<f;o++){c=k[o];b=this._getAttrib(e,c);b!==null&&u.writeAttribute(c.name,b)}}if(m.validAttribsRE){k=this.dom.getAttribs(e);for(o=k.length-1;o>-1;o--){c=k[o];if(c.specified){c=c.nodeName.toLowerCase();if(!(t.invalid_attrs.test(c)||!m.validAttribsRE.test(c))){f=this.findAttribRule(m,
c);b=this._getAttrib(e,f,c);b!==null&&u.writeAttribute(c,b)}}}}z&&p&&u.writeAttribute("_mce_type",z);if(d==="script"&&n.trim(e.innerHTML)){u.writeText("// ");u.writeCDATA(e.innerHTML.replace(/<!--|--\>|<\[CDATA\[|\]\]>/g,""));v=false;break}if(m.padd)if(v&&(j=e.firstChild)&&j.nodeType===1&&e.childNodes.length===1){if(j.hasAttribute?j.hasAttribute("_mce_bogus"):j.getAttribute("_mce_bogus"))u.writeText("\u00a0")}else v||u.writeText("\u00a0");break;case 3:if(t.validate_children&&this.elementName&&!this.schema.isValid(this.elementName,
"#text"))return;return u.writeText(e.nodeValue);case 4:return u.writeCDATA(e.nodeValue);case 8:return u.writeComment(e.nodeValue)}else if(e.nodeType==1)v=e.hasChildNodes();if(v&&!s)for(j=e.firstChild;j;){this._serializeNode(j);this.elementName=d;j=j.nextSibling}l||(s?u.writeEndElement():u.writeFullEndElement())},_protect:function(e){function o(v){return v.replace(/[\r\n\\]/g,function(j){if(j==="\n")return"\\n";else if(j==="\\")return"\\\\";return"\\r"})}function t(v){return v.replace(/\\[\\rn]/g,
function(j){if(j==="\\n")return"\n";else if(j==="\\\\")return"\\";return"\r"})}var u=this;e.items=e.items||[];g(e.patterns,function(v){e.content=t(o(e.content).replace(v.pattern,function(j,f,c,k){c=t(c);if(v.encode)c=u._encode(c);e.items.push(c);return f+"<!--mce:"+(e.items.length-1)+"--\>"+k}))});return e},_unprotect:function(e,o){e=e.replace(/\<!--mce:([0-9]+)--\>/g,function(t,u){return o.items[parseInt(u)]});o.items=[];return e},_encode:function(e){var o=this.settings,t;if(o.entity_encoding!==
"raw"){if(o.entity_encoding.indexOf("named")!=-1){this.setEntities(o.entities);t=this.entityLookup;e=e.replace(/[\u007E-\uFFFF]/g,function(u){var v;if(v=t[u])u="&"+v+";";return u})}if(o.entity_encoding.indexOf("numeric")!=-1)e=e.replace(/[\u007E-\uFFFF]/g,function(u){return"&#"+u.charCodeAt(0)+";"})}return e},_setup:function(){var e=this.settings;if(!this.done){this.done=1;this.setRules(e.valid_elements);this.addRules(e.extended_valid_elements);if(e.invalid_elements)this.invalidElementsRE=new RegExp("^("+
q(e.invalid_elements.replace(/,/g,"|").toLowerCase())+")$");if(e.attrib_value_filter)this.attribValueFilter=e.attribValueFilter}},_getAttrib:function(e,o,t){var u;t=t||o.name;if(o.forcedVal&&(u=o.forcedVal)){if(u==="{$uid}")return this.dom.uniqueId();return u}u=this.dom.getAttrib(e,t);switch(t){case "rowspan":case "colspan":if(u=="1")u="";break}if(this.attribValueFilter)u=this.attribValueFilter(t,u,e);if(o.validVals){for(e=o.validVals.length-1;e>=0;e--)if(u==o.validVals[e])break;if(e==-1)return null}if(u===
""&&typeof o.defaultVal!="undefined"){u=o.defaultVal;if(u==="{$uid}")return this.dom.uniqueId();return u}else if(t=="class"&&this.processObj.get)u=u.replace(/\s?mceItem\w+\s?/g,"");if(u==="")return null;return u}})})(tinymce);
(function(n){n.dom.ScriptLoader=function(){function q(e,o){function t(){u.remove(c);if(v)v.onreadystatechange=v.onload=v=null;o()}var u=n.DOM,v,j,f,c;c=u.uniqueId();if(n.isIE6){j=new n.util.URI(e);f=location;if(j.host==f.hostname&&j.port==f.port&&j.protocol+":"==f.protocol){n.util.XHR.send({url:n._addVer(j.getURI()),success:function(k){var b=u.create("script",{type:"text/javascript"});b.text=k;document.getElementsByTagName("head")[0].appendChild(b);u.remove(b);t()}});return}}v=u.create("script",{id:c,
type:"text/javascript",src:n._addVer(e)});v.onload=t;v.onreadystatechange=function(){var k=v.readyState;if(k=="complete"||k=="loaded")t()};(document.getElementsByTagName("head")[0]||document.body).appendChild(v)}var r={},g=[],i={},a=[],h=0;this.isDone=function(e){return r[e]==2};this.markDone=function(e){r[e]=2};this.add=this.load=function(e,o,t){if(r[e]==void 0){g.push(e);r[e]=0}if(o){i[e]||(i[e]=[]);i[e].push({func:o,scope:t||this})}};this.loadQueue=function(e,o){this.loadScripts(g,e,o)};this.loadScripts=
function(e,o,t){function u(j){n.each(i[j],function(f){f.func.call(f.scope)});i[j]=void 0}var v;a.push({func:o,scope:t||this});v=function(){var j=n.grep(e);e.length=0;n.each(j,function(f){if(r[f]==2)u(f);else if(r[f]!=1){r[f]=1;h++;q(f,function(){r[f]=2;h--;u(f);v()})}});if(!h){n.each(a,function(f){f.func.call(f.scope)});a.length=0}};v()}};n.ScriptLoader=new n.dom.ScriptLoader})(tinymce);
tinymce.dom.TreeWalker=function(n,q){function r(i,a,h,e){if(i){if(!e&&i[a])return i[a];if(i!=q){if(a=i[h])return a;for(i=i.parentNode;i&&i!=q;i=i.parentNode)if(a=i[h])return a}}}var g=n;this.current=function(){return g};this.next=function(i){return g=r(g,"firstChild","nextSibling",i)};this.prev=function(i){return g=r(g,"lastChild","lastSibling",i)}};
(function(){function n(r,g){function i(h){return h.replace(/[A-Z]+/g,function(e){return i(r[e])})}var a;for(a in r)if(r.hasOwnProperty(a))r[a]=i(r[a]);i(g).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]/g,function(h,e,o){var t={};o=o.split(/\|/);for(h=o.length-1;h>=0;h--)t[o[h]]=1;q[e]=t})}var q={};n({Z:"#|H|K|N|O|P",Y:"#|X|form|R|Q",X:"p|T|div|U|W|isindex|fieldset|table",W:"pre|hr|blockquote|address|center|noframes",U:"ul|ol|dl|menu|dir",ZC:"#|p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",
T:"h1|h2|h3|h4|h5|h6",ZB:"#|X|S|Q",S:"R|P",ZA:"#|a|G|J|M|O|P",R:"#|a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe"},"script[]style[]object[#|param|X|form|a|H|K|N|O|Q]param[]p[S]a[Z]br[]span[S]bdo[S]applet[#|param|X|form|a|H|K|N|O|Q]h1[S]img[]map[X|form|Q|area]h2[S]iframe[#|X|form|a|H|K|N|O|Q]h3[S]tt[S]i[S]b[S]u[S]s[S]strike[S]big[S]small[S]font[S]basefont[]em[S]strong[S]dfn[S]code[S]q[S]samp[S]kbd[S]var[S]cite[S]abbr[S]acronym[S]sub[S]sup[S]input[]select[optgroup|option]optgroup[option]option[]textarea[]label[S]button[#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[S]ins[#|X|form|a|H|K|N|O|Q]h5[S]del[#|X|form|a|H|K|N|O|Q]h6[S]div[#|X|form|a|H|K|N|O|Q]ul[li]li[#|X|form|a|H|K|N|O|Q]ol[li]dl[dt|dd]dt[S]dd[#|X|form|a|H|K|N|O|Q]menu[li]dir[li]pre[ZA]hr[]blockquote[#|X|form|a|H|K|N|O|Q]address[S|p]center[#|X|form|a|H|K|N|O|Q]noframes[#|X|form|a|H|K|N|O|Q]isindex[]fieldset[#|legend|X|form|a|H|K|N|O|Q]legend[S]table[caption|col|colgroup|thead|tfoot|tbody|tr]caption[S]col[]colgroup[col]thead[tr]tr[th|td]th[#|X|form|a|H|K|N|O|Q]form[#|X|a|H|K|N|O|Q]noscript[#|X|form|a|H|K|N|O|Q]td[#|X|form|a|H|K|N|O|Q]tfoot[tr]tbody[tr]area[]base[]body[#|X|form|a|H|K|N|O|Q]");
tinymce.dom.Schema=function(){var r=q;this.isValid=function(g,i){g=r[g];return!!(g&&(!i||g[i]))}}})();
(function(n){n.dom.RangeUtils=function(q){this.walk=function(r,g){function i(c,k,b){for(var d=[];c&&c!=b;c=c[k])d.push(c);return d}function a(c,k){do{if(c.parentNode==k)return c;c=c.parentNode}while(c)}function h(c,k,b){var d=b?"nextSibling":"previousSibling";u=c;for(v=u.parentNode;u&&u!=k;u=v){v=u.parentNode;j=i(u==c?u:u[d],d);if(j.length){b||j.reverse();g(j)}}}var e=r.startContainer,o=r.startOffset,t=r.endContainer;r=r.endOffset;var u,v,j,f;f=q.select("td.mceSelected,th.mceSelected");if(f.length>
0)n.each(f,function(c){g([c])});else{if(e.nodeType==1&&e.hasChildNodes())e=e.childNodes[o];if(t.nodeType==1&&t.hasChildNodes())t=t.childNodes[Math.min(o==r?r:r-1,t.childNodes.length-1)];r=q.findCommonAncestor(e,t);if(e==t)return g([e]);for(u=e;u;u=u.parentNode){if(u==t)return h(e,r,true);if(u==r)break}for(u=t;u;u=u.parentNode){if(u==e)return h(t,r);if(u==r)break}o=a(e,r)||e;r=a(t,r)||t;h(e,o,true);j=i(o==e?o:o.nextSibling,"nextSibling",r==t?r.nextSibling:r);j.length&&g(j);h(t,r)}}}})(tinymce);
(function(n){var q=n.DOM,r=n.is;n.create("tinymce.ui.Control",{Control:function(g,i){this.id=g;this.settings=i=i||{};this.rendered=false;this.onRender=new n.util.Dispatcher(this);this.classPrefix="";this.scope=i.scope||this;this.active=this.disabled=0},setDisabled:function(g){var i;if(g!=this.disabled){if((i=q.get(this.id))&&this.settings.unavailable_prefix)if(g){this.prevTitle=i.title;i.title=this.settings.unavailable_prefix+": "+i.title}else i.title=this.prevTitle;this.setState("Disabled",g);this.setState("Enabled",
!g);this.disabled=g}},isDisabled:function(){return this.disabled},setActive:function(g){if(g!=this.active){this.setState("Active",g);this.active=g}},isActive:function(){return this.active},setState:function(g,i){var a=q.get(this.id);g=this.classPrefix+g;i?q.addClass(a,g):q.removeClass(a,g)},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(g){q.setHTML(g,this.renderHTML())},postRender:function(){var g;if(r(this.disabled)){g=this.disabled;this.disabled=-1;this.setDisabled(g)}if(r(this.active)){g=
this.active;this.active=-1;this.setActive(g)}},remove:function(){q.remove(this.id);this.destroy()},destroy:function(){n.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(n,q){this.parent(n,q);this.controls=[];this.lookup={}},add:function(n){this.lookup[n.id]=n;this.controls.push(n);return n},get:function(n){return this.lookup[n]}});
tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(n,q){this.parent(n,q);this.classPrefix="mceSeparator"},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix})}});
(function(n){var q=n.is;n.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(r,g){this.parent(r,g);this.classPrefix="mceMenuItem"},setSelected:function(r){this.setState("Selected",r);this.selected=r},isSelected:function(){return this.selected},postRender:function(){this.parent();q(this.selected)&&this.setSelected(this.selected)}})})(tinymce);
(function(n){var q=n.DOM,r=n.walk;n.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(g,i){this.parent(g,i);this.items={};this.collapsed=false;this.menuCount=0;this.onAddItem=new n.util.Dispatcher(this)},expand:function(g){g&&r(this,function(i){i.expand&&i.expand()},"items",this);this.collapsed=false},collapse:function(g){g&&r(this,function(i){i.collapse&&i.collapse()},"items",this);this.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(g){g.settings||(g=new n.ui.MenuItem(g.id||
q.uniqueId(),g));this.onAddItem.dispatch(this,g);return this.items[g.id]=g},addSeparator:function(){return this.add({separator:true})},addMenu:function(g){g.collapse||(g=this.createMenu(g));this.menuCount++;return this.add(g)},hasMenus:function(){return this.menuCount!==0},remove:function(g){delete this.items[g.id]},removeAll:function(){r(this,function(g){g.removeAll?g.removeAll():g.remove();g.destroy()},"items",this);this.items={}},createMenu:function(g){g=new n.ui.Menu(g.id||q.uniqueId(),g);g.onAddItem.add(this.onAddItem.dispatch,
this.onAddItem);return g}})})(tinymce);
(function(n){var q=n.is,r=n.DOM,g=n.each,i=n.dom.Event,a=n.dom.Element;n.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,e){e=e||{};e.container=e.container||r.doc.body;e.offset_x=e.offset_x||0;e.offset_y=e.offset_y||0;e.vp_offset_x=e.vp_offset_x||0;e.vp_offset_y=e.vp_offset_y||0;if(q(e.icons)&&!e.icons)e["class"]+=" mceNoIcons";this.parent(h,e);this.onShowMenu=new n.util.Dispatcher(this);this.onHideMenu=new n.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(h){var e=
this.settings;h.container=h.container||e.container;h.parent=this;h.constrain=h.constrain||e.constrain;h["class"]=h["class"]||e["class"];h.vp_offset_x=h.vp_offset_x||e.vp_offset_x;h.vp_offset_y=h.vp_offset_y||e.vp_offset_y;h=new n.ui.DropMenu(h.id||r.uniqueId(),h);h.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return h},update:function(){var h=this.settings,e=r.get("menu_"+this.id+"_tbl"),o=r.get("menu_"+this.id+"_co"),t,u;t=h.max_width?Math.min(e.clientWidth,h.max_width):e.clientWidth;u=
h.max_height?Math.min(e.clientHeight,h.max_height):e.clientHeight;r.boxModel?this.element.setStyles({width:t,height:u}):this.element.setStyles({width:t+2,height:u+2});h.max_width&&r.setStyle(o,"width",t);if(h.max_height){r.setStyle(o,"height",u);e.clientHeight<h.max_height&&r.setStyle(o,"overflow","hidden")}},showMenu:function(h,e,o){var t=this,u=t.settings,v,j=r.getViewPort(),f,c,k,b,d=t.classPrefix;t.collapse(1);if(!t.isMenuVisible){if(t.rendered)v=r.get("menu_"+t.id);else{v=r.add(t.settings.container,
t.renderNode());g(t.items,function(m){m.postRender()});t.element=new a("menu_"+t.id,{blocker:1,container:u.container})}n.isOpera||r.setStyles(v,{left:-65535,top:-65535});r.show(v);t.update();h+=u.offset_x||0;e+=u.offset_y||0;j.w-=4;j.h-=4;if(u.constrain){f=v.clientWidth-2;c=v.clientHeight-2;k=j.x+j.w;j=j.y+j.h;if(h+u.vp_offset_x+f>k)h=o?o-f:Math.max(0,k-u.vp_offset_x-f);if(e+u.vp_offset_y+c>j)e=Math.max(0,j-u.vp_offset_y-c)}r.setStyles(v,{left:h,top:e});t.element.update();t.isMenuVisible=1;t.mouseClickFunc=
i.add(v,"click",function(m){var l;if((m=m.target)&&(m=r.getParent(m,"tr"))&&!r.hasClass(m,d+"ItemSub")){l=t.items[m.id];if(!l.isDisabled()){for(b=t;b;){b.hideMenu&&b.hideMenu();b=b.settings.parent}l.settings.onclick&&l.settings.onclick(m);return i.cancel(m)}}});if(t.hasMenus())t.mouseOverFunc=i.add(v,"mouseover",function(m){var l;if((m=m.target)&&(m=r.getParent(m,"tr"))){l=t.items[m.id];t.lastMenu&&t.lastMenu.collapse(1);if(!l.isDisabled())if(m&&r.hasClass(m,d+"ItemSub")){m=r.getRect(m);l.showMenu(m.x+
m.w-2,m.y-2,m.x);t.lastMenu=l;r.addClass(r.get(l.id).firstChild,d+"ItemActive")}}});t.onShowMenu.dispatch(t);if(u.keyboard_focus){i.add(v,"keydown",t._keyHandler,t);r.select("a","menu_"+t.id)[0].focus();t._focusIdx=0}}},hideMenu:function(h){var e=r.get("menu_"+this.id);if(this.isMenuVisible){i.remove(e,"mouseover",this.mouseOverFunc);i.remove(e,"click",this.mouseClickFunc);i.remove(e,"keydown",this._keyHandler);r.hide(e);this.isMenuVisible=0;h||this.collapse(1);this.element&&this.element.hide();if(h=
r.get(this.id))r.removeClass(h.firstChild,this.classPrefix+"ItemActive");this.onHideMenu.dispatch(this)}},add:function(h){var e;h=this.parent(h);if(this.isRendered&&(e=r.get("menu_"+this.id)))this._add(r.select("tbody",e)[0],h);return h},collapse:function(h){this.parent(h);this.hideMenu(1)},remove:function(h){r.remove(h.id);this.destroy();return this.parent(h)},destroy:function(){var h=r.get("menu_"+this.id);i.remove(h,"mouseover",this.mouseOverFunc);i.remove(h,"click",this.mouseClickFunc);this.element&&
this.element.remove();r.remove(h)},renderNode:function(){var h=this,e=h.settings,o,t,u;u=r.create("div",{id:"menu_"+h.id,"class":e["class"],style:"position:absolute;left:0;top:0;z-index:200000"});t=r.add(u,"div",{id:"menu_"+h.id+"_co","class":h.classPrefix+(e["class"]?" "+e["class"]:"")});h.element=new a("menu_"+h.id,{blocker:1,container:e.container});e.menu_line&&r.add(t,"span",{"class":h.classPrefix+"Line"});e=r.add(t,"table",{id:"menu_"+h.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});o=r.add(e,
"tbody");g(h.items,function(v){h._add(o,v)});h.rendered=true;return u},_keyHandler:function(h){function e(t){t=o._focusIdx+t;var u=r.select("a","menu_"+o.id)[t];if(u){o._focusIdx=t;u.focus()}}var o=this;switch(h.keyCode){case 38:e(-1);return;case 40:e(1);return;case 13:return;case 27:return this.hideMenu()}},_add:function(h,e){var o,t=e.settings,u,v,j=this.classPrefix;if(t.separator){u=r.add(h,"tr",{id:e.id,"class":j+"ItemSeparator"});r.add(u,"td",{"class":j+"ItemSeparator"});if(o=u.previousSibling)r.addClass(o,
"mceLast")}else{o=u=r.add(h,"tr",{id:e.id,"class":j+"Item "+j+"ItemEnabled"});o=v=r.add(o,"td");o=r.add(o,"a",{href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});r.addClass(v,t["class"]);v=r.add(o,"span",{"class":"mceIcon"+(t.icon?" mce_"+t.icon:"")});t.icon_src&&r.add(v,"img",{src:t.icon_src});o=r.add(o,t.element||"span",{"class":"mceText",title:e.settings.title},e.settings.title);e.settings.style&&r.setAttrib(o,"style",e.settings.style);h.childNodes.length==1&&r.addClass(u,
"mceFirst");if((o=u.previousSibling)&&r.hasClass(o,j+"ItemSeparator"))r.addClass(u,"mceFirst");e.collapse&&r.addClass(u,j+"ItemSub");if(o=u.previousSibling)r.removeClass(o,"mceLast");r.addClass(u,"mceLast")}}})})(tinymce);
(function(n){var q=n.DOM;n.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(r,g){this.parent(r,g);this.classPrefix="mceButton"},renderHTML:function(){var r=this.classPrefix,g=this.settings,i,a;a=q.encode(g.label||"");i='<a id="'+this.id+'" href="javascript:;" class="'+r+" "+r+"Enabled "+g["class"]+(a?" "+r+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" title="'+q.encode(g.title)+'">';i+=g.image?'<img class="mceIcon" src="'+g.image+'" />'+a+"</a>":'<span class="mceIcon '+
g["class"]+'"></span>'+(a?'<span class="'+r+'Label">'+a+"</span>":"")+"</a>";return i},postRender:function(){var r=this,g=r.settings;n.dom.Event.add(r.id,"click",function(i){if(!r.isDisabled())return g.onclick.call(g.scope,i)})}})})(tinymce);
(function(n){var q=n.DOM,r=n.dom.Event,g=n.each,i=n.util.Dispatcher;n.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(a,h){this.parent(a,h);this.items=[];this.onChange=new i(this);this.onPostRender=new i(this);this.onAdd=new i(this);this.onRenderMenu=new n.util.Dispatcher(this);this.classPrefix="mceListBox"},select:function(a){var h=this,e,o;if(a==undefined)return h.selectByIndex(-1);o=a&&a.call?a:function(t){return t==a};if(a!=h.selectedValue){g(h.items,function(t,u){if(o(t.value)){e=
1;h.selectByIndex(u);return false}});e||h.selectByIndex(-1)}},selectByIndex:function(a){var h,e;if(a!=this.selectedIndex){h=q.get(this.id+"_text");if(e=this.items[a]){this.selectedValue=e.value;this.selectedIndex=a;q.setHTML(h,q.encode(e.title));q.removeClass(h,"mceTitle")}else{q.setHTML(h,q.encode(this.settings.title));q.addClass(h,"mceTitle");this.selectedValue=this.selectedIndex=null}}},add:function(a,h,e){e=e||{};e=n.extend(e,{title:a,value:h});this.items.push(e);this.onAdd.dispatch(this,e)},
getLength:function(){return this.items.length},renderHTML:function(){var a="";a=this.settings;var h=this.classPrefix;a='<table id="'+this.id+'" cellpadding="0" cellspacing="0" class="'+h+" "+h+"Enabled"+(a["class"]?" "+a["class"]:"")+'"><tbody><tr>';a+="<td>"+q.createHTML("a",{id:this.id+"_text",href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},q.encode(this.settings.title))+"</td>";a+="<td>"+q.createHTML("a",{id:this.id+"_open",tabindex:-1,href:"javascript:;",
"class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},"<span></span>")+"</td>";a+="</tr></tbody></table>";return a},showMenu:function(){var a=this,h,e=q.get(this.id),o;if(!(a.isDisabled()||a.items.length==0)){if(a.menu&&a.menu.isMenuVisible)return a.hideMenu();if(!a.isMenuRendered){a.renderMenu();a.isMenuRendered=true}q.getPos(this.settings.menu_container);h=q.getPos(e);o=a.menu;o.settings.offset_x=h.x;o.settings.offset_y=h.y;o.settings.keyboard_focus=!n.isOpera;a.oldID&&o.items[a.oldID].setSelected(0);
g(a.items,function(t){if(t.value===a.selectedValue){o.items[t.id].setSelected(1);a.oldID=t.id}});o.showMenu(0,e.clientHeight);r.add(q.doc,"mousedown",a.hideMenu,a);q.addClass(a.id,a.classPrefix+"Selected")}},hideMenu:function(a){if(this.menu&&this.menu.isMenuVisible)if(!(a&&a.type=="mousedown"&&(a.target.id==this.id+"_text"||a.target.id==this.id+"_open")))if(!a||!q.getParent(a.target,".mceMenu")){q.removeClass(this.id,this.classPrefix+"Selected");r.remove(q.doc,"mousedown",this.hideMenu,this);this.menu.hideMenu()}},
renderMenu:function(){var a=this,h;h=a.settings.control_manager.createDropMenu(a.id+"_menu",{menu_line:1,"class":a.classPrefix+"Menu mceNoIcons",max_width:150,max_height:150});h.onHideMenu.add(a.hideMenu,a);h.add({title:a.settings.title,"class":"mceMenuItemTitle",onclick:function(){a.settings.onselect("")!==false&&a.select("")}});g(a.items,function(e){if(e.value===undefined)h.add({title:e.title,"class":"mceMenuItemTitle",onclick:function(){a.settings.onselect("")!==false&&a.select("")}});else{e.id=
q.uniqueId();e.onclick=function(){a.settings.onselect(e.value)!==false&&a.select(e.value)};h.add(e)}});a.onRenderMenu.dispatch(a,h);a.menu=h},postRender:function(){var a=this,h=a.classPrefix;r.add(a.id,"click",a.showMenu,a);r.add(a.id+"_text","focus",function(){if(!a._focused)a.keyDownHandler=r.add(a.id+"_text","keydown",function(e){var o=-1,t,u=e.keyCode;g(a.items,function(v,j){if(a.selectedValue==v.value)o=j});if(u==38)t=a.items[o-1];else if(u==40)t=a.items[o+1];else if(u==13){t=a.selectedValue;
a.selectedValue=null;a.settings.onselect(t);return r.cancel(e)}if(t){a.hideMenu();a.select(t.value)}});a._focused=1});r.add(a.id+"_text","blur",function(){r.remove(a.id+"_text","keydown",a.keyDownHandler);a._focused=0});if(n.isIE6||!q.boxModel){r.add(a.id,"mouseover",function(){q.hasClass(a.id,h+"Disabled")||q.addClass(a.id,h+"Hover")});r.add(a.id,"mouseout",function(){q.hasClass(a.id,h+"Disabled")||q.removeClass(a.id,h+"Hover")})}a.onPostRender.dispatch(a,q.get(a.id))},destroy:function(){this.parent();
r.clear(this.id+"_text");r.clear(this.id+"_open")}})})(tinymce);
(function(n){var q=n.DOM,r=n.dom.Event,g=n.each;n.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(i,a){this.parent(i,a);this.classPrefix="mceNativeListBox"},setDisabled:function(i){q.get(this.id).disabled=i},isDisabled:function(){return q.get(this.id).disabled},select:function(i){var a=this,h,e;if(i==undefined)return a.selectByIndex(-1);e=i&&i.call?i:function(o){return o==i};if(i!=a.selectedValue){g(a.items,function(o,t){if(e(o.value)){h=1;a.selectByIndex(t);return false}});
h||a.selectByIndex(-1)}},selectByIndex:function(i){q.get(this.id).selectedIndex=i+1;this.selectedValue=this.items[i]?this.items[i].value:null},add:function(i,a,h){h=h||{};h.value=a;this.isRendered()&&q.add(q.get(this.id),"option",h,i);i={title:i,value:a,attribs:h};this.items.push(i);this.onAdd.dispatch(this,i)},getLength:function(){return this.items.length},renderHTML:function(){var i;i=q.createHTML("option",{value:""},"-- "+this.settings.title+" --");g(this.items,function(a){i+=q.createHTML("option",
{value:a.value},a.title)});return i=q.createHTML("select",{id:this.id,"class":"mceNativeListBox"},i)},postRender:function(){function i(h){if((h=a.items[h.target.selectedIndex-1])&&(h=h.value)){a.onChange.dispatch(a,h);a.settings.onselect&&a.settings.onselect(h)}}var a=this;a.rendered=true;r.add(a.id,"change",i);r.add(a.id,"keydown",function(h){var e;r.remove(a.id,"change",void 0);e=r.add(a.id,"blur",function(){r.add(a.id,"change",i);r.remove(a.id,"blur",e)});if(h.keyCode==13||h.keyCode==32){i(h);
return r.cancel(h)}});a.onPostRender.dispatch(a,q.get(a.id))}})})(tinymce);
(function(n){var q=n.DOM,r=n.dom.Event;n.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,i){this.parent(g,i);this.onRenderMenu=new n.util.Dispatcher(this);i.menu_container=i.menu_container||q.doc.body},showMenu:function(){var g,i=q.get(this.id),a;if(!this.isDisabled()){if(!this.isMenuRendered){this.renderMenu();this.isMenuRendered=true}if(this.isMenuVisible)return this.hideMenu();q.getPos(this.settings.menu_container);g=q.getPos(i);a=this.menu;a.settings.offset_x=g.x;a.settings.offset_y=
g.y;a.settings.vp_offset_x=g.x;a.settings.vp_offset_y=g.y;a.settings.keyboard_focus=this._focused;a.showMenu(0,i.clientHeight);r.add(q.doc,"mousedown",this.hideMenu,this);this.setState("Selected",1);this.isMenuVisible=1}},renderMenu:function(){var g;g=this.settings.control_manager.createDropMenu(this.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:this.settings.icons});g.onHideMenu.add(this.hideMenu,this);this.onRenderMenu.dispatch(this,g);this.menu=g},hideMenu:function(g){var i=this;
if(!(g&&g.type=="mousedown"&&q.getParent(g.target,function(a){return a.id===i.id||a.id===i.id+"_open"}))){if(!g||!q.getParent(g.target,".mceMenu")){i.setState("Selected",0);r.remove(q.doc,"mousedown",i.hideMenu,i);i.menu&&i.menu.hideMenu()}i.isMenuVisible=0}},postRender:function(){var g=this,i=g.settings;r.add(g.id,"click",function(){if(!g.isDisabled()){i.onclick&&i.onclick(g.value);g.showMenu()}})}})})(tinymce);
(function(n){var q=n.DOM,r=n.dom.Event;n.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,i){this.parent(g,i);this.classPrefix="mceSplitButton"},renderHTML:function(){var g,i=this.settings,a;g="<tbody><tr>";a=i.image?q.createHTML("img ",{src:i.image,"class":"mceAction "+i["class"]}):q.createHTML("span",{"class":"mceAction "+i["class"]},"");g+="<td>"+q.createHTML("a",{id:this.id+"_action",href:"javascript:;","class":"mceAction "+i["class"],onclick:"return false;",onmousedown:"return false;",
title:i.title},a)+"</td>";a=q.createHTML("span",{"class":"mceOpen "+i["class"]});g+="<td>"+q.createHTML("a",{id:this.id+"_open",href:"javascript:;","class":"mceOpen "+i["class"],onclick:"return false;",onmousedown:"return false;",title:i.title},a)+"</td>";g+="</tr></tbody>";return q.createHTML("table",{id:this.id,"class":"mceSplitButton mceSplitButtonEnabled "+i["class"],cellpadding:"0",cellspacing:"0",onmousedown:"return false;",title:i.title},g)},postRender:function(){var g=this,i=g.settings;i.onclick&&
r.add(g.id+"_action","click",function(){g.isDisabled()||i.onclick(g.value)});r.add(g.id+"_open","click",g.showMenu,g);r.add(g.id+"_open","focus",function(){g._focused=1});r.add(g.id+"_open","blur",function(){g._focused=0});if(n.isIE6||!q.boxModel){r.add(g.id,"mouseover",function(){q.hasClass(g.id,"mceSplitButtonDisabled")||q.addClass(g.id,"mceSplitButtonHover")});r.add(g.id,"mouseout",function(){q.hasClass(g.id,"mceSplitButtonDisabled")||q.removeClass(g.id,"mceSplitButtonHover")})}},destroy:function(){this.parent();
r.clear(this.id+"_action");r.clear(this.id+"_open")}})})(tinymce);
(function(n){var q=n.DOM,r=n.dom.Event,g=n.is,i=n.each;n.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(a,h){this.parent(a,h);this.settings=h=n.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"},
this.settings);this.onShowMenu=new n.util.Dispatcher(this);this.onHideMenu=new n.util.Dispatcher(this);this.value=h.default_color},showMenu:function(){var a=this,h,e;if(!a.isDisabled()){if(!a.isMenuRendered){a.renderMenu();a.isMenuRendered=true}if(a.isMenuVisible)return a.hideMenu();h=q.get(a.id);q.show(a.id+"_menu");q.addClass(h,"mceSplitButtonSelected");e=q.getPos(h);q.setStyles(a.id+"_menu",{left:e.x,top:e.y+h.clientHeight,zIndex:2E5});h=0;r.add(q.doc,"mousedown",a.hideMenu,a);a.onShowMenu.dispatch(a);
if(a._focused){a._keyHandler=r.add(a.id+"_menu","keydown",function(o){o.keyCode==27&&a.hideMenu()});q.select("a",a.id+"_menu")[0].focus()}a.isMenuVisible=1}},hideMenu:function(a){var h=this;if(!(a&&a.type=="mousedown"&&q.getParent(a.target,function(e){return e.id===h.id+"_open"}))){if(!a||!q.getParent(a.target,".mceSplitButtonMenu")){q.removeClass(h.id,"mceSplitButtonSelected");r.remove(q.doc,"mousedown",h.hideMenu,h);r.remove(h.id+"_menu","keydown",h._keyHandler);q.hide(h.id+"_menu")}h.onHideMenu.dispatch(h);
h.isMenuVisible=0}},renderMenu:function(){var a=this,h,e=0,o=a.settings,t,u,v,j;j=q.add(o.menu_container,"div",{id:a.id+"_menu","class":o.menu_class+" "+o["class"],style:"position:absolute;left:0;top:-1000px;"});h=q.add(j,"div",{"class":o["class"]+" mceSplitButtonMenu"});q.add(h,"span",{"class":"mceMenuLine"});t=q.add(h,"table",{"class":"mceColorSplitMenu"});u=q.add(t,"tbody");e=0;i(g(o.colors,"array")?o.colors:o.colors.split(","),function(f){f=f.replace(/^#/,"");if(!e--){v=q.add(u,"tr");e=o.grid_width-
1}t=q.add(v,"td");t=q.add(t,"a",{href:"javascript:;",style:{backgroundColor:"#"+f},_mce_color:"#"+f})});if(o.more_colors_func){t=q.add(u,"tr");t=q.add(t,"td",{colspan:o.grid_width,"class":"mceMoreColors"});t=q.add(t,"a",{id:a.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},o.more_colors_title);r.add(t,"click",function(f){o.more_colors_func.call(o.more_colors_scope||this);return r.cancel(f)})}q.addClass(h,"mceColorSplitMenu");r.add(a.id+"_menu","click",function(f){var c;
f=f.target;if(f.nodeName=="A"&&(c=f.getAttribute("_mce_color")))a.setColor(c);return r.cancel(f)});return j},setColor:function(a){q.setStyle(this.id+"_preview","backgroundColor",a);this.value=a;this.hideMenu();this.settings.onselect(a)},postRender:function(){var a=this.id;this.parent();q.add(a+"_action","div",{id:a+"_preview","class":"mceColorPreview"});q.setStyle(this.id+"_preview","backgroundColor",this.value)},destroy:function(){this.parent();r.clear(this.id+"_menu");r.clear(this.id+"_more");q.remove(this.id+
"_menu")}})})(tinymce);
tinymce.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var n="",q,r,g=tinymce.DOM,i=this.settings,a,h,e,o;o=this.controls;for(a=0;a<o.length;a++){r=o[a];h=o[a-1];e=o[a+1];if(a===0){q="mceToolbarStart";if(r.Button)q+=" mceToolbarStartButton";else if(r.SplitButton)q+=" mceToolbarStartSplitButton";else if(r.ListBox)q+=" mceToolbarStartListBox";n+=g.createHTML("td",{"class":q},g.createHTML("span",null,"<!-- IE --\>"))}if(h&&r.ListBox)if(h.Button||h.SplitButton)n+=g.createHTML("td",
{"class":"mceToolbarEnd"},g.createHTML("span",null,"<!-- IE --\>"));n+=g.stdMode?'<td style="position: relative">'+r.renderHTML()+"</td>":"<td>"+r.renderHTML()+"</td>";if(e&&r.ListBox)if(e.Button||e.SplitButton)n+=g.createHTML("td",{"class":"mceToolbarStart"},g.createHTML("span",null,"<!-- IE --\>"))}q="mceToolbarEnd";if(r.Button)q+=" mceToolbarEndButton";else if(r.SplitButton)q+=" mceToolbarEndSplitButton";else if(r.ListBox)q+=" mceToolbarEndListBox";n+=g.createHTML("td",{"class":q},g.createHTML("span",
null,"<!-- IE --\>"));return g.createHTML("table",{id:this.id,"class":"mceToolbar"+(i["class"]?" "+i["class"]:""),cellpadding:"0",cellspacing:"0",align:this.settings.align||""},"<tbody><tr>"+n+"</tr></tbody>")}});
(function(n){n.create("tinymce.AddOnManager",{items:[],urls:{},lookup:{},onAdd:new n.util.Dispatcher(this),get:function(q){return this.lookup[q]},requireLangPack:function(q){var r=n.settings;r&&r.language&&n.ScriptLoader.add(this.urls[q]+"/langs/"+r.language+".js")},add:function(q,r){this.items.push(r);this.lookup[q]=r;this.onAdd.dispatch(this,q,r);return r},load:function(q,r,g,i){if(!this.urls[q]){if(r.indexOf("/")!=0&&r.indexOf("://")==-1)r=n.baseURL+"/"+r;this.urls[q]=r.substring(0,r.lastIndexOf("/"));
n.ScriptLoader.add(r,g,i)}}});n.PluginManager=new n.AddOnManager;n.ThemeManager=new n.AddOnManager})(tinymce);
(function(n){var q=n.each,r=n.extend,g=n.DOM,i=n.dom.Event,a=n.explode,h=n.util.Dispatcher,e=0;n.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");/[\/\\]$/.test(n.documentBaseURL)||(n.documentBaseURL+="/");n.baseURL=(new n.util.URI(n.documentBaseURL)).toAbsolute(n.baseURL);n.baseURI=new n.util.URI(n.baseURL);n.onBeforeUnload=new h(n);i.add(window,"beforeunload",function(o){n.onBeforeUnload.dispatch(n,o)});n.onAddEditor=new h(n);n.onRemoveEditor=new h(n);n.EditorManager=
r(n,{editors:[],i18n:{},activeEditor:null,init:function(o){function t(c,k,b){var d=c[k];if(d){if(n.is(d,"string")){b=(b=d.replace(/\.\w+$/,""))?n.resolve(b):0;d=n.resolve(d)}return d.apply(b||this,Array.prototype.slice.call(arguments,2))}}var u=this,v,j=[],f;o=r({theme:"simple",language:"en"},o);u.settings=o;i.add(document,"init",function(){var c,k;t(o,"onpageload");switch(o.mode){case "exact":c=o.elements||"";c.length>0&&q(a(c),function(d){if(g.get(d)){f=new n.Editor(d,o);j.push(f);f.render(1)}else q(document.forms,
function(m){q(m.elements,function(l){if(l.name===d){d="mce_editor_"+e++;g.setAttrib(l,"id",d);f=new n.Editor(d,o);j.push(f);f.render(1)}})})});break;case "textareas":case "specific_textareas":var b=function(d,m){return m.constructor===RegExp?m.test(d.className):g.hasClass(d,m)};q(g.select("textarea"),function(d){if(!(o.editor_deselector&&b(d,o.editor_deselector)))if(!o.editor_selector||b(d,o.editor_selector)){v=g.get(d.name);if(!d.id&&!v)d.id=d.name;if(!d.id||u.get(d.id))d.id=g.uniqueId();f=new n.Editor(d.id,
o);j.push(f);f.render(1)}});break}if(o.oninit){c=k=0;q(j,function(d){k++;if(d.initialized)c++;else d.onInit.add(function(){c++;c==k&&t(o,"oninit")});c==k&&t(o,"oninit")})}})},get:function(o){if(o===void 0)return this.editors;return this.editors[o]},getInstanceById:function(o){return this.get(o)},add:function(o){var t=this.editors;t[o.id]=o;t.push(o);this._setActive(o);this.onAddEditor.dispatch(this,o);return o},remove:function(o){var t,u=this.editors;if(!u[o.id])return null;delete u[o.id];for(t=0;t<
u.length;t++)if(u[t]==o){u.splice(t,1);break}this.activeEditor==o&&this._setActive(u[0]);o.destroy();this.onRemoveEditor.dispatch(this,o);return o},execCommand:function(o,t,u){var v=this.get(u),j;switch(o){case "mceFocus":v.focus();return true;case "mceAddEditor":case "mceAddControl":this.get(u)||(new n.Editor(u,this.settings)).render();return true;case "mceAddFrameControl":j=u.window;j.tinyMCE=tinyMCE;j.tinymce=n;n.DOM.doc=j.document;n.DOM.win=j;v=new n.Editor(u.element_id,u);v.render();if(n.isIE){var f=
function(){v.destroy();j.detachEvent("onunload",f);j=j.tinyMCE=j.tinymce=null};j.attachEvent("onunload",f)}u.page_window=null;return true;case "mceRemoveEditor":case "mceRemoveControl":v&&v.remove();return true;case "mceToggleEditor":if(!v){this.execCommand("mceAddControl",0,u);return true}v.isHidden()?v.show():v.hide();return true}if(this.activeEditor)return this.activeEditor.execCommand(o,t,u);return false},execInstanceCommand:function(o,t,u,v){if(o=this.get(o))return o.execCommand(t,u,v);return false},
triggerSave:function(){q(this.editors,function(o){o.save()})},addI18n:function(o,t){var u=this.i18n;n.is(o,"string")?q(t,function(v,j){u[o+"."+j]=v}):q(o,function(v,j){q(v,function(f,c){q(f,function(k,b){if(c==="common")u[j+"."+b]=k;else u[j+"."+c+"."+b]=k})})})},_setActive:function(o){this.selectedInstance=this.activeEditor=o}})})(tinymce);
(function(n){var q=n.DOM,r=n.dom.Event,g=n.extend,i=n.util.Dispatcher,a=n.each,h=n.isGecko,e=n.isIE,o=n.is,t=n.ThemeManager,u=n.PluginManager,v=n.explode;n.create("tinymce.Editor",{Editor:function(j,f){var c=this;c.id=c.editorId=j;c.execCommands={};c.queryStateCommands={};c.queryValueCommands={};c.isNotDirty=false;c.plugins={};a(["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(k){c[k]=new i(c)});c.settings=f=g({id:j,language:"en",docs_language:"en",theme:"simple",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:n.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:n.isIE6?'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">':"<!DOCTYPE>",visual_table_class:"mceItemTable",visual:1,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",
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,-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|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",keep_styles:1,fix_table_elements:1,inline_styles:1,convert_fonts_to_spans:true},f);c.documentBaseURI=new n.util.URI(f.document_base_url||n.documentBaseURL,{base_uri:tinyMCE.baseURI});c.baseURI=n.baseURI;c.execCallback("setup",c)},render:function(){function j(){c.language&&b.add(n.baseURL+"/langs/"+c.language+".js");c.theme&&c.theme.charAt(0)!="-"&&!t.urls[c.theme]&&t.load(c.theme,"themes/"+c.theme+"/editor_template"+
n.suffix+".js");a(v(c.plugins),function(d){d&&d.charAt(0)!="-"&&!u.urls[d]&&d!="safari"&&u.load(d,"plugins/"+d+"/editor_plugin"+n.suffix+".js")});b.loadQueue(function(){f.removed||f.init()})}var f=this,c=f.settings,k=f.id,b=n.ScriptLoader;if(r.domLoaded){tinyMCE.settings=c;if(f.getElement()){!/TEXTAREA|INPUT/i.test(f.getElement().nodeName)&&c.hidden_input&&q.getParent(k,"form")&&q.insertAfter(q.create("input",{type:"hidden",name:k}),k);if(n.WindowManager)f.windowManager=new n.WindowManager(f);c.encoding==
"xml"&&f.onGetContent.add(function(d,m){if(m.save)m.content=q.encode(m.content)});c.add_form_submit_trigger&&f.onSubmit.addToTop(function(){if(f.initialized){f.save();f.isNotDirty=1}});if(c.add_unload_trigger)f._beforeUnload=tinyMCE.onBeforeUnload.add(function(){f.initialized&&!f.destroyed&&!f.isHidden()&&f.save({format:"raw",no_events:true})});n.addUnload(f.destroy,f);c.submit_patch&&f.onBeforeRenderUI.add(function(){var d=f.getElement().form;if(d)if(!d._mceOldSubmit){if(!d.submit.nodeType&&!d.submit.length){f.formElement=
d;d._mceOldSubmit=d.submit;d.submit=function(){n.triggerSave();f.isNotDirty=1;return f.formElement._mceOldSubmit(f.formElement)}}d=null}});j()}}else r.add(document,"init",function(){f.render()})},init:function(){var j,f=this,c=f.settings,k,b=f.getElement(),d,m,l;n.add(f);if(c.theme){c.theme=c.theme.replace(/-/,"");d=t.get(c.theme);f.theme=new d;if(f.theme.init&&c.init_theme)f.theme.init(f,t.urls[c.theme]||n.documentBaseURL.replace(/\/$/,""))}a(v(c.plugins.replace(/\-/g,"")),function(s){var p=u.get(s),
z=u.urls[s]||n.documentBaseURL.replace(/\/$/,"");if(p){p=new p(f,z);f.plugins[s]=p;p.init&&p.init(f,z)}});if(c.popup_css!==false)c.popup_css=c.popup_css?f.documentBaseURI.toAbsolute(c.popup_css):f.baseURI.toAbsolute("themes/"+c.theme+"/skins/"+c.skin+"/dialog.css");if(c.popup_css_add)c.popup_css+=","+f.documentBaseURI.toAbsolute(c.popup_css_add);f.controlManager=new n.ControlManager(f);if(c.custom_undo_redo){f.onBeforeExecCommand.add(function(s,p,z,G,F){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!F||
!F.skip_undo))f.undoManager.hasUndo()||f.undoManager.add()});f.onExecCommand.add(function(s,p,z,G,F){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!F||!F.skip_undo))f.undoManager.add()})}f.onExecCommand.add(function(s,p){/^(FontName|FontSize)$/.test(p)||f.nodeChanged()});if(h){l=function(s,p){if(!p||!p.initial)f.execCommand("mceRepaint")};f.onUndo.add(l);f.onRedo.add(l);f.onSetContent.add(l)}f.onBeforeRenderUI.dispatch(f,f.controlManager);if(c.render_ui){k=c.width||b.style.width||b.offsetWidth;j=c.height||
b.style.height||b.offsetHeight;f.orgDisplay=b.style.display;l=/^[0-9\.]+(|px)$/i;if(l.test(""+k))k=Math.max(parseInt(k)+(d.deltaWidth||0),100);if(l.test(""+j))j=Math.max(parseInt(j)+(d.deltaHeight||0),100);d=f.theme.renderUI({targetNode:b,width:k,height:j,deltaWidth:c.delta_width,deltaHeight:c.delta_height});f.editorContainer=d.editorContainer}if(document.domain&&location.hostname!=document.domain)n.relaxedDomain=document.domain;q.setStyles(d.sizeContainer||d.editorContainer,{width:k,height:j});j=
(d.iframeHeight||j)+(typeof j=="number"?d.deltaHeight||0:"");if(j<100)j=100;f.iframeHTML=c.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">';if(c.document_base_url!=n.documentBaseURL)f.iframeHTML+='<base href="'+f.documentBaseURI.getURI()+'" />';f.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';if(n.relaxedDomain)f.iframeHTML+='<script type="text/javascript">document.domain = "'+n.relaxedDomain+'";<\/script>';
k=c.body_id||"tinymce";if(k.indexOf("=")!=-1){k=f.getParam("body_id","","hash");k=k[f.id]||k}c=c.body_class||"";if(c.indexOf("=")!=-1){c=f.getParam("body_class","","hash");c=c[f.id]||""}f.iframeHTML+='</head><body id="'+k+'" class="mceContentBody '+c+'"></body></html>';if(n.relaxedDomain)if(e||n.isOpera&&parseFloat(opera.version())>=9.5)m='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+f.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()';
else if(n.isOpera)m='javascript:(function(){document.open();document.domain="'+document.domain+'";document.close();ed.setupIframe();})()';j=q.add(d.iframeContainer,"iframe",{id:f.id+"_ifr",src:m||'javascript:""',frameBorder:"0",style:{width:"100%",height:j}});f.contentAreaContainer=d.iframeContainer;q.get(d.editorContainer).style.display=f.orgDisplay;q.get(f.id).style.display="none";if(!e||!n.relaxedDomain)f.setupIframe();b=j=d=null},setupIframe:function(){var j=this,f=j.settings,c=q.get(j.id);c=
j.getDoc();var k;if(!e||!n.relaxedDomain){c.open();c.write(j.iframeHTML);c.close()}if(!e)try{if(!f.readonly)c.designMode="On"}catch(b){}if(e){k=j.getBody();q.hide(k);if(!f.readonly)k.contentEditable=true;q.show(k)}j.dom=new n.dom.DOMUtils(j.getDoc(),{keep_values:true,url_converter:j.convertURL,url_converter_scope:j,hex_colors:f.force_hex_style_colors,class_filter:f.class_filter,update_styles:1,fix_ie_paragraphs:1,valid_styles:f.valid_styles});j.schema=new n.dom.Schema;j.serializer=new n.dom.Serializer(g(f,
{valid_elements:f.verify_html===false?"*[*]":f.valid_elements,dom:j.dom,schema:j.schema}));j.selection=new n.dom.Selection(j.dom,j.getWin(),j.serializer);j.formatter=new n.Formatter(this);j.formatter.register({alignleft:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"}},{selector:"img,table",styles:{"float":"left"}}],aligncenter:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"}},{selector:"img",styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},
{selector:"table",styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"}},{selector:"img,table",styles:{"float":"right"}}],alignfull:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"}}],bold:[{inline:"strong"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b"}],italic:[{inline:"em"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i"}],underline:[{inline:"span",styles:{textDecoration:"underline"},
exact:true},{inline:"u"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"u"}],forecolor:{inline:"span",styles:{color:"%value"}},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"}},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:true,expand:false,block_expand:true,
deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]});a("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(s){j.formatter.register(s,{block:s,remove:"all"})});j.formatter.register(j.settings.formats);j.undoManager=new n.UndoManager(j);j.undoManager.onAdd.add(function(s,p){if(!p.initial)return j.onChange.dispatch(j,p,s)});j.undoManager.onUndo.add(function(s,
p){return j.onUndo.dispatch(j,p,s)});j.undoManager.onRedo.add(function(s,p){return j.onRedo.dispatch(j,p,s)});j.forceBlocks=new n.ForceBlocks(j,{forced_root_block:f.forced_root_block});j.editorCommands=new n.EditorCommands(j);j.serializer.onPreProcess.add(function(s,p){return j.onPreProcess.dispatch(j,p,s)});j.serializer.onPostProcess.add(function(s,p){return j.onPostProcess.dispatch(j,p,s)});j.onPreInit.dispatch(j);if(!f.gecko_spellcheck)j.getBody().spellcheck=0;f.readonly||j._addEvents();j.controlManager.onPostRender.dispatch(j,
j.controlManager);j.onPostRender.dispatch(j);if(f.directionality)j.getBody().dir=f.directionality;if(f.nowrap)j.getBody().style.whiteSpace="nowrap";if(f.custom_elements){var d=function(s,p){a(v(f.custom_elements),function(z){var G;if(z.indexOf("~")===0){z=z.substring(1);G="span"}else G="div";p.content=p.content.replace(new RegExp("<("+z+")([^>]*)>","g"),"<"+G+' _mce_name="$1"$2>');p.content=p.content.replace(new RegExp("</("+z+")>","g"),"</"+G+">")})};j.onBeforeSetContent.add(d);j.onPostProcess.add(function(s,
p){p.set&&d(s,p)})}f.handle_node_change_callback&&j.onNodeChange.add(function(s,p,z){j.execCallback("handle_node_change_callback",j.id,z,-1,-1,true,j.selection.isCollapsed())});f.save_callback&&j.onSaveContent.add(function(s,p){if(s=j.execCallback("save_callback",j.id,p.content,j.getBody()))p.content=s});f.onchange_callback&&j.onChange.add(function(s,p){j.execCallback("onchange_callback",j,p)});f.convert_newlines_to_brs&&j.onBeforeSetContent.add(function(s,p){if(p.initial)p.content=p.content.replace(/\r?\n/g,
"<br />")});f.fix_nesting&&e&&j.onBeforeSetContent.add(function(s,p){p.content=j._fixNesting(p.content)});f.preformatted&&j.onPostProcess.add(function(s,p){p.content=p.content.replace(/^\s*<pre.*?>/,"");p.content=p.content.replace(/<\/pre>\s*$/,"");if(p.set)p.content='<pre class="mceItemHidden">'+p.content+"</pre>"});if(f.verify_css_classes)j.serializer.attribValueFilter=function(s,p){var z;if(s=="class"){if(!j.classesRE){s=j.dom.getClasses();if(s.length>0){z="";a(s,function(G){z+=(z?"|":"")+G["class"]});
j.classesRE=new RegExp("("+z+")","gi")}}return!j.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(p)||j.classesRE.test(p)?p:""}return p};if(f.cleanup_callback){j.onBeforeSetContent.add(function(s,p){p.content=j.execCallback("cleanup_callback","insert_to_editor",p.content,p)});j.onPreProcess.add(function(s,p){p.set&&j.execCallback("cleanup_callback","insert_to_editor_dom",p.node,p);p.get&&j.execCallback("cleanup_callback","get_from_editor_dom",p.node,p)});j.onPostProcess.add(function(s,p){if(p.set)p.content=
j.execCallback("cleanup_callback","insert_to_editor",p.content,p);if(p.get)p.content=j.execCallback("cleanup_callback","get_from_editor",p.content,p)})}f.save_callback&&j.onGetContent.add(function(s,p){if(p.save)p.content=j.execCallback("save_callback",j.id,p.content,j.getBody())});f.handle_event_callback&&j.onEvent.add(function(s,p,z){j.execCallback("handle_event_callback",p,s,z)===false&&r.cancel(p)});j.onSetContent.add(function(){j.addVisual(j.getBody())});f.padd_empty_editor&&j.onPostProcess.add(function(s,
p){p.content=p.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")});if(h){var m=function(s){a(s.dom.select("a"),function(p){var z=p.parentNode;s.dom.isBlock(z)&&z.lastChild===p&&s.dom.add(z,"br",{_mce_bogus:1})})};j.onExecCommand.add(function(s,p){p==="CreateLink"&&m(s)});j.onSetContent.add(j.selection.onSetContent.add(m));if(!f.readonly)try{c.designMode="Off";c.designMode="On"}catch(l){}}setTimeout(function(){if(!j.removed){j.load({initial:true,format:f.cleanup_on_startup?
"html":"raw"});j.startContent=j.getContent({format:"raw"});j.initialized=true;j.onInit.dispatch(j);j.execCallback("setupcontent_callback",j.id,j.getBody(),j.getDoc());j.execCallback("init_instance_callback",j);j.focus(true);j.nodeChanged({initial:1});f.content_css&&n.each(v(f.content_css),function(s){j.dom.loadCSS(j.documentBaseURI.toAbsolute(s))});f.auto_focus&&setTimeout(function(){var s=n.get(f.auto_focus);s.selection.select(s.getBody(),1);s.selection.collapse(1);s.getWin().focus()},100)}},1);
c=null},focus:function(j){var f=this.settings.content_editable;j||f||this.getWin().focus();if(n.activeEditor!=this){if((j=n.activeEditor)!=null)j.onDeactivate.dispatch(j,this);this.onActivate.dispatch(this,j)}n._setActive(this)},execCallback:function(j){var f=this.settings[j],c;if(f){if(this.callbackLookup&&(c=this.callbackLookup[j])){f=c.func;c=c.scope}if(o(f,"string")){c=(c=f.replace(/\.\w+$/,""))?n.resolve(c):0;f=n.resolve(f);this.callbackLookup=this.callbackLookup||{};this.callbackLookup[j]={func:f,
scope:c}}return f.apply(c||this,Array.prototype.slice.call(arguments,1))}},translate:function(j){var f=this.settings.language||"en",c=n.i18n;if(!j)return"";return c[f+"."+j]||j.replace(/{\#([^}]+)\}/g,function(k,b){return c[f+"."+b]||"{#"+b+"}"})},getLang:function(j,f){return n.i18n[(this.settings.language||"en")+"."+j]||(o(f)?f:"{#"+j+"}")},getParam:function(j,f,c){var k=n.trim;j=o(this.settings[j])?this.settings[j]:f;var b;if(c==="hash"){b={};if(o(j,"string"))a(j.indexOf("=")>0?j.split(/[;,](?![^=;,]*(?:[;,]|$))/):
j.split(","),function(d){d=d.split("=");if(d.length>1)b[k(d[0])]=k(d[1]);else b[k(d[0])]=k(d)});else b=j;return b}return j},nodeChanged:function(j){var f=this.selection,c=(e?f.getNode():f.getStart())||this.getBody();if(this.initialized){j=j||{};c=e&&c.ownerDocument!=this.getDoc()?this.getBody():c;j.parents=[];this.dom.getParent(c,function(k){if(k.nodeName=="BODY")return true;j.parents.push(k)});this.onNodeChange.dispatch(this,j?j.controlManager||this.controlManager:this.controlManager,c,f.isCollapsed(),
j)}},addButton:function(j,f){this.buttons=this.buttons||{};this.buttons[j]=f},addCommand:function(j,f,c){this.execCommands[j]={func:f,scope:c||this}},addQueryStateHandler:function(j,f,c){this.queryStateCommands[j]={func:f,scope:c||this}},addQueryValueHandler:function(j,f,c){this.queryValueCommands[j]={func:f,scope:c||this}},addShortcut:function(j,f,c,k){var b=this,d;if(!b.settings.custom_shortcuts)return false;b.shortcuts=b.shortcuts||{};if(o(c,"string")){d=c;c=function(){b.execCommand(d,false,null)}}if(o(c,
"object")){d=c;c=function(){b.execCommand(d[0],d[1],d[2])}}a(v(j),function(m){var l={func:c,scope:k||this,desc:f,alt:false,ctrl:false,shift:false};a(v(m,"+"),function(s){switch(s){case "alt":case "ctrl":case "shift":l[s]=true;break;default:l.charCode=s.charCodeAt(0);l.keyCode=s.toUpperCase().charCodeAt(0)}});b.shortcuts[(l.ctrl?"ctrl":"")+","+(l.alt?"alt":"")+","+(l.shift?"shift":"")+","+l.keyCode]=l});return true},execCommand:function(j,f,c,k){var b=this,d=0,m;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(j)&&
(!k||!k.skip_focus))b.focus();m={};b.onBeforeExecCommand.dispatch(b,j,f,c,m);if(m.terminate)return false;if(b.execCallback("execcommand_callback",b.id,b.selection.getNode(),j,f,c)){b.onExecCommand.dispatch(b,j,f,c,k);return true}if(m=b.execCommands[j]){m=m.func.call(m.scope,f,c);if(m!==true){b.onExecCommand.dispatch(b,j,f,c,k);return m}}a(b.plugins,function(l){if(l.execCommand&&l.execCommand(j,f,c)){b.onExecCommand.dispatch(b,j,f,c,k);d=1;return false}});if(d)return true;if(b.theme&&b.theme.execCommand&&
b.theme.execCommand(j,f,c)){b.onExecCommand.dispatch(b,j,f,c,k);return true}if(n.GlobalCommands.execCommand(b,j,f,c)){b.onExecCommand.dispatch(b,j,f,c,k);return true}if(b.editorCommands.execCommand(j,f,c)){b.onExecCommand.dispatch(b,j,f,c,k);return true}b.getDoc().execCommand(j,f,c);b.onExecCommand.dispatch(b,j,f,c,k)},queryCommandState:function(j){var f;if(!this._isHidden()){if(f=this.queryStateCommands[j]){f=f.func.call(f.scope);if(f!==true)return f}f=this.editorCommands.queryCommandState(j);if(f!==
-1)return f;try{return this.getDoc().queryCommandState(j)}catch(c){}}},queryCommandValue:function(j){var f;if(!this._isHidden()){if(f=this.queryValueCommands[j]){f=f.func.call(f.scope);if(f!==true)return f}f=this.editorCommands.queryCommandValue(j);if(o(f))return f;try{return this.getDoc().queryCommandValue(j)}catch(c){}}},show:function(){q.show(this.getContainer());q.hide(this.id);this.load()},hide:function(){var j=this.getDoc();e&&j&&j.execCommand("SelectAll");this.save();q.hide(this.getContainer());
q.setStyle(this.id,"display",this.orgDisplay)},isHidden:function(){return!q.isHidden(this.id)},setProgressState:function(j,f,c){this.onSetProgressState.dispatch(this,j,f,c);return j},load:function(j){var f=this.getElement(),c;if(f){j=j||{};j.load=true;c=this.setContent(o(f.value)?f.value:f.innerHTML,j);j.element=f;j.no_events||this.onLoadContent.dispatch(this,j);j.element=null;return c}},save:function(j){var f=this,c=f.getElement(),k;if(c&&f.initialized){j=j||{};j.save=true;if(!j.no_events){f.undoManager.typing=
0;f.undoManager.add()}j.element=c;k=j.content=f.getContent(j);j.no_events||f.onSaveContent.dispatch(f,j);k=j.content;if(/TEXTAREA|INPUT/i.test(c.nodeName))c.value=k;else{c.innerHTML=k;if(c=q.getParent(f.id,"form"))a(c.elements,function(b){if(b.name==f.id){b.value=k;return false}})}j.element=c=null;return k}},setContent:function(j,f){f=f||{};f.format=f.format||"html";f.set=true;f.content=j;f.no_events||this.onBeforeSetContent.dispatch(this,f);if(!n.isIE&&(j.length===0||/^\s+$/.test(j))){f.content=
this.dom.setHTML(this.getBody(),'<br _mce_bogus="1" />');f.format="raw"}f.content=this.dom.setHTML(this.getBody(),n.trim(f.content));if(f.format!="raw"&&this.settings.cleanup){f.getInner=true;f.content=this.dom.setHTML(this.getBody(),this.serializer.serialize(this.getBody(),f))}f.no_events||this.onSetContent.dispatch(this,f);return f.content},getContent:function(j){var f;j=j||{};j.format=j.format||"html";j.get=true;j.no_events||this.onBeforeGetContent.dispatch(this,j);if(j.format!="raw"&&this.settings.cleanup){j.getInner=
true;f=this.serializer.serialize(this.getBody(),j)}else f=this.getBody().innerHTML;f=f.replace(/^\s*|\s*$/g,"");j.content=f;j.no_events||this.onGetContent.dispatch(this,j);return j.content},isDirty:function(){return n.trim(this.startContent)!=n.trim(this.getContent({format:"raw",no_events:1}))&&!this.isNotDirty},getContainer:function(){if(!this.container)this.container=q.get(this.editorContainer||this.id+"_parent");return this.container},getContentAreaContainer:function(){return this.contentAreaContainer},
getElement:function(){return q.get(this.settings.content_element||this.id)},getWin:function(){var j;if(!this.contentWindow)if(j=q.get(this.id+"_ifr"))this.contentWindow=j.contentWindow;return this.contentWindow},getDoc:function(){var j;if(!this.contentDocument)if(j=this.getWin())this.contentDocument=j.document;return this.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(j,f,c){var k=this.settings;if(k.urlconverter_callback)return this.execCallback("urlconverter_callback",
j,c,true,f);if(!k.convert_urls||c&&c.nodeName=="LINK"||j.indexOf("file:")===0)return j;if(k.relative_urls)return this.documentBaseURI.toRelative(j);return j=this.documentBaseURI.toAbsolute(j,k.remove_script_host)},addVisual:function(j){var f=this,c=f.settings;j=j||f.getBody();if(!o(f.hasVisual))f.hasVisual=c.visual;a(f.dom.select("table,a",j),function(k){var b;switch(k.nodeName){case "TABLE":b=f.dom.getAttrib(k,"border");if(!b||b=="0")f.hasVisual?f.dom.addClass(k,c.visual_table_class):f.dom.removeClass(k,
c.visual_table_class);return;case "A":if(b=f.dom.getAttrib(k,"name"))f.hasVisual?f.dom.addClass(k,"mceItemAnchor"):f.dom.removeClass(k,"mceItemAnchor");return}});f.onVisualAid.dispatch(f,j,f.hasVisual)},remove:function(){var j=this.getContainer();this.removed=1;this.hide();this.execCallback("remove_instance_callback",this);this.onRemove.dispatch(this);this.onExecCommand.listeners=[];n.remove(this);q.remove(j)},destroy:function(j){if(!this.destroyed){if(!j){n.removeUnload(this.destroy);tinyMCE.onBeforeUnload.remove(this._beforeUnload);
this.theme&&this.theme.destroy&&this.theme.destroy();this.controlManager.destroy();this.selection.destroy();this.dom.destroy();if(!this.settings.content_editable){r.clear(this.getWin());r.clear(this.getDoc())}r.clear(this.getBody());r.clear(this.formElement)}if(this.formElement){this.formElement.submit=this.formElement._mceOldSubmit;this.formElement._mceOldSubmit=null}this.contentAreaContainer=this.formElement=this.container=this.settings.content_element=this.bodyElement=this.contentDocument=this.contentWindow=
null;if(this.selection)this.selection=this.selection.win=this.selection.dom=this.selection.dom.doc=null;this.destroyed=1}},_addEvents:function(){function j(l,s){if(!f.removed)if(f.onEvent.dispatch(f,l,s)!==false)f[b[l.fakeType||l.type]].dispatch(f,l,s)}var f=this,c,k=f.settings,b={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};
a(b,function(l,s){switch(s){case "contextmenu":n.isOpera?f.dom.bind(f.getBody(),"mousedown",function(p){if(p.ctrlKey){p.fakeType="contextmenu";j(p)}}):f.dom.bind(f.getBody(),s,j);break;case "paste":f.dom.bind(f.getBody(),s,function(p){j(p)});break;case "submit":case "reset":f.dom.bind(f.getElement().form||q.getParent(f.id,"form"),s,j);break;default:f.dom.bind(k.content_editable?f.getBody():f.getDoc(),s,j)}});f.dom.bind(k.content_editable?f.getBody():h?f.getDoc():f.getWin(),"focus",function(){f.focus(true)});
n.isGecko&&f.dom.bind(f.getDoc(),"DOMNodeInserted",function(l){var s;l=l.target;if(l.nodeType===1&&l.nodeName==="IMG"&&(s=l.getAttribute("_mce_src")))l.src=f.documentBaseURI.toAbsolute(s)});if(h){c=function(){var l=this.getDoc(),s=this.settings;if(h&&!s.readonly){if(this._isHidden())try{if(!s.content_editable)l.designMode="On"}catch(p){}try{l.execCommand("styleWithCSS",0,false)}catch(z){if(!this._isHidden())try{l.execCommand("useCSS",0,true)}catch(G){}}if(!s.table_inline_editing)try{l.execCommand("enableInlineTableEditing",
false,false)}catch(F){}if(!s.object_resizing)try{l.execCommand("enableObjectResizing",false,false)}catch(M){}}};f.onBeforeExecCommand.add(c);f.onMouseDown.add(c)}n.isWebKit&&f.onClick.add(function(l,s){s=s.target;if(s.nodeName=="IMG"||s.nodeName=="A"&&f.dom.hasClass(s,"mceItemAnchor"))f.selection.getSel().setBaseAndExtent(s,0,s,1)});f.onMouseUp.add(f.nodeChanged);f.onClick.add(f.nodeChanged);f.onKeyUp.add(function(l,s){l=s.keyCode;if(l>=33&&l<=36||l>=37&&l<=40||l==13||l==45||l==46||l==8||n.isMac&&
(l==91||l==93)||s.ctrlKey)f.nodeChanged()});f.onReset.add(function(){f.setContent(f.startContent,{format:"raw"})});if(k.custom_shortcuts){if(k.custom_undo_redo_keyboard_shortcuts){f.addShortcut("ctrl+z",f.getLang("undo_desc"),"Undo");f.addShortcut("ctrl+y",f.getLang("redo_desc"),"Redo")}if(h){f.addShortcut("ctrl+b",f.getLang("bold_desc"),"Bold");f.addShortcut("ctrl+i",f.getLang("italic_desc"),"Italic");f.addShortcut("ctrl+u",f.getLang("underline_desc"),"Underline")}for(c=1;c<=6;c++)f.addShortcut("ctrl+"+
c,"",["FormatBlock",false,"h"+c]);f.addShortcut("ctrl+7","",["FormatBlock",false,"<p>"]);f.addShortcut("ctrl+8","",["FormatBlock",false,"<div>"]);f.addShortcut("ctrl+9","",["FormatBlock",false,"<address>"]);var d=function(l){var s=null;if(!l.altKey&&!l.ctrlKey&&!l.metaKey)return s;a(f.shortcuts,function(p){if(!(n.isMac&&p.ctrl!=l.metaKey))if(!(!n.isMac&&p.ctrl!=l.ctrlKey))if(p.alt==l.altKey)if(p.shift==l.shiftKey)if(l.keyCode==p.keyCode||l.charCode&&l.charCode==p.charCode){s=p;return false}});return s};
f.onKeyUp.add(function(l,s){if(d(s))return r.cancel(s)});f.onKeyPress.add(function(l,s){if(d(s))return r.cancel(s)});f.onKeyDown.add(function(l,s){if(l=d(s)){l.func.call(l.scope);return r.cancel(s)}})}if(n.isIE){f.dom.bind(f.getDoc(),"controlselect",function(l){var s=f.resizeInfo;l=l.target;if(l.nodeName==="IMG"){s&&f.dom.unbind(s.node,s.ev,s.cb);if(f.dom.hasClass(l,"mceItemNoResize")){ev="resizestart";s=f.dom.bind(l,"resizestart",r.cancel,r)}else{ev="resizeend";s=f.dom.bind(l,ev,function(p){var z;
p=p.target;if(z=f.dom.getStyle(p,"width")){f.dom.setAttrib(p,"width",z.replace(/[^0-9%]+/g,""));f.dom.setStyle(p,"width","")}if(z=f.dom.getStyle(p,"height")){f.dom.setAttrib(p,"height",z.replace(/[^0-9%]+/g,""));f.dom.setStyle(p,"height","")}})}s=f.resizeInfo={node:l,ev:ev,cb:s}}});f.onKeyDown.add(function(l,s){switch(s.keyCode){case 8:if(f.selection.getRng().item){l.dom.remove(f.selection.getRng().item(0));return r.cancel(s)}}})}n.isOpera&&f.onClick.add(function(l,s){r.prevent(s)});if(k.custom_undo_redo){var m=
function(){f.undoManager.typing=0;f.undoManager.add()};f.dom.bind(f.getDoc(),"focusout",function(){!f.removed&&f.undoManager.typing&&m()});f.onKeyUp.add(function(l,s){if(s.keyCode>=33&&s.keyCode<=36||s.keyCode>=37&&s.keyCode<=40||s.keyCode==13||s.keyCode==45||s.ctrlKey)m()});f.onKeyDown.add(function(l,s){if(s.keyCode>=33&&s.keyCode<=36||s.keyCode>=37&&s.keyCode<=40||s.keyCode==13||s.keyCode==45)f.undoManager.typing&&m();else if(!f.undoManager.typing){f.undoManager.add();f.undoManager.typing=1}});
f.onMouseDown.add(function(){f.undoManager.typing&&m()})}},_isHidden:function(){var j;if(!h)return 0;j=this.selection.getSel();return!j||!j.rangeCount||j.rangeCount==0},_fixNesting:function(j){var f=[],c;j=j.replace(/<(\/)?([^\s>]+)[^>]*?>/g,function(k,b,d){if(b==="/"){if(!f.length)return"";if(d!==f[f.length-1].tag){for(c=f.length-1;c>=0;c--)if(f[c].tag===d){f[c].close=1;break}return""}else{f.pop();if(f.length&&f[f.length-1].close){k=k+"</"+f[f.length-1].tag+">";f.pop()}}}else{if(/^(br|hr|input|meta|img|link|param)$/i.test(d))return k;
if(/\/>$/.test(k))return k;f.push({tag:d})}return k});for(c=f.length-1;c>=0;c--)j+="</"+f[c].tag+">";return j}})})(tinymce);
(function(n){var q=n.each,r=true,g=false;n.EditorCommands=function(i){function a(l,s,p){var z;l=l.toLowerCase();if(z=b.exec[l]){z(l,s,p);return r}return g}function h(l){var s;l=l.toLowerCase();if(s=b.state[l])return s(l);return-1}function e(l){var s;l=l.toLowerCase();if(s=b.value[l])return s(l);return g}function o(l,s){s=s||"exec";q(l,function(p,z){q(z.toLowerCase().split(","),function(G){b[s][G]=p})})}function t(l,s,p){if(s===void 0)s=g;if(p===void 0)p=null;return i.getDoc().execCommand(l,s,p)}function u(l){return i.formatter.match(l)}
function v(l,s){i.formatter.toggle(l,s?{value:s}:void 0)}function j(l){m=k.getBookmark(l)}function f(){k.moveToBookmark(m)}var c=i.dom,k=i.selection,b={state:{},exec:{},value:{}},d=i.settings,m;n.extend(this,{execCommand:a,queryCommandState:h,queryCommandValue:e,addCommands:o});o({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){i.undoManager.add()},"Cut,Copy,Paste":function(l){var s=i.getDoc(),p;try{t(l)}catch(z){p=r}if(p||!s.queryCommandEnabled(l))n.isGecko?
i.windowManager.confirm(i.getLang("clipboard_msg"),function(G){G&&open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}):i.windowManager.alert(i.getLang("clipboard_no_support"))},unlink:function(l){k.isCollapsed()&&k.select(k.getNode());t(l);k.collapse(g)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(l){var s=l.substring(7);q("left,center,right,full".split(","),function(p){s!=p&&i.formatter.remove("align"+p)});v("align"+s)},"InsertUnorderedList,InsertOrderedList":function(l){var s;
t(l);if(l=c.getParent(k.getNode(),"ol,ul")){s=l.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(s.nodeName)){j();c.split(s,l);f()}}},"Bold,Italic,Underline,Strikethrough":function(l){v(l)},"ForeColor,HiliteColor,FontName":function(l,s,p){v(l,p)},FontSize:function(l,s,p){var z;if(p>=1&&p<=7){z=n.explode(d.font_size_style_values);p=(s=n.explode(d.font_size_classes))?s[p-1]||p:z[p-1]||p}v(l,p)},RemoveFormat:function(l){i.formatter.remove(l)},mceBlockQuote:function(){v("blockquote")},FormatBlock:function(l,
s,p){return v(p)},mceCleanup:function(){j();i.setContent(i.getContent({cleanup:r}),{cleanup:r});f()},mceRemoveNode:function(l,s,p){l=p||k.getNode();if(l!=ed.getBody()){j();i.dom.remove(l,r);f()}},mceSelectNodeDepth:function(l,s,p){var z=0;c.getParent(k.getNode(),function(G){if(G.nodeType==1&&z++==p){k.select(G);return g}},i.getBody())},mceSelectNode:function(l,s,p){k.select(p)},mceInsertContent:function(l,s,p){k.setContent(p)},mceInsertRawHTML:function(l,s,p){k.setContent("tiny_mce_marker");i.setContent(i.getContent().replace(/tiny_mce_marker/g,
p))},mceSetContent:function(l,s,p){i.setContent(p)},"Indent,Outdent":function(l){var s,p,z;s=d.indentation;p=/[a-z%]+$/i.exec(s);s=parseInt(s);!h("InsertUnorderedList")&&!h("InsertOrderedList")?q(k.getSelectedBlocks(),function(G){if(l=="outdent"){z=Math.max(0,parseInt(G.style.paddingLeft||0)-s);c.setStyle(G,"paddingLeft",z?z+p:"")}else c.setStyle(G,"paddingLeft",parseInt(G.style.paddingLeft||0)+s+p)}):t(l)},mceRepaint:function(){if(n.isGecko)try{j(r);k.getSel()&&k.getSel().selectAllChildren(i.getBody());
k.collapse(r);f()}catch(l){}},mceToggleFormat:function(l,s,p){i.formatter.toggle(p)},InsertHorizontalRule:function(){k.setContent("<hr />")},mceToggleVisualAid:function(){i.hasVisual=!i.hasVisual;i.addVisual()},mceReplaceContent:function(l,s,p){k.setContent(p.replace(/\{\$selection\}/g,k.getContent({format:"text"})))},mceInsertLink:function(l,s,p){l=c.getParent(k.getNode(),"a");if(n.is(p,"string"))p={href:p};if(l)p.href?c.setAttribs(l,p):ed.dom.remove(l,r);else{t("CreateLink",g,"javascript:mctmp(0);");
q(c.select("a[href=javascript:mctmp(0);]"),function(z){c.setAttribs(z,p)})}}});o({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(l){return u("align"+l.substring(7))},"Bold,Italic,Underline,Strikethrough":function(l){return u(l)},mceBlockQuote:function(){return u("blockquote")},Outdent:function(){var l;if(d.inline_styles){if((l=c.getParent(k.getStart(),c.isBlock))&&parseInt(l.style.paddingLeft)>0)return r;if((l=c.getParent(k.getEnd(),c.isBlock))&&parseInt(l.style.paddingLeft)>0)return r}return h("InsertUnorderedList")||
h("InsertOrderedList")||!d.inline_styles&&!!c.getParent(k.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(l){return c.getParent(k.getNode(),l=="insertunorderedlist"?"UL":"OL")}},"state");o({"FontSize,FontName":function(l){var s=0,p;if(p=c.getParent(k.getNode(),"span"))s=l=="fontsize"?p.style.fontSize:p.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase();return s}},"value");d.custom_undo_redo&&o({Undo:function(){i.undoManager.undo()},Redo:function(){i.undoManager.redo()}})}})(tinymce);
(function(n){var q=n.util.Dispatcher;n.UndoManager=function(r){function g(){return n.trim(r.getContent({format:"raw",no_events:1}))}var i,a=0,h=[];return i={typing:0,onAdd:new q(i),onUndo:new q(i),onRedo:new q(i),add:function(e){var o;o=r.settings;var t;e=e||{};e.content=g();if((t=h[a])&&t.content==e.content)if(a>0||h.length==1)return null;if(o.custom_undo_redo_levels)if(h.length>o.custom_undo_redo_levels){for(o=0;o<h.length-1;o++)h[o]=h[o+1];h.length--;a=h.length}e.bookmark=r.selection.getBookmark(2,
true);if(a<h.length-1)if(a==0)h=[];else h.length=a+1;h.push(e);a=h.length-1;i.onAdd.dispatch(i,e);r.isNotDirty=0;return e},undo:function(){var e;if(i.typing){i.add();i.typing=0}if(a>0){e=h[--a];r.setContent(e.content,{format:"raw"});r.selection.moveToBookmark(e.bookmark);i.onUndo.dispatch(i,e)}return e},redo:function(){var e;if(a<h.length-1){e=h[++a];r.setContent(e.content,{format:"raw"});r.selection.moveToBookmark(e.bookmark);i.onRedo.dispatch(i,e)}return e},clear:function(){h=[];a=i.typing=0},hasUndo:function(){return a>
0||i.typing},hasRedo:function(){return a<h.length-1}}}})(tinymce);
(function(n){function q(v,j){var f=j.ownerDocument.createRange();f.setStart(v.endContainer,v.endOffset);f.setEndAfter(j);return f.cloneContents().textContent.length==0}function r(v){v=v.innerHTML;v=v.replace(/<(img|hr|table|input|select|textarea)[ \>]/gi,"-");v=v.replace(/<[^>]+>/g,"");return v.replace(/[ \u00a0\t\r\n]+/g,"")==""}function g(v,j,f){var c;if(r(f)){c=j.getParent(f,"ul,ol");if(!j.getParent(c.parentNode,"ul,ol")){j.split(c,f);c=j.create("p",0,'<br _mce_bogus="1" />');j.replace(c,f);v.select(c,
1)}return u}return t}var i=n.dom.Event,a=n.isIE,h=n.isGecko,e=n.isOpera,o=n.each,t=true,u=false;n.create("tinymce.ForceBlocks",{ForceBlocks:function(v){function j(b,d){if(e)d.content=d.content.replace(f.reOpera,"</"+k+">");d.content=d.content.replace(f.rePadd,"<"+k+"$1$2$3$4$5$6>\u00a0</"+k+">");if(!a&&!e&&d.set){d.content=d.content.replace(f.reNbsp2BR1,"<"+k+"$1$2><br /></"+k+">");d.content=d.content.replace(f.reNbsp2BR2,"<"+k+"$1$2><br /></"+k+">")}else d.content=d.content.replace(f.reBR2Nbsp,"<"+
k+"$1$2>\u00a0</"+k+">")}var f=this,c=v.settings,k;f.editor=v;f.dom=v.dom;k=(c.forced_root_block||"p").toLowerCase();c.element=k.toUpperCase();v.onPreInit.add(f.setup,f);f.reOpera=new RegExp("(\\u00a0|&#160;|&nbsp;)</"+k+">","gi");f.rePadd=new RegExp("<p( )([^>]+)><\\/p>|<p( )([^>]+)\\/>|<p( )([^>]+)>\\s+<\\/p>|<p><\\/p>|<p\\/>|<p>\\s+<\\/p>".replace(/p/g,k),"gi");f.reNbsp2BR1=new RegExp("<p( )([^>]+)>[\\s\\u00a0]+<\\/p>|<p>[\\s\\u00a0]+<\\/p>".replace(/p/g,k),"gi");f.reNbsp2BR2=new RegExp("<%p()([^>]+)>(&nbsp;|&#160;)<\\/%p>|<%p>(&nbsp;|&#160;)<\\/%p>".replace(/%p/g,
k),"gi");f.reBR2Nbsp=new RegExp("<p( )([^>]+)>\\s*<br \\/>\\s*<\\/p>|<p>\\s*<br \\/>\\s*<\\/p>".replace(/p/g,k),"gi");v.onBeforeSetContent.add(j);v.onPostProcess.add(j);if(c.forced_root_block){v.onInit.add(f.forceRoots,f);v.onSetContent.add(f.forceRoots,f);v.onBeforeGetContent.add(f.forceRoots,f)}},setup:function(){var v=this,j=v.editor,f=j.settings,c=j.dom,k=j.selection;if(f.forced_root_block){j.onBeforeExecCommand.add(v.forceRoots,v);j.onKeyUp.add(v.forceRoots,v);j.onPreProcess.add(v.forceRoots,
v)}f.force_br_newlines&&a&&j.onKeyPress.add(function(d,m){if(m.keyCode==13&&k.getNode().nodeName!="LI"){k.setContent('<br id="__" /> ',{format:"raw"});d=c.get("__");d.removeAttribute("id");k.select(d);k.collapse();return i.cancel(m)}});if(!a&&f.force_p_newlines){j.onKeyPress.add(function(d,m){m.keyCode==13&&!m.shiftKey&&!v.insertPara(m)&&i.cancel(m)});h&&j.onKeyDown.add(function(d,m){if((m.keyCode==8||m.keyCode==46)&&!m.shiftKey)v.backspaceDelete(m,m.keyCode==8)})}if(n.isWebKit){var b=function(d){var m=
k.getRng(),l,s=c.create("div",null," "),p=c.getViewPort(d.getWin()).h;m.insertNode(l=c.create("br"));m.setStartAfter(l);m.setEndAfter(l);k.setRng(m);if(k.getSel().focusNode==l.previousSibling){k.select(c.insertAfter(c.doc.createTextNode("\u00a0"),l));k.collapse(t)}c.insertAfter(s,l);m=c.getPos(s).y;c.remove(s);m>p&&d.getWin().scrollTo(0,m)};j.onKeyPress.add(function(d,m){if(m.keyCode==13&&(m.shiftKey||f.force_br_newlines)){b(d);i.cancel(m)}})}j.onPreProcess.add(function(d,m){o(c.select("p,h1,h2,h3,h4,h5,h6,div",
m.node),function(l){r(l)&&o(c.select("span,em,strong,b,i",m.node),function(s){if(!s.hasChildNodes()){s.appendChild(d.getDoc().createTextNode("\u00a0"));return u}})})});if(a)if(f.element!="P"){j.onKeyPress.add(function(){v.lastElm=k.getNode().nodeName});j.onKeyUp.add(function(d,m){var l=k.getNode();if(d.getBody().childNodes.length===1&&l.nodeName=="P"){l=c.rename(l,f.element);k.select(l);k.collapse();d.nodeChanged()}else if(m.keyCode==13&&!m.shiftKey&&v.lastElm!="P")if(m=c.getParent(l,"p")){c.rename(m,
f.element);d.nodeChanged()}})}},find:function(v,j,f){for(var c=this.editor.getDoc().createTreeWalker(v,4,null,u),k=-1;v=c.nextNode();){k++;if(j==0&&v==f)return k;if(j==1&&k==f)return v}return-1},forceRoots:function(v){v=this.editor;var j=v.getBody(),f=v.getDoc(),c=v.selection,k=c.getSel(),b=c.getRng(),d=-2,m,l,s,p,z,G=j.childNodes,F,M,R;for(F=G.length-1;F>=0;F--){z=G[F];if(z.nodeType===1&&z.getAttribute("_mce_type"))p=null;else if(z.nodeType===3||!this.dom.isBlock(z)&&z.nodeType!==8&&!/^(script|mce:script|style|mce:style)$/i.test(z.nodeName))if(p)p.hasChildNodes()?
p.insertBefore(z,p.firstChild):p.appendChild(z);else{if(z.nodeType!=3||/[^\s]/g.test(z.nodeValue)){if(d==-2&&b)if(a){p=f.body.createTextRange();p.moveToElementText(j);p.collapse(1);d=p.move("character",-16777215)*-1;p=b.duplicate();p.collapse(1);m=p.move("character",-16777215)*-1;p=b.duplicate();p.collapse(0);p=p.move("character",-16777215)*-1-m;d=m-d;m=p}else if(b.startContainer.nodeType==1&&(M=b.startContainer.childNodes[b.startOffset])&&M.nodeType==1){R=M.getAttribute("id");M.setAttribute("id",
"__mce")}else if(v.dom.getParent(b.startContainer,function(W){return W===j})){l=b.startOffset;s=b.endOffset;d=this.find(j,0,b.startContainer);m=this.find(j,0,b.endContainer)}p=v.dom.create(v.settings.forced_root_block);z.parentNode.replaceChild(p,z);p.appendChild(z)}}else p=null}if(d!=-2)if(a)try{b=k.createRange();b.moveToElementText(j);b.collapse(1);b.moveStart("character",d);b.moveEnd("character",m);b.select()}catch(U){}else{p=j.getElementsByTagName(v.settings.element)[0];b=f.createRange();d!=-1?
b.setStart(this.find(j,1,d),l):b.setStart(p,0);m!=-1?b.setEnd(this.find(j,1,m),s):b.setEnd(p,0);if(k){k.removeAllRanges();k.addRange(b)}}else if(!a&&(M=v.dom.get("__mce"))){R?M.setAttribute("id",R):M.removeAttribute("id");b=f.createRange();b.setStartBefore(M);b.setEndBefore(M);c.setRng(b)}},getParentBlock:function(v){var j=this.dom;return j.getParent(v,j.isBlock)},insertPara:function(){function v(aa,da){var ba=[],ca;aa.innerHTML="";if(b.keep_styles){ca=da;do if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(ca.nodeName)){da=
ca.cloneNode(u);c.setAttrib(da,"id","");ba.push(da)}while(ca=ca.parentNode)}if(ba.length>0){ca=ba.length-1;for(da=aa;ca>=0;ca--)da=da.appendChild(ba[ca]);ba[0].innerHTML=e?"&nbsp;":"<br />";return ba[0]}else aa.innerHTML=e?"&nbsp;":"<br />"}function j(aa){return k.createTreeWalker(aa,NodeFilter.SHOW_TEXT,null,u).nextNode()||aa}var f=this.editor,c=f.dom,k=f.getDoc(),b=f.settings,d=f.selection.getSel(),m=d.getRangeAt(0),l=k.body,s,p,z,G,F,M,R,U,W,S,K,Q,I=c.getViewPort(f.getWin()),ia;s=k.createRange();
s.setStart(d.anchorNode,d.anchorOffset);s.collapse(t);p=k.createRange();p.setStart(d.focusNode,d.focusOffset);p.collapse(t);G=(z=s.compareBoundaryPoints(s.START_TO_END,p)<0)?d.anchorNode:d.focusNode;F=z?d.anchorOffset:d.focusOffset;M=z?d.focusNode:d.anchorNode;z=z?d.focusOffset:d.anchorOffset;if(G===M&&/^(TD|TH)$/.test(G.nodeName)){G.firstChild.nodeName=="BR"&&c.remove(G.firstChild);if(G.childNodes.length==0)f.dom.add(G,b.element,null,"<br />");else{Q=G.innerHTML;G.innerHTML="";f.dom.add(G,b.element,
null,Q)}U=f.dom.add(G,b.element,null,"<br />");m=k.createRange();m.selectNodeContents(U);m.collapse(1);f.selection.setRng(m);return u}if(G==l&&M==l&&l.firstChild&&f.dom.isBlock(l.firstChild)){G=M=G.firstChild;F=z=0;s=k.createRange();s.setStart(G,0);p=k.createRange();p.setStart(M,0)}G=G.nodeName=="HTML"?k.body:G;G=G.nodeName=="BODY"?G.firstChild:G;M=M.nodeName=="HTML"?k.body:M;M=M.nodeName=="BODY"?M.firstChild:M;R=this.getParentBlock(G);U=this.getParentBlock(M);W=R?R.nodeName:b.element;if(Q=this.dom.getParent(R,
"li,pre")){if(Q.nodeName=="LI")return g(f.selection,this.dom,Q);return t}if(R&&(R.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(c.getStyle(R,"position",1)))){W=b.element;R=null}if(U&&(U.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(c.getStyle(R,"position",1)))){W=b.element;U=null}if(/(TD|TABLE|TH|CAPTION)/.test(W)||R&&W=="DIV"&&/left|right/gi.test(c.getStyle(R,"float",1))){W=b.element;R=U=null}S=R&&R.nodeName==W?R.cloneNode(0):f.dom.create(W);U=U&&U.nodeName==W?U.cloneNode(0):f.dom.create(W);
U.removeAttribute("id");if(/^(H[1-6])$/.test(W)&&q(m,R))U=f.dom.create(b.element);Q=R=G;do{if(Q==l||Q.nodeType==9||this.dom.isBlock(Q)||/(TD|TABLE|TH|CAPTION)/.test(Q.nodeName))break;R=Q}while(Q=Q.previousSibling?Q.previousSibling:Q.parentNode);Q=K=M;do{if(Q==l||Q.nodeType==9||this.dom.isBlock(Q)||/(TD|TABLE|TH|CAPTION)/.test(Q.nodeName))break;K=Q}while(Q=Q.nextSibling?Q.nextSibling:Q.parentNode);R.nodeName==W?s.setStart(R,0):s.setStartBefore(R);s.setEnd(G,F);S.appendChild(s.cloneContents()||k.createTextNode(""));
try{p.setEndAfter(K)}catch(la){}p.setStart(M,z);U.appendChild(p.cloneContents()||k.createTextNode(""));m=k.createRange();if(!R.previousSibling&&R.parentNode.nodeName==W)m.setStartBefore(R.parentNode);else s.startContainer.nodeName==W&&s.startOffset==0?m.setStartBefore(s.startContainer):m.setStart(s.startContainer,s.startOffset);!K.nextSibling&&K.parentNode.nodeName==W?m.setEndAfter(K.parentNode):m.setEnd(p.endContainer,p.endOffset);m.deleteContents();e&&f.getWin().scrollTo(0,I.y);if(S.firstChild&&
S.firstChild.nodeName==W)S.innerHTML=S.firstChild.innerHTML;if(U.firstChild&&U.firstChild.nodeName==W)U.innerHTML=U.firstChild.innerHTML;if(r(S))S.innerHTML="<br />";if(r(U))ia=v(U,M);if(e&&parseFloat(opera.version())<9.5){m.insertNode(S);m.insertNode(U)}else{m.insertNode(U);m.insertNode(S)}U.normalize();S.normalize();m=k.createRange();m.selectNodeContents(h?j(ia||U):ia||U);m.collapse(1);d.removeAllRanges();d.addRange(m);d=f.dom.getPos(U).y;m=U.clientHeight;if(d<I.y||d+m>I.y+I.h)f.getWin().scrollTo(0,
d<I.y?d:d-I.h+25);return u},backspaceDelete:function(v,j){function f(p){var z;if((p=p.target)&&p.parentNode&&p.nodeName=="BR"&&(d=c.getParentBlock(p))){z=p.previousSibling;i.remove(b,"DOMNodeInserted",f);if(!(z&&z.nodeType==3&&/\s+$/.test(z.nodeValue)))if(p.previousSibling||p.nextSibling)k.dom.remove(p)}}var c=this,k=c.editor,b=k.getBody(),d,m=k.selection,l=m.getRng(),s=l.startContainer;if(s&&k.dom.isBlock(s)&&!/^(TD|TH)$/.test(s.nodeName)&&j)if(s.childNodes.length==0||s.childNodes.length==1&&s.firstChild.nodeName==
"BR"){for(d=s;(d=d.previousSibling)&&!k.dom.isBlock(d););if(d){if(s!=b.firstChild){for(j=k.dom.doc.createTreeWalker(d,NodeFilter.SHOW_TEXT,null,u);l=j.nextNode();)d=l;l=k.getDoc().createRange();l.setStart(d,d.nodeValue?d.nodeValue.length:0);l.setEnd(d,d.nodeValue?d.nodeValue.length:0);m.setRng(l);k.dom.remove(s)}return i.cancel(v)}}i._add(b,"DOMNodeInserted",f);window.setTimeout(function(){i._remove(b,"DOMNodeInserted",f)},1)}})})(tinymce);
(function(n){var q=n.dom.Event,r=n.each,g=n.extend;n.create("tinymce.ControlManager",{ControlManager:function(i,a){var h=this;a=a||{};h.editor=i;h.controls={};h.onAdd=new n.util.Dispatcher(h);h.onPostRender=new n.util.Dispatcher(h);h.prefix=a.prefix||i.id+"_";h._cls={};h.onPostRender.add(function(){r(h.controls,function(e){e.postRender()})})},get:function(i){return this.controls[this.prefix+i]||this.controls[i]},setActive:function(i,a){var h=null;if(h=this.get(i))h.setActive(a);return h},setDisabled:function(i,
a){var h=null;if(h=this.get(i))h.setDisabled(a);return h},add:function(i){if(i){this.controls[i.id]=i;this.onAdd.dispatch(i,this)}return i},createControl:function(i){var a,h=this,e=h.editor;r(e.plugins,function(o){if(o.createControl)if(a=o.createControl(i,h))return false});switch(i){case "|":case "separator":return h.createSeparator()}if(!a&&e.buttons&&(a=e.buttons[i]))return h.createButton(i,a);return h.add(a)},createDropMenu:function(i,a,h){var e=this.editor,o,t,u;a=g({"class":"mceDropDown",constrain:e.settings.constrain_menus},
a);a["class"]=a["class"]+" "+e.getParam("skin")+"Skin";if(u=e.getParam("skin_variant"))a["class"]+=" "+e.getParam("skin")+"Skin"+u.substring(0,1).toUpperCase()+u.substring(1);i=this.prefix+i;o=this.controls[i]=new (h||this._cls.dropmenu||n.ui.DropMenu)(i,a);o.onAddItem.add(function(v,j){var f=j.settings;f.title=e.getLang(f.title,f.title);if(!f.onclick)f.onclick=function(){if(f.cmd)e.execCommand(f.cmd,f.ui||false,f.value)}});e.onRemove.add(function(){o.destroy()});if(n.isIE){o.onShowMenu.add(function(){e.focus();
t=e.selection.getBookmark(1)});o.onHideMenu.add(function(){if(t){e.selection.moveToBookmark(t);t=0}})}return this.add(o)},createListBox:function(i,a,h){var e=this.editor;if(this.get(i))return null;a.title=e.translate(a.title);a.scope=a.scope||e;if(!a.onselect)a.onselect=function(o){e.execCommand(a.cmd,a.ui||false,o||a.value)};a=g({title:a.title,"class":"mce_"+i,scope:a.scope,control_manager:this},a);i=this.prefix+i;if(e.settings.use_native_selects)h=new n.ui.NativeListBox(i,a);else{h=h||this._cls.listbox||
n.ui.ListBox;h=new h(i,a)}this.controls[i]=h;n.isWebKit&&h.onPostRender.add(function(o,t){q.add(t,"mousedown",function(){e.bookmark=e.selection.getBookmark(1)});q.add(t,"focus",function(){e.selection.moveToBookmark(e.bookmark);e.bookmark=null})});h.hideMenu&&e.onMouseDown.add(h.hideMenu,h);return this.add(h)},createButton:function(i,a,h){var e=this.editor;if(this.get(i))return null;a.title=e.translate(a.title);a.label=e.translate(a.label);a.scope=a.scope||e;if(!a.onclick&&!a.menu_button)a.onclick=
function(){e.execCommand(a.cmd,a.ui||false,a.value)};a=g({title:a.title,"class":"mce_"+i,unavailable_prefix:e.getLang("unavailable",""),scope:a.scope,control_manager:this},a);i=this.prefix+i;if(a.menu_button){h=h||this._cls.menubutton||n.ui.MenuButton;i=new h(i,a);e.onMouseDown.add(i.hideMenu,i)}else{h=this._cls.button||n.ui.Button;i=new h(i,a)}return this.add(i)},createMenuButton:function(i,a,h){a=a||{};a.menu_button=1;return this.createButton(i,a,h)},createSplitButton:function(i,a,h){var e=this.editor;
if(this.get(i))return null;a.title=e.translate(a.title);a.scope=a.scope||e;if(!a.onclick)a.onclick=function(o){e.execCommand(a.cmd,a.ui||false,o||a.value)};if(!a.onselect)a.onselect=function(o){e.execCommand(a.cmd,a.ui||false,o||a.value)};a=g({title:a.title,"class":"mce_"+i,scope:a.scope,control_manager:this},a);i=this.prefix+i;i=this.add(new (h||this._cls.splitbutton||n.ui.SplitButton)(i,a));e.onMouseDown.add(i.hideMenu,i);return i},createColorSplitButton:function(i,a,h){var e=this.editor,o,t;if(this.get(i))return null;
a.title=e.translate(a.title);a.scope=a.scope||e;if(!a.onclick)a.onclick=function(u){if(n.isIE)t=e.selection.getBookmark(1);e.execCommand(a.cmd,a.ui||false,u||a.value)};if(!a.onselect)a.onselect=function(u){e.execCommand(a.cmd,a.ui||false,u||a.value)};a=g({title:a.title,"class":"mce_"+i,menu_class:e.getParam("skin")+"Skin",scope:a.scope,more_colors_title:e.getLang("more_colors")},a);i=this.prefix+i;o=new (h||this._cls.colorsplitbutton||n.ui.ColorSplitButton)(i,a);e.onMouseDown.add(o.hideMenu,o);e.onRemove.add(function(){o.destroy()});
if(n.isIE){o.onShowMenu.add(function(){e.focus();t=e.selection.getBookmark(1)});o.onHideMenu.add(function(){if(t){e.selection.moveToBookmark(t);t=0}})}return this.add(o)},createToolbar:function(i,a,h){i=this.prefix+i;a=new (h||this._cls.toolbar||n.ui.Toolbar)(i,a);if(this.get(i))return null;return this.add(a)},createSeparator:function(i){return new (i||this._cls.separator||n.ui.Separator)},setControlType:function(i,a){return this._cls[i.toLowerCase()]=a},destroy:function(){r(this.controls,function(i){i.destroy()});
this.controls=null}})})(tinymce);
(function(n){var q=n.util.Dispatcher,r=n.each,g=n.isIE,i=n.isOpera;n.create("tinymce.WindowManager",{WindowManager:function(a){this.editor=a;this.onOpen=new q(this);this.onClose=new q(this);this.params={};this.features={}},open:function(a,h){var e="",o=this.editor.settings.dialog_type=="modal",t,u,v;v=n.DOM.getViewPort();a=a||{};h=h||{};u=i?v.w:screen.width;v=i?v.h:screen.height;a.name=a.name||"mc_"+(new Date).getTime();a.width=parseInt(a.width||320);a.height=parseInt(a.height||240);a.resizable=true;
a.left=a.left||parseInt(u/2)-a.width/2;a.top=a.top||parseInt(v/2)-a.height/2;h.inline=false;h.mce_width=a.width;h.mce_height=a.height;h.mce_auto_focus=a.auto_focus;if(o)if(g){a.center=true;a.help=false;a.dialogWidth=a.width+"px";a.dialogHeight=a.height+"px";a.scroll=a.scrollbars||false}r(a,function(f,c){if(n.is(f,"boolean"))f=f?"yes":"no";/^(name|url)$/.test(c)||(e+=g&&o?(e?";":"")+c+":"+f:(e?",":"")+c+"="+f)});this.features=a;this.params=h;this.onOpen.dispatch(this,a,h);h=a.url||a.file;h=n._addVer(h);
try{if(g&&o){t=1;window.showModalDialog(h,window,e)}else t=window.open(h,a.name,e)}catch(j){}t||alert(this.editor.getLang("popup_blocked"))},close:function(a){a.close();this.onClose.dispatch(this)},createInstance:function(a,h,e,o,t,u){return new (n.resolve(a))(h,e,o,t,u)},confirm:function(a,h,e,o){o=o||window;h.call(e||this,o.confirm(this._decode(this.editor.getLang(a,a))))},alert:function(a,h,e,o){o=o||window;o.alert(this._decode(this.editor.getLang(a,a)));if(h)h.call(e||this)},resizeBy:function(a,
h,e){e.resizeBy(a,h)},_decode:function(a){return n.DOM.decode(a).replace(/\\n/g,"\n")}})})(tinymce);
(function(n){function q(){function r(h,e,o,t){if(typeof e=="string")e=[e];n.each(e,function(u){h[u.toLowerCase()]={func:o,scope:t}})}var g={},i={},a={};n.extend(this,{add:function(h,e,o){r(g,h,e,o)},addQueryStateHandler:function(h,e,o){r(i,h,e,o)},addQueryValueHandler:function(h,e,o){r(a,h,e,o)},execCommand:function(h,e,o,t,u){if(e=g[e.toLowerCase()])if(e.func.call(h||e.scope,o,t,u)!==false)return true},queryCommandValue:function(){if(cmd=a[cmd.toLowerCase()])return cmd.func.call(scope||cmd.scope,
ui,value,args)},queryCommandState:function(){if(cmd=i[cmd.toLowerCase()])return cmd.func.call(scope||cmd.scope,ui,value,args)}})}n.GlobalCommands=new q})(tinymce);
(function(n){n.Formatter=function(q){function r(C,E){return K.getParents(C,E,K.getRoot())}function g(C){return C.nodeType===1&&(C.face==="mceinline"||C.style.fontFamily==="mceinline")}function i(C){return C?W[C]:W}function a(C,E){if(C)if(typeof C!=="string")S(C,function(x,y){a(y,x)});else{E=E.length?E:[E];S(E,function(x){if(x.deep===ga)x.deep=!x.selector;if(x.split===ga)x.split=!x.selector||x.inline;if(x.remove===ga&&x.selector&&!x.inline)x.remove="none";if(x.selector&&x.inline){x.mixed=true;x.block_expand=
true}if(typeof x.classes==="string")x.classes=x.classes.split(/\s+/)});W[C]=E}}function h(C,E,x){function y(L){var O=L.startContainer,N=L.startOffset;if(O.nodeType==1||O.nodeValue===""){O=new I(O.childNodes[N]);for(N=O.current();N;N=O.next())if(N.nodeType==3&&!aa(N.parentNode)&&!d(N)){L.setStart(N,0);break}}return L}function B(L,O){O=O||H;if(L){S(O.styles,function(N,P){K.setStyle(L,P,b(N,E))});S(O.attributes,function(N,P){K.setAttrib(L,P,b(N,E))});S(O.classes,function(N){N=b(N,E);K.hasClass(L,N)||
K.addClass(L,N)})}}function A(L){var O=[],N,P;N=H.inline||H.block;P=K.create(N);B(P);ia.walk(L,function(T){function Z($){var fa=$.nodeName.toLowerCase(),ha=$.parentNode.nodeName.toLowerCase(),ja;if(c(fa,"br")){ea=0;H.block&&K.remove($)}else if(H.wrapper&&t($,C,E))ea=0;else if(H.block&&!H.wrapper&&M(fa)){$=K.rename($,N);B($);O.push($);ea=0}else{if(H.selector){S(D,function(ka){if(K.is($,ka.selector)&&!g($)){B($,ka);ja=true}});if(!H.inline||ja){ea=0;return}}if(la(N,fa)&&la(ha,N)){if(!ea){ea=P.cloneNode(X);
$.parentNode.insertBefore(ea,$);O.push(ea)}ea.appendChild($)}else{ea=0;S(n.grep($.childNodes),Z);ea=0}}}var ea;S(T,Z)});S(O,function(T){function Z(fa){var ha=0;S(fa.childNodes,function(ja){!d(ja)&&!G(ja)&&ha++});return ha}function ea(fa){var ha,ja;S(fa.childNodes,function(ka){if(ka.nodeType==1&&!G(ka)&&!g(ka)){ha=ka;return X}});if(ha&&f(ha,H)){ja=ha.cloneNode(X);B(ja);K.replace(ja,fa,V);K.remove(ha,1)}return ja||fa}var $;$=Z(T);if($===0)K.remove(T,1);else if(H.inline||H.wrapper){if(!H.exact&&$===
1)T=ea(T);S(D,function(fa){S(K.select(fa.inline,T),function(ha){s(fa,E,ha,fa.exact?ha:null)})});K.getParent(T.parentNode,function(fa){if(t(fa,C,E)){K.remove(T,1);T=0;return V}});if(T){T=F(z(T),T);T=F(T,z(T,V))}}})}var D=i(C),H=D[0],J;if(H)if(x){J=K.createRng();J.setStartBefore(x);J.setEndAfter(x);A(J)}else if(!Q.isCollapsed()||!H.inline){x=Q.getBookmark();A(l(Q.getRng(V),D));Q.moveToBookmark(x);Q.setRng(y(Q.getRng(V)));q.nodeChanged()}else U("apply",C,E)}function e(C,E,x){function y(P){var T,Z,ea;
T=n.grep(P.childNodes);Z=0;for(ea=L.length;Z<ea;Z++)if(s(L[Z],E,P,P))break;if(O.deep){Z=0;for(ea=T.length;Z<ea;Z++)y(T[Z])}}function B(P){var T;S(r(P.parentNode).reverse(),function(Z){var ea;if(!T&&Z.id!="_start"&&Z.id!="_end")if((ea=t(Z,C,E))&&ea.split!==false)T=Z});return T}function A(P,T,Z,ea){var $,fa,ha,ja,ka,ma;if(P){ma=P.parentNode;for($=T.parentNode;$&&$!=ma;$=$.parentNode){fa=$.cloneNode(X);for(ka=0;ka<L.length;ka++)if(s(L[ka],E,fa,fa)){fa=0;break}if(fa){ha&&fa.appendChild(ha);ja||(ja=fa);
ha=fa}}if(ea&&(!O.mixed||!aa(P)))T=K.split(P,T);if(ha){Z.parentNode.insertBefore(ha,Z);ja.appendChild(Z)}}return T}function D(P){return A(B(P),P,P,true)}function H(P){var T=K.get(P?"_start":"_end");P=T[P?"firstChild":"lastChild"];K.remove(T,1);return P}function J(P){var T,Z;P=l(P,L,V);if(O.split){T=R(P,V);Z=R(P);if(T!=Z){T=m(T,"span",{id:"_start",_mce_type:"bookmark"});Z=m(Z,"span",{id:"_end",_mce_type:"bookmark"});D(T);D(Z);T=H(V);Z=H()}else T=Z=D(T);P.startContainer=T.parentNode;P.startOffset=ba(T);
P.endContainer=Z.parentNode;P.endOffset=ba(Z)+1}ia.walk(P,function(ea){S(ea,function($){y($)})})}var L=i(C),O=L[0],N;if(x){N=K.createRng();N.setStartBefore(x);N.setEndAfter(x);J(N)}else if(!Q.isCollapsed()||!O.inline){x=Q.getBookmark();J(Q.getRng(V));Q.moveToBookmark(x);q.nodeChanged()}else U("remove",C,E)}function o(C,E,x){u(C,E,x)?e(C,E,x):h(C,E,x)}function t(C,E,x){function y(D,H,J){var L,O,N=H[J];if(N)if(N.length===ga)for(L in N){if(N.hasOwnProperty(L)){O=J==="attributes"?K.getAttrib(D,L):k(D,
L);if(!c(O,b(N[L],x)))return}}else for(L=0;L<N.length;L++)if(J==="attributes"?K.getAttrib(D,N[L]):k(D,N[L]))return H;return H}var B=i(E),A;if(B&&C)for(A=0;A<B.length;A++){E=B[A];if(f(C,E)&&y(C,E,"attributes")&&y(C,E,"styles")){if(B=E.classes)for(A=0;A<B.length;A++)if(!K.hasClass(C,B[A]))return;return E}}}function u(C,E,x){function y(A){A=K.getParent(A,function(D){return!!t(D,C,E)});return t(A,C,E)}var B;if(x)return y(x);if(Q.isCollapsed()){for(x=Y.apply.length-1;x>=0;x--)if(Y.apply[x].name==C)return true;
for(x=Y.remove.length-1;x>=0;x--)if(Y.remove[x].name==C)return false;return y(Q.getNode())}x=Q.getNode();if(y(x))return V;B=Q.getStart();if(B!=x)if(y(B))return V;return X}function v(C,E){var x,y=[],B={},A,D;if(Q.isCollapsed()){for(A=0;A<C.length;A++)for(x=Y.remove.length-1;x>=0;x--){D=C[A];if(Y.remove[x].name==D){B[D]=true;break}}for(x=Y.apply.length-1;x>=0;x--)for(A=0;A<C.length;A++){D=C[A];if(!B[D]&&Y.apply[x].name==D){B[D]=true;y.push(D)}}}x=Q.getStart();K.getParent(x,function(H){var J,L;for(J=
0;J<C.length;J++){L=C[J];if(!B[L]&&t(H,L,E)){B[L]=true;y.push(L)}}});return y}function j(C){C=i(C);var E,x,y,B;if(C){E=Q.getStart();E=r(E);for(y=C.length-1;y>=0;y--){B=C[y].selector;if(!B)return V;for(x=E.length-1;x>=0;x--)if(K.is(E[x],B))return V}}return X}function f(C,E){if(c(C,E.inline))return V;if(c(C,E.block))return V;if(E.selector)return K.is(C,E.selector)}function c(C,E){C=C||"";E=E||"";C=""+(C.nodeName||C);E=""+(E.nodeName||E);return C.toLowerCase()==E.toLowerCase()}function k(C,E){C=K.getStyle(C,
E);if(E=="color"||E=="backgroundColor")C=K.toHex(C);if(E=="fontWeight"&&C==700)C="bold";return""+C}function b(C,E){if(typeof C!="string")C=C(E);else if(E)C=C.replace(/%(\w+)/g,function(x,y){return E[y]||x});return C}function d(C){return C&&C.nodeType===3&&/^\s*$/.test(C.nodeValue)}function m(C,E,x){E=K.create(E,x);C.parentNode.insertBefore(E,C);E.appendChild(C);return E}function l(C,E){function x(J,L,O,N){var P;for(N=N||K.getRoot();;){P=J.parentNode;if(P==N||!E[0].block_expand&&aa(P))return J;for(D=
P[L];D&&D!=J;D=D[O]){if(D.nodeType==1&&!G(D))return J;if(D.nodeType==3&&!d(D))return J}J=J.parentNode}return J}var y=C.startContainer,B=C.startOffset,A=C.endContainer;C=C.endOffset;var D,H;if(y.nodeType==1&&y.hasChildNodes()){H=y.childNodes.length-1;y=y.childNodes[B>H?H:B];if(y.nodeType==3)B=0}if(A.nodeType==1&&A.hasChildNodes()){H=A.childNodes.length-1;A=A.childNodes[C>H?H:C-1];if(A.nodeType==3)C=A.nodeValue.length}if(G(y.parentNode))y=y.parentNode;if(G(y))y=y.nextSibling||y;if(G(A.parentNode))A=
A.parentNode;if(G(A))A=A.previousSibling||A;if(E[0].inline||E[0].block_expand){y=x(y,"firstChild","nextSibling");A=x(A,"lastChild","previousSibling")}if(E[0].selector&&E[0].expand!==X&&!E[0].inline){H=function(J,L){var O,N;if(J.nodeType==3&&J.nodeValue.length==0&&J[L])J=J[L];L=r(J);for(O=0;O<L.length;O++)for(N=0;N<E.length;N++)if(K.is(L[O],E[N].selector))return L[O];return J};y=H(y,"previousSibling");A=H(A,"nextSibling")}if(E[0].block||E[0].selector){H=function(J,L){var O;E[0].wrapper||(O=K.getParent(J,
E[0].block));O||(O=K.getParent(J.nodeType==3?J.parentNode:J,aa));if(O&&E[0].wrapper)O=r(O,"ul,ol").reverse()[0]||O;if(!O)for(O=J;O[L]&&!aa(O[L]);){O=O[L];if(c(O,"br"))break}return O||J};y=H(y,"previousSibling");A=H(A,"nextSibling");if(E[0].block){aa(y)||(y=x(y,"firstChild","nextSibling"));aa(A)||(A=x(A,"lastChild","previousSibling"))}}if(y.nodeType==1){B=ba(y);y=y.parentNode}if(A.nodeType==1){C=ba(A)+1;A=A.parentNode}return{startContainer:y,startOffset:B,endContainer:A,endOffset:C}}function s(C,E,
x,y){var B,A,D;if(!f(x,C))return X;if(C.remove!="all"){S(C.styles,function(H,J){H=b(H,E);if(typeof J==="number"){J=H;y=0}if(!y||c(k(y,J),H))K.setStyle(x,J,"");D=1});if(D&&K.getAttrib(x,"style")==""){x.removeAttribute("style");x.removeAttribute("_mce_style")}S(C.attributes,function(H,J){var L;H=b(H,E);if(typeof J==="number"){J=H;y=0}if(!y||c(K.getAttrib(y,J),H)){if(J=="class")if(H=K.getAttrib(x,J)){L="";S(H.split(/\s+/),function(O){if(/mce\w+/.test(O))L+=(L?" ":"")+O});if(L){K.setAttrib(x,J,L);return}}J==
"class"&&x.removeAttribute("className");ca.test(J)&&x.removeAttribute("_mce_"+J);x.removeAttribute(J)}});S(C.classes,function(H){H=b(H,E);if(!y||K.hasClass(y,H))K.removeClass(x,H)});A=K.getAttribs(x);for(B=0;B<A.length;B++)if(A[B].nodeName.indexOf("_")!==0)return X}if(C.remove!="none"){p(x,C);return V}}function p(C,E){var x=C.parentNode,y;if(E.block)if(da){if(x==K.getRoot())if(!E.list_block||!c(C,E.list_block))S(n.grep(C.childNodes),function(A){if(la(da,A.nodeName.toLowerCase()))if(y)y.appendChild(A);
else y=m(A,da);else y=0})}else{var B=function(A,D,H){A=z(A,D,H);return!A||A.nodeName=="BR"||aa(A)};if(aa(C)&&!aa(x)){!B(C,X)&&!B(C.firstChild,V,1)&&C.insertBefore(K.create("br"),C.firstChild);!B(C,V)&&!B(C.lastChild,X,1)&&C.appendChild(K.create("br"))}}E.selector&&E.inline&&!c(E.inline,C)||K.remove(C,1)}function z(C,E,x){if(C){E=E?"nextSibling":"previousSibling";for(C=x?C:C[E];C;C=C[E])if(C.nodeType==1||!d(C))return C}}function G(C){return C&&C.nodeType==1&&C.getAttribute("_mce_type")=="bookmark"}
function F(C,E){function x(A,D){function H(L){var O={};S(K.getAttribs(L),function(N){N=N.nodeName.toLowerCase();if(N.indexOf("_")!==0&&N!=="style")O[N]=K.getAttrib(L,N)});return O}function J(L,O){var N,P;for(P in L)if(L.hasOwnProperty(P)){N=O[P];if(N===ga)return X;if(L[P]!=N)return X;delete O[P]}for(P in O)if(O.hasOwnProperty(P))return X;return V}if(A.nodeName!=D.nodeName)return X;if(!J(H(A),H(D)))return X;if(!J(K.parseStyle(K.getAttrib(A,"style")),K.parseStyle(K.getAttrib(D,"style"))))return X;return V}
var y,B;if(C&&E){B=function(A,D){for(y=A;y;y=y[D]){if(y.nodeType==3&&!d(y))return A;if(y.nodeType==1&&!G(y))return y}return A};C=B(C,"previousSibling");E=B(E,"nextSibling");if(x(C,E)){for(y=C.nextSibling;y&&y!=E;){B=y;y=y.nextSibling;C.appendChild(B)}K.remove(E);S(n.grep(E.childNodes),function(A){C.appendChild(A)});return C}}return E}function M(C){return/^(h[1-6]|p|div|pre|address)$/.test(C)}function R(C,E){var x,y;x=C[E?"startContainer":"endContainer"];C=C[E?"startOffset":"endOffset"];if(x.nodeType==
1){y=x.childNodes.length-1;!E&&C&&C--;x=x.childNodes[C>y?y:C]}return x}function U(C,E,x){function y(){return Y.apply.length||Y.remove.length}function B(){Y.apply=[];Y.remove=[]}function A(J){S(Y.apply.reverse(),function(L){h(L.name,L.vars,J)});S(Y.remove.reverse(),function(L){e(L.name,L.vars,J)});K.remove(J,1);B()}var D=Y[C],H=Y[C=="apply"?"remove":"apply"];for(C=D.length-1;C>=0;C--)if(D[C].name==E)return;D.push({name:E,vars:x});for(C=H.length-1;C>=0;C--)H[C].name==E&&H.splice(C,1);if(y()){q.getDoc().execCommand("FontName",
false,"mceinline");S(K.select("font,span"),function(J){var L;if(g(J)){L=Q.getBookmark();A(J);Q.moveToBookmark(L);q.nodeChanged()}});if(!Y.isListening&&y()){Y.isListening=true;S("onKeyDown,onKeyUp,onKeyPress,onMouseUp".split(","),function(J){q[J].addToTop(function(L,O){if(y()){S(K.select("font,span"),function(N){var P;if(g(N)){P=N.firstChild;A(N);N=K.createRng();N.setStart(P,P.nodeValue.length);N.setEnd(P,P.nodeValue.length);Q.setRng(N);L.nodeChanged()}});if(O.type=="keyup"||O.type=="mouseup")B()}})})}}}
var W={},S=n.each,K=q.dom,Q=q.selection,I=n.dom.TreeWalker,ia=new n.dom.RangeUtils(K),la=q.schema.isValid,aa=K.isBlock,da=q.settings.forced_root_block,ba=K.nodeIndex,ca=/^(src|href|style)$/,X=false,V=true,ga,Y={apply:[],remove:[]};n.extend(this,{get:i,register:a,apply:h,remove:e,toggle:o,match:u,matchAll:v,matchNode:t,canApply:j})}})(tinymce);
tinymce.onAddEditor.add(function(n,q){var r,g,i,a=q.settings;if(a.inline_styles){g=n.explode(a.font_size_style_values);var h=function(o,t){i.replace(i.create("span",{style:t}),o,1)};r={font:function(o,t){h(t,{backgroundColor:t.style.backgroundColor,color:t.color,fontFamily:t.face,fontSize:g[parseInt(t.size)-1]})},u:function(o,t){h(t,{textDecoration:"underline"})},strike:function(o,t){h(t,{textDecoration:"line-through"})}};var e=function(o,t){i=o.dom;a.convert_fonts_to_spans&&n.each(i.select("font,u,strike",
t.node),function(u){r[u.nodeName.toLowerCase()](q.dom,u)})};q.onPreProcess.add(e);q.onInit.add(function(){q.selection.onSetContent.add(e)})}});
