]> git.donarmstrong.com Git - roundcube.git/blobdiff - program/js/tiny_mce/tiny_mce.js
Imported Upstream version 0.5.1
[roundcube.git] / program / js / tiny_mce / tiny_mce.js
index 72087e80aa035b40369abd226108f089c2b98f30..f49c5ab75ef9812a66bf6359410ed059c33e815a 100644 (file)
@@ -1 +1,362 @@
-var tinymce={majorVersion:'3',minorVersion:'1.0.1',releaseDate:'2008-06-18',_init:function(){var t=this,d=document,w=window,na=navigator,ua=na.userAgent,i,nl,n,base,p,v;t.isOpera=w.opera&&opera.buildNumber;t.isWebKit=/WebKit/.test(ua);t.isOldWebKit=t.isWebKit&&!w.getSelection().getRangeAt;t.isIE=!t.isWebKit&&!t.isOpera&&(/MSIE/gi).test(ua)&&(/Explorer/gi).test(na.appName);t.isIE6=t.isIE&&/MSIE [56]/.test(ua);t.isGecko=!t.isWebKit&&/Gecko/.test(ua);t.isMac=ua.indexOf('Mac')!=-1;if(w.tinyMCEPreInit){t.suffix=tinyMCEPreInit.suffix;t.baseURL=tinyMCEPreInit.base;t.query=tinyMCEPreInit.query;return;}t.suffix='';nl=d.getElementsByTagName('base');for(i=0;i<nl.length;i++){if(v=nl[i].href){if(/^https?:\/\/[^\/]+$/.test(v))v+='/';base=v?v.match(/.*\//)[0]:'';}}function getBase(n){if(n.src&&/tiny_mce(|_dev|_src|_gzip|_jquery|_prototype).js/.test(n.src)){if(/_(src|dev)\.js/g.test(n.src))t.suffix='_src';if((p=n.src.indexOf('?'))!=-1)t.query=n.src.substring(p+1);t.baseURL=n.src.substring(0,n.src.lastIndexOf('/'));if(base&&t.baseURL.indexOf('://')==-1)t.baseURL=base+t.baseURL;return t.baseURL;}return null;};nl=d.getElementsByTagName('script');for(i=0;i<nl.length;i++){if(getBase(nl[i]))return;}n=d.getElementsByTagName('head')[0];if(n){nl=n.getElementsByTagName('script');for(i=0;i<nl.length;i++){if(getBase(nl[i]))return;}}return;},is:function(o,t){var n=typeof(o);if(!t)return n!='undefined';if(t=='array'&&(o instanceof Array))return true;return n==t;},each:function(o,cb,s){var n,l;if(!o)return 0;s=s||o;if(typeof(o.length)!='undefined'){for(n=0,l=o.length;n<l;n++){if(cb.call(s,o[n],n,o)===false)return 0;}}else{for(n in o){if(o.hasOwnProperty(n)){if(cb.call(s,o[n],n,o)===false)return 0;}}}return 1;},map:function(a,f){var o=[];tinymce.each(a,function(v){o.push(f(v));});return o;},grep:function(a,f){var o=[];tinymce.each(a,function(v){if(!f||f(v))o.push(v);});return o;},inArray:function(a,v){var i,l;if(a){for(i=0,l=a.length;i<l;i++){if(a[i]===v)return i;}}return-1;},extend:function(o,e){var i,a=arguments;for(i=1;i<a.length;i++){e=a[i];tinymce.each(e,function(v,n){if(typeof(v)!=='undefined')o[n]=v;});}return o;},trim:function(s){return(s?''+s:'').replace(/^\s*|\s*$/g,'');},create:function(s,p){var t=this,sp,ns,cn,scn,c,de=0;s=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(s);cn=s[3].match(/(^|\.)(\w+)$/i)[2];ns=t.createNS(s[3].replace(/\.\w+$/,''));if(ns[cn])return;if(s[2]=='static'){ns[cn]=p;if(this.onCreate)this.onCreate(s[2],s[3],ns[cn]);return;}if(!p[cn]){p[cn]=function(){};de=1;}ns[cn]=p[cn];t.extend(ns[cn].prototype,p);if(s[5]){sp=t.resolve(s[5]).prototype;scn=s[5].match(/\.(\w+)$/i)[1];c=ns[cn];if(de){ns[cn]=function(){return sp[scn].apply(this,arguments);};}else{ns[cn]=function(){this.parent=sp[scn];return c.apply(this,arguments);};}ns[cn].prototype[cn]=ns[cn];t.each(sp,function(f,n){ns[cn].prototype[n]=sp[n];});t.each(p,function(f,n){if(sp[n]){ns[cn].prototype[n]=function(){this.parent=sp[n];return f.apply(this,arguments);};}else{if(n!=cn)ns[cn].prototype[n]=f;}});}t.each(p['static'],function(f,n){ns[cn][n]=f;});if(this.onCreate)this.onCreate(s[2],s[3],ns[cn].prototype);},walk:function(o,f,n,s){s=s||this;if(o){if(n)o=o[n];tinymce.each(o,function(o,i){if(f.call(s,o,i,n)===false)return false;tinymce.walk(o,f,n,s);});}},createNS:function(n,o){var i,v;o=o||window;n=n.split('.');for(i=0;i<n.length;i++){v=n[i];if(!o[v])o[v]={};o=o[v];}return o;},resolve:function(n,o){var i,l;o=o||window;n=n.split('.');for(i=0,l=n.length;i<l;i++){o=o[n[i]];if(!o)break;}return o;},addUnload:function(f,s){var t=this,w=window;f={func:f,scope:s||this};if(!t.unloads){function unload(){var li=t.unloads,o,n;if(li){for(n in li){o=li[n];if(o&&o.func)o.func.call(o.scope,1);}if(w.detachEvent){w.detachEvent('onbeforeunload',fakeUnload);w.detachEvent('onunload',unload);}else if(w.removeEventListener)w.removeEventListener('unload',unload,false);t.unloads=o=li=w=unload=null;if(window.CollectGarbage)window.CollectGarbage();}};function fakeUnload(){var d=document;if(d.readyState=='interactive'){function stop(){d.detachEvent('onstop',stop);unload();d=null;};d.attachEvent('onstop',stop);window.setTimeout(function(){d.detachEvent('onstop',stop);},0);}};if(w.attachEvent){w.attachEvent('onunload',unload);w.attachEvent('onbeforeunload',fakeUnload);}else if(w.addEventListener)w.addEventListener('unload',unload,false);t.unloads=[f];}else t.unloads.push(f);return f;},removeUnload:function(f){var u=this.unloads,r=null;tinymce.each(u,function(o,i){if(o&&o.func==f){u.splice(i,1);r=f;return false;}});return r;},explode:function(s,d){return s?tinymce.map(s.split(d||','),tinymce.trim):s;},_addVer:function(u){var v;if(!this.query)return u;v=(u.indexOf('?')==-1?'?':'&')+this.query;if(u.indexOf('#')==-1)return u+v;return u.replace('#',v+'#');}};window.tinymce=tinymce;tinymce._init();tinymce.create('tinymce.util.Dispatcher',{scope:null,listeners:null,Dispatcher:function(s){this.scope=s||this;this.listeners=[];},add:function(cb,s){this.listeners.push({cb:cb,scope:s||this.scope});return cb;},addToTop:function(cb,s){this.listeners.unshift({cb:cb,scope:s||this.scope});return cb;},remove:function(cb){var l=this.listeners,o=null;tinymce.each(l,function(c,i){if(cb==c.cb){o=cb;l.splice(i,1);return false;}});return o;},dispatch:function(){var s,a=arguments,i,li=this.listeners,c;for(i=0;i<li.length;i++){c=li[i];s=c.cb.apply(c.scope,a);if(s===false)break;}return s;}});(function(){var each=tinymce.each;tinymce.create('tinymce.util.URI',{URI:function(u,s){var t=this,o,a,b;s=t.settings=s||{};if(/^(mailto|news|javascript|about):/i.test(u)||/^\s*#/.test(u)){t.source=u;return;}if(u.indexOf('/')===0&&u.indexOf('//')!==0)u=(s.base_uri?s.base_uri.protocol||'http':'http')+'://mce_host'+u;if(u.indexOf('://')===-1&&u.indexOf('//')!==0)u=(s.base_uri.protocol||'http')+'://mce_host'+t.toAbsPath(s.base_uri.path,u);u=u.replace(/@@/g,'(mce_at)');u=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(u);each(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(v,i){var s=u[i];if(s)s=s.replace(/\(mce_at\)/g,'@@');t[v]=s;});if(b=s.base_uri){if(!t.protocol)t.protocol=b.protocol;if(!t.userInfo)t.userInfo=b.userInfo;if(!t.port&&t.host=='mce_host')t.port=b.port;if(!t.host||t.host=='mce_host')t.host=b.host;t.source='';}},setPath:function(p){var t=this;p=/^(.*?)\/?(\w+)?$/.exec(p);t.path=p[0];t.directory=p[1];t.file=p[2];t.source='';t.getURI();},toRelative:function(u){var t=this,o;u=new tinymce.util.URI(u,{base_uri:t});if((u.host!='mce_host'&&t.host!=u.host&&u.host)||t.port!=u.port||t.protocol!=u.protocol)return u.getURI();o=t.toRelPath(t.path,u.path);if(u.query)o+='?'+u.query;if(u.anchor)o+='#'+u.anchor;return o;},toAbsolute:function(u,nh){var u=new tinymce.util.URI(u,{base_uri:this});return u.getURI(this.host==u.host?nh:0);},toRelPath:function(base,path){var items,bp=0,out='',i;base=base.substring(0,base.lastIndexOf('/'));base=base.split('/');items=path.split('/');if(base.length>=items.length){for(i=0;i<base.length;i++){if(i>=items.length||base[i]!=items[i]){bp=i+1;break;}}}if(base.length<items.length){for(i=0;i<items.length;i++){if(i>=base.length||base[i]!=items[i]){bp=i+1;break;}}}if(bp==1)return path;for(i=0;i<base.length-(bp-1);i++)out+="../";for(i=bp-1;i<items.length;i++){if(i!=bp-1)out+="/"+items[i];else out+=items[i];}return out;},toAbsPath:function(base,path){var i,nb=0,o=[];base=base.split('/');path=path.split('/');each(base,function(k){if(k)o.push(k);});base=o;for(i=path.length-1,o=[];i>=0;i--){if(path[i].length==0||path[i]==".")continue;if(path[i]=='..'){nb++;continue;}if(nb>0){nb--;continue;}o.push(path[i]);}i=base.length-nb;if(i<=0)return'/'+o.reverse().join('/');return'/'+base.slice(0,i).join('/')+'/'+o.reverse().join('/');},getURI:function(nh){var s,t=this;if(!t.source||nh){s='';if(!nh){if(t.protocol)s+=t.protocol+'://';if(t.userInfo)s+=t.userInfo+'@';if(t.host)s+=t.host;if(t.port)s+=':'+t.port;}if(t.path)s+=t.path;if(t.query)s+='?'+t.query;if(t.anchor)s+='#'+t.anchor;t.source=s;}return t.source;}});})();(function(){var each=tinymce.each;tinymce.create('static tinymce.util.Cookie',{getHash:function(n){var v=this.get(n),h;if(v){each(v.split('&'),function(v){v=v.split('=');h=h||{};h[unescape(v[0])]=unescape(v[1]);});}return h;},setHash:function(n,v,e,p,d,s){var o='';each(v,function(v,k){o+=(!o?'':'&')+escape(k)+'='+escape(v);});this.set(n,o,e,p,d,s);},get:function(n){var c=document.cookie,e,p=n+"=",b;if(!c)return;b=c.indexOf("; "+p);if(b==-1){b=c.indexOf(p);if(b!=0)return null;}else b+=2;e=c.indexOf(";",b);if(e==-1)e=c.length;return unescape(c.substring(b+p.length,e));},set:function(n,v,e,p,d,s){document.cookie=n+"="+escape(v)+((e)?"; expires="+e.toGMTString():"")+((p)?"; path="+escape(p):"")+((d)?"; domain="+d:"")+((s)?"; secure":"");},remove:function(n,p){var d=new Date();d.setTime(d.getTime()-1000);this.set(n,'',d,p,d);}});})();tinymce.create('static tinymce.util.JSON',{serialize:function(o){var i,v,s=tinymce.util.JSON.serialize,t;if(o==null)return'null';t=typeof o;if(t=='string'){v='\bb\tt\nn\ff\rr\""\'\'\\\\';return'"'+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'])/g,function(a,b){i=v.indexOf(b);if(i+1)return'\\'+v.charAt(i+1);a=b.charCodeAt().toString(16);return'\\u'+'0000'.substring(a.length)+a;})+'"';}if(t=='object'){if(o instanceof Array){for(i=0,v='[';i<o.length;i++)v+=(i>0?',':'')+s(o[i]);return v+']';}v='{';for(i in o)v+=typeof o[i]!='function'?(v.length>1?',"':'"')+i+'":'+s(o[i]):'';return v+'}';}return''+o;},parse:function(s){try{return eval('('+s+')');}catch(ex){}}});tinymce.create('static tinymce.util.XHR',{send:function(o){var x,t,w=window,c=0;o.scope=o.scope||this;o.success_scope=o.success_scope||o.scope;o.error_scope=o.error_scope||o.scope;o.async=o.async===false?false:true;o.data=o.data||'';function get(s){x=0;try{x=new ActiveXObject(s);}catch(ex){}return x;};x=w.XMLHttpRequest?new XMLHttpRequest():get('Microsoft.XMLHTTP')||get('Msxml2.XMLHTTP');if(x){if(x.overrideMimeType)x.overrideMimeType(o.content_type);x.open(o.type||(o.data?'POST':'GET'),o.url,o.async);if(o.content_type)x.setRequestHeader('Content-Type',o.content_type);x.send(o.data);function ready(){if(!o.async||x.readyState==4||c++>10000){if(o.success&&c<10000&&x.status==200)o.success.call(o.success_scope,''+x.responseText,x,o);else if(o.error)o.error.call(o.error_scope,c>10000?'TIMED_OUT':'GENERAL',x,o);x=null;}else w.setTimeout(ready,10);};if(!o.async)return ready();t=w.setTimeout(ready,10);}}});(function(){var extend=tinymce.extend,JSON=tinymce.util.JSON,XHR=tinymce.util.XHR;tinymce.create('tinymce.util.JSONRequest',{JSONRequest:function(s){this.settings=extend({},s);this.count=0;},send:function(o){var ecb=o.error,scb=o.success;o=extend(this.settings,o);o.success=function(c,x){c=JSON.parse(c);if(typeof(c)=='undefined'){c={error:'JSON Parse error.'};}if(c.error)ecb.call(o.error_scope||o.scope,c.error,x);else scb.call(o.success_scope||o.scope,c.result);};o.error=function(ty,x){ecb.call(o.error_scope||o.scope,ty,x);};o.data=JSON.serialize({id:o.id||'c'+(this.count++),method:o.method,params:o.params});o.content_type='application/json';XHR.send(o);},'static':{sendRPC:function(o){return new tinymce.util.JSONRequest().send(o);}}});}());(function(){var each=tinymce.each,is=tinymce.is;var isWebKit=tinymce.isWebKit,isIE=tinymce.isIE;tinymce.create('tinymce.dom.DOMUtils',{doc:null,root:null,files:null,listeners:{},pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,cache:{},idPattern:/^#[\w]+$/,elmPattern:/^[\w_*]+$/,elmClassPattern:/^([\w_]*)\.([\w_]+)$/,DOMUtils:function(d,s){var t=this;t.doc=d;t.win=window;t.files={};t.cssFlicker=false;t.counter=0;t.boxModel=!tinymce.isIE||d.compatMode=="CSS1Compat";t.stdMode=d.documentMode===8;this.settings=s=tinymce.extend({keep_values:false,hex_colors:1,process_html:1},s);if(tinymce.isIE6){try{d.execCommand('BackgroundImageCache',false,true);}catch(e){t.cssFlicker=true;}}tinymce.addUnload(t.destroy,t);},getRoot:function(){var t=this,s=t.settings;return(s&&t.get(s.root_element))||t.doc.body;},getViewPort:function(w){var d,b;w=!w?this.win:w;d=w.document;b=this.boxModel?d.documentElement:d.body;return{x:w.pageXOffset||b.scrollLeft,y:w.pageYOffset||b.scrollTop,w:w.innerWidth||b.clientWidth,h:w.innerHeight||b.clientHeight};},getRect:function(e){var p,t=this,w,h;e=t.get(e);p=t.getPos(e);w=t.getStyle(e,'width');h=t.getStyle(e,'height');if(w.indexOf('px')===-1)w=0;if(h.indexOf('px')===-1)h=0;return{x:p.x,y:p.y,w:parseInt(w)||e.offsetWidth||e.clientWidth,h:parseInt(h)||e.offsetHeight||e.clientHeight};},getParent:function(n,f,r){var na,se=this.settings;n=this.get(n);if(se.strict_root)r=r||this.getRoot();if(is(f,'string')){na=f.toUpperCase();f=function(n){var s=false;if(n.nodeType==1&&na==='*'){s=true;return false;}each(na.split(','),function(v){if(n.nodeType==1&&((se.strict&&n.nodeName.toUpperCase()==v)||n.nodeName.toUpperCase()==v)){s=true;return false;}});return s;};}while(n){if(n==r)return null;if(f(n))return n;n=n.parentNode;}return null;},get:function(e){var n;if(e&&this.doc&&typeof(e)=='string'){n=e;e=this.doc.getElementById(e);if(e&&e.id!==n)return this.doc.getElementsByName(n)[1];}return e;},select:function(pa,s){var t=this,cs,c,pl,o=[],x,i,l,n;s=t.get(s)||t.doc;if(s.querySelectorAll){if(s!=t.doc){i=s.id;s.id='_mc_tmp';pa='#_mc_tmp '+pa;}l=tinymce.grep(s.querySelectorAll(pa));s.id=i;return l;}if(t.settings.strict){function get(s,n){return s.getElementsByTagName(n.toLowerCase());};}else{function get(s,n){return s.getElementsByTagName(n);};}if(t.elmPattern.test(pa)){x=get(s,pa);for(i=0,l=x.length;i<l;i++)o.push(x[i]);return o;}if(t.elmClassPattern.test(pa)){pl=t.elmClassPattern.exec(pa);x=get(s,pl[1]||'*');c=' '+pl[2]+' ';for(i=0,l=x.length;i<l;i++){n=x[i];if(n.className&&(' '+n.className+' ').indexOf(c)!==-1)o.push(n);}return o;}function collect(n){if(!n.mce_save){n.mce_save=1;o.push(n);}};function collectIE(n){if(!n.getAttribute('mce_save')){n.setAttribute('mce_save','1');o.push(n);}};function find(n,f,r){var i,l,nl=get(r,n);for(i=0,l=nl.length;i<l;i++)f(nl[i]);};each(pa.split(','),function(v,i){v=tinymce.trim(v);if(t.elmPattern.test(v)){each(get(s,v),function(n){collect(n);});return;}if(t.elmClassPattern.test(v)){x=t.elmClassPattern.exec(v);each(get(s,x[1]),function(n){if(t.hasClass(n,x[2]))collect(n);});return;}if(!(cs=t.cache[pa])){cs='x=(function(cf, s) {';pl=v.split(' ');each(pl,function(v){var p=/^([\w\\*]+)?(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@([\w\\]+)([\^\$\*!]?=)([\w\\]+)\])?(?:\:([\w\\]+))?/i.exec(v);p[1]=p[1]||'*';cs+='find("'+p[1]+'", function(n) {';if(p[2])cs+='if (n.id !== "'+p[2]+'") return;';if(p[3]){cs+='var c = " " + n.className + " ";';cs+='if (';c='';each(p[3].split('.'),function(v){if(v)c+=(c?'||':'')+'c.indexOf(" '+v+' ") === -1';});cs+=c+') return;';}});cs+='cf(n);';for(i=pl.length-1;i>=0;i--)cs+='}, '+(i?'n':'s')+');';cs+='})';t.cache[pa]=cs=eval(cs);}cs(isIE?collectIE:collect,s);});each(o,function(n){if(isIE)n.removeAttribute('mce_save');else delete n.mce_save;});return o;},add:function(p,n,a,h,c){var t=this;return this.run(p,function(p){var e,k;e=is(n,'string')?t.doc.createElement(n):n;if(a){for(k in a){if(a.hasOwnProperty(k)&&!is(a[k],'object'))t.setAttrib(e,k,''+a[k]);}if(a.style&&!is(a.style,'string')){each(a.style,function(v,n){t.setStyle(e,n,v);});}}if(h){if(h.nodeType)e.appendChild(h);else t.setHTML(e,h);}return!c?p.appendChild(e):e;});},create:function(n,a,h){return this.add(this.doc.createElement(n),n,a,h,1);},createHTML:function(n,a,h){var o='',t=this,k;o+='<'+n;for(k in a){if(a.hasOwnProperty(k))o+=' '+k+'="'+t.encode(a[k])+'"';}if(tinymce.is(h))return o+'>'+h+'</'+n+'>';return o+' />';},remove:function(n,k){return this.run(n,function(n){var p,g;p=n.parentNode;if(!p)return null;if(k){each(n.childNodes,function(c){p.insertBefore(c.cloneNode(true),n);});}return p.removeChild(n);});},setStyle:function(n,na,v){var t=this;return t.run(n,function(e){var s,i;s=e.style;na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase();});if(t.pixelStyles.test(na)&&(tinymce.is(v,'number')||/^[\-0-9\.]+$/.test(v)))v+='px';switch(na){case'opacity':if(isIE){s.filter=v===''?'':"alpha(opacity="+(v*100)+")";if(!n.currentStyle||!n.currentStyle.hasLayout)s.display='inline-block';}s[na]=s['-moz-opacity']=s['-khtml-opacity']=v||'';break;case'float':isIE?s.styleFloat=v:s.cssFloat=v;break;default:s[na]=v||'';}if(t.settings.update_styles)t.setAttrib(e,'mce_style');});},getStyle:function(n,na,c){n=this.get(n);if(!n)return false;if(this.doc.defaultView&&c){na=na.replace(/[A-Z]/g,function(a){return'-'+a;});try{return this.doc.defaultView.getComputedStyle(n,null).getPropertyValue(na);}catch(ex){return null;}}na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase();});if(na=='float')na=isIE?'styleFloat':'cssFloat';if(n.currentStyle&&c)return n.currentStyle[na];return n.style[na];},setStyles:function(e,o){var t=this,s=t.settings,ol;ol=s.update_styles;s.update_styles=0;each(o,function(v,n){t.setStyle(e,n,v);});s.update_styles=ol;if(s.update_styles)t.setAttrib(e,s.cssText);},setAttrib:function(e,n,v){var t=this;if(t.settings.strict)n=n.toLowerCase();return this.run(e,function(e){var s=t.settings;switch(n){case"style":if(s.keep_values){if(v&&!t._isRes(v))e.setAttribute('mce_style',v,2);else e.removeAttribute('mce_style',2);}e.style.cssText=v;break;case"class":e.className=v||'';break;case"src":case"href":if(s.keep_values){if(s.url_converter)v=s.url_converter.call(s.url_converter_scope||t,v,n,e);t.setAttrib(e,'mce_'+n,v,2);}break;case"shape":e.setAttribute('mce_style',v);break;}if(is(v)&&v!==null&&v.length!==0)e.setAttribute(n,''+v,2);else e.removeAttribute(n,2);});},setAttribs:function(e,o){var t=this;return this.run(e,function(e){each(o,function(v,n){t.setAttrib(e,n,v);});});},getAttrib:function(e,n,dv){var v,t=this;e=t.get(e);if(!e||e.nodeType!==1)return false;if(!is(dv))dv="";if(/^(src|href|style|coords|shape)$/.test(n)){v=e.getAttribute("mce_"+n);if(v)return v;}v=e.getAttribute(n,2);if(!v){switch(n){case'class':v=e.className;break;default:if(isIE&&n==='name'&&e.nodeName==='A'){v=e.name;break;}v=e.attributes[n];v=v&&is(v.nodeValue)?v.nodeValue:v;}}switch(n){case'style':v=v||e.style.cssText;if(v){v=t.serializeStyle(t.parseStyle(v));if(t.settings.keep_values&&!t._isRes(v))e.setAttribute('mce_style',v);}break;}if(isWebKit&&n==="class"&&v)v=v.replace(/(apple|webkit)\-[a-z\-]+/gi,'');if(isIE){switch(n){case'rowspan':case'colspan':if(v===1)v='';break;case'size':if(v==='+0')v='';break;case'hspace':if(v===-1)v='';break;case'tabindex':if(v===32768)v='';break;case'maxlength':if(v===2147483647)v='';break;case'shape':v=v.toLowerCase();break;default:if(n.indexOf('on')===0&&v)v=(''+v).replace(/^function\s+anonymous\(\)\s+\{\s+(.*)\s+\}$/,'$1');}}return(v&&v!='')?''+v:dv;},getPos:function(n){var t=this,x=0,y=0,e,d=t.doc,r;n=t.get(n);if(n&&isIE){n=n.getBoundingClientRect();e=t.boxModel?d.documentElement:d.body;x=t.getStyle(t.select('html')[0],'borderWidth');x=(x=='medium'||t.boxModel&&!t.isIE6)&&2||x;n.top+=t.win.self!=t.win.top?2:0;return{x:n.left+e.scrollLeft-x,y:n.top+e.scrollTop-x};}r=n;while(r){x+=r.offsetLeft||0;y+=r.offsetTop||0;r=r.offsetParent;}r=n;while(r){if(!/^table-row|inline.*/i.test(t.getStyle(r,"display",1))){x-=r.scrollLeft||0;y-=r.scrollTop||0;}r=r.parentNode;if(r==d.body)break;}return{x:x,y:y};},parseStyle:function(st){var t=this,s=t.settings,o={};if(!st)return o;function compress(p,s,ot){var t,r,b,l;t=o[p+'-top'+s];if(!t)return;r=o[p+'-right'+s];if(t!=r)return;b=o[p+'-bottom'+s];if(r!=b)return;l=o[p+'-left'+s];if(b!=l)return;o[ot]=l;delete o[p+'-top'+s];delete o[p+'-right'+s];delete o[p+'-bottom'+s];delete o[p+'-left'+s];};function compress2(ta,a,b,c){var t;t=o[a];if(!t)return;t=o[b];if(!t)return;t=o[c];if(!t)return;o[ta]=o[a]+' '+o[b]+' '+o[c];delete o[a];delete o[b];delete o[c];};st=st.replace(/&(#?[a-z0-9]+);/g,'&$1_MCE_SEMI_');each(st.split(';'),function(v){var sv,ur=[];if(v){v=v.replace(/_MCE_SEMI_/g,';');v=v.replace(/url\([^\)]+\)/g,function(v){ur.push(v);return'url('+ur.length+')';});v=v.split(':');sv=tinymce.trim(v[1]);sv=sv.replace(/url\(([^\)]+)\)/g,function(a,b){return ur[parseInt(b)-1];});sv=sv.replace(/rgb\([^\)]+\)/g,function(v){return t.toHex(v);});if(s.url_converter){sv=sv.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(x,c){return'url('+s.url_converter.call(s.url_converter_scope||t,t.decode(c),'style',null)+')';});}o[tinymce.trim(v[0]).toLowerCase()]=sv;}});compress("border","","border");compress("border","-width","border-width");compress("border","-color","border-color");compress("border","-style","border-style");compress("padding","","padding");compress("margin","","margin");compress2('border','border-width','border-style','border-color');if(isIE){if(o.border=='medium none')o.border='';}return o;},serializeStyle:function(o){var s='';each(o,function(v,k){if(k&&v){if(tinymce.isGecko&&k.indexOf('-moz-')===0)return;switch(k){case'color':case'background-color':v=v.toLowerCase();break;}s+=(s?' ':'')+k+': '+v+';';}});return s;},loadCSS:function(u){var t=this,d=t.doc;if(!u)u='';each(u.split(','),function(u){if(t.files[u])return;t.files[u]=true;t.add(t.select('head')[0],'link',{rel:'stylesheet',href:tinymce._addVer(u)});});},addClass:function(e,c){return this.run(e,function(e){var o;if(!c)return 0;if(this.hasClass(e,c))return e.className;o=this.removeClass(e,c);return e.className=(o!=''?(o+' '):'')+c;});},removeClass:function(e,c){var t=this,re;return t.run(e,function(e){var v;if(t.hasClass(e,c)){if(!re)re=new RegExp("(^|\\s+)"+c+"(\\s+|$)","g");v=e.className.replace(re,' ');return e.className=tinymce.trim(v!=' '?v:'');}return e.className;});},hasClass:function(n,c){n=this.get(n);if(!n||!c)return false;return(' '+n.className+' ').indexOf(' '+c+' ')!==-1;},show:function(e){return this.setStyle(e,'display','block');},hide:function(e){return this.setStyle(e,'display','none');},isHidden:function(e){e=this.get(e);return e.style.display=='none'||this.getStyle(e,'display')=='none';},uniqueId:function(p){return(!p?'mce_':p)+(this.counter++);},setHTML:function(e,h){var t=this;return this.run(e,function(e){var x,i,nl,n,p,x;h=t.processHTML(h);if(isIE){function set(){try{e.innerHTML='<br />'+h;e.removeChild(e.firstChild);}catch(ex){while(e.firstChild)e.firstChild.removeNode();x=t.create('div');x.innerHTML='<br />'+h;each(x.childNodes,function(n,i){if(i)e.appendChild(n);});}};if(t.settings.fix_ie_paragraphs)h=h.replace(/<p><\/p>|<p([^>]+)><\/p>|<p[^\/+]\/>/gi,'<p$1 mce_keep="true">&nbsp;</p>');set();if(t.settings.fix_ie_paragraphs){nl=e.getElementsByTagName("p");for(i=nl.length-1,x=0;i>=0;i--){n=nl[i];if(!n.hasChildNodes()){if(!n.mce_keep){x=1;break;}n.removeAttribute('mce_keep');}}}if(x){h=h.replace(/<p([^>]+)>|<p>/g,'<div$1 mce_tmp="1">');h=h.replace(/<\/p>/g,'</div>');set();if(t.settings.fix_ie_paragraphs){nl=e.getElementsByTagName("DIV");for(i=nl.length-1;i>=0;i--){n=nl[i];if(n.mce_tmp){p=t.doc.createElement('p');n.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(a,b){var v;if(b!=='mce_tmp'){v=n.getAttribute(b);if(!v&&b==='class')v=n.className;p.setAttribute(b,v);}});for(x=0;x<n.childNodes.length;x++)p.appendChild(n.childNodes[x].cloneNode(true));n.swapNode(p);}}}}}else e.innerHTML=h;return h;});},processHTML:function(h){var t=this,s=t.settings;if(!s.process_html)return h;if(tinymce.isGecko){h=h.replace(/<(\/?)strong>|<strong( [^>]+)>/gi,'<$1b$2>');h=h.replace(/<(\/?)em>|<em( [^>]+)>/gi,'<$1i$2>');}else if(isIE)h=h.replace(/&apos;/g,'&#39;');h=h.replace(/<a( )([^>]+)\/>|<a\/>/gi,'<a$1$2></a>');if(s.keep_values){if(/<script|style/.test(h)){function trim(s){s=s.replace(/^[\r\n]*|[\r\n]*$/g,'');s=s.replace(/^\s*(\/\/\s*<!--|\/\/\s*<\[CDATA\[|<!--|<\[CDATA\[)[\r\n]*/g,'');s=s.replace(/\s*(\/\/\s*\]\]>|\/\/\s*-->|\]\]>|-->)\s*$/g,'');return s;};h=h.replace(/<script([^>]+|)>([\s\S]*?)<\/script>/g,function(v,a,b){b=trim(b);if(!a)a=' type="text/javascript"';if(b)b='<!--\n'+b+'\n// -->';return'<mce:script'+a+'>'+b+'</mce:script>';});h=h.replace(/<style([^>]+|)>([\s\S]*?)<\/style>/g,function(v,a,b){b=trim(b);return'<mce:style'+a+'><!--\n'+b+'\n--></mce:style><style'+a+' mce_bogus="1">'+b+'</style>';});}h=h.replace(/<([\w:]+) [^>]*(src|href|style|shape|coords)[^>]*>/gi,function(a,n){function handle(m,b,c){var u=c;if(a.indexOf('mce_'+b)!=-1)return m;if(b=='style'){if(t._isRes(c))return m;if(s.hex_colors){u=u.replace(/rgb\([^\)]+\)/g,function(v){return t.toHex(v);});}if(s.url_converter){u=u.replace(/url\([\'\"]?([^\)\'\"]+)\)/g,function(x,c){return'url('+t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),b,n))+')';});}}else if(b!='coords'&&b!='shape'){if(s.url_converter)u=t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),b,n));}return' '+b+'="'+c+'" mce_'+b+'="'+u+'"';};a=a.replace(/ (src|href|style|coords|shape)=[\"]([^\"]+)[\"]/gi,handle);a=a.replace(/ (src|href|style|coords|shape)=[\']([^\']+)[\']/gi,handle);return a.replace(/ (src|href|style|coords|shape)=([^\s\"\'>]+)/gi,handle);});}return h;},getOuterHTML:function(e){var d;e=this.get(e);if(!e)return null;if(isIE)return e.outerHTML;d=(e.ownerDocument||this.doc).createElement("body");d.appendChild(e.cloneNode(true));return d.innerHTML;},setOuterHTML:function(e,h,d){var t=this;return this.run(e,function(e){var n,tp;e=t.get(e);d=d||e.ownerDocument||t.doc;if(isIE&&e.nodeType==1)e.outerHTML=h;else{tp=d.createElement("body");tp.innerHTML=h;n=tp.lastChild;while(n){t.insertAfter(n.cloneNode(true),e);n=n.previousSibling;}t.remove(e);}});},decode:function(s){var e;if(/&[^;]+;/.test(s)){e=this.doc.createElement("div");e.innerHTML=s;return!e.firstChild?s:e.firstChild.nodeValue;}return s;},encode:function(s){return s?(''+s).replace(/[<>&\"]/g,function(c,b){switch(c){case'&':return'&amp;';case'"':return'&quot;';case'<':return'&lt;';case'>':return'&gt;';}return c;}):s;},insertAfter:function(n,r){var t=this;r=t.get(r);return this.run(n,function(n){var p,ns;p=r.parentNode;ns=r.nextSibling;if(ns)p.insertBefore(n,ns);else p.appendChild(n);return n;});},isBlock:function(n){if(n.nodeType&&n.nodeType!==1)return false;n=n.nodeName||n;return/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(n);},replace:function(n,o,k){if(is(o,'array'))n=n.cloneNode(true);return this.run(o,function(o){if(k){each(o.childNodes,function(c){n.appendChild(c.cloneNode(true));});}return o.parentNode.replaceChild(n,o);});},toHex:function(s){var c=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(s);function hex(s){s=parseInt(s).toString(16);return s.length>1?s:'0'+s;};if(c){s='#'+hex(c[1])+hex(c[2])+hex(c[3]);return s;}return s;},getClasses:function(){var t=this,cl=[],i,lo={},f=t.settings.class_filter,ov;if(t.classes)return t.classes;function addClasses(s){each(s.imports,function(r){addClasses(r);});each(s.cssRules||s.rules,function(r){switch(r.type||1){case 1:if(r.selectorText){each(r.selectorText.split(','),function(v){v=v.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(v)||!/\.[\w\-]+$/.test(v))return;ov=v;v=v.replace(/.*\.([a-z0-9_\-]+).*/i,'$1');if(f&&!(v=f(v,ov)))return;if(!lo[v]){cl.push({'class':v});lo[v]=1;}});}break;case 3:addClasses(r.styleSheet);break;}});};try{each(t.doc.styleSheets,addClasses);}catch(ex){}if(cl.length>0)t.classes=cl;return cl;},run:function(e,f,s){var t=this,o;if(t.doc&&typeof(e)==='string')e=t.doc.getElementById(e);if(!e)return false;s=s||this;if(!e.nodeType&&(e.length||e.length===0)){o=[];each(e,function(e,i){if(e){if(typeof(e)=='string')e=t.doc.getElementById(e);o.push(f.call(s,e,i));}});return o;}return f.call(s,e);},getAttribs:function(n){var o;n=this.get(n);if(!n)return[];if(isIE){o=[];if(n.nodeName=='OBJECT')return n.attributes;n.cloneNode(false).outerHTML.replace(/([a-z0-9\:\-_]+)=/gi,function(a,b){o.push({specified:1,nodeName:b});});return o;}return n.attributes;},destroy:function(s){var t=this;t.win=t.doc=t.root=null;if(!s)tinymce.removeUnload(t.destroy);},_isRes:function(c){return/^(top|left|bottom|right|width|height)/i.test(c)||/;\s*(top|left|bottom|right|width|height)/i.test(c);}});tinymce.DOM=new tinymce.dom.DOMUtils(document,{process_html:0});})();(function(){var each=tinymce.each,DOM=tinymce.DOM,isIE=tinymce.isIE,isWebKit=tinymce.isWebKit,Event;tinymce.create('static tinymce.dom.Event',{inits:[],events:[],add:function(o,n,f,s){var cb,t=this,el=t.events,r;if(o&&o instanceof Array){r=[];each(o,function(o){o=DOM.get(o);r.push(t.add(o,n,f,s));});return r;}o=DOM.get(o);if(!o)return;cb=function(e){e=e||window.event;if(e&&!e.target&&isIE)e.target=e.srcElement;if(!s)return f(e);return f.call(s,e);};if(n=='unload'){tinymce.unloads.unshift({func:cb});return cb;}if(n=='init'){if(t.domLoaded)cb();else t.inits.push(cb);return cb;}el.push({obj:o,name:n,func:f,cfunc:cb,scope:s});t._add(o,n,cb);return f;},remove:function(o,n,f){var t=this,a=t.events,s=false,r;if(o&&o instanceof Array){r=[];each(o,function(o){o=DOM.get(o);r.push(t.remove(o,n,f));});return r;}o=DOM.get(o);each(a,function(e,i){if(e.obj==o&&e.name==n&&(!f||(e.func==f||e.cfunc==f))){a.splice(i,1);t._remove(o,n,e.cfunc);s=true;return false;}});return s;},clear:function(o){var t=this,a=t.events,i,e;if(o){o=DOM.get(o);for(i=a.length-1;i>=0;i--){e=a[i];if(e.obj===o){t._remove(e.obj,e.name,e.cfunc);e.obj=e.cfunc=null;a.splice(i,1);}}}},cancel:function(e){if(!e)return false;this.stop(e);return this.prevent(e);},stop:function(e){if(e.stopPropagation)e.stopPropagation();else e.cancelBubble=true;return false;},prevent:function(e){if(e.preventDefault)e.preventDefault();else e.returnValue=false;return false;},_unload:function(){var t=Event;each(t.events,function(e,i){t._remove(e.obj,e.name,e.cfunc);e.obj=e.cfunc=null;});t.events=[];t=null;},_add:function(o,n,f){if(o.attachEvent)o.attachEvent('on'+n,f);else if(o.addEventListener)o.addEventListener(n,f,false);else o['on'+n]=f;},_remove:function(o,n,f){if(o){try{if(o.detachEvent)o.detachEvent('on'+n,f);else if(o.removeEventListener)o.removeEventListener(n,f,false);else o['on'+n]=null;}catch(ex){}}},_pageInit:function(){var e=Event;e._remove(window,'DOMContentLoaded',e._pageInit);e.domLoaded=true;each(e.inits,function(c){c();});e.inits=[];},_wait:function(){var t;if(window.tinyMCE_GZ&&tinyMCE_GZ.loaded){Event.domLoaded=1;return;}if(isIE&&document.location.protocol!='https:'){document.write('<script id=__ie_onload defer src=\'javascript:""\';><\/script>');DOM.get("__ie_onload").onreadystatechange=function(){if(this.readyState=="complete"){Event._pageInit();DOM.get("__ie_onload").onreadystatechange=null;}};}else{Event._add(window,'DOMContentLoaded',Event._pageInit,Event);if(isIE||isWebKit){t=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(t);Event._pageInit();}},10);}}}});Event=tinymce.dom.Event;Event._wait();tinymce.addUnload(Event._unload);})();(function(){var each=tinymce.each;tinymce.create('tinymce.dom.Element',{Element:function(id,s){var t=this,dom,el;s=s||{};t.id=id;t.dom=dom=s.dom||tinymce.DOM;t.settings=s;if(!tinymce.isIE)el=t.dom.get(t.id);each(['getPos','getRect','getParent','add','setStyle','getStyle','setStyles','setAttrib','setAttribs','getAttrib','addClass','removeClass','hasClass','getOuterHTML','setOuterHTML','remove','show','hide','isHidden','setHTML','get'],function(k){t[k]=function(){var a=arguments,o;if(tinymce.isOpera){a=[id];each(arguments,function(v){a.push(v);});}else Array.prototype.unshift.call(a,el||id);o=dom[k].apply(dom,a);t.update(k);return o;};});},on:function(n,f,s){return tinymce.dom.Event.add(this.id,n,f,s);},getXY:function(){return{x:parseInt(this.getStyle('left')),y:parseInt(this.getStyle('top'))};},getSize:function(){var n=this.dom.get(this.id);return{w:parseInt(this.getStyle('width')||n.clientWidth),h:parseInt(this.getStyle('height')||n.clientHeight)};},moveTo:function(x,y){this.setStyles({left:x,top:y});},moveBy:function(x,y){var p=this.getXY();this.moveTo(p.x+x,p.y+y);},resizeTo:function(w,h){this.setStyles({width:w,height:h});},resizeBy:function(w,h){var s=this.getSize();this.resizeTo(s.w+w,s.h+h);},update:function(k){var t=this,b,dom=t.dom;if(tinymce.isIE6&&t.settings.blocker){k=k||'';if(k.indexOf('get')===0||k.indexOf('has')===0||k.indexOf('is')===0)return;if(k=='remove'){dom.remove(t.blocker);return;}if(!t.blocker){t.blocker=dom.uniqueId();b=dom.add(t.settings.container||dom.getRoot(),'iframe',{id:t.blocker,style:'position:absolute;',frameBorder:0,src:'javascript:""'});dom.setStyle(b,'opacity',0);}else b=dom.get(t.blocker);dom.setStyle(b,'left',t.getStyle('left',1));dom.setStyle(b,'top',t.getStyle('top',1));dom.setStyle(b,'width',t.getStyle('width',1));dom.setStyle(b,'height',t.getStyle('height',1));dom.setStyle(b,'display',t.getStyle('display',1));dom.setStyle(b,'zIndex',parseInt(t.getStyle('zIndex',1)||0)-1);}}});})();(function(){function trimNl(s){return s.replace(/[\n\r]+/g,'');};var is=tinymce.is,isIE=tinymce.isIE,each=tinymce.each;tinymce.create('tinymce.dom.Selection',{Selection:function(dom,win,serializer){var t=this;t.dom=dom;t.win=win;t.serializer=serializer;tinymce.addUnload(t.destroy,t);},getContent:function(s){var t=this,r=t.getRng(),e=t.dom.create("body"),se=t.getSel(),wb,wa,n;s=s||{};wb=wa='';s.get=true;s.format=s.format||'html';if(s.format=='text')return t.isCollapsed()?'':(r.text||(se.toString?se.toString():''));if(r.cloneContents){n=r.cloneContents();if(n)e.appendChild(n);}else if(is(r.item)||is(r.htmlText))e.innerHTML=r.item?r.item(0).outerHTML:r.htmlText;else e.innerHTML=r.toString();if(/^\s/.test(e.innerHTML))wb=' ';if(/\s+$/.test(e.innerHTML))wa=' ';s.getInner=true;return t.isCollapsed()?'':wb+t.serializer.serialize(e,s)+wa;},setContent:function(h,s){var t=this,r=t.getRng(),d=t.win.document;s=s||{format:'html'};s.set=true;h=t.dom.processHTML(h);if(r.insertNode){if(tinymce.isGecko&&h.indexOf('<')==-1){r.deleteContents();r.insertNode(t.getRng().createContextualFragment(h+'<span id="__caret">_</span>'));t.select(t.dom.get('__caret'));t.getRng().deleteContents();return;}try{if(d.queryCommandEnabled('InsertHTML'))return d.execCommand('InsertHTML',false,h);}catch(ex){r.deleteContents();r.insertNode(t.getRng().createContextualFragment(h));}}else{if(r.item){d.execCommand('Delete',false,null);r=t.getRng();}r.pasteHTML(h);}},getStart:function(){var t=this,r=t.getRng(),e;if(isIE){if(r.item)return r.item(0);r=r.duplicate();r.collapse(1);e=r.parentElement();if(e&&e.nodeName=='BODY')return e.firstChild;return e;}else{e=r.startContainer;if(e.nodeName=='BODY')return e.firstChild;return t.dom.getParent(e,function(n){return n.nodeType==1;});}},getEnd:function(){var t=this,r=t.getRng(),e;if(isIE){if(r.item)return r.item(0);r=r.duplicate();r.collapse(0);e=r.parentElement();if(e&&e.nodeName=='BODY')return e.lastChild;return e;}else{e=r.endContainer;if(e.nodeName=='BODY')return e.lastChild;return t.dom.getParent(e,function(n){return n.nodeType==1;});}},getBookmark:function(si){var t=this,r=t.getRng(),tr,sx,sy,vp=t.dom.getViewPort(t.win),e,sp,bp,le,c=-0xFFFFFF,s,ro=t.dom.getRoot(),wb=0,wa=0,nv;sx=vp.x;sy=vp.y;if(si=='simple')return{rng:r,scrollX:sx,scrollY:sy};if(isIE){if(r.item){e=r.item(0);each(t.dom.select(e.nodeName),function(n,i){if(e==n){sp=i;return false;}});return{tag:e.nodeName,index:sp,scrollX:sx,scrollY:sy};}tr=t.dom.doc.body.createTextRange();tr.moveToElementText(ro);tr.collapse(true);bp=Math.abs(tr.move('character',c));tr=r.duplicate();tr.collapse(true);sp=Math.abs(tr.move('character',c));tr=r.duplicate();tr.collapse(false);le=Math.abs(tr.move('character',c))-sp;return{start:sp-bp,length:le,scrollX:sx,scrollY:sy};}e=t.getNode();s=t.getSel();if(!s)return null;if(e&&e.nodeName=='IMG'){return{scrollX:sx,scrollY:sy};}function getPos(r,sn,en){var w=t.dom.doc.createTreeWalker(r,NodeFilter.SHOW_TEXT,null,false),n,p=0,d={};while((n=w.nextNode())!=null){if(n==sn)d.start=p;if(n==en){d.end=p;return d;}p+=trimNl(n.nodeValue||'').length;}return null;};if(s.anchorNode==s.focusNode&&s.anchorOffset==s.focusOffset){e=getPos(ro,s.anchorNode,s.focusNode);if(!e)return{scrollX:sx,scrollY:sy};trimNl(s.anchorNode.nodeValue||'').replace(/^\s+/,function(a){wb=a.length;});return{start:Math.max(e.start+s.anchorOffset-wb,0),end:Math.max(e.end+s.focusOffset-wb,0),scrollX:sx,scrollY:sy,beg:s.anchorOffset-wb==0};}else{e=getPos(ro,r.startContainer,r.endContainer);if(!e)return{scrollX:sx,scrollY:sy};return{start:Math.max(e.start+r.startOffset-wb,0),end:Math.max(e.end+r.endOffset-wa,0),scrollX:sx,scrollY:sy,beg:r.startOffset-wb==0};}},moveToBookmark:function(b){var t=this,r=t.getRng(),s=t.getSel(),ro=t.dom.getRoot(),sd,nvl,nv;function getPos(r,sp,ep){var w=t.dom.doc.createTreeWalker(r,NodeFilter.SHOW_TEXT,null,false),n,p=0,d={},o,v,wa,wb;while((n=w.nextNode())!=null){wa=wb=0;nv=n.nodeValue||'';nvl=trimNl(nv).length;p+=nvl;if(p>=sp&&!d.startNode){o=sp-(p-nvl);if(b.beg&&o>=nvl)continue;d.startNode=n;d.startOffset=o+wb;}if(p>=ep){d.endNode=n;d.endOffset=ep-(p-nvl)+wb;return d;}}return null;};if(!b)return false;t.win.scrollTo(b.scrollX,b.scrollY);if(isIE){if(r=b.rng){try{r.select();}catch(ex){}return true;}t.win.focus();if(b.tag){r=ro.createControlRange();each(t.dom.select(b.tag),function(n,i){if(i==b.index)r.addElement(n);});}else{try{if(b.start<0)return true;r=s.createRange();r.moveToElementText(ro);r.collapse(true);r.moveStart('character',b.start);r.moveEnd('character',b.length);}catch(ex2){return true;}}try{r.select();}catch(ex){}return true;}if(!s)return false;if(b.rng){s.removeAllRanges();s.addRange(b.rng);}else{if(is(b.start)&&is(b.end)){try{sd=getPos(ro,b.start,b.end);if(sd){r=t.dom.doc.createRange();r.setStart(sd.startNode,sd.startOffset);r.setEnd(sd.endNode,sd.endOffset);s.removeAllRanges();s.addRange(r);}if(!tinymce.isOpera)t.win.focus();}catch(ex){}}}},select:function(n,c){var t=this,r=t.getRng(),s=t.getSel(),b,fn,ln,d=t.win.document;function first(n){return n?d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false).nextNode():null;};function last(n){var c,o,w;if(!n)return null;w=d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false);while(c=w.nextNode())o=c;return o;};if(isIE){try{b=d.body;if(/^(IMG|TABLE)$/.test(n.nodeName)){r=b.createControlRange();r.addElement(n);}else{r=b.createTextRange();r.moveToElementText(n);}r.select();}catch(ex){}}else{if(c){fn=first(n);ln=last(n);if(fn&&ln){r=d.createRange();r.setStart(fn,0);r.setEnd(ln,ln.nodeValue.length);}else r.selectNode(n);}else r.selectNode(n);t.setRng(r);}return n;},isCollapsed:function(){var t=this,r=t.getRng(),s=t.getSel();if(!r||r.item)return false;return!s||r.boundingWidth==0||s.isCollapsed;},collapse:function(b){var t=this,r=t.getRng(),n;if(r.item){n=r.item(0);r=this.win.document.body.createTextRange();r.moveToElementText(n);}r.collapse(!!b);t.setRng(r);},getSel:function(){var t=this,w=this.win;return w.getSelection?w.getSelection():w.document.selection;},getRng:function(){var t=this,s=t.getSel(),r;try{if(s)r=s.rangeCount>0?s.getRangeAt(0):(s.createRange?s.createRange():t.win.document.createRange());}catch(ex){}if(!r)r=isIE?t.win.document.body.createTextRange():t.win.document.createRange();return r;},setRng:function(r){var s;if(!isIE){s=this.getSel();if(s){s.removeAllRanges();s.addRange(r);}}else{try{r.select();}catch(ex){}}},setNode:function(n){var t=this;t.setContent(t.dom.getOuterHTML(n));return n;},getNode:function(){var t=this,r=t.getRng(),s=t.getSel(),e;if(!isIE){if(!r)return t.dom.getRoot();e=r.commonAncestorContainer;if(!r.collapsed){if(r.startContainer==r.endContainer||(tinymce.isWebKit&&r.startContainer==r.endContainer.parentNode)){if(r.startOffset-r.endOffset<2||tinymce.isWebKit){if(r.startContainer.hasChildNodes())e=r.startContainer.childNodes[r.startOffset];}}}return t.dom.getParent(e,function(n){return n.nodeType==1;});}return r.item?r.item(0):r.parentElement();},destroy:function(s){var t=this;t.win=null;if(!s)tinymce.removeUnload(t.destroy);}});})();(function(){tinymce.create('tinymce.dom.XMLWriter',{node:null,XMLWriter:function(s){function getXML(){var i=document.implementation;if(!i||!i.createDocument){try{return new ActiveXObject('MSXML2.DOMDocument');}catch(ex){}try{return new ActiveXObject('Microsoft.XmlDom');}catch(ex){}}else return i.createDocument('','',null);};this.doc=getXML();this.valid=tinymce.isOpera||tinymce.isWebKit;this.reset();},reset:function(){var t=this,d=t.doc;if(d.firstChild)d.removeChild(d.firstChild);t.node=d.appendChild(d.createElement("html"));},writeStartElement:function(n){var t=this;t.node=t.node.appendChild(t.doc.createElement(n));},writeAttribute:function(n,v){if(this.valid)v=v.replace(/>/g,'%MCGT%');this.node.setAttribute(n,v);},writeEndElement:function(){this.node=this.node.parentNode;},writeFullEndElement:function(){var t=this,n=t.node;n.appendChild(t.doc.createTextNode(""));t.node=n.parentNode;},writeText:function(v){if(this.valid)v=v.replace(/>/g,'%MCGT%');this.node.appendChild(this.doc.createTextNode(v));},writeCDATA:function(v){this.node.appendChild(this.doc.createCDATA(v));},writeComment:function(v){this.node.appendChild(this.doc.createComment(v.replace(/\-\-/g,' ')));},getContent:function(){var h;h=this.doc.xml||new XMLSerializer().serializeToString(this.doc);h=h.replace(/<\?[^?]+\?>|<html>|<\/html>|<html\/>|<!DOCTYPE[^>]+>/g,'');h=h.replace(/ ?\/>/g,' />');if(this.valid)h=h.replace(/\%MCGT%/g,'&gt;');return h;}});})();(function(){tinymce.create('tinymce.dom.StringWriter',{str:null,tags:null,count:0,settings:null,indent:null,StringWriter:function(s){this.settings=tinymce.extend({indent_char:' ',indentation:1},s);this.reset();},reset:function(){this.indent='';this.str="";this.tags=[];this.count=0;},writeStartElement:function(n){this._writeAttributesEnd();this.writeRaw('<'+n);this.tags.push(n);this.inAttr=true;this.count++;this.elementCount=this.count;},writeAttribute:function(n,v){var t=this;t.writeRaw(" "+t.encode(n)+'="'+t.encode(v)+'"');},writeEndElement:function(){var n;if(this.tags.length>0){n=this.tags.pop();if(this._writeAttributesEnd(1))this.writeRaw('</'+n+'>');if(this.settings.indentation>0)this.writeRaw('\n');}},writeFullEndElement:function(){if(this.tags.length>0){this._writeAttributesEnd();this.writeRaw('</'+this.tags.pop()+'>');if(this.settings.indentation>0)this.writeRaw('\n');}},writeText:function(v){this._writeAttributesEnd();this.writeRaw(this.encode(v));this.count++;},writeCDATA:function(v){this._writeAttributesEnd();this.writeRaw('<![CDATA['+v+']]>');this.count++;},writeComment:function(v){this._writeAttributesEnd();this.writeRaw('<!-- '+v+'-->');this.count++;},writeRaw:function(v){this.str+=v;},encode:function(s){return s.replace(/[<>&"]/g,function(v){switch(v){case'<':return'&lt;';case'>':return'&gt;';case'&':return'&amp;';case'"':return'&quot;';}return v;});},getContent:function(){return this.str;},_writeAttributesEnd:function(s){if(!this.inAttr)return;this.inAttr=false;if(s&&this.elementCount==this.count){this.writeRaw(' />');return false;}this.writeRaw('>');return true;}});})();(function(){var extend=tinymce.extend,each=tinymce.each,Dispatcher=tinymce.util.Dispatcher,isIE=tinymce.isIE,isGecko=tinymce.isGecko;function getIEAtts(n){var o=[];if(n.nodeName=='OBJECT')return n.attributes;n.cloneNode(false).outerHTML.replace(/([a-z0-9\:\-_]+)=/gi,function(a,b){o.push({specified:1,nodeName:b});});return o;};function wildcardToRE(s){return s.replace(/([?+*])/g,'.$1');};tinymce.create('tinymce.dom.Serializer',{Serializer:function(s){var t=this;t.key=0;t.onPreProcess=new Dispatcher(t);t.onPostProcess=new Dispatcher(t);if(tinymce.relaxedDomain&&tinymce.isGecko){t.writer=new tinymce.dom.StringWriter();}else{try{t.writer=new tinymce.dom.XMLWriter();}catch(ex){t.writer=new tinymce.dom.StringWriter();}}t.settings=s=extend({dom:tinymce.DOM,valid_nodes:0,node_filter:0,attr_filter:0,invalid_attrs:/^(mce_|_moz_)/,closed:/(br|hr|input|meta|img|link|param)/,entity_encoding:'named',entities:'160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro',valid_elements:'*[*]',extended_valid_elements:0,valid_child_elements:0,invalid_elements:0,fix_table_elements:0,fix_list_elements:true,fix_content_duplication:true,convert_fonts_to_spans:false,font_size_classes:0,font_size_style_values:0,apply_source_formatting:0,indent_mode:'simple',indent_char:'\t',indent_levels:1,remove_linebreaks:1},s);t.dom=s.dom;if(s.fix_list_elements){t.onPreProcess.add(function(se,o){var nl,x,a=['ol','ul'],i,n,p,r=/^(OL|UL)$/,np;function prevNode(e,n){var a=n.split(','),i;while((e=e.previousSibling)!=null){for(i=0;i<a.length;i++){if(e.nodeName==a[i])return e;}}return null;};for(x=0;x<a.length;x++){nl=t.dom.select(a[x],o.node);for(i=0;i<nl.length;i++){n=nl[i];p=n.parentNode;if(r.test(p.nodeName)){np=prevNode(n,'LI');if(!np){np=t.dom.create('li');np.innerHTML='&nbsp;';np.appendChild(n);p.insertBefore(np,p.firstChild);}else np.appendChild(n);}}}});}if(s.fix_table_elements){t.onPreProcess.add(function(se,o){each(t.dom.select('table',o.node),function(e){var pa=t.dom.getParent(e,'H1,H2,H3,H4,H5,H6,P'),pa2,n,tm,pl=[],i,ns;if(pa){pa2=pa.cloneNode(false);pl.push(e);for(n=e;n=n.parentNode;){pl.push(n);if(n==pa)break;}tm=pa2;for(i=pl.length-1;i>=0;i--){if(i==pl.length-1){while(ns=pl[i-1].nextSibling)tm.appendChild(ns.parentNode.removeChild(ns));}else{n=pl[i].cloneNode(false);if(i!=0){while(ns=pl[i-1].nextSibling)n.appendChild(ns.parentNode.removeChild(ns));}tm=tm.appendChild(n);}}e=t.dom.insertAfter(e.parentNode.removeChild(e),pa);t.dom.insertAfter(e,pa);t.dom.insertAfter(pa2,e);}});});}},setEntities:function(s){var t=this,a,i,l={},re='',v;if(t.entityLookup)return;a=s.split(',');for(i=0;i<a.length;i+=2){v=a[i];if(v==34||v==38||v==60||v==62)continue;l[String.fromCharCode(a[i])]=a[i+1];v=parseInt(a[i]).toString(16);re+='\\u'+'0000'.substring(v.length)+v;}if(!re){t.settings.entity_encoding='raw';return;}t.entitiesRE=new RegExp('['+re+']','g');t.entityLookup=l;},setValidChildRules:function(s){this.childRules=null;this.addValidChildRules(s);},addValidChildRules:function(s){var t=this,inst,intr,bloc;if(!s)return;inst='A|BR|SPAN|BDO|MAP|OBJECT|IMG|TT|I|B|BIG|SMALL|EM|STRONG|DFN|CODE|Q|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|SUB|SUP|#text|#comment';intr='A|BR|SPAN|BDO|OBJECT|APPLET|IMG|MAP|IFRAME|TT|I|B|U|S|STRIKE|BIG|SMALL|FONT|BASEFONT|EM|STRONG|DFN|CODE|Q|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|SUB|SUP|INPUT|SELECT|TEXTAREA|LABEL|BUTTON|#text|#comment';bloc='H[1-6]|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|FORM|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP';each(s.split(','),function(s){var p=s.split(/\[|\]/),re;s='';each(p[1].split('|'),function(v){if(s)s+='|';switch(v){case'%itrans':v=intr;break;case'%itrans_na':v=intr.substring(2);break;case'%istrict':v=inst;break;case'%istrict_na':v=inst.substring(2);break;case'%btrans':v=bloc;break;case'%bstrict':v=bloc;break;}s+=v;});re=new RegExp('^('+s.toLowerCase()+')$','i');each(p[0].split('/'),function(s){t.childRules=t.childRules||{};t.childRules[s]=re;});});s='';each(t.childRules,function(v,k){if(s)s+='|';s+=k;});t.parentElementsRE=new RegExp('^('+s.toLowerCase()+')$','i');},setRules:function(s){var t=this;t._setup();t.rules={};t.wildRules=[];t.validElements={};return t.addRules(s);},addRules:function(s){var t=this,dr;if(!s)return;t._setup();each(s.split(','),function(s){var p=s.split(/\[|\]/),tn=p[0].split('/'),ra,at,wat,va=[];if(dr)at=tinymce.extend([],dr.attribs);if(p.length>1){each(p[1].split('|'),function(s){var ar={},i;at=at||[];s=s.replace(/::/g,'~');s=/^([!\-])?([\w*.?~_\-]+|)([=:<])?(.+)?$/.exec(s);s[2]=s[2].replace(/~/g,':');if(s[1]=='!'){ra=ra||[];ra.push(s[2]);}if(s[1]=='-'){for(i=0;i<at.length;i++){if(at[i].name==s[2]){at.splice(i,1);return;}}}switch(s[3]){case'=':ar.defaultVal=s[4]||'';break;case':':ar.forcedVal=s[4];break;case'<':ar.validVals=s[4].split('?');break;}if(/[*.?]/.test(s[2])){wat=wat||[];ar.nameRE=new RegExp('^'+wildcardToRE(s[2])+'$');wat.push(ar);}else{ar.name=s[2];at.push(ar);}va.push(s[2]);});}each(tn,function(s,i){var pr=s.charAt(0),x=1,ru={};if(dr){if(dr.noEmpty)ru.noEmpty=dr.noEmpty;if(dr.fullEnd)ru.fullEnd=dr.fullEnd;if(dr.padd)ru.padd=dr.padd;}switch(pr){case'-':ru.noEmpty=true;break;case'+':ru.fullEnd=true;break;case'#':ru.padd=true;break;default:x=0;}tn[i]=s=s.substring(x);t.validElements[s]=1;if(/[*.?]/.test(tn[0])){ru.nameRE=new RegExp('^'+wildcardToRE(tn[0])+'$');t.wildRules=t.wildRules||{};t.wildRules.push(ru);}else{ru.name=tn[0];if(tn[0]=='@')dr=ru;t.rules[s]=ru;}ru.attribs=at;if(ra)ru.requiredAttribs=ra;if(wat){s='';each(va,function(v){if(s)s+='|';s+='('+wildcardToRE(v)+')';});ru.validAttribsRE=new RegExp('^'+s.toLowerCase()+'$');ru.wildAttribs=wat;}});});s='';each(t.validElements,function(v,k){if(s)s+='|';if(k!='@')s+=k;});t.validElementsRE=new RegExp('^('+wildcardToRE(s.toLowerCase())+')$');},findRule:function(n){var t=this,rl=t.rules,i,r;t._setup();r=rl[n];if(r)return r;rl=t.wildRules;for(i=0;i<rl.length;i++){if(rl[i].nameRE.test(n))return rl[i];}return null;},findAttribRule:function(ru,n){var i,wa=ru.wildAttribs;for(i=0;i<wa.length;i++){if(wa[i].nameRE.test(n))return wa[i];}return null;},serialize:function(n,o){var h,t=this;t._setup();o=o||{};o.format=o.format||'html';t.processObj=o;n=n.cloneNode(true);t.key=''+(parseInt(t.key)+1);if(!o.no_events){o.node=n;t.onPreProcess.dispatch(t,o);}t.writer.reset();t._serializeNode(n,o.getInner);o.content=t.writer.getContent();if(!o.no_events)t.onPostProcess.dispatch(t,o);t._postProcess(o);o.node=null;return tinymce.trim(o.content);},_postProcess:function(o){var t=this,s=t.settings,h=o.content,sc=[],p;if(o.format=='html'){p=t._protect({content:h,patterns:[{pattern:/(<script[^>]*>)(.*?)(<\/script>)/g},{pattern:/(<style[^>]*>)(.*?)(<\/style>)/g},{pattern:/(<pre[^>]*>)(.*?)(<\/pre>)/g,encode:1}]});h=p.content;if(s.entity_encoding!=='raw')h=t._encode(h);if(!o.set){h=h.replace(/<p>\s+<\/p>|<p([^>]+)>\s+<\/p>/g,s.entity_encoding=='numeric'?'<p$1>&#160;</p>':'<p$1>&nbsp;</p>');if(s.remove_linebreaks){h=h.replace(/\r?\n|\r/g,' ');h=h.replace(/(<[^>]+>)\s+/g,'$1 ');h=h.replace(/\s+(<\/[^>]+>)/g,' $1');h=h.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>');h=h.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>');h=h.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(s.apply_source_formatting&&s.indent_mode=='simple'){h=h.replace(/<(\/?)(ul|hr|table|meta|link|tbody|tr|object|body|head|html|map)(|[^>]+)>\s*/g,'\n<$1$2$3>\n');h=h.replace(/\s*<(p|h[1-6]|blockquote|div|title|style|pre|script|td|li|area)(|[^>]+)>/g,'\n<$1$2>');h=h.replace(/<\/(p|h[1-6]|blockquote|div|title|style|pre|script|td|li)>\s*/g,'</$1>\n');h=h.replace(/\n\n/g,'\n');}}h=t._unprotect(h,p);if(s.entity_encoding=='raw')h=h.replace(/<p>&nbsp;<\/p>|<p([^>]+)>&nbsp;<\/p>/g,'<p$1>\u00a0</p>');}o.content=h;},_serializeNode:function(n,inn){var t=this,s=t.settings,w=t.writer,hc,el,cn,i,l,a,at,no,v,nn,ru,ar,iv;if(!s.node_filter||s.node_filter(n)){switch(n.nodeType){case 1:if(n.hasAttribute?n.hasAttribute('mce_bogus'):n.getAttribute('mce_bogus'))return;iv=false;hc=n.hasChildNodes();nn=n.getAttribute('mce_name')||n.nodeName.toLowerCase();if(isIE){if(n.scopeName!=='HTML'&&n.scopeName!=='html')nn=n.scopeName+':'+nn;}if(nn.indexOf('mce:')===0)nn=nn.substring(4);if(!t.validElementsRE.test(nn)||(t.invalidElementsRE&&t.invalidElementsRE.test(nn))||inn){iv=true;break;}if(isIE){if(s.fix_content_duplication){if(n.mce_serialized==t.key)return;n.mce_serialized=t.key;}if(nn.charAt(0)=='/')nn=nn.substring(1);}else if(isGecko){if(n.nodeName==='BR'&&n.getAttribute('type')=='_moz')return;}if(t.childRules){if(t.parentElementsRE.test(t.elementName)){if(!t.childRules[t.elementName].test(nn)){iv=true;break;}}t.elementName=nn;}ru=t.findRule(nn);nn=ru.name||nn;if((!hc&&ru.noEmpty)||(isIE&&!nn)){iv=true;break;}if(ru.requiredAttribs){a=ru.requiredAttribs;for(i=a.length-1;i>=0;i--){if(this.dom.getAttrib(n,a[i])!=='')break;}if(i==-1){iv=true;break;}}w.writeStartElement(nn);if(ru.attribs){for(i=0,at=ru.attribs,l=at.length;i<l;i++){a=at[i];v=t._getAttrib(n,a);if(v!==null)w.writeAttribute(a.name,v);}}if(ru.validAttribsRE){at=isIE?getIEAtts(n):n.attributes;for(i=at.length-1;i>-1;i--){no=at[i];if(no.specified){a=no.nodeName.toLowerCase();if(s.invalid_attrs.test(a)||!ru.validAttribsRE.test(a))continue;ar=t.findAttribRule(ru,a);v=t._getAttrib(n,ar,a);if(v!==null)w.writeAttribute(a,v);}}}if(!hc&&ru.padd)w.writeText('\u00a0');break;case 3:if(t.childRules&&t.parentElementsRE.test(t.elementName)){if(!t.childRules[t.elementName].test(n.nodeName))return;}return w.writeText(n.nodeValue);case 4:return w.writeCDATA(n.nodeValue);case 8:return w.writeComment(n.nodeValue);}}else if(n.nodeType==1)hc=n.hasChildNodes();if(hc){cn=n.firstChild;while(cn){t._serializeNode(cn);t.elementName=nn;cn=cn.nextSibling;}}if(!iv){if(hc||!s.closed.test(nn))w.writeFullEndElement();else w.writeEndElement();}},_protect:function(o){var t=this;o.items=o.items||[];function enc(s){return s.replace(/[\r\n\\]/g,function(c){if(c==='\n')return'\\n';else if(c==='\\')return'\\\\';return'\\r';});};function dec(s){return s.replace(/\\[\\rn]/g,function(c){if(c==='\\n')return'\n';else if(c==='\\\\')return'\\';return'\r';});};each(o.patterns,function(p){o.content=dec(enc(o.content).replace(p.pattern,function(x,a,b,c){b=dec(b);if(p.encode)b=t._encode(b);o.items.push(b);return a+'<!--mce:'+(o.items.length-1)+'-->'+c;}));});return o;},_unprotect:function(h,o){h=h.replace(/\<!--mce:([0-9]+)--\>/g,function(a,b){return o.items[parseInt(b)];});o.items=[];return h;},_encode:function(h){var t=this,s=t.settings,l;if(s.entity_encoding!=='raw'){if(s.entity_encoding.indexOf('named')!=-1){t.setEntities(s.entities);l=t.entityLookup;h=h.replace(t.entitiesRE,function(a){var v;if(v=l[a])a='&'+v+';';return a;});}if(s.entity_encoding.indexOf('numeric')!=-1){h=h.replace(/[\u007E-\uFFFF]/g,function(a){return'&#'+a.charCodeAt(0)+';';});}}return h;},_setup:function(){var t=this,s=this.settings;if(t.done)return;t.done=1;t.setRules(s.valid_elements);t.addRules(s.extended_valid_elements);t.addValidChildRules(s.valid_child_elements);if(s.invalid_elements)t.invalidElementsRE=new RegExp('^('+wildcardToRE(s.invalid_elements.replace(/,/g,'|').toLowerCase())+')$');if(s.attrib_value_filter)t.attribValueFilter=s.attribValueFilter;},_getAttrib:function(n,a,na){var i,v;na=na||a.name;if(a.forcedVal&&(v=a.forcedVal)){if(v==='{$uid}')return this.dom.uniqueId();return v;}v=this.dom.getAttrib(n,na);switch(na){case'rowspan':case'colspan':if(v=='1')v='';break;}if(this.attribValueFilter)v=this.attribValueFilter(na,v,n);if(a.validVals){for(i=a.validVals.length-1;i>=0;i--){if(v==a.validVals[i])break;}if(i==-1)return null;}if(v===''&&typeof(a.defaultVal)!='undefined'){v=a.defaultVal;if(v==='{$uid}')return this.dom.uniqueId();return v;}else{if(na=='class'&&this.processObj.get)v=v.replace(/\s?mceItem\w+\s?/g,'');}if(v==='')return null;return v;}});})();(function(){var each=tinymce.each;tinymce.create('tinymce.dom.ScriptLoader',{ScriptLoader:function(s){this.settings=s||{};this.queue=[];this.lookup={};},isDone:function(u){return this.lookup[u]?this.lookup[u].state==2:0;},markDone:function(u){this.lookup[u]={state:2,url:u};},add:function(u,cb,s,pr){var t=this,lo=t.lookup,o;if(o=lo[u]){if(cb&&o.state==2)cb.call(s||this);return o;}o={state:0,url:u,func:cb,scope:s||this};if(pr)t.queue.unshift(o);else t.queue.push(o);lo[u]=o;return o;},load:function(u,cb,s){var t=this,o;if(o=t.lookup[u]){if(cb&&o.state==2)cb.call(s||t);return o;}function loadScript(u){if(tinymce.dom.Event.domLoaded||t.settings.strict_mode){tinymce.util.XHR.send({url:tinymce._addVer(u),error:t.settings.error,async:false,success:function(co){t.eval(co);}});}else document.write('<script type="text/javascript" src="'+tinymce._addVer(u)+'"></script>');};if(!tinymce.is(u,'string')){each(u,function(u){loadScript(u);});if(cb)cb.call(s||t);}else{loadScript(u);if(cb)cb.call(s||t);}},loadQueue:function(cb,s){var t=this;if(!t.queueLoading){t.queueLoading=1;t.queueCallbacks=[];t.loadScripts(t.queue,function(){t.queueLoading=0;if(cb)cb.call(s||t);each(t.queueCallbacks,function(o){o.func.call(o.scope);});});}else if(cb)t.queueCallbacks.push({func:cb,scope:s||t});},eval:function(co){var w=window;if(!w.execScript){try{eval.call(w,co);}catch(ex){eval(co,w);}}else w.execScript(co);},loadScripts:function(sc,cb,s){var t=this,lo=t.lookup;function done(o){o.state=2;if(o.func)o.func.call(o.scope||t);};function allDone(){var l;l=sc.length;each(sc,function(o){o=lo[o.url];if(o.state===2){done(o);l--;}else load(o);});if(l===0&&cb){cb.call(s||t);cb=0;}};function load(o){if(o.state>0)return;o.state=1;tinymce.util.XHR.send({url:o.url,error:t.settings.error,success:function(co){t.eval(co);done(o);allDone();}});};each(sc,function(o){var u=o.url;if(!lo[u]){lo[u]=o;t.queue.push(o);}else o=lo[u];if(o.state>0)return;if(!tinymce.dom.Event.domLoaded&&!t.settings.strict_mode){var ix,ol='';if(cb||o.func){o.state=1;ix=tinymce.dom.ScriptLoader._addOnLoad(function(){done(o);allDone();});if(tinymce.isIE)ol=' onreadystatechange="';else ol=' onload="';ol+='tinymce.dom.ScriptLoader._onLoad(this,\''+u+'\','+ix+');"';}document.write('<script type="text/javascript" src="'+tinymce._addVer(u)+'"'+ol+'></script>');if(!o.func)done(o);}else load(o);});allDone();},'static':{_addOnLoad:function(f){var t=this;t._funcs=t._funcs||[];t._funcs.push(f);return t._funcs.length-1;},_onLoad:function(e,u,ix){if(!tinymce.isIE||e.readyState=='complete')this._funcs[ix].call(this);}}});tinymce.ScriptLoader=new tinymce.dom.ScriptLoader();})();(function(){var DOM=tinymce.DOM,is=tinymce.is;tinymce.create('tinymce.ui.Control',{Control:function(id,s){this.id=id;this.settings=s=s||{};this.rendered=false;this.onRender=new tinymce.util.Dispatcher(this);this.classPrefix='';this.scope=s.scope||this;this.disabled=0;this.active=0;},setDisabled:function(s){var e;if(s!=this.disabled){e=DOM.get(this.id);if(e&&this.settings.unavailable_prefix){if(s){this.prevTitle=e.title;e.title=this.settings.unavailable_prefix+": "+e.title;}else e.title=this.prevTitle;}this.setState('Disabled',s);this.setState('Enabled',!s);this.disabled=s;}},isDisabled:function(){return this.disabled;},setActive:function(s){if(s!=this.active){this.setState('Active',s);this.active=s;}},isActive:function(){return this.active;},setState:function(c,s){var n=DOM.get(this.id);c=this.classPrefix+c;if(s)DOM.addClass(n,c);else DOM.removeClass(n,c);},isRendered:function(){return this.rendered;},renderHTML:function(){},renderTo:function(n){DOM.setHTML(n,this.renderHTML());},postRender:function(){var t=this,b;if(is(t.disabled)){b=t.disabled;t.disabled=-1;t.setDisabled(b);}if(is(t.active)){b=t.active;t.active=-1;t.setActive(b);}},remove:function(){DOM.remove(this.id);this.destroy();},destroy:function(){tinymce.dom.Event.clear(this.id);}});})();tinymce.create('tinymce.ui.Container:tinymce.ui.Control',{Container:function(id,s){this.parent(id,s);this.controls=[];this.lookup={};},add:function(c){this.lookup[c.id]=c;this.controls.push(c);return c;},get:function(n){return this.lookup[n];}});tinymce.create('tinymce.ui.Separator:tinymce.ui.Control',{Separator:function(id,s){this.parent(id,s);this.classPrefix='mceSeparator';},renderHTML:function(){return tinymce.DOM.createHTML('span',{'class':this.classPrefix});}});(function(){var is=tinymce.is,DOM=tinymce.DOM,each=tinymce.each,walk=tinymce.walk;tinymce.create('tinymce.ui.MenuItem:tinymce.ui.Control',{MenuItem:function(id,s){this.parent(id,s);this.classPrefix='mceMenuItem';},setSelected:function(s){this.setState('Selected',s);this.selected=s;},isSelected:function(){return this.selected;},postRender:function(){var t=this;t.parent();if(is(t.selected))t.setSelected(t.selected);}});})();(function(){var is=tinymce.is,DOM=tinymce.DOM,each=tinymce.each,walk=tinymce.walk;tinymce.create('tinymce.ui.Menu:tinymce.ui.MenuItem',{Menu:function(id,s){var t=this;t.parent(id,s);t.items={};t.collapsed=false;t.menuCount=0;t.onAddItem=new tinymce.util.Dispatcher(this);},expand:function(d){var t=this;if(d){walk(t,function(o){if(o.expand)o.expand();},'items',t);}t.collapsed=false;},collapse:function(d){var t=this;if(d){walk(t,function(o){if(o.collapse)o.collapse();},'items',t);}t.collapsed=true;},isCollapsed:function(){return this.collapsed;},add:function(o){if(!o.settings)o=new tinymce.ui.MenuItem(o.id||DOM.uniqueId(),o);this.onAddItem.dispatch(this,o);return this.items[o.id]=o;},addSeparator:function(){return this.add({separator:true});},addMenu:function(o){if(!o.collapse)o=this.createMenu(o);this.menuCount++;return this.add(o);},hasMenus:function(){return this.menuCount!==0;},remove:function(o){delete this.items[o.id];},removeAll:function(){var t=this;walk(t,function(o){if(o.removeAll)o.removeAll();else o.remove();o.destroy();},'items',t);t.items={};},createMenu:function(o){var m=new tinymce.ui.Menu(o.id||DOM.uniqueId(),o);m.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return m;}});})();(function(){var is=tinymce.is,DOM=tinymce.DOM,each=tinymce.each,Event=tinymce.dom.Event,Element=tinymce.dom.Element;tinymce.create('tinymce.ui.DropMenu:tinymce.ui.Menu',{DropMenu:function(id,s){s=s||{};s.container=s.container||DOM.doc.body;s.offset_x=s.offset_x||0;s.offset_y=s.offset_y||0;s.vp_offset_x=s.vp_offset_x||0;s.vp_offset_y=s.vp_offset_y||0;if(is(s.icons)&&!s.icons)s['class']+=' mceNoIcons';this.parent(id,s);this.onShowMenu=new tinymce.util.Dispatcher(this);this.onHideMenu=new tinymce.util.Dispatcher(this);this.classPrefix='mceMenu';},createMenu:function(s){var t=this,cs=t.settings,m;s.container=s.container||cs.container;s.parent=t;s.constrain=s.constrain||cs.constrain;s['class']=s['class']||cs['class'];s.vp_offset_x=s.vp_offset_x||cs.vp_offset_x;s.vp_offset_y=s.vp_offset_y||cs.vp_offset_y;m=new tinymce.ui.DropMenu(s.id||DOM.uniqueId(),s);m.onAddItem.add(t.onAddItem.dispatch,t.onAddItem);return m;},update:function(){var t=this,s=t.settings,tb=DOM.get('menu_'+t.id+'_tbl'),co=DOM.get('menu_'+t.id+'_co'),tw,th;tw=s.max_width?Math.min(tb.clientWidth,s.max_width):tb.clientWidth;th=s.max_height?Math.min(tb.clientHeight,s.max_height):tb.clientHeight;if(!DOM.boxModel)t.element.setStyles({width:tw+2,height:th+2});else t.element.setStyles({width:tw,height:th});if(s.max_width)DOM.setStyle(co,'width',tw);if(s.max_height){DOM.setStyle(co,'height',th);if(tb.clientHeight<s.max_height)DOM.setStyle(co,'overflow','hidden');}},showMenu:function(x,y,px){var t=this,s=t.settings,co,vp=DOM.getViewPort(),w,h,mx,my,ot=2,dm,tb,cp=t.classPrefix;t.collapse(1);if(t.isMenuVisible)return;if(!t.rendered){co=DOM.add(t.settings.container,t.renderNode());each(t.items,function(o){o.postRender();});t.element=new Element('menu_'+t.id,{blocker:1,container:s.container});}else co=DOM.get('menu_'+t.id);if(!tinymce.isOpera)DOM.setStyles(co,{left:-0xFFFF,top:-0xFFFF});DOM.show(co);t.update();x+=s.offset_x||0;y+=s.offset_y||0;vp.w-=4;vp.h-=4;if(s.constrain){w=co.clientWidth-ot;h=co.clientHeight-ot;mx=vp.x+vp.w;my=vp.y+vp.h;if((x+s.vp_offset_x+w)>mx)x=px?px-w:Math.max(0,(mx-s.vp_offset_x)-w);if((y+s.vp_offset_y+h)>my)y=Math.max(0,(my-s.vp_offset_y)-h);}DOM.setStyles(co,{left:x,top:y});t.element.update();t.isMenuVisible=1;t.mouseClickFunc=Event.add(co,'click',function(e){var m;e=e.target;if(e&&(e=DOM.getParent(e,'TR'))&&!DOM.hasClass(e,cp+'ItemSub')){m=t.items[e.id];if(m.isDisabled())return;dm=t;while(dm){if(dm.hideMenu)dm.hideMenu();dm=dm.settings.parent;}if(m.settings.onclick)m.settings.onclick(e);return Event.cancel(e);}});if(t.hasMenus()){t.mouseOverFunc=Event.add(co,'mouseover',function(e){var m,r,mi;e=e.target;if(e&&(e=DOM.getParent(e,'TR'))){m=t.items[e.id];if(t.lastMenu)t.lastMenu.collapse(1);if(m.isDisabled())return;if(e&&DOM.hasClass(e,cp+'ItemSub')){r=DOM.getRect(e);m.showMenu((r.x+r.w-ot),r.y-ot,r.x);t.lastMenu=m;DOM.addClass(DOM.get(m.id).firstChild,cp+'ItemActive');}}});}t.onShowMenu.dispatch(t);if(s.keyboard_focus){Event.add(co,'keydown',t._keyHandler,t);DOM.select('a','menu_'+t.id)[0].focus();t._focusIdx=0;}},hideMenu:function(c){var t=this,co=DOM.get('menu_'+t.id),e;if(!t.isMenuVisible)return;Event.remove(co,'mouseover',t.mouseOverFunc);Event.remove(co,'click',t.mouseClickFunc);Event.remove(co,'keydown',t._keyHandler);DOM.hide(co);t.isMenuVisible=0;if(!c)t.collapse(1);if(t.element)t.element.hide();if(e=DOM.get(t.id))DOM.removeClass(e.firstChild,t.classPrefix+'ItemActive');t.onHideMenu.dispatch(t);},add:function(o){var t=this,co;o=t.parent(o);if(t.isRendered&&(co=DOM.get('menu_'+t.id)))t._add(DOM.select('tbody',co)[0],o);return o;},collapse:function(d){this.parent(d);this.hideMenu(1);},remove:function(o){DOM.remove(o.id);this.destroy();return this.parent(o);},destroy:function(){var t=this,co=DOM.get('menu_'+t.id);Event.remove(co,'mouseover',t.mouseOverFunc);Event.remove(co,'click',t.mouseClickFunc);if(t.element)t.element.remove();DOM.remove(co);},renderNode:function(){var t=this,s=t.settings,n,tb,co,w;w=DOM.create('div',{id:'menu_'+t.id,'class':s['class'],'style':'position:absolute;left:0;top:0;z-index:200000'});co=DOM.add(w,'div',{id:'menu_'+t.id+'_co','class':t.classPrefix+(s['class']?' '+s['class']:'')});t.element=new Element('menu_'+t.id,{blocker:1,container:s.container});if(s.menu_line)DOM.add(co,'span',{'class':t.classPrefix+'Line'});n=DOM.add(co,'table',{id:'menu_'+t.id+'_tbl',border:0,cellPadding:0,cellSpacing:0});tb=DOM.add(n,'tbody');each(t.items,function(o){t._add(tb,o);});t.rendered=true;return w;},_keyHandler:function(e){var t=this,kc=e.keyCode;function focus(d){var i=t._focusIdx+d,e=DOM.select('a','menu_'+t.id)[i];if(e){t._focusIdx=i;e.focus();}};switch(kc){case 38:focus(-1);return;case 40:focus(1);return;case 13:return;case 27:return this.hideMenu();}},_add:function(tb,o){var n,s=o.settings,a,ro,it,cp=this.classPrefix;if(s.separator){ro=DOM.add(tb,'tr',{id:o.id,'class':cp+'ItemSeparator'});DOM.add(ro,'td',{'class':cp+'ItemSeparator'});if(n=ro.previousSibling)DOM.addClass(n,'mceLast');return;}n=ro=DOM.add(tb,'tr',{id:o.id,'class':cp+'Item '+cp+'ItemEnabled'});n=it=DOM.add(n,'td');n=a=DOM.add(n,'a',{href:'javascript:;',onclick:"return false;",onmousedown:'return false;'});DOM.addClass(it,s['class']);DOM.add(n,'span',{'class':'mceIcon'+(s.icon?' mce_'+s.icon:'')});n=DOM.add(n,s.element||'span',{'class':'mceText',title:o.settings.title},o.settings.title);if(o.settings.style)DOM.setAttrib(n,'style',o.settings.style);if(tb.childNodes.length==1)DOM.addClass(ro,'mceFirst');if((n=ro.previousSibling)&&DOM.hasClass(n,cp+'ItemSeparator'))DOM.addClass(ro,'mceFirst');if(o.collapse)DOM.addClass(ro,cp+'ItemSub');if(n=ro.previousSibling)DOM.removeClass(n,'mceLast');DOM.addClass(ro,'mceLast');}});})();(function(){var DOM=tinymce.DOM;tinymce.create('tinymce.ui.Button:tinymce.ui.Control',{Button:function(id,s){this.parent(id,s);this.classPrefix='mceButton';},renderHTML:function(){var cp=this.classPrefix,s=this.settings,h,l;l=DOM.encode(s.label||'');h='<a id="'+this.id+'" href="javascript:;" class="'+cp+' '+cp+'Enabled '+s['class']+(l?' '+cp+'Labeled':'')+'" onmousedown="return false;" onclick="return false;" title="'+DOM.encode(s.title)+'">';if(s.image)h+='<img class="mceIcon" src="'+s.image+'" />'+l+'</a>';else h+='<span class="mceIcon '+s['class']+'"></span>'+(l?'<span class="'+cp+'Label">'+l+'</span>':'')+'</a>';return h;},postRender:function(){var t=this,s=t.settings;tinymce.dom.Event.add(t.id,'click',function(e){if(!t.isDisabled())return s.onclick.call(s.scope,e);});}});})();(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each,Dispatcher=tinymce.util.Dispatcher;tinymce.create('tinymce.ui.ListBox:tinymce.ui.Control',{ListBox:function(id,s){var t=this;t.parent(id,s);t.items=[];t.onChange=new Dispatcher(t);t.onPostRender=new Dispatcher(t);t.onAdd=new Dispatcher(t);t.onRenderMenu=new tinymce.util.Dispatcher(this);t.classPrefix='mceListBox';},select:function(v){var t=this,e,fv;if(v!=t.selectedValue){e=DOM.get(t.id+'_text');t.selectedValue=v;each(t.items,function(o){if(o.value==v){DOM.setHTML(e,DOM.encode(o.title));fv=1;return false;}});if(!fv){DOM.setHTML(e,DOM.encode(t.settings.title));DOM.addClass(e,'mceTitle');e=0;return;}else DOM.removeClass(e,'mceTitle');}e=0;},add:function(n,v,o){var t=this;o=o||{};o=tinymce.extend(o,{title:n,value:v});t.items.push(o);t.onAdd.dispatch(t,o);},getLength:function(){return this.items.length;},renderHTML:function(){var h='',t=this,s=t.settings,cp=t.classPrefix;h='<table id="'+t.id+'" cellpadding="0" cellspacing="0" class="'+cp+' '+cp+'Enabled'+(s['class']?(' '+s['class']):'')+'"><tbody><tr>';h+='<td>'+DOM.createHTML('a',{id:t.id+'_text',href:'javascript:;','class':'mceText',onclick:"return false;",onmousedown:'return false;'},DOM.encode(t.settings.title))+'</td>';h+='<td>'+DOM.createHTML('a',{id:t.id+'_open',tabindex:-1,href:'javascript:;','class':'mceOpen',onclick:"return false;",onmousedown:'return false;'},'<span></span>')+'</td>';h+='</tr></tbody></table>';return h;},showMenu:function(){var t=this,p1,p2,e=DOM.get(this.id),m;if(t.isDisabled()||t.items.length==0)return;if(t.menu&&t.menu.isMenuVisible)return t.hideMenu();if(!t.isMenuRendered){t.renderMenu();t.isMenuRendered=true;}p1=DOM.getPos(this.settings.menu_container);p2=DOM.getPos(e);m=t.menu;m.settings.offset_x=p2.x;m.settings.offset_y=p2.y;m.settings.keyboard_focus=!tinymce.isOpera;if(t.oldID)m.items[t.oldID].setSelected(0);each(t.items,function(o){if(o.value===t.selectedValue){m.items[o.id].setSelected(1);t.oldID=o.id;}});m.showMenu(0,e.clientHeight);Event.add(DOM.doc,'mousedown',t.hideMenu,t);DOM.addClass(t.id,t.classPrefix+'Selected');},hideMenu:function(e){var t=this;if(e&&e.type=="mousedown"&&(e.target.id==t.id+'_text'||e.target.id==t.id+'_open'))return;if(!e||!DOM.getParent(e.target,function(n){return DOM.hasClass(n,'mceMenu');})){DOM.removeClass(t.id,t.classPrefix+'Selected');Event.remove(DOM.doc,'mousedown',t.hideMenu,t);if(t.menu)t.menu.hideMenu();}},renderMenu:function(){var t=this,m;m=t.settings.control_manager.createDropMenu(t.id+'_menu',{menu_line:1,'class':t.classPrefix+'Menu mceNoIcons',max_width:150,max_height:150});m.onHideMenu.add(t.hideMenu,t);m.add({title:t.settings.title,'class':'mceMenuItemTitle',onclick:function(){if(t.settings.onselect('')!==false)t.select('');}});each(t.items,function(o){o.id=DOM.uniqueId();o.onclick=function(){if(t.settings.onselect(o.value)!==false)t.select(o.value);};m.add(o);});t.onRenderMenu.dispatch(t,m);t.menu=m;},postRender:function(){var t=this,cp=t.classPrefix;Event.add(t.id,'click',t.showMenu,t);Event.add(t.id+'_text','focus',function(e){if(!t._focused){t.keyDownHandler=Event.add(t.id+'_text','keydown',function(e){var idx=-1,v,kc=e.keyCode;each(t.items,function(v,i){if(t.selectedValue==v.value)idx=i;});if(kc==38)v=t.items[idx-1];else if(kc==40)v=t.items[idx+1];else if(kc==13){v=t.selectedValue;t.selectedValue=null;t.settings.onselect(v);return Event.cancel(e);}if(v){t.hideMenu();t.select(v.value);}});}t._focused=1;});Event.add(t.id+'_text','blur',function(){Event.remove(t.id+'_text','keydown',t.keyDownHandler);t._focused=0;});if(tinymce.isIE6||!DOM.boxModel){Event.add(t.id,'mouseover',function(){if(!DOM.hasClass(t.id,cp+'Disabled'))DOM.addClass(t.id,cp+'Hover');});Event.add(t.id,'mouseout',function(){if(!DOM.hasClass(t.id,cp+'Disabled'))DOM.removeClass(t.id,cp+'Hover');});}t.onPostRender.dispatch(t,DOM.get(t.id));},destroy:function(){this.parent();Event.clear(this.id+'_text');}});})();(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each,Dispatcher=tinymce.util.Dispatcher;tinymce.create('tinymce.ui.NativeListBox:tinymce.ui.ListBox',{NativeListBox:function(id,s){this.parent(id,s);this.classPrefix='mceNativeListBox';},setDisabled:function(s){DOM.get(this.id).disabled=s;},isDisabled:function(){return DOM.get(this.id).disabled;},select:function(v){var e=DOM.get(this.id),ol=e.options;v=''+(v||'');e.selectedIndex=0;each(ol,function(o,i){if(o.value==v){e.selectedIndex=i;return false;}});},add:function(n,v,a){var o,t=this;a=a||{};a.value=v;if(t.isRendered())DOM.add(DOM.get(this.id),'option',a,n);o={title:n,value:v,attribs:a};t.items.push(o);t.onAdd.dispatch(t,o);},getLength:function(){return DOM.get(this.id).options.length-1;},renderHTML:function(){var h,t=this;h=DOM.createHTML('option',{value:''},'-- '+t.settings.title+' --');each(t.items,function(it){h+=DOM.createHTML('option',{value:it.value},it.title);});h=DOM.createHTML('select',{id:t.id,'class':'mceNativeListBox'},h);return h;},postRender:function(){var t=this,ch;t.rendered=true;function onChange(e){var v=e.target.options[e.target.selectedIndex].value;t.onChange.dispatch(t,v);if(t.settings.onselect)t.settings.onselect(v);};Event.add(t.id,'change',onChange);Event.add(t.id,'keydown',function(e){var bf;Event.remove(t.id,'change',ch);bf=Event.add(t.id,'blur',function(){Event.add(t.id,'change',onChange);Event.remove(t.id,'blur',bf);});if(e.keyCode==13||e.keyCode==32){onChange(e);return Event.cancel(e);}});t.onPostRender.dispatch(t,DOM.get(t.id));}});})();(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each;tinymce.create('tinymce.ui.MenuButton:tinymce.ui.Button',{MenuButton:function(id,s){this.parent(id,s);this.onRenderMenu=new tinymce.util.Dispatcher(this);s.menu_container=s.menu_container||DOM.doc.body;},showMenu:function(){var t=this,p1,p2,e=DOM.get(t.id),m;if(t.isDisabled())return;if(!t.isMenuRendered){t.renderMenu();t.isMenuRendered=true;}if(t.isMenuVisible)return t.hideMenu();p1=DOM.getPos(t.settings.menu_container);p2=DOM.getPos(e);m=t.menu;m.settings.offset_x=p2.x;m.settings.offset_y=p2.y;m.settings.vp_offset_x=p2.x;m.settings.vp_offset_y=p2.y;m.settings.keyboard_focus=t._focused;m.showMenu(0,e.clientHeight);Event.add(DOM.doc,'mousedown',t.hideMenu,t);t.setState('Selected',1);t.isMenuVisible=1;},renderMenu:function(){var t=this,m;m=t.settings.control_manager.createDropMenu(t.id+'_menu',{menu_line:1,'class':this.classPrefix+'Menu',icons:t.settings.icons});m.onHideMenu.add(t.hideMenu,t);t.onRenderMenu.dispatch(t,m);t.menu=m;},hideMenu:function(e){var t=this;if(e&&e.type=="mousedown"&&DOM.getParent(e.target,function(e){return e.id===t.id||e.id===t.id+'_open';}))return;if(!e||!DOM.getParent(e.target,function(n){return DOM.hasClass(n,'mceMenu');})){t.setState('Selected',0);Event.remove(DOM.doc,'mousedown',t.hideMenu,t);if(t.menu)t.menu.hideMenu();}t.isMenuVisible=0;},postRender:function(){var t=this,s=t.settings;Event.add(t.id,'click',function(){if(!t.isDisabled()){if(s.onclick)s.onclick(t.value);t.showMenu();}});}});})();(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each;tinymce.create('tinymce.ui.SplitButton:tinymce.ui.MenuButton',{SplitButton:function(id,s){this.parent(id,s);this.classPrefix='mceSplitButton';},renderHTML:function(){var h,t=this,s=t.settings,h1;h='<tbody><tr>';if(s.image)h1=DOM.createHTML('img ',{src:s.image,'class':'mceAction '+s['class']});else h1=DOM.createHTML('span',{'class':'mceAction '+s['class']},'');h+='<td>'+DOM.createHTML('a',{id:t.id+'_action',href:'javascript:;','class':'mceAction '+s['class'],onclick:"return false;",onmousedown:'return false;',title:s.title},h1)+'</td>';h1=DOM.createHTML('span',{'class':'mceOpen '+s['class']});h+='<td>'+DOM.createHTML('a',{id:t.id+'_open',href:'javascript:;','class':'mceOpen '+s['class'],onclick:"return false;",onmousedown:'return false;',title:s.title},h1)+'</td>';h+='</tr></tbody>';return DOM.createHTML('table',{id:t.id,'class':'mceSplitButton mceSplitButtonEnabled '+s['class'],cellpadding:'0',cellspacing:'0',onmousedown:'return false;',title:s.title},h);},postRender:function(){var t=this,s=t.settings;if(s.onclick){Event.add(t.id+'_action','click',function(){if(!t.isDisabled())s.onclick(t.value);});}Event.add(t.id+'_open','click',t.showMenu,t);Event.add(t.id+'_open','focus',function(){t._focused=1;});Event.add(t.id+'_open','blur',function(){t._focused=0;});if(tinymce.isIE6||!DOM.boxModel){Event.add(t.id,'mouseover',function(){if(!DOM.hasClass(t.id,'mceSplitButtonDisabled'))DOM.addClass(t.id,'mceSplitButtonHover');});Event.add(t.id,'mouseout',function(){if(!DOM.hasClass(t.id,'mceSplitButtonDisabled'))DOM.removeClass(t.id,'mceSplitButtonHover');});}},destroy:function(){this.parent();Event.clear(this.id+'_action');Event.clear(this.id+'_open');}});})();(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,is=tinymce.is,each=tinymce.each;tinymce.create('tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton',{ColorSplitButton:function(id,s){var t=this;t.parent(id,s);t.settings=s=tinymce.extend({colors:'000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF',grid_width:8,default_color:'#888888'},t.settings);t.onShowMenu=new tinymce.util.Dispatcher(t);t.onHideMenu=new tinymce.util.Dispatcher(t);t.value=s.default_color;},showMenu:function(){var t=this,r,p,e,p2;if(t.isDisabled())return;if(!t.isMenuRendered){t.renderMenu();t.isMenuRendered=true;}if(t.isMenuVisible)return t.hideMenu();e=DOM.get(t.id);DOM.show(t.id+'_menu');DOM.addClass(e,'mceSplitButtonSelected');p2=DOM.getPos(e);DOM.setStyles(t.id+'_menu',{left:p2.x,top:p2.y+e.clientHeight,zIndex:200000});e=0;Event.add(DOM.doc,'mousedown',t.hideMenu,t);if(t._focused){t._keyHandler=Event.add(t.id+'_menu','keydown',function(e){if(e.keyCode==27)t.hideMenu();});DOM.select('a',t.id+'_menu')[0].focus();}t.onShowMenu.dispatch(t);t.isMenuVisible=1;},hideMenu:function(e){var t=this;if(e&&e.type=="mousedown"&&DOM.getParent(e.target,function(e){return e.id===t.id+'_open';}))return;if(!e||!DOM.getParent(e.target,function(n){return DOM.hasClass(n,'mceSplitButtonMenu');})){DOM.removeClass(t.id,'mceSplitButtonSelected');Event.remove(DOM.doc,'mousedown',t.hideMenu,t);Event.remove(t.id+'_menu','keydown',t._keyHandler);DOM.hide(t.id+'_menu');}t.onHideMenu.dispatch(t);t.isMenuVisible=0;},renderMenu:function(){var t=this,m,i=0,s=t.settings,n,tb,tr,w;w=DOM.add(s.menu_container,'div',{id:t.id+'_menu','class':s['menu_class']+' '+s['class'],style:'position:absolute;left:0;top:-1000px;'});m=DOM.add(w,'div',{'class':s['class']+' mceSplitButtonMenu'});DOM.add(m,'span',{'class':'mceMenuLine'});n=DOM.add(m,'table',{'class':'mceColorSplitMenu'});tb=DOM.add(n,'tbody');i=0;each(is(s.colors,'array')?s.colors:s.colors.split(','),function(c){c=c.replace(/^#/,'');if(!i--){tr=DOM.add(tb,'tr');i=s.grid_width-1;}n=DOM.add(tr,'td');n=DOM.add(n,'a',{href:'javascript:;',style:{backgroundColor:'#'+c},mce_color:'#'+c});});if(s.more_colors_func){n=DOM.add(tb,'tr');n=DOM.add(n,'td',{colspan:s.grid_width,'class':'mceMoreColors'});n=DOM.add(n,'a',{id:t.id+'_more',href:'javascript:;',onclick:'return false;','class':'mceMoreColors'},s.more_colors_title);Event.add(n,'click',function(e){s.more_colors_func.call(s.more_colors_scope||this);return Event.cancel(e);});}DOM.addClass(m,'mceColorSplitMenu');Event.add(t.id+'_menu','click',function(e){var c;e=e.target;if(e.nodeName=='A'&&(c=e.getAttribute('mce_color')))t.setColor(c);return Event.cancel(e);});return w;},setColor:function(c){var t=this;DOM.setStyle(t.id+'_preview','backgroundColor',c);t.value=c;t.hideMenu();t.settings.onselect(c);},postRender:function(){var t=this,id=t.id;t.parent();DOM.add(id+'_action','div',{id:id+'_preview','class':'mceColorPreview'});},destroy:function(){this.parent();Event.clear(this.id+'_menu');Event.clear(this.id+'_more');DOM.remove(this.id+'_menu');}});})();tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container',{renderHTML:function(){var t=this,h='',c,co,dom=tinymce.DOM,s=t.settings,i,pr,nx,cl;cl=t.controls;for(i=0;i<cl.length;i++){co=cl[i];pr=cl[i-1];nx=cl[i+1];if(i===0){c='mceToolbarStart';if(co.Button)c+=' mceToolbarStartButton';else if(co.SplitButton)c+=' mceToolbarStartSplitButton';else if(co.ListBox)c+=' mceToolbarStartListBox';h+=dom.createHTML('td',{'class':c},dom.createHTML('span',null,'<!-- IE -->'));}if(pr&&co.ListBox){if(pr.Button||pr.SplitButton)h+=dom.createHTML('td',{'class':'mceToolbarEnd'},dom.createHTML('span',null,'<!-- IE -->'));}if(dom.stdMode)h+='<td style="position: relative">'+co.renderHTML()+'</td>';else h+='<td>'+co.renderHTML()+'</td>';if(nx&&co.ListBox){if(nx.Button||nx.SplitButton)h+=dom.createHTML('td',{'class':'mceToolbarStart'},dom.createHTML('span',null,'<!-- IE -->'));}}c='mceToolbarEnd';if(co.Button)c+=' mceToolbarEndButton';else if(co.SplitButton)c+=' mceToolbarEndSplitButton';else if(co.ListBox)c+=' mceToolbarEndListBox';h+=dom.createHTML('td',{'class':c},dom.createHTML('span',null,'<!-- IE -->'));return dom.createHTML('table',{id:t.id,'class':'mceToolbar'+(s['class']?' '+s['class']:''),cellpadding:'0',cellspacing:'0',align:t.settings.align||''},'<tbody><tr>'+h+'</tr></tbody>');}});(function(){var Dispatcher=tinymce.util.Dispatcher,each=tinymce.each;tinymce.create('tinymce.AddOnManager',{items:[],urls:{},lookup:{},onAdd:new Dispatcher(this),get:function(n){return this.lookup[n];},requireLangPack:function(n){var u,s;if(tinymce.EditorManager.settings){u=this.urls[n]+'/langs/'+tinymce.EditorManager.settings.language+'.js';s=tinymce.EditorManager.settings;if(s){if(!tinymce.dom.Event.domLoaded&&!s.strict_mode)tinymce.ScriptLoader.load(u);else tinymce.ScriptLoader.add(u);}}},add:function(id,o){this.items.push(o);this.lookup[id]=o;this.onAdd.dispatch(this,id,o);return o;},load:function(n,u,cb,s){var t=this;if(t.urls[n])return;if(u.indexOf('/')!=0&&u.indexOf('://')==-1)u=tinymce.baseURL+'/'+u;t.urls[n]=u.substring(0,u.lastIndexOf('/'));tinymce.ScriptLoader.add(u,cb,s);}});tinymce.PluginManager=new tinymce.AddOnManager();tinymce.ThemeManager=new tinymce.AddOnManager();}());(function(){var each=tinymce.each,extend=tinymce.extend,DOM=tinymce.DOM,Event=tinymce.dom.Event,ThemeManager=tinymce.ThemeManager,PluginManager=tinymce.PluginManager,explode=tinymce.explode;tinymce.create('static tinymce.EditorManager',{editors:{},i18n:{},activeEditor:null,preInit:function(){var t=this,lo=window.location;tinymce.documentBaseURL=lo.href.replace(/[\?#].*$/,'').replace(/[\/\\][^\/]+$/,'');if(!/[\/\\]$/.test(tinymce.documentBaseURL))tinymce.documentBaseURL+='/';tinymce.baseURL=new tinymce.util.URI(tinymce.documentBaseURL).toAbsolute(tinymce.baseURL);tinymce.EditorManager.baseURI=new tinymce.util.URI(tinymce.baseURL);if(tinymce.EditorManager.baseURI.host!=lo.hostname&&lo.hostname)document.domain=tinymce.relaxedDomain=lo.hostname.replace(/.*\.(.+\..+)$/,'$1');t.onBeforeUnload=new tinymce.util.Dispatcher(t);Event.add(window,'beforeunload',function(e){t.onBeforeUnload.dispatch(t,e);});},init:function(s){var t=this,pl,sl=tinymce.ScriptLoader,c,e;function execCallback(se,n,s){var f=se[n];if(!f)return;if(tinymce.is(f,'string')){s=f.replace(/\.\w+$/,'');s=s?tinymce.resolve(s):0;f=tinymce.resolve(f);}return f.apply(s||this,Array.prototype.slice.call(arguments,2));};s=extend({theme:"simple",language:"en",strict_loading_mode:document.contentType=='application/xhtml+xml'},s);t.settings=s;if(!Event.domLoaded&&!s.strict_loading_mode){if(s.language)sl.add(tinymce.baseURL+'/langs/'+s.language+'.js');if(s.theme&&s.theme.charAt(0)!='-'&&!ThemeManager.urls[s.theme])ThemeManager.load(s.theme,'themes/'+s.theme+'/editor_template'+tinymce.suffix+'.js');if(s.plugins){pl=explode(s.plugins);if(tinymce.inArray(pl,'compat2x')!=-1)PluginManager.load('compat2x','plugins/compat2x/editor_plugin'+tinymce.suffix+'.js');each(pl,function(v){if(v&&v.charAt(0)!='-'&&!PluginManager.urls[v]){if(!tinymce.isWebKit&&v=='safari')return;PluginManager.load(v,'plugins/'+v+'/editor_plugin'+tinymce.suffix+'.js');}});}sl.loadQueue();}Event.add(document,'init',function(){var l,co;execCallback(s,'onpageload');if(s.browsers){l=false;each(explode(s.browsers),function(v){switch(v){case'ie':case'msie':if(tinymce.isIE)l=true;break;case'gecko':if(tinymce.isGecko)l=true;break;case'safari':case'webkit':if(tinymce.isWebKit)l=true;break;case'opera':if(tinymce.isOpera)l=true;break;}});if(!l)return;}switch(s.mode){case"exact":l=s.elements||'';if(l.length>0){each(explode(l),function(v){if(DOM.get(v))new tinymce.Editor(v,s).render(1);else{c=0;each(document.forms,function(f){each(f.elements,function(e){if(e.name===v){v='mce_editor_'+c;DOM.setAttrib(e,'id',v);new tinymce.Editor(v,s).render(1);}});});}});}break;case"textareas":case"specific_textareas":function hasClass(n,c){return c.constructor===RegExp?c.test(n.className):DOM.hasClass(n,c);};each(DOM.select('textarea'),function(v){if(s.editor_deselector&&hasClass(v,s.editor_deselector))return;if(!s.editor_selector||hasClass(v,s.editor_selector)){e=DOM.get(v.name);if(!v.id&&!e)v.id=v.name;if(!v.id||t.get(v.id))v.id=DOM.uniqueId();new tinymce.Editor(v.id,s).render(1);}});break;}if(s.oninit){l=co=0;each(t.editors,function(ed){co++;if(!ed.initialized){ed.onInit.add(function(){l++;if(l==co)execCallback(s,'oninit');});}else l++;if(l==co)execCallback(s,'oninit');});}});},get:function(id){return this.editors[id];},getInstanceById:function(id){return this.get(id);},add:function(e){this.editors[e.id]=e;this._setActive(e);return e;},remove:function(e){var t=this;if(!t.editors[e.id])return null;delete t.editors[e.id];if(t.activeEditor==e){each(t.editors,function(e){t._setActive(e);return false;});}e.destroy();return e;},execCommand:function(c,u,v){var t=this,ed=t.get(v),w;switch(c){case"mceFocus":ed.focus();return true;case"mceAddEditor":case"mceAddControl":if(!t.get(v))new tinymce.Editor(v,t.settings).render();return true;case"mceAddFrameControl":w=v.window;w.tinyMCE=tinyMCE;w.tinymce=tinymce;tinymce.DOM.doc=w.document;tinymce.DOM.win=w;ed=new tinymce.Editor(v.element_id,v);ed.render();if(tinymce.isIE){function clr(){ed.destroy();w.detachEvent('onunload',clr);w=w.tinyMCE=w.tinymce=null;};w.attachEvent('onunload',clr);}v.page_window=null;return true;case"mceRemoveEditor":case"mceRemoveControl":ed.remove();return true;case'mceToggleEditor':if(!ed){t.execCommand('mceAddControl',0,v);return true;}if(ed.isHidden())ed.show();else ed.hide();return true;}if(t.activeEditor)return t.activeEditor.execCommand(c,u,v);return false;},execInstanceCommand:function(id,c,u,v){var ed=this.get(id);if(ed)return ed.execCommand(c,u,v);return false;},triggerSave:function(){each(this.editors,function(e){e.save();});},addI18n:function(p,o){var lo,i18n=this.i18n;if(!tinymce.is(p,'string')){each(p,function(o,lc){each(o,function(o,g){each(o,function(o,k){if(g==='common')i18n[lc+'.'+k]=o;else i18n[lc+'.'+g+'.'+k]=o;});});});}else{each(o,function(o,k){i18n[p+'.'+k]=o;});}},_setActive:function(e){this.selectedInstance=this.activeEditor=e;}});tinymce.EditorManager.preInit();})();var tinyMCE=window.tinyMCE=tinymce.EditorManager;(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,extend=tinymce.extend,Dispatcher=tinymce.util.Dispatcher;var each=tinymce.each,isGecko=tinymce.isGecko,isIE=tinymce.isIE,isWebKit=tinymce.isWebKit;var is=tinymce.is,ThemeManager=tinymce.ThemeManager,PluginManager=tinymce.PluginManager,EditorManager=tinymce.EditorManager;var inArray=tinymce.inArray,grep=tinymce.grep,explode=tinymce.explode;tinymce.create('tinymce.Editor',{Editor:function(id,s){var t=this;t.id=t.editorId=id;t.execCommands={};t.queryStateCommands={};t.queryValueCommands={};t.plugins={};each(['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(e){t[e]=new Dispatcher(t);});t.settings=s=extend({id:id,language:'en',docs_language:'en',theme:'simple',skin:'default',delta_width:0,delta_height:0,popup_css:'',plugins:'',document_base_url:tinymce.documentBaseURL,add_form_submit_trigger:1,submit_patch:1,add_unload_trigger:1,convert_urls:1,relative_urls:1,remove_script_host:1,table_inline_editing:0,object_resizing:1,cleanup:1,accessibility_focus:1,custom_shortcuts:1,custom_undo_redo_keyboard_shortcuts:1,custom_undo_redo_restore_selection:1,custom_undo_redo:1,doctype:'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">',visual_table_class:'mceItemTable',visual:1,inline_styles:true,convert_fonts_to_spans:true,font_size_style_values:'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[align],-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,-blockquote[cite],-table[border=0|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],object[classid|width|height|codebase|*],param[name|value],embed[type|width|height|src|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value],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'},s);t.documentBaseURI=new tinymce.util.URI(s.document_base_url||tinymce.documentBaseURL,{base_uri:tinyMCE.baseURI});t.baseURI=EditorManager.baseURI;t.execCallback('setup',t);},render:function(nst){var t=this,s=t.settings,id=t.id,sl=tinymce.ScriptLoader;if(!Event.domLoaded){Event.add(document,'init',function(){t.render();});return;}if(!nst){s.strict_loading_mode=1;tinyMCE.settings=s;}if(!t.getElement())return;if(s.strict_loading_mode){sl.settings.strict_mode=s.strict_loading_mode;tinymce.DOM.settings.strict=1;}if(!/TEXTAREA|INPUT/i.test(t.getElement().nodeName)&&s.hidden_input&&DOM.getParent(id,'form'))DOM.insertAfter(DOM.create('input',{type:'hidden',name:id}),id);t.windowManager=new tinymce.WindowManager(t);if(s.encoding=='xml'){t.onGetContent.add(function(ed,o){if(o.save)o.content=DOM.encode(o.content);});}if(s.add_form_submit_trigger){t.onSubmit.addToTop(function(){if(t.initialized){t.save();t.isNotDirty=1;}});}if(s.add_unload_trigger&&!s.ask){t._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(t.initialized&&!t.destroyed&&!t.isHidden())t.save({format:'raw',no_events:true});});}tinymce.addUnload(t.destroy,t);if(s.submit_patch){t.onBeforeRenderUI.add(function(){var n=t.getElement().form;if(!n)return;if(n._mceOldSubmit)return;if(!n.submit.nodeType&&!n.submit.length){t.formElement=n;n._mceOldSubmit=n.submit;n.submit=function(){EditorManager.triggerSave();t.isNotDirty=1;return this._mceOldSubmit(this);};}n=null;});}function loadScripts(){if(s.language)sl.add(tinymce.baseURL+'/langs/'+s.language+'.js');if(s.theme.charAt(0)!='-'&&!ThemeManager.urls[s.theme])ThemeManager.load(s.theme,'themes/'+s.theme+'/editor_template'+tinymce.suffix+'.js');each(explode(s.plugins),function(p){if(p&&p.charAt(0)!='-'&&!PluginManager.urls[p]){if(!isWebKit&&p=='safari')return;PluginManager.load(p,'plugins/'+p+'/editor_plugin'+tinymce.suffix+'.js');}});sl.loadQueue(function(){if(s.ask){function ask(){window.setTimeout(function(){Event.remove(t.id,'focus',ask);t.windowManager.confirm(t.getLang('edit_confirm'),function(s){if(s)t.init();});},0);};Event.add(t.id,'focus',ask);return;}if(!t.removed)t.init();});};if(s.plugins.indexOf('compat2x')!=-1){PluginManager.load('compat2x','plugins/compat2x/editor_plugin'+tinymce.suffix+'.js');sl.loadQueue(loadScripts);}else loadScripts();},init:function(){var n,t=this,s=t.settings,w,h,e=t.getElement(),o,ti,u,bi,bc,re;EditorManager.add(t);s.theme=s.theme.replace(/-/,'');o=ThemeManager.get(s.theme);t.theme=new o();if(t.theme.init&&s.init_theme)t.theme.init(t,ThemeManager.urls[s.theme]||tinymce.documentBaseURL.replace(/\/$/,''));each(explode(s.plugins.replace(/\-/g,'')),function(p){var c=PluginManager.get(p),u=PluginManager.urls[p]||tinymce.documentBaseURL.replace(/\/$/,''),po;if(c){po=new c(t,u);t.plugins[p]=po;if(po.init)po.init(t,u);}});if(s.popup_css)s.popup_css=t.documentBaseURI.toAbsolute(s.popup_css);else s.popup_css=t.baseURI.toAbsolute("themes/"+s.theme+"/skins/"+s.skin+"/dialog.css");if(s.popup_css_add)s.popup_css+=','+t.documentBaseURI.toAbsolute(s.popup_css_add);t.controlManager=new tinymce.ControlManager(t);t.undoManager=new tinymce.UndoManager(t);t.undoManager.onAdd.add(function(um,l){if(!l.initial)return t.onChange.dispatch(t,l,um);});t.undoManager.onUndo.add(function(um,l){return t.onUndo.dispatch(t,l,um);});t.undoManager.onRedo.add(function(um,l){return t.onRedo.dispatch(t,l,um);});if(s.custom_undo_redo){t.onExecCommand.add(function(ed,cmd,ui,val,a){if(cmd!='Undo'&&cmd!='Redo'&&cmd!='mceRepaint'&&(!a||!a.skip_undo))t.undoManager.add();});}t.onExecCommand.add(function(ed,c){if(!/^(FontName|FontSize)$/.test(c))t.nodeChanged();});if(isGecko){function repaint(a,o){if(!o||!o.initial)t.execCommand('mceRepaint');};t.onUndo.add(repaint);t.onRedo.add(repaint);t.onSetContent.add(repaint);}t.onBeforeRenderUI.dispatch(t,t.controlManager);if(s.render_ui){w=s.width||e.style.width||e.offsetWidth;h=s.height||e.style.height||e.offsetHeight;t.orgDisplay=e.style.display;re=/^[0-9\.]+(|px)$/i;if(re.test(''+w))w=Math.max(parseInt(w)+(o.deltaWidth||0),100);if(re.test(''+h))h=Math.max(parseInt(h)+(o.deltaHeight||0),100);o=t.theme.renderUI({targetNode:e,width:w,height:h,deltaWidth:s.delta_width,deltaHeight:s.delta_height});t.editorContainer=o.editorContainer;}DOM.setStyles(o.sizeContainer||o.editorContainer,{width:w,height:h});h=(o.iframeHeight||h)+((h+'').indexOf('%')==-1?(o.deltaHeight||0):'');if(h<100)h=100;t.iframeHTML=s.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml"><base href="'+t.documentBaseURI.getURI()+'" />';t.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';if(tinymce.relaxedDomain)t.iframeHTML+='<script type="text/javascript">document.domain = "'+tinymce.relaxedDomain+'";</script>';bi=s.body_id||'tinymce';if(bi.indexOf('=')!=-1){bi=t.getParam('body_id','','hash');bi=bi[t.id]||bi;}bc=s.body_class||'';if(bc.indexOf('=')!=-1){bc=t.getParam('body_class','','hash');bc=bc[t.id]||'';}t.iframeHTML+='</head><body id="'+bi+'" class="mceContentBody '+bc+'"></body></html>';if(tinymce.relaxedDomain){if(isIE)u='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()';else if(tinymce.isOpera)u='javascript:(function(){document.open();document.domain="'+document.domain+'";document.close();ed.setupIframe();})()';}n=DOM.add(o.iframeContainer,'iframe',{id:t.id+"_ifr",src:u||'javascript:""',frameBorder:'0',style:{width:'100%',height:h}});t.contentAreaContainer=o.iframeContainer;DOM.get(o.editorContainer).style.display=t.orgDisplay;DOM.get(t.id).style.display='none';if(tinymce.isOldWebKit){Event.add(n,'load',t.setupIframe,t);n.src=tinymce.baseURL+'/plugins/safari/blank.htm';}else{if(!isIE||!tinymce.relaxedDomain)t.setupIframe();e=n=o=null;}},setupIframe:function(){var t=this,s=t.settings,e=DOM.get(t.id),d=t.getDoc(),h,b;if(!isIE||!tinymce.relaxedDomain){d.open();d.write(t.iframeHTML);d.close();}if(!isIE){try{d.designMode='On';}catch(ex){}}if(isIE){b=t.getBody();DOM.hide(b);b.contentEditable=true;DOM.show(b);}t.dom=new tinymce.DOM.DOMUtils(t.getDoc(),{keep_values:true,url_converter:t.convertURL,url_converter_scope:t,hex_colors:s.force_hex_style_colors,class_filter:s.class_filter,update_styles:1,fix_ie_paragraphs:1});t.serializer=new tinymce.dom.Serializer({entity_encoding:s.entity_encoding,entities:s.entities,valid_elements:s.verify_html===false?'*[*]':s.valid_elements,extended_valid_elements:s.extended_valid_elements,valid_child_elements:s.valid_child_elements,invalid_elements:s.invalid_elements,fix_table_elements:s.fix_table_elements,fix_list_elements:s.fix_list_elements,fix_content_duplication:s.fix_content_duplication,convert_fonts_to_spans:s.convert_fonts_to_spans,font_size_classes:s.font_size_classes,font_size_style_values:s.font_size_style_values,apply_source_formatting:s.apply_source_formatting,remove_linebreaks:s.remove_linebreaks,dom:t.dom});t.selection=new tinymce.dom.Selection(t.dom,t.getWin(),t.serializer);t.forceBlocks=new tinymce.ForceBlocks(t,{forced_root_block:s.forced_root_block});t.editorCommands=new tinymce.EditorCommands(t);t.serializer.onPreProcess.add(function(se,o){return t.onPreProcess.dispatch(t,o,se);});t.serializer.onPostProcess.add(function(se,o){return t.onPostProcess.dispatch(t,o,se);});t.onPreInit.dispatch(t);if(!s.gecko_spellcheck)t.getBody().spellcheck=0;t._addEvents();t.controlManager.onPostRender.dispatch(t,t.controlManager);t.onPostRender.dispatch(t);if(s.directionality)t.getBody().dir=s.directionality;if(s.nowrap)t.getBody().style.whiteSpace="nowrap";if(s.auto_resize)t.onNodeChange.add(t.resizeToContent,t);if(s.custom_elements){function handleCustom(ed,o){each(explode(s.custom_elements),function(v){var n;if(v.indexOf('~')===0){v=v.substring(1);n='span';}else n='div';o.content=o.content.replace(new RegExp('<('+v+')([^>]*)>','g'),'<'+n+' mce_name="$1"$2>');o.content=o.content.replace(new RegExp('</('+v+')>','g'),'</'+n+'>');});};t.onBeforeSetContent.add(handleCustom);t.onPostProcess.add(function(ed,o){if(o.set)handleCustom(ed,o)});}if(s.handle_node_change_callback){t.onNodeChange.add(function(ed,cm,n){t.execCallback('handle_node_change_callback',t.id,n,-1,-1,true,t.selection.isCollapsed());});}if(s.save_callback){t.onSaveContent.add(function(ed,o){var h=t.execCallback('save_callback',t.id,o.content,t.getBody());if(h)o.content=h;});}if(s.onchange_callback){t.onChange.add(function(ed,l){t.execCallback('onchange_callback',t,l);});}if(s.convert_newlines_to_brs){t.onBeforeSetContent.add(function(ed,o){if(o.initial)o.content=o.content.replace(/\r?\n/g,'<br />');});}if(s.fix_nesting&&isIE){t.onBeforeSetContent.add(function(ed,o){o.content=t._fixNesting(o.content);});}if(s.preformatted){t.onPostProcess.add(function(ed,o){o.content=o.content.replace(/^\s*<pre.*?>/,'');o.content=o.content.replace(/<\/pre>\s*$/,'');if(o.set)o.content='<pre class="mceItemHidden">'+o.content+'</pre>';});}if(s.verify_css_classes){t.serializer.attribValueFilter=function(n,v){var s,cl;if(n=='class'){if(!t.classesRE){cl=t.dom.getClasses();if(cl.length>0){s='';each(cl,function(o){s+=(s?'|':'')+o['class'];});t.classesRE=new RegExp('('+s+')','gi');}}return!t.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(v)||t.classesRE.test(v)?v:'';}return v;};}if(s.convert_fonts_to_spans)t._convertFonts();if(s.inline_styles)t._convertInlineElements();if(s.cleanup_callback){t.onBeforeSetContent.add(function(ed,o){o.content=t.execCallback('cleanup_callback','insert_to_editor',o.content,o);});t.onPreProcess.add(function(ed,o){if(o.set)t.execCallback('cleanup_callback','insert_to_editor_dom',o.node,o);if(o.get)t.execCallback('cleanup_callback','get_from_editor_dom',o.node,o);});t.onPostProcess.add(function(ed,o){if(o.set)o.content=t.execCallback('cleanup_callback','insert_to_editor',o.content,o);if(o.get)o.content=t.execCallback('cleanup_callback','get_from_editor',o.content,o);});}if(s.save_callback){t.onGetContent.add(function(ed,o){if(o.save)o.content=t.execCallback('save_callback',t.id,o.content,t.getBody());});}if(s.handle_event_callback){t.onEvent.add(function(ed,e,o){if(t.execCallback('handle_event_callback',e,ed,o)===false)Event.cancel(e);});}t.onSetContent.add(function(){t.addVisual(t.getBody());});if(s.padd_empty_editor){t.onPostProcess.add(function(ed,o){o.content=o.content.replace(/^(<p>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,'');});}if(isGecko){try{d.designMode='Off';d.designMode='On';}catch(ex){}}setTimeout(function(){if(t.removed)return;t.load({initial:true,format:(s.cleanup_on_startup?'html':'raw')});t.startContent=t.getContent({format:'raw'});t.undoManager.add({initial:true});t.initialized=true;t.onInit.dispatch(t);t.execCallback('setupcontent_callback',t.id,t.getBody(),t.getDoc());t.execCallback('init_instance_callback',t);t.focus(true);t.nodeChanged({initial:1});if(s.content_css){tinymce.each(explode(s.content_css),function(u){t.dom.loadCSS(t.documentBaseURI.toAbsolute(u));});}if(s.auto_focus){setTimeout(function(){var ed=EditorManager.get(s.auto_focus);ed.selection.select(ed.getBody(),1);ed.selection.collapse(1);ed.getWin().focus();},100);}},1);e=null;},focus:function(sf){var oed,t=this,ce=t.settings.content_editable;if(!sf){if(!ce&&(!isIE||t.selection.getNode().ownerDocument!=t.getDoc()))t.getWin().focus();}if(EditorManager.activeEditor!=t){if((oed=EditorManager.activeEditor)!=null)oed.onDeactivate.dispatch(oed,t);t.onActivate.dispatch(t,oed);}EditorManager._setActive(t);},execCallback:function(n){var t=this,f=t.settings[n],s;if(!f)return;if(t.callbackLookup&&(s=t.callbackLookup[n])){f=s.func;s=s.scope;}if(is(f,'string')){s=f.replace(/\.\w+$/,'');s=s?tinymce.resolve(s):0;f=tinymce.resolve(f);t.callbackLookup=t.callbackLookup||{};t.callbackLookup[n]={func:f,scope:s};}return f.apply(s||t,Array.prototype.slice.call(arguments,1));},translate:function(s){var c=this.settings.language,i18n=EditorManager.i18n;if(!s)return'';return i18n[c+'.'+s]||s.replace(/{\#([^}]+)\}/g,function(a,b){return i18n[c+'.'+b]||'{#'+b+'}';});},getLang:function(n,dv){return EditorManager.i18n[this.settings.language+'.'+n]||(is(dv)?dv:'{#'+n+'}');},getParam:function(n,dv,ty){var tr=tinymce.trim,v=is(this.settings[n])?this.settings[n]:dv,o;if(ty==='hash'){o={};if(is(v,'string')){each(v.indexOf('=')>0?v.split(/[;,](?![^=;,]*(?:[;,]|$))/):v.split(','),function(v){v=v.split('=');if(v.length>1)o[tr(v[0])]=tr(v[1]);else o[tr(v[0])]=tr(v);});}else o=v;return o;}return v;},nodeChanged:function(o){var t=this,s=t.selection,n=s.getNode()||t.getBody();if(t.initialized){t.onNodeChange.dispatch(t,o?o.controlManager||t.controlManager:t.controlManager,isIE&&n.ownerDocument!=t.getDoc()?t.getBody():n,s.isCollapsed(),o);}},addButton:function(n,s){var t=this;t.buttons=t.buttons||{};t.buttons[n]=s;},addCommand:function(n,f,s){this.execCommands[n]={func:f,scope:s||this};},addQueryStateHandler:function(n,f,s){this.queryStateCommands[n]={func:f,scope:s||this};},addQueryValueHandler:function(n,f,s){this.queryValueCommands[n]={func:f,scope:s||this};},addShortcut:function(pa,desc,cmd_func,sc){var t=this,c;if(!t.settings.custom_shortcuts)return false;t.shortcuts=t.shortcuts||{};if(is(cmd_func,'string')){c=cmd_func;cmd_func=function(){t.execCommand(c,false,null);};}if(is(cmd_func,'object')){c=cmd_func;cmd_func=function(){t.execCommand(c[0],c[1],c[2]);};}each(explode(pa),function(pa){var o={func:cmd_func,scope:sc||this,desc:desc,alt:false,ctrl:false,shift:false};each(explode(pa,'+'),function(v){switch(v){case'alt':case'ctrl':case'shift':o[v]=true;break;default:o.charCode=v.charCodeAt(0);o.keyCode=v.toUpperCase().charCodeAt(0);}});t.shortcuts[(o.ctrl?'ctrl':'')+','+(o.alt?'alt':'')+','+(o.shift?'shift':'')+','+o.keyCode]=o;});return true;},execCommand:function(cmd,ui,val,a){var t=this,s=0,o,st;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(cmd)&&(!a||!a.skip_focus))t.focus();o={};t.onBeforeExecCommand.dispatch(t,cmd,ui,val,o);if(o.terminate)return false;if(t.execCallback('execcommand_callback',t.id,t.selection.getNode(),cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}if(o=t.execCommands[cmd]){st=o.func.call(o.scope,ui,val);if(st!==true){t.onExecCommand.dispatch(t,cmd,ui,val,a);return st;}}each(t.plugins,function(p){if(p.execCommand&&p.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);s=1;return false;}});if(s)return true;if(t.theme.execCommand&&t.theme.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}if(t.editorCommands.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}t.getDoc().execCommand(cmd,ui,val);t.onExecCommand.dispatch(t,cmd,ui,val,a);},queryCommandState:function(c){var t=this,o,s;if(t._isHidden())return;if(o=t.queryStateCommands[c]){s=o.func.call(o.scope);if(s!==true)return s;}o=t.editorCommands.queryCommandState(c);if(o!==-1)return o;try{return this.getDoc().queryCommandState(c);}catch(ex){}},queryCommandValue:function(c){var t=this,o,s;if(t._isHidden())return;if(o=t.queryValueCommands[c]){s=o.func.call(o.scope);if(s!==true)return s;}o=t.editorCommands.queryCommandValue(c);if(is(o))return o;try{return this.getDoc().queryCommandValue(c);}catch(ex){}},show:function(){var t=this;DOM.show(t.getContainer());DOM.hide(t.id);t.load();},hide:function(){var t=this,d=t.getDoc();if(isIE&&d)d.execCommand('SelectAll');t.save();DOM.hide(t.getContainer());DOM.setStyle(t.id,'display',t.orgDisplay);},isHidden:function(){return!DOM.isHidden(this.id);},setProgressState:function(b,ti,o){this.onSetProgressState.dispatch(this,b,ti,o);return b;},resizeToContent:function(){var t=this;DOM.setStyle(t.id+"_ifr",'height',t.getBody().scrollHeight);},load:function(o){var t=this,e=t.getElement(),h;o=o||{};o.load=true;h=t.setContent(is(e.value)?e.value:e.innerHTML,o);o.element=e;if(!o.no_events)t.onLoadContent.dispatch(t,o);o.element=e=null;return h;},save:function(o){var t=this,e=t.getElement(),h,f;if(!t.initialized)return;o=o||{};o.save=true;if(!o.no_events){t.undoManager.typing=0;t.undoManager.add();}o.element=e;h=o.content=t.getContent(o);if(!o.no_events)t.onSaveContent.dispatch(t,o);h=o.content;if(!/TEXTAREA|INPUT/i.test(e.nodeName)){e.innerHTML=h;if(f=DOM.getParent(t.id,'form')){each(f.elements,function(e){if(e.name==t.id){e.value=h;return false;}});}}else e.value=h;o.element=e=null;return h;},setContent:function(h,o){var t=this;o=o||{};o.format=o.format||'html';o.set=true;o.content=h;if(!o.no_events)t.onBeforeSetContent.dispatch(t,o);if(!tinymce.isIE&&(h.length===0||/^\s+$/.test(h))){o.content=t.dom.setHTML(t.getBody(),'<br mce_bogus="1" />');o.format='raw';}o.content=t.dom.setHTML(t.getBody(),tinymce.trim(o.content));if(o.format!='raw'&&t.settings.cleanup){o.getInner=true;o.content=t.dom.setHTML(t.getBody(),t.serializer.serialize(t.getBody(),o));}if(!o.no_events)t.onSetContent.dispatch(t,o);return o.content;},getContent:function(o){var t=this,h;o=o||{};o.format=o.format||'html';o.get=true;if(!o.no_events)t.onBeforeGetContent.dispatch(t,o);if(o.format!='raw'&&t.settings.cleanup){o.getInner=true;h=t.serializer.serialize(t.getBody(),o);}else h=t.getBody().innerHTML;h=h.replace(/^\s*|\s*$/g,'');o.content=h;if(!o.no_events)t.onGetContent.dispatch(t,o);return o.content;},isDirty:function(){var t=this;return tinymce.trim(t.startContent)!=tinymce.trim(t.getContent({format:'raw',no_events:1}))&&!t.isNotDirty;},getContainer:function(){var t=this;if(!t.container)t.container=DOM.get(t.editorContainer||t.id+'_parent');return t.container;},getContentAreaContainer:function(){return this.contentAreaContainer;},getElement:function(){return DOM.get(this.settings.content_element||this.id);},getWin:function(){var t=this,e;if(!t.contentWindow){e=DOM.get(t.id+"_ifr");if(e)t.contentWindow=e.contentWindow;}return t.contentWindow;},getDoc:function(){var t=this,w;if(!t.contentDocument){w=t.getWin();if(w)t.contentDocument=w.document;}return t.contentDocument;},getBody:function(){return this.bodyElement||this.getDoc().body;},convertURL:function(u,n,e){var t=this,s=t.settings;if(s.urlconverter_callback)return t.execCallback('urlconverter_callback',u,e,true,n);if(!s.convert_urls||(e&&e.nodeName=='LINK')||u.indexOf('file:')===0)return u;if(s.relative_urls)return t.documentBaseURI.toRelative(u);u=t.documentBaseURI.toAbsolute(u,s.remove_script_host);return u;},addVisual:function(e){var t=this,s=t.settings;e=e||t.getBody();if(!is(t.hasVisual))t.hasVisual=s.visual;each(t.dom.select('table,a',e),function(e){var v;switch(e.nodeName){case'TABLE':v=t.dom.getAttrib(e,'border');if(!v||v=='0'){if(t.hasVisual)t.dom.addClass(e,s.visual_table_class);else t.dom.removeClass(e,s.visual_table_class);}return;case'A':v=t.dom.getAttrib(e,'name');if(v){if(t.hasVisual)t.dom.addClass(e,'mceItemAnchor');else t.dom.removeClass(e,'mceItemAnchor');}return;}});t.onVisualAid.dispatch(t,e,t.hasVisual);},remove:function(){var t=this,e=t.getContainer();t.removed=1;t.hide();t.execCallback('remove_instance_callback',t);t.onRemove.dispatch(t);t.onExecCommand.listeners=[];EditorManager.remove(t);DOM.remove(e);},destroy:function(s){var t=this;if(t.destroyed)return;if(!s){tinymce.removeUnload(t.destroy);tinyMCE.onBeforeUnload.remove(t._beforeUnload);if(t.theme.destroy)t.theme.destroy();t.controlManager.destroy();t.selection.destroy();t.dom.destroy();if(!t.settings.content_editable){Event.clear(t.getWin());Event.clear(t.getDoc());}Event.clear(t.getBody());Event.clear(t.formElement);}if(t.formElement){t.formElement.submit=t.formElement._mceOldSubmit;t.formElement._mceOldSubmit=null;}t.contentAreaContainer=t.formElement=t.container=t.settings.content_element=t.bodyElement=t.contentDocument=t.contentWindow=null;if(t.selection)t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null;t.destroyed=1;},_addEvents:function(){var t=this,i,s=t.settings,lo={mouseup:'onMouseUp',mousedown:'onMouseDown',click:'onClick',keyup:'onKeyUp',keydown:'onKeyDown',keypress:'onKeyPress',submit:'onSubmit',reset:'onReset',contextmenu:'onContextMenu',dblclick:'onDblClick',paste:'onPaste'};function eventHandler(e,o){var ty=e.type;if(t.removed)return;if(t.onEvent.dispatch(t,e,o)!==false){t[lo[e.fakeType||e.type]].dispatch(t,e,o);}};each(lo,function(v,k){switch(k){case'contextmenu':if(tinymce.isOpera){Event.add(t.getBody(),'mousedown',function(e){if(e.ctrlKey){e.fakeType='contextmenu';eventHandler(e);}});}else Event.add(t.getBody(),k,eventHandler);break;case'paste':Event.add(t.getBody(),k,function(e){var tx,h,el,r;if(e.clipboardData)tx=e.clipboardData.getData('text/plain');else if(tinymce.isIE)tx=t.getWin().clipboardData.getData('Text');eventHandler(e,{text:tx,html:h});});break;case'submit':case'reset':Event.add(t.getElement().form||DOM.getParent(t.id,'form'),k,eventHandler);break;default:Event.add(s.content_editable?t.getBody():t.getDoc(),k,eventHandler);}});Event.add(s.content_editable?t.getBody():(isGecko?t.getDoc():t.getWin()),'focus',function(e){t.focus(true);});if(tinymce.isGecko){Event.add(t.getDoc(),'DOMNodeInserted',function(e){var v;e=e.target;if(e.nodeType===1&&e.nodeName==='IMG'&&(v=e.getAttribute('mce_src')))e.src=t.documentBaseURI.toAbsolute(v);});}if(isGecko){function setOpts(){var t=this,d=t.getDoc(),s=t.settings;if(isGecko){if(t._isHidden()){try{if(!s.content_editable)d.designMode='On';}catch(ex){}}try{d.execCommand("styleWithCSS",0,false);}catch(ex){if(!t._isHidden())try{d.execCommand("useCSS",0,true);}catch(ex){}}if(!s.table_inline_editing)try{d.execCommand('enableInlineTableEditing',false,false);}catch(ex){}if(!s.object_resizing)try{d.execCommand('enableObjectResizing',false,false);}catch(ex){}}};t.onBeforeExecCommand.add(setOpts);t.onMouseDown.add(setOpts);}t.onMouseUp.add(t.nodeChanged);t.onClick.add(t.nodeChanged);t.onKeyUp.add(function(ed,e){if((e.keyCode>=33&&e.keyCode<=36)||(e.keyCode>=37&&e.keyCode<=40)||e.keyCode==13||e.keyCode==45||e.keyCode==46||e.keyCode==8||e.ctrlKey)t.nodeChanged();});t.onReset.add(function(){t.setContent(t.startContent,{format:'raw'});});if(t.getParam('tab_focus')){function tabCancel(ed,e){if(e.keyCode===9)return Event.cancel(e);};function tabHandler(ed,e){var x,i,f,el,v;function find(d){f=DOM.getParent(ed.id,'form');el=f.elements;if(f){each(el,function(e,i){if(e.id==ed.id){x=i;return false;}});if(d>0){for(i=x+1;i<el.length;i++){if(el[i].type!='hidden')return el[i];}}else{for(i=x-1;i>=0;i--){if(el[i].type!='hidden')return el[i];}}}return null;};if(e.keyCode===9){v=explode(ed.getParam('tab_focus'));if(v.length==1){v[1]=v[0];v[0]=':prev';}if(e.shiftKey){if(v[0]==':prev')el=find(-1);else el=DOM.get(v[0]);}else{if(v[1]==':next')el=find(1);else el=DOM.get(v[1]);}if(el){if(ed=EditorManager.get(el.id||el.name))ed.focus();else window.setTimeout(function(){window.focus();el.focus();},10);return Event.cancel(e);}}};t.onKeyUp.add(tabCancel);if(isGecko){t.onKeyPress.add(tabHandler);t.onKeyDown.add(tabCancel);}else t.onKeyDown.add(tabHandler);}if(s.custom_shortcuts){if(s.custom_undo_redo_keyboard_shortcuts){t.addShortcut('ctrl+z',t.getLang('undo_desc'),'Undo');t.addShortcut('ctrl+y',t.getLang('redo_desc'),'Redo');}if(isGecko){t.addShortcut('ctrl+b',t.getLang('bold_desc'),'Bold');t.addShortcut('ctrl+i',t.getLang('italic_desc'),'Italic');t.addShortcut('ctrl+u',t.getLang('underline_desc'),'Underline');}for(i=1;i<=6;i++)t.addShortcut('ctrl+'+i,'',['FormatBlock',false,'<h'+i+'>']);t.addShortcut('ctrl+7','',['FormatBlock',false,'<p>']);t.addShortcut('ctrl+8','',['FormatBlock',false,'<div>']);t.addShortcut('ctrl+9','',['FormatBlock',false,'<address>']);function find(e){var v=null;if(!e.altKey&&!e.ctrlKey&&!e.metaKey)return v;each(t.shortcuts,function(o){if(o.ctrl!=e.ctrlKey&&(!tinymce.isMac||o.ctrl==e.metaKey))return;if(o.alt!=e.altKey)return;if(o.shift!=e.shiftKey)return;if(e.keyCode==o.keyCode||(e.charCode&&e.charCode==o.charCode)){v=o;return false;}});return v;};t.onKeyUp.add(function(ed,e){var o=find(e);if(o)return Event.cancel(e);});t.onKeyPress.add(function(ed,e){var o=find(e);if(o)return Event.cancel(e);});t.onKeyDown.add(function(ed,e){var o=find(e);if(o){o.func.call(o.scope);return Event.cancel(e);}});}if(tinymce.isIE){Event.add(t.getDoc(),'controlselect',function(e){var re=t.resizeInfo,cb;e=e.target;if(e.nodeName!=='IMG')return;if(re)Event.remove(re.node,re.ev,re.cb);if(!t.dom.hasClass(e,'mceItemNoResize')){ev='resizeend';cb=Event.add(e,ev,function(e){var v;e=e.target;if(v=t.dom.getStyle(e,'width')){t.dom.setAttrib(e,'width',v.replace(/[^0-9%]+/g,''));t.dom.setStyle(e,'width','');}if(v=t.dom.getStyle(e,'height')){t.dom.setAttrib(e,'height',v.replace(/[^0-9%]+/g,''));t.dom.setStyle(e,'height','');}});}else{ev='resizestart';cb=Event.add(e,'resizestart',Event.cancel,Event);}re=t.resizeInfo={node:e,ev:ev,cb:cb};});t.onKeyDown.add(function(ed,e){switch(e.keyCode){case 8:if(t.selection.getRng().item){t.selection.getRng().item(0).removeNode();return Event.cancel(e);}}});}if(tinymce.isOpera){t.onClick.add(function(ed,e){Event.prevent(e);});}if(s.custom_undo_redo){function addUndo(){t.undoManager.typing=0;t.undoManager.add();};if(tinymce.isIE){Event.add(t.getWin(),'blur',function(e){var n;if(t.selection){n=t.selection.getNode();if(!t.removed&&n.ownerDocument&&n.ownerDocument!=t.getDoc())addUndo();}});}else{Event.add(t.getDoc(),'blur',function(){if(t.selection&&!t.removed)addUndo();});}t.onMouseDown.add(addUndo);t.onKeyUp.add(function(ed,e){if((e.keyCode>=33&&e.keyCode<=36)||(e.keyCode>=37&&e.keyCode<=40)||e.keyCode==13||e.keyCode==45||e.ctrlKey){t.undoManager.typing=0;t.undoManager.add();}});t.onKeyDown.add(function(ed,e){if((e.keyCode>=33&&e.keyCode<=36)||(e.keyCode>=37&&e.keyCode<=40)||e.keyCode==13||e.keyCode==45){if(t.undoManager.typing){t.undoManager.add();t.undoManager.typing=0;}return;}if(!t.undoManager.typing){t.undoManager.add();t.undoManager.typing=1;}});}},_convertInlineElements:function(){var t=this,s=t.settings,dom=t.dom,v,e,na,st,sp;function convert(ed,o){if(!s.inline_styles)return;if(o.get){each(t.dom.select('table,u,strike',o.node),function(n){switch(n.nodeName){case'TABLE':if(v=dom.getAttrib(n,'height')){dom.setStyle(n,'height',v);dom.setAttrib(n,'height','');}break;case'U':case'STRIKE':n.style.textDecoration=n.nodeName=='U'?'underline':'line-through';dom.setAttrib(n,'mce_style','');dom.setAttrib(n,'mce_name','span');break;}});}else if(o.set){each(t.dom.select('table,span',o.node).reverse(),function(n){if(n.nodeName=='TABLE'){if(v=dom.getStyle(n,'height'))dom.setAttrib(n,'height',v.replace(/[^0-9%]+/g,''));}else{if(n.style.textDecoration=='underline')na='u';else if(n.style.textDecoration=='line-through')na='strike';else na='';if(na){n.style.textDecoration='';dom.setAttrib(n,'mce_style','');e=dom.create(na,{style:dom.getAttrib(n,'style')});dom.replace(e,n,1);}}});}};t.onPreProcess.add(convert);if(!s.cleanup_on_startup){t.onSetContent.add(function(ed,o){if(o.initial)convert(t,{node:t.getBody(),set:1});});}},_convertFonts:function(){var t=this,s=t.settings,dom=t.dom,fz,fzn,sl,cl;if(!s.inline_styles)return;fz=[8,10,12,14,18,24,36];fzn=['xx-small','x-small','small','medium','large','x-large','xx-large'];if(sl=s.font_size_style_values)sl=explode(sl);if(cl=s.font_size_classes)cl=explode(cl);function convertToFonts(no){var n,f,nl,x,i,v,st;if(tinymce.isWebKit||!s.inline_styles)return;nl=t.dom.select('span',no);for(x=nl.length-1;x>=0;x--){n=nl[x];f=dom.create('font',{color:dom.toHex(dom.getStyle(n,'color')),face:dom.getStyle(n,'fontFamily'),style:dom.getAttrib(n,'style'),'class':dom.getAttrib(n,'class')});st=f.style;if(st.color||st.fontFamily){st.color=st.fontFamily='';dom.setAttrib(f,'mce_style','');}if(sl){i=inArray(sl,dom.getStyle(n,'fontSize'));if(i!=-1){dom.setAttrib(f,'size',''+(i+1||1));}}else if(cl){i=inArray(cl,dom.getAttrib(n,'class'));v=dom.getStyle(n,'fontSize');if(i==-1&&v.indexOf('pt')>0)i=inArray(fz,parseInt(v));if(i==-1)i=inArray(fzn,v);if(i!=-1){dom.setAttrib(f,'size',''+(i+1||1));f.style.fontSize='';}}if(f.color||f.face||f.size){f.style.fontFamily='';dom.setAttrib(f,'mce_style','');dom.replace(f,n,1);}f=n=null;}};t.onSetContent.add(function(ed,o){convertToFonts(ed.getBody());});t.onPreProcess.add(function(ed,o){var n,sp,nl,x;if(!s.inline_styles)return;if(o.get){nl=t.dom.select('font',o.node);for(x=nl.length-1;x>=0;x--){n=nl[x];sp=dom.create('span',{style:dom.getAttrib(n,'style'),'class':dom.getAttrib(n,'class')});dom.setStyles(sp,{fontFamily:dom.getAttrib(n,'face'),color:dom.getAttrib(n,'color'),backgroundColor:n.style.backgroundColor});if(n.size){if(sl)dom.setStyle(sp,'fontSize',sl[parseInt(n.size)-1]);else dom.setAttrib(sp,'class',cl[parseInt(n.size)-1]);}dom.setAttrib(sp,'mce_style','');dom.replace(sp,n,1);}}});},_isHidden:function(){var s;if(!isGecko)return 0;s=this.selection.getSel();return(!s||!s.rangeCount||s.rangeCount==0);},_fixNesting:function(s){var d=[],i;s=s.replace(/<(\/)?([^\s>]+)[^>]*?>/g,function(a,b,c){var e;if(b==='/'){if(!d.length)return'';if(c!==d[d.length-1].tag){for(i=d.length-1;i>=0;i--){if(d[i].tag===c){d[i].close=1;break;}}return'';}else{d.pop();if(d.length&&d[d.length-1].close){a=a+'</'+d[d.length-1].tag+'>';d.pop();}}}else{if(/^(br|hr|input|meta|img|link|param)$/i.test(c))return a;if(/\/>$/.test(a))return a;d.push({tag:c});}return a;});for(i=d.length-1;i>=0;i--)s+='</'+d[i].tag+'>';return s;}});})();(function(){var each=tinymce.each,isIE=tinymce.isIE,isGecko=tinymce.isGecko,isOpera=tinymce.isOpera,isWebKit=tinymce.isWebKit;tinymce.create('tinymce.EditorCommands',{EditorCommands:function(ed){this.editor=ed;},execCommand:function(cmd,ui,val){var t=this,ed=t.editor,f;switch(cmd){case'Cut':case'Copy':case'Paste':try{ed.getDoc().execCommand(cmd,ui,val);}catch(ex){if(isGecko){ed.windowManager.confirm(ed.getLang('clipboard_msg'),function(s){if(s)window.open('http://www.mozilla.org/editor/midasdemo/securityprefs.html','mceExternal');});}else ed.windowManager.alert(ed.getLang('clipboard_no_support'));}return true;case'mceResetDesignMode':case'mceBeginUndoLevel':return true;case'unlink':t.UnLink();return true;case'JustifyLeft':case'JustifyCenter':case'JustifyRight':case'JustifyFull':t.mceJustify(cmd,cmd.substring(7).toLowerCase());return true;case'mceEndUndoLevel':case'mceAddUndoLevel':ed.undoManager.add();return true;default:f=this[cmd];if(f){f.call(this,ui,val);return true;}}return false;},Indent:function(){var ed=this.editor,d=ed.dom,s=ed.selection,e,iv,iu;iv=ed.settings.indentation;iu=/[a-z%]+$/i.exec(iv);iv=parseInt(iv);if(ed.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){each(this._getSelectedBlocks(),function(e){d.setStyle(e,'paddingLeft',(parseInt(e.style.paddingLeft||0)+iv)+iu);});return;}ed.getDoc().execCommand('Indent',false,null);if(isIE){d.getParent(s.getNode(),function(n){if(n.nodeName=='BLOCKQUOTE'){n.dir=n.style.cssText='';}});}},Outdent:function(){var ed=this.editor,d=ed.dom,s=ed.selection,e,v,iv,iu;iv=ed.settings.indentation;iu=/[a-z%]+$/i.exec(iv);iv=parseInt(iv);if(ed.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){each(this._getSelectedBlocks(),function(e){v=Math.max(0,parseInt(e.style.paddingLeft||0)-iv);d.setStyle(e,'paddingLeft',v?v+iu:'');});return;}ed.getDoc().execCommand('Outdent',false,null);},mceSetAttribute:function(u,v){var ed=this.editor,d=ed.dom,e;if(e=d.getParent(ed.selection.getNode(),d.isBlock))d.setAttrib(e,v.name,v.value);},mceSetContent:function(u,v){this.editor.setContent(v);},mceToggleVisualAid:function(){var ed=this.editor;ed.hasVisual=!ed.hasVisual;ed.addVisual();},mceReplaceContent:function(u,v){var s=this.editor.selection;s.setContent(v.replace(/\{\$selection\}/g,s.getContent({format:'text'})));},mceInsertLink:function(u,v){var ed=this.editor,s=ed.selection,e=ed.dom.getParent(s.getNode(),'A');if(tinymce.is(v,'string'))v={href:v};function set(e){each(v,function(v,k){ed.dom.setAttrib(e,k,v);});};if(!e){ed.execCommand('CreateLink',false,'javascript:mctmp(0);');each(ed.dom.select('a'),function(e){if(e.href=='javascript:mctmp(0);')set(e);});}else{if(v.href)set(e);else ed.dom.remove(e,1);}},UnLink:function(){var ed=this.editor,s=ed.selection;if(s.isCollapsed())s.select(s.getNode());ed.getDoc().execCommand('unlink',false,null);s.collapse(0);},FontName:function(u,v){var t=this,ed=t.editor,s=ed.selection,e;if(!v){if(s.isCollapsed())s.select(s.getNode());t.RemoveFormat();}else ed.getDoc().execCommand('FontName',false,v);},FontSize:function(u,v){var ed=this.editor,s=ed.settings,fz=tinymce.explode(s.font_size_style_values),fzc=tinymce.explode(s.font_size_classes),h,bm;each(ed.dom.select('font'),function(e){e.style.fontSize='';});ed.getDoc().execCommand('FontSize',false,v);if(s.inline_styles){each(ed.dom.select('font'),function(e){if(e.parentNode.nodeName=='FONT'&&e.size==e.parentNode.size){if(!bm)bm=ed.selection.getBookmark();ed.dom.remove(e,1);return;}if(v=e.size){if(fzc&&fzc.length>0)ed.dom.setAttrib(e,'class',fzc[parseInt(v)-1]);else ed.dom.setStyle(e,'fontSize',fz[parseInt(v)-1]);}});}ed.selection.moveToBookmark(bm);},queryCommandValue:function(c){var f=this['queryValue'+c];if(f)return f.call(this,c);return false;},queryCommandState:function(cmd){var f;switch(cmd){case'JustifyLeft':case'JustifyCenter':case'JustifyRight':case'JustifyFull':return this.queryStateJustify(cmd,cmd.substring(7).toLowerCase());default:if(f=this['queryState'+cmd])return f.call(this,cmd);}return-1;},_queryState:function(c){try{return this.editor.getDoc().queryCommandState(c);}catch(ex){}},_queryVal:function(c){try{return this.editor.getDoc().queryCommandValue(c);}catch(ex){}},queryValueFontSize:function(){var ed=this.editor,v=0,p;if(isOpera||isWebKit){if(p=ed.dom.getParent(ed.selection.getNode(),'FONT'))v=p.size;return v;}return this._queryVal('FontSize');},queryValueFontName:function(){var ed=this.editor,v=0,p;if(p=ed.dom.getParent(ed.selection.getNode(),'FONT'))v=p.face;if(!v)v=this._queryVal('FontName');return v;},mceJustify:function(c,v){var ed=this.editor,se=ed.selection,n=se.getNode(),nn=n.nodeName,bl,nb,dom=ed.dom,rm;if(ed.settings.inline_styles&&this.queryStateJustify(c,v))rm=1;bl=dom.getParent(n,ed.dom.isBlock);if(nn=='IMG'){if(v=='full')return;if(rm){if(v=='center')dom.setStyle(n.parentNode,'textAlign','');dom.setStyle(n,'float','');this.mceRepaint();return;}if(v=='center'){if(/^(TD|TH)$/.test(bl.nodeName))bl=0;if(!bl||bl.childNodes.length>1){nb=dom.create('p');nb.appendChild(n.cloneNode(false));if(bl)dom.insertAfter(nb,bl);else dom.insertAfter(nb,n);dom.remove(n);n=nb.firstChild;bl=nb;}dom.setStyle(bl,'textAlign',v);dom.setStyle(n,'float','');}else{dom.setStyle(n,'float',v);dom.setStyle(n.parentNode,'textAlign','');}this.mceRepaint();return;}if(ed.settings.inline_styles&&ed.settings.forced_root_block){if(rm)v='';each(this._getSelectedBlocks(dom.getParent(se.getStart(),dom.isBlock),dom.getParent(se.getEnd(),dom.isBlock)),function(e){dom.setAttrib(e,'align','');dom.setStyle(e,'textAlign',v=='full'?'justify':v);});return;}else if(!rm)ed.getDoc().execCommand(c,false,null);if(ed.settings.inline_styles){if(rm){dom.getParent(ed.selection.getNode(),function(n){if(n.style&&n.style.textAlign)dom.setStyle(n,'textAlign','');});return;}each(dom.select('*'),function(n){var v=n.align;if(v){if(v=='full')v='justify';dom.setStyle(n,'textAlign',v);dom.setAttrib(n,'align','');}});}},mceSetCSSClass:function(u,v){this.mceSetStyleInfo(0,{command:'setattrib',name:'class',value:v});},getSelectedElement:function(){var t=this,ed=t.editor,dom=ed.dom,se=ed.selection,r=se.getRng(),r1,r2,sc,ec,so,eo,e,sp,ep,re;if(se.isCollapsed()||r.item)return se.getNode();re=ed.settings.merge_styles_invalid_parents;if(tinymce.is(re,'string'))re=new RegExp(re,'i');if(isIE){r1=r.duplicate();r1.collapse(true);sc=r1.parentElement();r2=r.duplicate();r2.collapse(false);ec=r2.parentElement();if(sc!=ec){r1.move('character',1);sc=r1.parentElement();}if(sc==ec){r1=r.duplicate();r1.moveToElementText(sc);if(r1.compareEndPoints('StartToStart',r)==0&&r1.compareEndPoints('EndToEnd',r)==0)return re&&re.test(sc.nodeName)?null:sc;}}else{function getParent(n){return dom.getParent(n,function(n){return n.nodeType==1;});};sc=r.startContainer;ec=r.endContainer;so=r.startOffset;eo=r.endOffset;if(!r.collapsed){if(sc==ec){if(so-eo<2){if(sc.hasChildNodes()){sp=sc.childNodes[so];return re&&re.test(sp.nodeName)?null:sp;}}}}if(sc.nodeType!=3||ec.nodeType!=3)return null;if(so==0){sp=getParent(sc);if(sp&&sp.firstChild!=sc)sp=null;}if(so==sc.nodeValue.length){e=sc.nextSibling;if(e&&e.nodeType==1)sp=sc.nextSibling;}if(eo==0){e=ec.previousSibling;if(e&&e.nodeType==1)ep=e;}if(eo==ec.nodeValue.length){ep=getParent(ec);if(ep&&ep.lastChild!=ec)ep=null;}if(sp==ep)return re&&sp&&re.test(sp.nodeName)?null:sp;}return null;},InsertHorizontalRule:function(){if(isGecko||isIE)this.editor.selection.setContent('<hr />');else this.editor.getDoc().execCommand('InsertHorizontalRule',false,'');},RemoveFormat:function(){var t=this,ed=t.editor,s=ed.selection,b;if(isWebKit)s.setContent(s.getContent({format:'raw'}).replace(/(<(span|b|i|strong|em|strike) [^>]+>|<(span|b|i|strong|em|strike)>|<\/(span|b|i|strong|em|strike)>|)/g,''),{format:'raw'});else ed.getDoc().execCommand('RemoveFormat',false,null);t.mceSetStyleInfo(0,{command:'removeformat'});ed.addVisual();},mceSetStyleInfo:function(u,v){var t=this,ed=t.editor,d=ed.getDoc(),dom=ed.dom,e,b,s=ed.selection,nn=v.wrapper||'span',b=s.getBookmark(),re;function set(n,e){if(n.nodeType==1){switch(v.command){case'setattrib':return dom.setAttrib(n,v.name,v.value);case'setstyle':return dom.setStyle(n,v.name,v.value);case'removeformat':return dom.setAttrib(n,'class','');}}};re=ed.settings.merge_styles_invalid_parents;if(tinymce.is(re,'string'))re=new RegExp(re,'i');if(e=t.getSelectedElement())set(e,1);else{d.execCommand('FontName',false,'__');each(isWebKit?dom.select('span'):dom.select('font'),function(n){var sp,e;if(dom.getAttrib(n,'face')=='__'||n.style.fontFamily==='__'){sp=dom.create(nn,{mce_new:'1'});set(sp);each(n.childNodes,function(n){sp.appendChild(n.cloneNode(true));});dom.replace(sp,n);}});}each(dom.select(nn).reverse(),function(n){var p=n.parentNode;if(!dom.getAttrib(n,'mce_new')){p=dom.getParent(n,function(n){return n.nodeType==1&&dom.getAttrib(n,'mce_new');});if(p)dom.remove(n,1);}});each(dom.select(nn).reverse(),function(n){var p=n.parentNode;if(!p||!dom.getAttrib(n,'mce_new'))return;if(p.nodeName==nn.toUpperCase()&&p.childNodes.length==1)return dom.remove(p,1);if(n.nodeType==1&&(!re||!re.test(p.nodeName))&&p.childNodes.length==1){set(p);dom.setAttrib(n,'class','');}});each(dom.select(nn).reverse(),function(n){if(dom.getAttrib(n,'mce_new')||(dom.getAttribs(n).length<=1&&n.className==='')){if(!dom.getAttrib(n,'class')&&!dom.getAttrib(n,'style'))return dom.remove(n,1);dom.setAttrib(n,'mce_new','');}});s.moveToBookmark(b);},queryStateJustify:function(c,v){var ed=this.editor,n=ed.selection.getNode(),dom=ed.dom;if(n&&n.nodeName=='IMG'){if(dom.getStyle(n,'float')==v)return 1;return n.parentNode.style.textAlign==v;}n=dom.getParent(ed.selection.getStart(),function(n){return n.nodeType==1&&n.style.textAlign;});if(v=='full')v='justify';if(ed.settings.inline_styles)return(n&&n.style.textAlign==v);return this._queryState(c);},HiliteColor:function(ui,val){var t=this,ed=t.editor,d=ed.getDoc();function set(s){if(!isGecko)return;try{d.execCommand("styleWithCSS",0,s);}catch(ex){d.execCommand("useCSS",0,!s);}};if(isGecko||isOpera){set(true);d.execCommand('hilitecolor',false,val);set(false);}else d.execCommand('BackColor',false,val);},Undo:function(){var ed=this.editor;if(ed.settings.custom_undo_redo){ed.undoManager.undo();ed.nodeChanged();}else ed.getDoc().execCommand('Undo',false,null);},Redo:function(){var ed=this.editor;if(ed.settings.custom_undo_redo){ed.undoManager.redo();ed.nodeChanged();}else ed.getDoc().execCommand('Redo',false,null);},FormatBlock:function(ui,val){var t=this,ed=t.editor,s=ed.selection,dom=ed.dom,bl,nb,b;function isBlock(n){return/^(P|DIV|H[1-6]|ADDRESS|BLOCKQUOTE|PRE)$/.test(n.nodeName);};bl=dom.getParent(s.getNode(),function(n){return isBlock(n);});if(bl){if((isIE&&isBlock(bl.parentNode))||bl.nodeName=='DIV'){nb=ed.dom.create(val);each(dom.getAttribs(bl),function(v){dom.setAttrib(nb,v.nodeName,dom.getAttrib(bl,v.nodeName));});b=s.getBookmark();dom.replace(nb,bl,1);s.moveToBookmark(b);ed.nodeChanged();return;}}val=ed.settings.forced_root_block?(val||'<p>'):val;if(val.indexOf('<')==-1)val='<'+val+'>';if(tinymce.isGecko)val=val.replace(/<(div|blockquote|code|dt|dd|dl|samp)>/gi,'$1');ed.getDoc().execCommand('FormatBlock',false,val);},mceCleanup:function(){var ed=this.editor,s=ed.selection,b=s.getBookmark();ed.setContent(ed.getContent());s.moveToBookmark(b);},mceRemoveNode:function(ui,val){var ed=this.editor,s=ed.selection,b,n=val||s.getNode();if(n==ed.getBody())return;b=s.getBookmark();ed.dom.remove(n,1);s.moveToBookmark(b);ed.nodeChanged();},mceSelectNodeDepth:function(ui,val){var ed=this.editor,s=ed.selection,c=0;ed.dom.getParent(s.getNode(),function(n){if(n.nodeType==1&&c++==val){s.select(n);ed.nodeChanged();return false;}},ed.getBody());},mceSelectNode:function(u,v){this.editor.selection.select(v);},mceInsertContent:function(ui,val){this.editor.selection.setContent(val);},mceInsertRawHTML:function(ui,val){var ed=this.editor;ed.selection.setContent('tiny_mce_marker');ed.setContent(ed.getContent().replace(/tiny_mce_marker/g,val));},mceRepaint:function(){var s,b,e=this.editor;if(tinymce.isGecko){try{s=e.selection;b=s.getBookmark(true);if(s.getSel())s.getSel().selectAllChildren(e.getBody());s.collapse(true);s.moveToBookmark(b);}catch(ex){}}},queryStateUnderline:function(){var ed=this.editor,n=ed.selection.getNode();if(n&&n.nodeName=='A')return false;return this._queryState('Underline');},queryStateOutdent:function(){var ed=this.editor,n;if(ed.settings.inline_styles){if((n=ed.dom.getParent(ed.selection.getStart(),ed.dom.isBlock))&&parseInt(n.style.paddingLeft)>0)return true;if((n=ed.dom.getParent(ed.selection.getEnd(),ed.dom.isBlock))&&parseInt(n.style.paddingLeft)>0)return true;}else return!!ed.dom.getParent(ed.selection.getNode(),'BLOCKQUOTE');return this.queryStateInsertUnorderedList()||this.queryStateInsertOrderedList();},queryStateInsertUnorderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),'UL');},queryStateInsertOrderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),'OL');},queryStatemceBlockQuote:function(){return!!this.editor.dom.getParent(this.editor.selection.getStart(),function(n){return n.nodeName==='BLOCKQUOTE';});},mceBlockQuote:function(){var t=this,ed=t.editor,s=ed.selection,dom=ed.dom,sb,eb,n,bm,bq,r,bq2,i,nl;function getBQ(e){return dom.getParent(e,function(n){return n.nodeName==='BLOCKQUOTE';});};sb=dom.getParent(s.getStart(),dom.isBlock);eb=dom.getParent(s.getEnd(),dom.isBlock);if(bq=getBQ(sb)){if(sb!=eb||sb.childNodes.length>1||(sb.childNodes.length==1&&sb.firstChild.nodeName!='BR'))bm=s.getBookmark();if(getBQ(eb)){bq2=bq.cloneNode(false);while(n=eb.nextSibling)bq2.appendChild(n.parentNode.removeChild(n));}if(bq2)dom.insertAfter(bq2,bq);nl=t._getSelectedBlocks(sb,eb);for(i=nl.length-1;i>=0;i--){dom.insertAfter(nl[i],bq);}if(/^\s*$/.test(bq.innerHTML))dom.remove(bq,1);if(bq2&&/^\s*$/.test(bq2.innerHTML))dom.remove(bq2,1);if(!bm){if(!isIE){r=ed.getDoc().createRange();r.setStart(sb,0);r.setEnd(sb,0);s.setRng(r);}else{s.select(sb);s.collapse(0);if(dom.getParent(s.getStart(),dom.isBlock)!=sb){r=s.getRng();r.move('character',-1);r.select();}}}else t.editor.selection.moveToBookmark(bm);return;}if(isIE&&!sb&&!eb){t.editor.getDoc().execCommand('Indent');n=getBQ(s.getNode());n.style.margin=n.dir='';return;}if(!sb||!eb)return;if(sb!=eb||sb.childNodes.length>1||(sb.childNodes.length==1&&sb.firstChild.nodeName!='BR'))bm=s.getBookmark();each(t._getSelectedBlocks(getBQ(s.getStart()),getBQ(s.getEnd())),function(e){if(e.nodeName=='BLOCKQUOTE'&&!bq){bq=e;return;}if(!bq){bq=dom.create('blockquote');e.parentNode.insertBefore(bq,e);}if(e.nodeName=='BLOCKQUOTE'&&bq){n=e.firstChild;while(n){bq.appendChild(n.cloneNode(true));n=n.nextSibling;}dom.remove(e);return;}bq.appendChild(dom.remove(e));});if(!bm){if(!isIE){r=ed.getDoc().createRange();r.setStart(sb,0);r.setEnd(sb,0);s.setRng(r);}else{s.select(sb);s.collapse(1);}}else s.moveToBookmark(bm);},_getSelectedBlocks:function(st,en){var ed=this.editor,dom=ed.dom,s=ed.selection,sb,eb,n,bl=[];sb=dom.getParent(st||s.getStart(),dom.isBlock);eb=dom.getParent(en||s.getEnd(),dom.isBlock);if(sb)bl.push(sb);if(sb&&eb&&sb!=eb){n=sb;while((n=n.nextSibling)&&n!=eb){if(dom.isBlock(n))bl.push(n);}}if(eb&&sb!=eb)bl.push(eb);return bl;}});})();tinymce.create('tinymce.UndoManager',{index:0,data:null,typing:0,UndoManager:function(ed){var t=this,Dispatcher=tinymce.util.Dispatcher;t.editor=ed;t.data=[];t.onAdd=new Dispatcher(this);t.onUndo=new Dispatcher(this);t.onRedo=new Dispatcher(this);},add:function(l){var t=this,i,ed=t.editor,b,s=ed.settings,la;l=l||{};l.content=l.content||ed.getContent({format:'raw',no_events:1});l.content=l.content.replace(/^\s*|\s*$/g,'');la=t.data[t.index>0&&(t.index==0||t.index==t.data.length)?t.index-1:t.index];if(!l.initial&&la&&l.content==la.content)return null;if(s.custom_undo_redo_levels){if(t.data.length>s.custom_undo_redo_levels){for(i=0;i<t.data.length-1;i++)t.data[i]=t.data[i+1];t.data.length--;t.index=t.data.length;}}if(s.custom_undo_redo_restore_selection&&!l.initial)l.bookmark=b=l.bookmark||ed.selection.getBookmark();if(t.index<t.data.length)t.index++;if(t.data.length===0&&!l.initial)return null;t.data.length=t.index+1;t.data[t.index++]=l;if(l.initial)t.index=0;if(t.data.length==2&&t.data[0].initial)t.data[0].bookmark=b;t.onAdd.dispatch(t,l);ed.isNotDirty=0;return l;},undo:function(){var t=this,ed=t.editor,l=l,i;if(t.typing){t.add();t.typing=0;}if(t.index>0){if(t.index==t.data.length&&t.index>1){i=t.index;t.typing=0;if(!t.add())t.index=i;--t.index;}l=t.data[--t.index];ed.setContent(l.content,{format:'raw'});ed.selection.moveToBookmark(l.bookmark);t.onUndo.dispatch(t,l);}return l;},redo:function(){var t=this,ed=t.editor,l=null;if(t.index<t.data.length-1){l=t.data[++t.index];ed.setContent(l.content,{format:'raw'});ed.selection.moveToBookmark(l.bookmark);t.onRedo.dispatch(t,l);}return l;},clear:function(){var t=this;t.data=[];t.index=0;t.typing=0;t.add({initial:true});},hasUndo:function(){return this.index!=0||this.typing;},hasRedo:function(){return this.index<this.data.length-1;}});(function(){var Event,isIE,isGecko,isOpera,each,extend;Event=tinymce.dom.Event;isIE=tinymce.isIE;isGecko=tinymce.isGecko;isOpera=tinymce.isOpera;each=tinymce.each;extend=tinymce.extend;tinymce.create('tinymce.ForceBlocks',{ForceBlocks:function(ed){var t=this,s=ed.settings,elm;t.editor=ed;t.dom=ed.dom;elm=(s.forced_root_block||'p').toLowerCase();s.element=elm.toUpperCase();ed.onPreInit.add(t.setup,t);t.reOpera=new RegExp('(\\u00a0|&#160;|&nbsp;)<\/'+elm+'>','gi');t.rePadd=new RegExp('<p( )([^>]+)><\\\/p>|<p( )([^>]+)\\\/>|<p( )([^>]+)>\\s+<\\\/p>|<p><\\\/p>|<p\\\/>|<p>\\s+<\\\/p>'.replace(/p/g,elm),'gi');t.reNbsp2BR1=new RegExp('<p( )([^>]+)>[\\s\\u00a0]+<\\\/p>|<p>[\\s\\u00a0]+<\\\/p>'.replace(/p/g,elm),'gi');t.reNbsp2BR2=new RegExp('<p( )([^>]+)>(&nbsp;|&#160;)<\\\/p>|<p>(&nbsp;|&#160;)<\\\/p>'.replace(/p/g,elm),'gi');t.reBR2Nbsp=new RegExp('<p( )([^>]+)>\\s*<br \\\/>\\s*<\\\/p>|<p>\\s*<br \\\/>\\s*<\\\/p>'.replace(/p/g,elm),'gi');t.reTrailBr=new RegExp('\\s*<br \\/>\\s*<\\\/p>'.replace(/p/g,elm),'gi');function padd(ed,o){if(isOpera)o.content=o.content.replace(t.reOpera,'</'+elm+'>');o.content=o.content.replace(t.rePadd,'<'+elm+'$1$2$3$4$5$6>\u00a0</'+elm+'>');if(!isIE&&!isOpera&&o.set){o.content=o.content.replace(t.reNbsp2BR1,'<'+elm+'$1$2><br /></'+elm+'>');o.content=o.content.replace(t.reNbsp2BR2,'<'+elm+'$1$2><br /></'+elm+'>');}else{o.content=o.content.replace(t.reBR2Nbsp,'<'+elm+'$1$2>\u00a0</'+elm+'>');o.content=o.content.replace(t.reTrailBr,'</'+elm+'>');}};ed.onBeforeSetContent.add(padd);ed.onPostProcess.add(padd);if(s.forced_root_block){ed.onInit.add(t.forceRoots,t);ed.onSetContent.add(t.forceRoots,t);ed.onBeforeGetContent.add(t.forceRoots,t);}},setup:function(){var t=this,ed=t.editor,s=ed.settings;if(s.forced_root_block){ed.onKeyUp.add(t.forceRoots,t);ed.onPreProcess.add(t.forceRoots,t);}if(s.force_br_newlines){if(isIE){ed.onKeyPress.add(function(ed,e){var n,s=ed.selection;if(e.keyCode==13&&s.getNode().nodeName!='LI'){s.setContent('<br id="__" /> ',{format:'raw'});n=ed.dom.get('__');n.removeAttribute('id');s.select(n);s.collapse();return Event.cancel(e);}});}return;}if(!isIE&&s.force_p_newlines){ed.onKeyPress.add(function(ed,e){if(e.keyCode==13&&!e.shiftKey){if(!t.insertPara(e))Event.cancel(e);}});if(isGecko){ed.onKeyDown.add(function(ed,e){if((e.keyCode==8||e.keyCode==46)&&!e.shiftKey)t.backspaceDelete(e,e.keyCode==8);});}}function ren(rn,na){var ne=ed.dom.create(na);each(rn.attributes,function(a){if(a.specified&&a.nodeValue)ne.setAttribute(a.nodeName.toLowerCase(),a.nodeValue);});each(rn.childNodes,function(n){ne.appendChild(n.cloneNode(true));});rn.parentNode.replaceChild(ne,rn);return ne;};if(isIE&&s.element!='P'){ed.onKeyPress.add(function(ed,e){t.lastElm=ed.selection.getNode().nodeName;});ed.onKeyUp.add(function(ed,e){var bl,sel=ed.selection,n=sel.getNode(),b=ed.getBody();if(b.childNodes.length===1&&n.nodeName=='P'){n=ren(n,s.element);sel.select(n);sel.collapse();ed.nodeChanged();}else if(e.keyCode==13&&!e.shiftKey&&t.lastElm!='P'){bl=ed.dom.getParent(n,'P');if(bl){ren(bl,s.element);ed.nodeChanged();}}});}},find:function(n,t,s){var ed=this.editor,w=ed.getDoc().createTreeWalker(n,4,null,false),c=-1;while(n=w.nextNode()){c++;if(t==0&&n==s)return c;if(t==1&&c==s)return n;}return-1;},forceRoots:function(ed,e){var t=this,ed=t.editor,b=ed.getBody(),d=ed.getDoc(),se=ed.selection,s=se.getSel(),r=se.getRng(),si=-2,ei,so,eo,tr,c=-0xFFFFFF;var nx,bl,bp,sp,le,nl=b.childNodes,i;if(e&&e.keyCode==13)return true;for(i=nl.length-1;i>=0;i--){nx=nl[i];if(nx.nodeType==3||(!t.dom.isBlock(nx)&&nx.nodeType!=8)){if(!bl){if(nx.nodeType!=3||/[^\s]/g.test(nx.nodeValue)){if(si==-2&&r){if(!isIE){if(ed.dom.getParent(r.startContainer,function(e){return e===b;})){so=r.startOffset;eo=r.endOffset;si=t.find(b,0,r.startContainer);ei=t.find(b,0,r.endContainer);}}else{tr=d.body.createTextRange();tr.moveToElementText(b);tr.collapse(1);bp=tr.move('character',c)*-1;tr=r.duplicate();tr.collapse(1);sp=tr.move('character',c)*-1;tr=r.duplicate();tr.collapse(0);le=(tr.move('character',c)*-1)-sp;si=sp-bp;ei=le;}}bl=ed.dom.create(ed.settings.forced_root_block);bl.appendChild(nx.cloneNode(1));nx.parentNode.replaceChild(bl,nx);}}else{if(bl.hasChildNodes())bl.insertBefore(nx,bl.firstChild);else bl.appendChild(nx);}}else bl=null;}if(si!=-2){if(!isIE){bl=b.getElementsByTagName(ed.settings.element)[0];r=d.createRange();if(si!=-1)r.setStart(t.find(b,1,si),so);else r.setStart(bl,0);if(ei!=-1)r.setEnd(t.find(b,1,ei),eo);else r.setEnd(bl,0);if(s){s.removeAllRanges();s.addRange(r);}}else{try{r=s.createRange();r.moveToElementText(b);r.collapse(1);r.moveStart('character',si);r.moveEnd('character',ei);r.select();}catch(ex){}}}},getParentBlock:function(n){var d=this.dom;return d.getParent(n,d.isBlock);},insertPara:function(e){var t=this,ed=t.editor,dom=ed.dom,d=ed.getDoc(),se=ed.settings,s=ed.selection.getSel(),r=s.getRangeAt(0),b=d.body;var rb,ra,dir,sn,so,en,eo,sb,eb,bn,bef,aft,sc,ec,n,vp=dom.getViewPort(ed.getWin()),y,ch;function isEmpty(n){n=n.innerHTML;n=n.replace(/<(img|hr|table)/gi,'-');n=n.replace(/<[^>]+>/g,'');return n.replace(/[ \t\r\n]+/g,'')=='';};rb=d.createRange();rb.setStart(s.anchorNode,s.anchorOffset);rb.collapse(true);ra=d.createRange();ra.setStart(s.focusNode,s.focusOffset);ra.collapse(true);dir=rb.compareBoundaryPoints(rb.START_TO_END,ra)<0;sn=dir?s.anchorNode:s.focusNode;so=dir?s.anchorOffset:s.focusOffset;en=dir?s.focusNode:s.anchorNode;eo=dir?s.focusOffset:s.anchorOffset;if(sn===en&&/^(TD|TH)$/.test(sn.nodeName)){dom.remove(sn.firstChild);ed.dom.add(sn,se.element,null,'<br />');aft=ed.dom.add(sn,se.element,null,'<br />');r=d.createRange();r.selectNodeContents(aft);r.collapse(1);ed.selection.setRng(r);return false;}if(sn==b&&en==b&&b.firstChild&&ed.dom.isBlock(b.firstChild)){sn=en=sn.firstChild;so=eo=0;rb=d.createRange();rb.setStart(sn,0);ra=d.createRange();ra.setStart(en,0);}sn=sn.nodeName=="HTML"?d.body:sn;sn=sn.nodeName=="BODY"?sn.firstChild:sn;en=en.nodeName=="HTML"?d.body:en;en=en.nodeName=="BODY"?en.firstChild:en;sb=t.getParentBlock(sn);eb=t.getParentBlock(en);bn=sb?sb.nodeName:se.element;if(t.dom.getParent(sb,function(n){return/OL|UL|PRE/.test(n.nodeName);}))return true;if(sb&&(sb.nodeName=='CAPTION'||/absolute|relative|static/gi.test(sb.style.position))){bn=se.element;sb=null;}if(eb&&(eb.nodeName=='CAPTION'||/absolute|relative|static/gi.test(eb.style.position))){bn=se.element;eb=null;}if(/(TD|TABLE|TH|CAPTION)/.test(bn)||(sb&&bn=="DIV"&&/left|right/gi.test(sb.style.cssFloat))){bn=se.element;sb=eb=null;}bef=(sb&&sb.nodeName==bn)?sb.cloneNode(0):ed.dom.create(bn);aft=(eb&&eb.nodeName==bn)?eb.cloneNode(0):ed.dom.create(bn);aft.removeAttribute('id');if(/^(H[1-6])$/.test(bn)&&sn.nodeValue&&so==sn.nodeValue.length)aft=ed.dom.create(se.element);n=sc=sn;do{if(n==b||n.nodeType==9||t.dom.isBlock(n)||/(TD|TABLE|TH|CAPTION)/.test(n.nodeName))break;sc=n;}while((n=n.previousSibling?n.previousSibling:n.parentNode));n=ec=en;do{if(n==b||n.nodeType==9||t.dom.isBlock(n)||/(TD|TABLE|TH|CAPTION)/.test(n.nodeName))break;ec=n;}while((n=n.nextSibling?n.nextSibling:n.parentNode));if(sc.nodeName==bn)rb.setStart(sc,0);else rb.setStartBefore(sc);rb.setEnd(sn,so);bef.appendChild(rb.cloneContents()||d.createTextNode(''));try{ra.setEndAfter(ec);}catch(ex){}ra.setStart(en,eo);aft.appendChild(ra.cloneContents()||d.createTextNode(''));r=d.createRange();if(!sc.previousSibling&&sc.parentNode.nodeName==bn){r.setStartBefore(sc.parentNode);}else{if(rb.startContainer.nodeName==bn&&rb.startOffset==0)r.setStartBefore(rb.startContainer);else r.setStart(rb.startContainer,rb.startOffset);}if(!ec.nextSibling&&ec.parentNode.nodeName==bn)r.setEndAfter(ec.parentNode);else r.setEnd(ra.endContainer,ra.endOffset);r.deleteContents();if(isOpera)ed.getWin().scrollTo(0,vp.y);if(bef.firstChild&&bef.firstChild.nodeName==bn)bef.innerHTML=bef.firstChild.innerHTML;if(aft.firstChild&&aft.firstChild.nodeName==bn)aft.innerHTML=aft.firstChild.innerHTML;if(isEmpty(bef))bef.innerHTML='<br />';if(isEmpty(aft))aft.innerHTML=isOpera?'&nbsp;':'<br />';if(isOpera&&parseFloat(opera.version())<9.5){r.insertNode(bef);r.insertNode(aft);}else{r.insertNode(aft);r.insertNode(bef);}aft.normalize();bef.normalize();function first(n){return d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false).nextNode()||n;};r=d.createRange();r.selectNodeContents(isGecko?first(aft):aft);r.collapse(1);s.removeAllRanges();s.addRange(r);y=ed.dom.getPos(aft).y;ch=aft.clientHeight;if(y<vp.y||y+ch>vp.y+vp.h){ed.getWin().scrollTo(0,y<vp.y?y:y-vp.h+ch);}return false;},backspaceDelete:function(e,bs){var t=this,ed=t.editor,b=ed.getBody(),n,se=ed.selection,r=se.getRng(),sc=r.startContainer,n,w,tn;if(sc&&ed.dom.isBlock(sc)&&!/^(TD|TH)$/.test(sc.nodeName)&&bs){if(sc.childNodes.length==0||(sc.childNodes.length==1&&sc.firstChild.nodeName=='BR')){n=sc;while((n=n.previousSibling)&&!ed.dom.isBlock(n));if(n){if(sc!=b.firstChild){w=ed.dom.doc.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false);while(tn=w.nextNode())n=tn;r=ed.getDoc().createRange();r.setStart(n,n.nodeValue?n.nodeValue.length:0);r.setEnd(n,n.nodeValue?n.nodeValue.length:0);se.setRng(r);ed.dom.remove(sc);}return Event.cancel(e);}}}function handler(e){e=e.target;if(e&&e.parentNode&&e.nodeName=='BR'&&(n=t.getParentBlock(e))){Event.remove(b,'DOMNodeInserted',handler);if(e.previousSibling||e.nextSibling)ed.dom.remove(e);}};Event._add(b,'DOMNodeInserted',handler);window.setTimeout(function(){Event._remove(b,'DOMNodeInserted',handler);},1);}});})();(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each,extend=tinymce.extend;tinymce.create('tinymce.ControlManager',{ControlManager:function(ed,s){var t=this,i;s=s||{};t.editor=ed;t.controls={};t.onAdd=new tinymce.util.Dispatcher(t);t.onPostRender=new tinymce.util.Dispatcher(t);t.prefix=s.prefix||ed.id+'_';t._cls={};t.onPostRender.add(function(){each(t.controls,function(c){c.postRender();});});},get:function(id){return this.controls[this.prefix+id]||this.controls[id];},setActive:function(id,s){var c=null;if(c=this.get(id))c.setActive(s);return c;},setDisabled:function(id,s){var c=null;if(c=this.get(id))c.setDisabled(s);return c;},add:function(c){var t=this;if(c){t.controls[c.id]=c;t.onAdd.dispatch(c,t);}return c;},createControl:function(n){var c,t=this,ed=t.editor;each(ed.plugins,function(p){if(p.createControl){c=p.createControl(n,t);if(c)return false;}});switch(n){case"|":case"separator":return t.createSeparator();}if(!c&&ed.buttons&&(c=ed.buttons[n]))return t.createButton(n,c);return t.add(c);},createDropMenu:function(id,s,cc){var t=this,ed=t.editor,c,bm,v,cls;s=extend({'class':'mceDropDown',constrain:ed.settings.constrain_menus},s);s['class']=s['class']+' '+ed.getParam('skin')+'Skin';if(v=ed.getParam('skin_variant'))s['class']+=' '+ed.getParam('skin')+'Skin'+v.substring(0,1).toUpperCase()+v.substring(1);id=t.prefix+id;cls=cc||t._cls.dropmenu||tinymce.ui.DropMenu;c=t.controls[id]=new cls(id,s);c.onAddItem.add(function(c,o){var s=o.settings;s.title=ed.getLang(s.title,s.title);if(!s.onclick){s.onclick=function(v){ed.execCommand(s.cmd,s.ui||false,s.value);};}});ed.onRemove.add(function(){c.destroy();});if(tinymce.isIE){c.onShowMenu.add(function(){bm=ed.selection.getBookmark(1);});c.onHideMenu.add(function(){if(bm)ed.selection.moveToBookmark(bm);});}return t.add(c);},createListBox:function(id,s,cc){var t=this,ed=t.editor,cmd,c,cls;if(t.get(id))return null;s.title=ed.translate(s.title);s.scope=s.scope||ed;if(!s.onselect){s.onselect=function(v){ed.execCommand(s.cmd,s.ui||false,v||s.value);};}s=extend({title:s.title,'class':'mce_'+id,scope:s.scope,control_manager:t},s);id=t.prefix+id;if(ed.settings.use_native_selects)c=new tinymce.ui.NativeListBox(id,s);else{cls=cc||t._cls.listbox||tinymce.ui.ListBox;c=new cls(id,s);}t.controls[id]=c;if(tinymce.isWebKit){c.onPostRender.add(function(c,n){Event.add(n,'mousedown',function(){ed.bookmark=ed.selection.getBookmark('simple');});Event.add(n,'focus',function(){ed.selection.moveToBookmark(ed.bookmark);ed.bookmark=null;});});}if(c.hideMenu)ed.onMouseDown.add(c.hideMenu,c);return t.add(c);},createButton:function(id,s,cc){var t=this,ed=t.editor,o,c,cls;if(t.get(id))return null;s.title=ed.translate(s.title);s.label=ed.translate(s.label);s.scope=s.scope||ed;if(!s.onclick&&!s.menu_button){s.onclick=function(){ed.execCommand(s.cmd,s.ui||false,s.value);};}s=extend({title:s.title,'class':'mce_'+id,unavailable_prefix:ed.getLang('unavailable',''),scope:s.scope,control_manager:t},s);id=t.prefix+id;if(s.menu_button){cls=cc||t._cls.menubutton||tinymce.ui.MenuButton;c=new cls(id,s);ed.onMouseDown.add(c.hideMenu,c);}else{cls=t._cls.button||tinymce.ui.Button;c=new cls(id,s);}return t.add(c);},createMenuButton:function(id,s){s=s||{};s.menu_button=1;return this.createButton(id,s);},createSplitButton:function(id,s,cc){var t=this,ed=t.editor,cmd,c,cls;if(t.get(id))return null;s.title=ed.translate(s.title);s.scope=s.scope||ed;if(!s.onclick){s.onclick=function(v){ed.execCommand(s.cmd,s.ui||false,v||s.value);};}if(!s.onselect){s.onselect=function(v){ed.execCommand(s.cmd,s.ui||false,v||s.value);};}s=extend({title:s.title,'class':'mce_'+id,scope:s.scope,control_manager:t},s);id=t.prefix+id;cls=cc||t._cls.splitbutton||tinymce.ui.SplitButton;c=t.add(new cls(id,s));ed.onMouseDown.add(c.hideMenu,c);return c;},createColorSplitButton:function(id,s,cc){var t=this,ed=t.editor,cmd,c,cls,bm;if(t.get(id))return null;s.title=ed.translate(s.title);s.scope=s.scope||ed;if(!s.onclick){s.onclick=function(v){ed.execCommand(s.cmd,s.ui||false,v||s.value);};}if(!s.onselect){s.onselect=function(v){ed.execCommand(s.cmd,s.ui||false,v||s.value);};}s=extend({title:s.title,'class':'mce_'+id,'menu_class':ed.getParam('skin')+'Skin',scope:s.scope,more_colors_title:ed.getLang('more_colors')},s);id=t.prefix+id;cls=cc||t._cls.colorsplitbutton||tinymce.ui.ColorSplitButton;c=new cls(id,s);ed.onMouseDown.add(c.hideMenu,c);ed.onRemove.add(function(){c.destroy();});if(tinymce.isIE){c.onShowMenu.add(function(){bm=ed.selection.getBookmark(1);});c.onHideMenu.add(function(){if(bm){ed.selection.moveToBookmark(bm);bm=0;}});}return t.add(c);},createToolbar:function(id,s,cc){var c,t=this,cls;id=t.prefix+id;cls=cc||t._cls.toolbar||tinymce.ui.Toolbar;c=new cls(id,s);if(t.get(id))return null;return t.add(c);},createSeparator:function(cc){var cls=cc||this._cls.separator||tinymce.ui.Separator;return new cls();},setControlType:function(n,c){return this._cls[n.toLowerCase()]=c;},destroy:function(){each(this.controls,function(c){c.destroy();});this.controls=null;}});})();(function(){var Dispatcher=tinymce.util.Dispatcher,each=tinymce.each,isIE=tinymce.isIE,isOpera=tinymce.isOpera;tinymce.create('tinymce.WindowManager',{WindowManager:function(ed){var t=this;t.editor=ed;t.onOpen=new Dispatcher(t);t.onClose=new Dispatcher(t);t.params={};t.features={};},open:function(s,p){var t=this,f='',x,y,mo=t.editor.settings.dialog_type=='modal',w,sw,sh,vp=tinymce.DOM.getViewPort(),u;s=s||{};p=p||{};sw=isOpera?vp.w:screen.width;sh=isOpera?vp.h:screen.height;s.name=s.name||'mc_'+new Date().getTime();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240);s.resizable=true;s.left=s.left||parseInt(sw/ 2.0) - (s.width /2.0);s.top=s.top||parseInt(sh/ 2.0) - (s.height /2.0);p.inline=false;p.mce_width=s.width;p.mce_height=s.height;p.mce_auto_focus=s.auto_focus;if(mo){if(isIE){s.center=true;s.help=false;s.dialogWidth=s.width+'px';s.dialogHeight=s.height+'px';s.scroll=s.scrollbars||false;}}each(s,function(v,k){if(tinymce.is(v,'boolean'))v=v?'yes':'no';if(!/^(name|url)$/.test(k)){if(isIE&&mo)f+=(f?';':'')+k+':'+v;else f+=(f?',':'')+k+'='+v;}});t.features=s;t.params=p;t.onOpen.dispatch(t,s,p);u=s.url||s.file;if(tinymce.relaxedDomain)u+=(u.indexOf('?')==-1?'?':'&')+'mce_rdomain='+tinymce.relaxedDomain;u=tinymce._addVer(u);try{if(isIE&&mo){w=1;window.showModalDialog(u,window,f);}else w=window.open(u,s.name,f);}catch(ex){}if(!w)alert(t.editor.getLang('popup_blocked'));},close:function(w){w.close();this.onClose.dispatch(this);},createInstance:function(cl,a,b,c,d,e){var f=tinymce.resolve(cl);return new f(a,b,c,d,e);},confirm:function(t,cb,s){cb.call(s||this,confirm(this._decode(this.editor.getLang(t,t))));},alert:function(tx,cb,s){var t=this;alert(t._decode(t.editor.getLang(tx,tx)));if(cb)cb.call(s||t);},_decode:function(s){return tinymce.DOM.decode(s).replace(/\\n/g,'\n');}});}());
\ No newline at end of file
+(function(l){var o=/^\s*|\s*$/g,q={majorVersion:"3",minorVersion:"3.7",releaseDate:"2010-06-10",_init:function(){function k(v){if(v.src&&/tiny_mce(|_gzip|_jquery|_prototype)(_dev|_src)?.js/.test(v.src)){if(/_(src|dev)\.js/g.test(v.src))j.suffix="_src";if((r=v.src.indexOf("?"))!=-1)j.query=v.src.substring(r+1);j.baseURL=v.src.substring(0,v.src.lastIndexOf("/"));if(n&&j.baseURL.indexOf("://")==-1&&j.baseURL.indexOf("/")!==0)j.baseURL=n+j.baseURL;return j.baseURL}return null}var j=this,b=document,g=
+navigator,d=g.userAgent,n,r,u;j.isOpera=l.opera&&opera.buildNumber;j.isWebKit=/WebKit/.test(d);j.isIE=!j.isWebKit&&!j.isOpera&&/MSIE/gi.test(d)&&/Explorer/gi.test(g.appName);j.isIE6=j.isIE&&/MSIE [56]/.test(d);j.isGecko=!j.isWebKit&&/Gecko/.test(d);j.isMac=d.indexOf("Mac")!=-1;j.isAir=/adobeair/i.test(d);j.isIDevice=/(iPad|iPhone)/.test(d);if(l.tinyMCEPreInit){j.suffix=tinyMCEPreInit.suffix;j.baseURL=tinyMCEPreInit.base;j.query=tinyMCEPreInit.query}else{j.suffix="";d=b.getElementsByTagName("base");
+for(g=0;g<d.length;g++)if(u=d[g].href){if(/^https?:\/\/[^\/]+$/.test(u))u+="/";n=u?u.match(/.*\//)[0]:""}d=b.getElementsByTagName("script");for(g=0;g<d.length;g++)if(k(d[g]))return;if(b=b.getElementsByTagName("head")[0]){d=b.getElementsByTagName("script");for(g=0;g<d.length;g++)if(k(d[g]))break}}},is:function(k,j){if(!j)return k!==void 0;if(j=="array"&&k.hasOwnProperty&&k instanceof Array)return true;return typeof k==j},each:function(k,j,b){var g,d;if(!k)return 0;b=b||k;if(k.length!==void 0){g=0;
+for(d=k.length;g<d;g++)if(j.call(b,k[g],g,k)===false)return 0}else for(g in k)if(k.hasOwnProperty(g))if(j.call(b,k[g],g,k)===false)return 0;return 1},map:function(k,j){var b=[];q.each(k,function(g){b.push(j(g))});return b},grep:function(k,j){var b=[];q.each(k,function(g){if(!j||j(g))b.push(g)});return b},inArray:function(k,j){var b,g;if(k){b=0;for(g=k.length;b<g;b++)if(k[b]===j)return b}return-1},extend:function(k,j){var b,g,d=arguments;b=1;for(g=d.length;b<g;b++){j=d[b];q.each(j,function(n,r){if(n!==
+void 0)k[r]=n})}return k},trim:function(k){return(k?""+k:"").replace(o,"")},create:function(k,j){var b,g,d,n,r,u=0;k=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(k);d=k[3].match(/(^|\.)(\w+)$/i)[2];g=this.createNS(k[3].replace(/\.\w+$/,""));if(!g[d])if(k[2]=="static"){g[d]=j;if(this.onCreate)this.onCreate(k[2],k[3],g[d])}else{if(!j[d]){j[d]=function(){};u=1}g[d]=j[d];this.extend(g[d].prototype,j);if(k[5]){b=this.resolve(k[5]).prototype;n=k[5].match(/\.(\w+)$/i)[1];r=g[d];g[d]=u?function(){return b[n].apply(this,
+arguments)}:function(){this.parent=b[n];return r.apply(this,arguments)};g[d].prototype[d]=g[d];this.each(b,function(v,f){g[d].prototype[f]=b[f]});this.each(j,function(v,f){if(b[f])g[d].prototype[f]=function(){this.parent=b[f];return v.apply(this,arguments)};else if(f!=d)g[d].prototype[f]=v})}this.each(j["static"],function(v,f){g[d][f]=v});if(this.onCreate)this.onCreate(k[2],k[3],g[d].prototype)}},walk:function(k,j,b,g){g=g||this;if(k){if(b)k=k[b];q.each(k,function(d,n){if(j.call(g,d,n,b)===false)return false;
+q.walk(d,j,b,g)})}},createNS:function(k,j){var b,g;j=j||l;k=k.split(".");for(b=0;b<k.length;b++){g=k[b];j[g]||(j[g]={});j=j[g]}return j},resolve:function(k,j){var b,g;j=j||l;k=k.split(".");b=0;for(g=k.length;b<g;b++){j=j[k[b]];if(!j)break}return j},addUnload:function(k,j){var b=this;k={func:k,scope:j||this};if(b.unloads)b.unloads.push(k);else{var g=function(){var n=b.unloads,r,u;if(n){for(u in n)(r=n[u])&&r.func&&r.func.call(r.scope,1);if(l.detachEvent){l.detachEvent("onbeforeunload",d);l.detachEvent("onunload",
+g)}else l.removeEventListener&&l.removeEventListener("unload",g,false);b.unloads=w=g=0;l.CollectGarbage&&CollectGarbage()}},d=function(){var n=document;if(n.readyState=="interactive"){var r=function(){n.detachEvent("onstop",r);g&&g();n=0};n&&n.attachEvent("onstop",r);l.setTimeout(function(){n&&n.detachEvent("onstop",r)},0)}};if(l.attachEvent){l.attachEvent("onunload",g);l.attachEvent("onbeforeunload",d)}else l.addEventListener&&l.addEventListener("unload",g,false);b.unloads=[k]}return k},removeUnload:function(k){var j=
+this.unloads,b=null;q.each(j,function(g,d){if(g&&g.func==k){j.splice(d,1);b=k;return false}});return b},explode:function(k,j){return k?q.map(k.split(j||","),q.trim):k},_addVer:function(k){var j;if(!this.query)return k;j=(k.indexOf("?")==-1?"?":"&")+this.query;if(k.indexOf("#")==-1)return k+j;return k.replace("#",j+"#")}};q._init();l.tinymce=l.tinyMCE=q})(window);
+tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,Dispatcher:function(l){this.scope=l||this;this.listeners=[]},add:function(l,o){this.listeners.push({cb:l,scope:o||this.scope});return l},addToTop:function(l,o){this.listeners.unshift({cb:l,scope:o||this.scope});return l},remove:function(l){var o=this.listeners,q=null;tinymce.each(o,function(k,j){if(l==k.cb){q=l;o.splice(j,1);return false}});return q},dispatch:function(){var l,o=arguments,q,k=this.listeners;for(q=0;q<k.length;q++){l=
+k[q];l=l.cb.apply(l.scope,o);if(l===false)break}return l}});
+(function(){var l=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(o,q){var k=this,j;o=tinymce.trim(o);q=k.settings=q||{};if(/^(mailto|tel|news|javascript|about|data):/i.test(o)||/^\s*#/.test(o))k.source=o;else{if(o.indexOf("/")===0&&o.indexOf("//")!==0)o=(q.base_uri?q.base_uri.protocol||"http":"http")+"://mce_host"+o;/^\w*:?\/\//.test(o)||(o=(q.base_uri.protocol||"http")+"://mce_host"+k.toAbsPath(q.base_uri.path,o));o=o.replace(/@@/g,"(mce_at)");o=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(o);
+l(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(b,g){var d=o[g];if(d)d=d.replace(/\(mce_at\)/g,"@@");k[b]=d});if(j=q.base_uri){if(!k.protocol)k.protocol=j.protocol;if(!k.userInfo)k.userInfo=j.userInfo;if(!k.port&&k.host=="mce_host")k.port=j.port;if(!k.host||k.host=="mce_host")k.host=j.host;k.source=""}}},setPath:function(o){o=/^(.*?)\/?(\w+)?$/.exec(o);this.path=o[0];this.directory=o[1];this.file=o[2];this.source=
+"";this.getURI()},toRelative:function(o){var q;if(o==="./")return o;o=new tinymce.util.URI(o,{base_uri:this});if(o.host!="mce_host"&&this.host!=o.host&&o.host||this.port!=o.port||this.protocol!=o.protocol)return o.getURI();q=this.toRelPath(this.path,o.path);if(o.query)q+="?"+o.query;if(o.anchor)q+="#"+o.anchor;return q},toAbsolute:function(o,q){o=new tinymce.util.URI(o,{base_uri:this});return o.getURI(this.host==o.host&&this.protocol==o.protocol?q:0)},toRelPath:function(o,q){var k,j=0,b="",g,d;o=
+o.substring(0,o.lastIndexOf("/"));o=o.split("/");k=q.split("/");if(o.length>=k.length){g=0;for(d=o.length;g<d;g++)if(g>=k.length||o[g]!=k[g]){j=g+1;break}}if(o.length<k.length){g=0;for(d=k.length;g<d;g++)if(g>=o.length||o[g]!=k[g]){j=g+1;break}}if(j==1)return q;g=0;for(d=o.length-(j-1);g<d;g++)b+="../";g=j-1;for(d=k.length;g<d;g++)b+=g!=j-1?"/"+k[g]:k[g];return b},toAbsPath:function(o,q){var k,j=0,b=[],g;g=/\/$/.test(q)?"/":"";o=o.split("/");q=q.split("/");l(o,function(d){d&&b.push(d)});o=b;k=q.length-
+1;for(b=[];k>=0;k--)if(!(q[k].length==0||q[k]=="."))if(q[k]=="..")j++;else if(j>0)j--;else b.push(q[k]);k=o.length-j;k=k<=0?b.reverse().join("/"):o.slice(0,k).join("/")+"/"+b.reverse().join("/");if(k.indexOf("/")!==0)k="/"+k;if(g&&k.lastIndexOf("/")!==k.length-1)k+=g;return k},getURI:function(o){var q;if(!this.source||o){q="";if(!o){if(this.protocol)q+=this.protocol+"://";if(this.userInfo)q+=this.userInfo+"@";if(this.host)q+=this.host;if(this.port)q+=":"+this.port}if(this.path)q+=this.path;if(this.query)q+=
+"?"+this.query;if(this.anchor)q+="#"+this.anchor;this.source=q}return this.source}})})();
+(function(){var l=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(o){o=this.get(o);var q;o&&l(o.split("&"),function(k){k=k.split("=");q=q||{};q[unescape(k[0])]=unescape(k[1])});return q},setHash:function(o,q,k,j,b,g){var d="";l(q,function(n,r){d+=(!d?"":"&")+escape(r)+"="+escape(n)});this.set(o,d,k,j,b,g)},get:function(o){var q=document.cookie,k=o+"=",j;if(q){j=q.indexOf("; "+k);if(j==-1){j=q.indexOf(k);if(j!=0)return null}else j+=2;o=q.indexOf(";",j);if(o==-1)o=q.length;
+return unescape(q.substring(j+k.length,o))}},set:function(o,q,k,j,b,g){document.cookie=o+"="+escape(q)+(k?"; expires="+k.toGMTString():"")+(j?"; path="+escape(j):"")+(b?"; domain="+b:"")+(g?"; secure":"")},remove:function(o,q){var k=new Date;k.setTime(k.getTime()-1E3);this.set(o,"",k,q,k)}})})();
+tinymce.create("static tinymce.util.JSON",{serialize:function(l){var o,q,k=tinymce.util.JSON.serialize,j;if(l==null)return"null";j=typeof l;if(j=="string"){q="\u0008b\tt\nn\u000cf\rr\"\"''\\\\";return'"'+l.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(b,g){o=q.indexOf(g);if(o+1)return"\\"+q.charAt(o+1);b=g.charCodeAt().toString(16);return"\\u"+"0000".substring(b.length)+b})+'"'}if(j=="object"){if(l.hasOwnProperty&&l instanceof Array){o=0;for(q="[";o<l.length;o++)q+=(o>0?",":"")+k(l[o]);return q+
+"]"}q="{";for(o in l)q+=typeof l[o]!="function"?(q.length>1?',"':'"')+o+'":'+k(l[o]):"";return q+"}"}return""+l},parse:function(l){try{return eval("("+l+")")}catch(o){}}});
+tinymce.create("static tinymce.util.XHR",{send:function(l){function o(g){q=0;try{q=new ActiveXObject(g)}catch(d){}return q}var q,k=window,j=0;l.scope=l.scope||this;l.success_scope=l.success_scope||l.scope;l.error_scope=l.error_scope||l.scope;l.async=l.async===false?false:true;l.data=l.data||"";if(q=k.XMLHttpRequest?new XMLHttpRequest:o("Microsoft.XMLHTTP")||o("Msxml2.XMLHTTP")){q.overrideMimeType&&q.overrideMimeType(l.content_type);q.open(l.type||(l.data?"POST":"GET"),l.url,l.async);l.content_type&&
+q.setRequestHeader("Content-Type",l.content_type);q.setRequestHeader("X-Requested-With","XMLHttpRequest");q.send(l.data);var b=function(){if(!l.async||q.readyState==4||j++>1E4){if(l.success&&j<1E4&&q.status==200)l.success.call(l.success_scope,""+q.responseText,q,l);else if(l.error)l.error.call(l.error_scope,j>1E4?"TIMED_OUT":"GENERAL",q,l);q=null}else k.setTimeout(b,10)};if(!l.async)return b();k.setTimeout(b,10)}}});
+(function(){var l=tinymce.extend,o=tinymce.util.JSON,q=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(k){this.settings=l({},k);this.count=0},send:function(k){var j=k.error,b=k.success;k=l(this.settings,k);k.success=function(g,d){g=o.parse(g);if(typeof g=="undefined")g={error:"JSON Parse error."};g.error?j.call(k.error_scope||k.scope,g.error,d):b.call(k.success_scope||k.scope,g.result)};k.error=function(g,d){j.call(k.error_scope||k.scope,g,d)};k.data=o.serialize({id:k.id||
+"c"+this.count++,method:k.method,params:k.params});k.content_type="application/json";q.send(k)},"static":{sendRPC:function(k){return(new tinymce.util.JSONRequest).send(k)}}})})();
+(function(l){function o(c){var i={},a;c=c.split(",");for(a=c.length;a>=0;a--)i[c[a]]=1;return i}var q=l.each,k=l.is,j=l.isWebKit,b=l.isIE,g=/^(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)$/,d=o("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),n=o("src,href,style,coords,shape"),r={"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"},u=/[<>&\"]/g,v=
+/^([a-z0-9],?)+$/i,f=/<(\w+)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)(\s*\/?)>/g,e=/(\w+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;l.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,i){var a=this;a.doc=c;a.win=window;a.files={};a.cssFlicker=false;a.counter=0;a.boxModel=!l.isIE||c.compatMode=="CSS1Compat";a.stdMode=c.documentMode===8;a.settings=i=l.extend({keep_values:false,hex_colors:1,process_html:1},i);if(l.isIE6)try{c.execCommand("BackgroundImageCache",false,true)}catch(h){a.cssFlicker=true}if(i.valid_styles){a._styles={};q(i.valid_styles,function(m,p){a._styles[p]=l.explode(m)})}l.addUnload(a.destroy,a)},getRoot:function(){var c=this.settings;
+return c&&this.get(c.root_element)||this.doc.body},getViewPort:function(c){var i;c=!c?this.win:c;i=c.document;i=this.boxModel?i.documentElement:i.body;return{x:c.pageXOffset||i.scrollLeft,y:c.pageYOffset||i.scrollTop,w:c.innerWidth||i.clientWidth,h:c.innerHeight||i.clientHeight}},getRect:function(c){var i;c=this.get(c);i=this.getPos(c);c=this.getSize(c);return{x:i.x,y:i.y,w:c.w,h:c.h}},getSize:function(c){var i,a;c=this.get(c);i=this.getStyle(c,"width");a=this.getStyle(c,"height");if(i.indexOf("px")===
+-1)i=0;if(a.indexOf("px")===-1)a=0;return{w:parseInt(i)||c.offsetWidth||c.clientWidth,h:parseInt(a)||c.offsetHeight||c.clientHeight}},getParent:function(c,i,a){return this.getParents(c,i,a,false)},getParents:function(c,i,a,h){var m=this,p,t=m.settings,s=[];c=m.get(c);h=h===undefined;if(t.strict_root)a=a||m.getRoot();if(k(i,"string")){p=i;i=i==="*"?function(x){return x.nodeType==1}:function(x){return m.is(x,p)}}for(;c;){if(c==a||!c.nodeType||c.nodeType===9)break;if(!i||i(c))if(h)s.push(c);else return c;
+c=c.parentNode}return h?s:null},get:function(c){var i;if(c&&this.doc&&typeof c=="string"){i=c;if((c=this.doc.getElementById(c))&&c.id!==i)return this.doc.getElementsByName(i)[1]}return c},getNext:function(c,i){return this._findSib(c,i,"nextSibling")},getPrev:function(c,i){return this._findSib(c,i,"previousSibling")},select:function(c,i){return l.dom.Sizzle(c,this.get(i)||this.get(this.settings.root_element)||this.doc,[])},is:function(c,i){var a;if(c.length===undefined){if(i==="*")return c.nodeType==
+1;if(v.test(i)){i=i.toLowerCase().split(/,/);c=c.nodeName.toLowerCase();for(a=i.length-1;a>=0;a--)if(i[a]==c)return true;return false}}return l.dom.Sizzle.matches(i,c.nodeType?[c]:c).length>0},add:function(c,i,a,h,m){var p=this;return this.run(c,function(t){var s;s=k(i,"string")?p.doc.createElement(i):i;p.setAttribs(s,a);if(h)h.nodeType?s.appendChild(h):p.setHTML(s,h);return!m?t.appendChild(s):s})},create:function(c,i,a){return this.add(this.doc.createElement(c),c,i,a,1)},createHTML:function(c,i,
+a){var h="",m;h+="<"+c;for(m in i)if(i.hasOwnProperty(m))h+=" "+m+'="'+this.encode(i[m])+'"';if(l.is(a))return h+">"+a+"</"+c+">";return h+" />"},remove:function(c,i){return this.run(c,function(a){var h,m;h=a.parentNode;if(!h)return null;if(i)for(;m=a.firstChild;)!l.isIE||m.nodeType!==3||m.nodeValue?h.insertBefore(m,a):a.removeChild(m);return h.removeChild(a)})},setStyle:function(c,i,a){var h=this;return h.run(c,function(m){var p;p=m.style;i=i.replace(/-(\D)/g,function(t,s){return s.toUpperCase()});
+if(h.pixelStyles.test(i)&&(l.is(a,"number")||/^[\-0-9\.]+$/.test(a)))a+="px";switch(i){case "opacity":if(b){p.filter=a===""?"":"alpha(opacity="+a*100+")";if(!c.currentStyle||!c.currentStyle.hasLayout)p.display="inline-block"}p[i]=p["-moz-opacity"]=p["-khtml-opacity"]=a||"";break;case "float":b?p.styleFloat=a:p.cssFloat=a;break;default:p[i]=a||""}h.settings.update_styles&&h.setAttrib(m,"_mce_style")})},getStyle:function(c,i,a){c=this.get(c);if(!c)return false;if(this.doc.defaultView&&a){i=i.replace(/[A-Z]/g,
+function(m){return"-"+m});try{return this.doc.defaultView.getComputedStyle(c,null).getPropertyValue(i)}catch(h){return null}}i=i.replace(/-(\D)/g,function(m,p){return p.toUpperCase()});if(i=="float")i=b?"styleFloat":"cssFloat";if(c.currentStyle&&a)return c.currentStyle[i];return c.style[i]},setStyles:function(c,i){var a=this,h=a.settings,m;m=h.update_styles;h.update_styles=0;q(i,function(p,t){a.setStyle(c,t,p)});h.update_styles=m;h.update_styles&&a.setAttrib(c,h.cssText)},setAttrib:function(c,i,a){var h=
+this;if(c&&i){if(h.settings.strict)i=i.toLowerCase();return this.run(c,function(m){var p=h.settings;switch(i){case "style":if(!k(a,"string")){q(a,function(t,s){h.setStyle(m,s,t)});return}if(p.keep_values)a&&!h._isRes(a)?m.setAttribute("_mce_style",a,2):m.removeAttribute("_mce_style",2);m.style.cssText=a;break;case "class":m.className=a||"";break;case "src":case "href":if(p.keep_values){if(p.url_converter)a=p.url_converter.call(p.url_converter_scope||h,a,i,m);h.setAttrib(m,"_mce_"+i,a,2)}break;case "shape":m.setAttribute("_mce_style",
+a)}k(a)&&a!==null&&a.length!==0?m.setAttribute(i,""+a,2):m.removeAttribute(i,2)})}},setAttribs:function(c,i){var a=this;return this.run(c,function(h){q(i,function(m,p){a.setAttrib(h,p,m)})})},getAttrib:function(c,i,a){var h;c=this.get(c);if(!c||c.nodeType!==1)return false;k(a)||(a="");if(/^(src|href|style|coords|shape)$/.test(i))if(h=c.getAttribute("_mce_"+i))return h;if(b&&this.props[i])h=(h=c[this.props[i]])&&h.nodeValue?h.nodeValue:h;h||(h=c.getAttribute(i,2));if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(i)){if(c[this.props[i]]===
+true&&h==="")return i;return h?i:""}if(c.nodeName==="FORM"&&c.getAttributeNode(i))return c.getAttributeNode(i).nodeValue;if(i==="style")if(h=h||c.style.cssText){h=this.serializeStyle(this.parseStyle(h),c.nodeName);this.settings.keep_values&&!this._isRes(h)&&c.setAttribute("_mce_style",h)}if(j&&i==="class"&&h)h=h.replace(/(apple|webkit)\-[a-z\-]+/gi,"");if(b)switch(i){case "rowspan":case "colspan":if(h===1)h="";break;case "size":if(h==="+0"||h===20||h===0)h="";break;case "width":case "height":case "vspace":case "checked":case "disabled":case "readonly":if(h===
+0)h="";break;case "hspace":if(h===-1)h="";break;case "maxlength":case "tabindex":if(h===32768||h===2147483647||h==="32768")h="";break;case "multiple":case "compact":case "noshade":case "nowrap":if(h===65535)return i;return a;case "shape":h=h.toLowerCase();break;default:if(i.indexOf("on")===0&&h)h=(""+h).replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1")}return h!==undefined&&h!==null&&h!==""?""+h:a},getPos:function(c,i){var a=0,h=0,m=this.doc;c=this.get(c);i=i||m.body;if(c){if(b&&!this.stdMode){c=
+c.getBoundingClientRect();h=this.boxModel?m.documentElement:m.body;a=this.getStyle(this.select("html")[0],"borderWidth");a=(a=="medium"||this.boxModel&&!this.isIE6)&&2||a;c.top+=this.win.self!=this.win.top?2:0;return{x:c.left+h.scrollLeft-a,y:c.top+h.scrollTop-a}}for(m=c;m&&m!=i&&m.nodeType;){a+=m.offsetLeft||0;h+=m.offsetTop||0;m=m.offsetParent}for(m=c.parentNode;m&&m!=i&&m.nodeType;){a-=m.scrollLeft||0;h-=m.scrollTop||0;m=m.parentNode}}return{x:a,y:h}},parseStyle:function(c){function i(p,t,s){var x,
+y;if(x=m[p+"-top"+t]){y=m[p+"-right"+t];if(x==y){x=m[p+"-bottom"+t];if(y==x){y=m[p+"-left"+t];if(x==y){m[s]=y;delete m[p+"-top"+t];delete m[p+"-right"+t];delete m[p+"-bottom"+t];delete m[p+"-left"+t]}}}}}var a=this,h=a.settings,m={};if(!c)return m;c=c.replace(/&(#?[a-z0-9]+);/g,"&$1_MCE_SEMI_");q(c.split(";"),function(p){var t,s=[];if(p){p=p.replace(/_MCE_SEMI_/g,";");p=p.replace(/url\([^\)]+\)/g,function(x){s.push(x);return"url("+s.length+")"});p=p.split(":");t=l.trim(p[1]);t=t.replace(/url\(([^\)]+)\)/g,
+function(x,y){return s[parseInt(y)-1]});t=t.replace(/rgb\([^\)]+\)/g,function(x){return a.toHex(x)});if(h.url_converter)t=t.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(x,y){return"url("+h.url_converter.call(h.url_converter_scope||a,a.decode(y),"style",null)+")"});m[l.trim(p[0]).toLowerCase()]=t}});i("border","","border");i("border","-width","border-width");i("border","-color","border-color");i("border","-style","border-style");i("padding","","padding");i("margin","","margin");(function(p,
+t,s,x){var y;if(y=m[t])if(y=m[s])if(y=m[x]){m[p]=m[t]+" "+m[s]+" "+m[x];delete m[t];delete m[s];delete m[x]}})("border","border-width","border-style","border-color");if(b)if(m.border=="medium none")m.border="";return m},serializeStyle:function(c,i){function a(m,p){if(p&&m)if(p.indexOf("-")!==0){switch(p){case "font-weight":if(m==700)m="bold";break;case "color":case "background-color":m=m.toLowerCase()}h+=(h?" ":"")+p+": "+m+";"}}var h="";if(i&&this._styles){q(this._styles["*"],function(m){a(c[m],
+m)});q(this._styles[i.toLowerCase()],function(m){a(c[m],m)})}else q(c,a);return h},loadCSS:function(c){var i=this,a=i.doc,h;c||(c="");h=i.select("head")[0];q(c.split(","),function(m){var p;if(!i.files[m]){i.files[m]=true;p=i.create("link",{rel:"stylesheet",href:l._addVer(m)});if(b&&a.documentMode)p.onload=function(){a.recalc();p.onload=null};h.appendChild(p)}})},addClass:function(c,i){return this.run(c,function(a){var h;if(!i)return 0;if(this.hasClass(a,i))return a.className;h=this.removeClass(a,
+i);return a.className=(h!=""?h+" ":"")+i})},removeClass:function(c,i){var a=this,h;return a.run(c,function(m){var p;if(a.hasClass(m,i)){h||(h=RegExp("(^|\\s+)"+i+"(\\s+|$)","g"));p=m.className.replace(h," ");p=l.trim(p!=" "?p:"");m.className=p;if(!p){m.removeAttribute("class");m.removeAttribute("className")}return p}return m.className})},hasClass:function(c,i){c=this.get(c);if(!c||!i)return false;return(" "+c.className+" ").indexOf(" "+i+" ")!==-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,i){var a=this;return this.run(c,function(h){var m,p,t,s,x;i=a.processHTML(i);if(b){var y=function(){for(;h.firstChild;)h.firstChild.removeNode();try{h.innerHTML="<br />"+i;h.removeChild(h.firstChild)}catch(C){m=a.create("div");m.innerHTML="<br />"+i;
+q(m.childNodes,function(A,M){M&&h.appendChild(A)})}};if(a.settings.fix_ie_paragraphs)i=i.replace(/<p><\/p>|<p([^>]+)><\/p>|<p[^\/+]\/>/gi,'<p$1 _mce_keep="true">&nbsp;</p>');y();if(a.settings.fix_ie_paragraphs){t=h.getElementsByTagName("p");p=t.length-1;for(m=0;p>=0;p--){s=t[p];if(!s.hasChildNodes()){if(!s._mce_keep){m=1;break}s.removeAttribute("_mce_keep")}}}if(m){i=i.replace(/<p ([^>]+)>|<p>/ig,'<div $1 _mce_tmp="1">');i=i.replace(/<\/p>/gi,"</div>");y();if(a.settings.fix_ie_paragraphs){t=h.getElementsByTagName("DIV");
+for(p=t.length-1;p>=0;p--){s=t[p];if(s._mce_tmp){x=a.doc.createElement("p");s.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(C,A){var M;if(A!=="_mce_tmp"){M=s.getAttribute(A);if(!M&&A==="class")M=s.className;x.setAttribute(A,M)}});for(m=0;m<s.childNodes.length;m++)x.appendChild(s.childNodes[m].cloneNode(true));s.swapNode(x)}}}}}else h.innerHTML=i;return i})},processHTML:function(c){var i=this,a=i.settings,h=[];if(!a.process_html)return c;if(b){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(a.keep_values){if(/<script|noscript|style/i.test(c)){var m=function(p){p=p.replace(/(<\!--\[CDATA\[|\]\]--\>)/g,"\n");p=p.replace(/^[\r\n]*|[\r\n]*$/g,"");p=p.replace(/^\s*(\/\/\s*<\!--|\/\/\s*<!\[CDATA\[|<\!--|<!\[CDATA\[)[\r\n]*/g,"");return p=p.replace(/\s*(\/\/\s*\]\]>|\/\/\s*--\>|\]\]>|--\>|\]\]--\>)\s*$/g,"")};c=c.replace(/<script([^>]+|)>([\s\S]*?)<\/script>/gi,function(p,t,s){t||(t=' type="text/javascript"');t=t.replace(/src=\"([^\"]+)\"?/i,
+function(x,y){if(a.url_converter)y=i.encode(a.url_converter.call(a.url_converter_scope||i,i.decode(y),"src","script"));return'_mce_src="'+y+'"'});if(l.trim(s)){h.push(m(s));s="<\!--\nMCE_SCRIPT:"+(h.length-1)+"\n// --\>"}return"<mce:script"+t+">"+s+"</mce:script>"});c=c.replace(/<style([^>]+|)>([\s\S]*?)<\/style>/gi,function(p,t,s){if(s){h.push(m(s));s="<\!--\nMCE_SCRIPT:"+(h.length-1)+"\n--\>"}return"<mce:style"+t+">"+s+"</mce:style><style "+t+' _mce_bogus="1">'+s+"</style>"});c=c.replace(/<noscript([^>]+|)>([\s\S]*?)<\/noscript>/g,
+function(p,t,s){return"<mce:noscript"+t+"><\!--"+i.encode(s).replace(/--/g,"&#45;&#45;")+"--\></mce:noscript>"})}c=c.replace(/<!\[CDATA\[([\s\S]+)\]\]>/g,"<\!--[CDATA[$1]]--\>");c=function(p){return p.replace(f,function(t,s,x,y){return"<"+s+x.replace(e,function(C,A,M,X,E){A=A.toLowerCase();M=M||X||E||"";if(d[A]){if(M==="false"||M==="0")return;return A+'="'+A+'"'}if(n[A]&&x.indexOf("_mce_"+A)==-1){C=i.decode(M);if(a.url_converter&&(A=="src"||A=="href"))C=a.url_converter.call(a.url_converter_scope||
+i,C,A,s);if(A=="style")C=i.serializeStyle(i.parseStyle(C),A);return A+'="'+M+'" _mce_'+A+'="'+i.encode(C)+'"'}return C})+y+">"})}(c);c=c.replace(/MCE_SCRIPT:([0-9]+)/g,function(p,t){return h[t]})}return c},getOuterHTML:function(c){var i;c=this.get(c);if(!c)return null;if(c.outerHTML!==undefined)return c.outerHTML;i=(c.ownerDocument||this.doc).createElement("body");i.appendChild(c.cloneNode(true));return i.innerHTML},setOuterHTML:function(c,i,a){function h(p,t,s){s=s.createElement("body");s.innerHTML=
+t;for(t=s.lastChild;t;){m.insertAfter(t.cloneNode(true),p);t=t.previousSibling}m.remove(p)}var m=this;return this.run(c,function(p){p=m.get(p);if(p.nodeType==1){a=a||p.ownerDocument||m.doc;if(b)try{if(b&&p.nodeType==1)p.outerHTML=i;else h(p,i,a)}catch(t){h(p,i,a)}else h(p,i,a)}})},decode:function(c){var i,a;if(/&[\w#]+;/.test(c)){i=this.doc.createElement("div");i.innerHTML=c;i=i.firstChild;a="";if(i){do a+=i.nodeValue;while(i=i.nextSibling)}return a||c}return c},encode:function(c){return(""+c).replace(u,
+function(i){return r[i]})},insertAfter:function(c,i){i=this.get(i);return this.run(c,function(a){var h,m;h=i.parentNode;(m=i.nextSibling)?h.insertBefore(a,m):h.appendChild(a);return a})},isBlock:function(c){if(c.nodeType&&c.nodeType!==1)return false;c=c.nodeName||c;return g.test(c)},replace:function(c,i,a){if(k(i,"array"))c=c.cloneNode(true);return this.run(i,function(h){a&&q(l.grep(h.childNodes),function(m){c.appendChild(m)});return h.parentNode.replaceChild(c,h)})},rename:function(c,i){var a=this,
+h;if(c.nodeName!=i.toUpperCase()){h=a.create(i);q(a.getAttribs(c),function(m){a.setAttrib(h,m.nodeName,a.getAttrib(c,m.nodeName))});a.replace(h,c,1)}return h||c},findCommonAncestor:function(c,i){for(var a=c,h;a;){for(h=i;h&&a!=h;)h=h.parentNode;if(a==h)break;a=a.parentNode}if(!a&&c.ownerDocument)return c.ownerDocument.documentElement;return a},toHex:function(c){function i(h){h=parseInt(h).toString(16);return h.length>1?h:"0"+h}var a=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(c);
+if(a)c="#"+i(a[1])+i(a[2])+i(a[3]);return c},getClasses:function(){function c(t){q(t.imports,function(s){c(s)});q(t.cssRules||t.rules,function(s){switch(s.type||1){case 1:s.selectorText&&q(s.selectorText.split(","),function(x){x=x.replace(/^\s*|\s*$|^\s\./g,"");if(!(/\.mce/.test(x)||!/\.[\w\-]+$/.test(x))){m=x;x=x.replace(/.*\.([a-z0-9_\-]+).*/i,"$1");if(!(h&&!(x=h(x,m))))if(!a[x]){i.push({"class":x});a[x]=1}}});break;case 3:c(s.styleSheet)}})}var i=[],a={},h=this.settings.class_filter,m;if(this.classes)return this.classes;
+try{q(this.doc.styleSheets,c)}catch(p){}if(i.length>0)this.classes=i;return i},run:function(c,i,a){var h=this,m;if(h.doc&&typeof c==="string")c=h.get(c);if(!c)return false;a=a||this;if(!c.nodeType&&(c.length||c.length===0)){m=[];q(c,function(p,t){if(p){if(typeof p=="string")p=h.doc.getElementById(p);m.push(i.call(a,p,t))}});return m}return i.call(a,c)},getAttribs:function(c){var i;c=this.get(c);if(!c)return[];if(b){i=[];if(c.nodeName=="OBJECT")return c.attributes;c.nodeName==="OPTION"&&this.getAttrib(c,
+"selected")&&i.push({specified:1,nodeName:"selected"});c.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(a){i.push({specified:1,nodeName:a})});return i}return c.attributes},destroy:function(c){this.events&&this.events.destroy();this.win=this.doc=this.root=this.events=null;c||l.removeUnload(this.destroy)},createRng:function(){var c=this.doc;return c.createRange?c.createRange():new l.dom.Range(this)},nodeIndex:function(c,i){var a=
+0,h,m;if(c){h=c.nodeType;for(c=c.previousSibling;c;c=c.previousSibling){m=c.nodeType;if(i&&m==3)if(m==h||!c.nodeValue.length)continue;a++;h=m}}return a},split:function(c,i,a){function h(x){var y,C=x.childNodes;if(!(x.nodeType==1&&x.getAttribute("_mce_type")=="bookmark")){for(y=C.length-1;y>=0;y--)h(C[y]);if(x.nodeType!=9){if(x.nodeType==3&&x.nodeValue.length>0)return;if(x.nodeType==1){C=x.childNodes;C.length==1&&C[0]&&C[0].nodeType==1&&C[0].getAttribute("_mce_type")=="bookmark"&&x.parentNode.insertBefore(C[0],
+x);if(C.length||/^(br|hr|input|img)$/i.test(x.nodeName))return}m.remove(x)}return x}}var m=this,p=m.createRng(),t,s;if(c&&i){p.setStart(c.parentNode,m.nodeIndex(c));p.setEnd(i.parentNode,m.nodeIndex(i));t=p.extractContents();p=m.createRng();p.setStart(i.parentNode,m.nodeIndex(i)+1);p.setEnd(c.parentNode,m.nodeIndex(c)+1);p=p.extractContents();s=c.parentNode;s.insertBefore(h(t),c);a?s.replaceChild(a,i):s.insertBefore(i,c);s.insertBefore(h(p),c);m.remove(c);return a||i}},bind:function(c,i,a,h){if(!this.events)this.events=
+new l.dom.EventUtils;return this.events.add(c,i,a,h||this)},unbind:function(c,i,a){if(!this.events)this.events=new l.dom.EventUtils;return this.events.remove(c,i,a)},_findSib:function(c,i,a){var h=this,m=i;if(c){if(k(m,"string"))m=function(p){return h.is(p,i)};for(c=c[a];c;c=c[a])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)}});l.DOM=new l.dom.DOMUtils(document,{process_html:0})})(tinymce);
+(function(l){function o(q){function k(E,D){r(t,E,D)}function j(E,D){r(s,E,D)}function b(E){k(E.parentNode,X(E))}function g(E){j(E.parentNode,X(E)+1)}function d(E,D){var B;if(E.nodeType==3)return E;if(D<0)return E;for(B=E.firstChild;B&&D>0;){--D;B=B.nextSibling}if(B)return B;return E}function n(E,D,B,K){var H,W;if(E==B){if(D==K)return 0;if(D<K)return-1;return 1}for(H=B;H&&H.parentNode!=E;)H=H.parentNode;if(H){W=0;for(B=E.firstChild;B!=H&&W<D;){W++;B=B.nextSibling}if(D<=W)return-1;return 1}for(H=E;H&&
+H.parentNode!=B;)H=H.parentNode;if(H){W=0;for(B=B.firstChild;B!=H&&W<K;){W++;B=B.nextSibling}if(W<K)return-1;return 1}for(D=q.findCommonAncestor(E,B);E&&E.parentNode!=D;)E=E.parentNode;E||(E=D);for(K=B;K&&K.parentNode!=D;)K=K.parentNode;K||(K=D);if(E==K)return 0;for(B=D.firstChild;B;){if(B==E)return-1;if(B==K)return 1;B=B.nextSibling}}function r(E,D,B){if(E){a[y]=D;a[x]=B}else{a[C]=D;a[A]=B}for(D=a[C];D.parentNode;)D=D.parentNode;for(B=a[y];B.parentNode;)B=B.parentNode;if(B==D)n(a[y],a[x],a[C],a[A])>
+0&&a.collapse(E);else a.collapse(E);a.collapsed=a[y]==a[C]&&a[x]==a[A];a.commonAncestorContainer=q.findCommonAncestor(a[y],a[C])}function u(E){var D,B=0,K=0,H;if(a[y]==a[C])return v(E);D=a[C];for(H=D.parentNode;H;D=H,H=H.parentNode){if(H==a[y]){var W=D;D=void 0;H=void 0;B=void 0;K=void 0;H=void 0;if(E!=p)D=h.createDocumentFragment();H=f(W,E);D&&D.appendChild(H);B=X(W)-a[x];if(!(B<=0))for(H=W.previousSibling;B>0;){K=H.previousSibling;H=i(H,E);D&&D.insertBefore(H,D.firstChild);--B;H=K}if(E!=m){a.setEndBefore(W);
+a.collapse(s)}E=D;return E}++B}D=a[y];for(H=D.parentNode;H;D=H,H=H.parentNode){if(H==a[C]){W=D;D=void 0;B=void 0;H=void 0;B=void 0;K=void 0;H=void 0;if(E!=p)D=h.createDocumentFragment();H=e(W,E);D&&D.appendChild(H);B=X(W);++B;B=a[A]-B;for(H=W.nextSibling;B>0;){K=H.nextSibling;H=i(H,E);D&&D.appendChild(H);--B;H=K}if(E!=m){a.setStartAfter(W);a.collapse(t)}return D}++K}K-=B;for(D=a[y];K>0;){D=D.parentNode;K--}for(B=a[C];K<0;){B=B.parentNode;K++}K=D.parentNode;for(H=B.parentNode;K!=H;K=K.parentNode,H=
+H.parentNode){D=K;B=H}var V;if(E!=p)W=h.createDocumentFragment();V=e(D,E);W&&W.appendChild(V);K=X(D);H=X(B);++K;K=H-K;for(V=D.nextSibling;K>0;){H=V.nextSibling;V=i(V,E);W&&W.appendChild(V);V=H;--K}V=f(B,E);W&&W.appendChild(V);if(E!=m){a.setStartAfter(D);a.collapse(t)}return W}function v(E){var D,B,K,H;if(E!=p)D=h.createDocumentFragment();if(a[x]==a[A])return D;if(a[y].nodeType==3){B=a[y].nodeValue;B=B.substring(a[x],a[A]);if(E!=m){a[y].deleteData(a[x],a[A]-a[x]);a.collapse(t)}if(E==p)return;D.appendChild(h.createTextNode(B));
+return D}K=d(a[y],a[x]);for(B=a[A]-a[x];B>0;){H=K.nextSibling;K=i(K,E);D&&D.appendChild(K);--B;K=H}E!=m&&a.collapse(t);return D}function f(E,D){var B=d(a[C],a[A]-1),K,H,W,V=B!=a[C];if(B==E)return c(B,V,s,D);K=B.parentNode;for(H=c(K,s,s,D);K;){for(;B;){W=B.previousSibling;B=c(B,V,s,D);D!=p&&H.insertBefore(B,H.firstChild);V=t;B=W}if(K==E)return H;B=K.previousSibling;K=K.parentNode;W=c(K,s,s,D);D!=p&&W.appendChild(H);H=W}}function e(E,D){var B=d(a[y],a[x]),K=B!=a[y],H,W,V;if(B==E)return c(B,K,t,D);H=
+B.parentNode;for(W=c(H,s,t,D);H;){for(;B;){V=B.nextSibling;B=c(B,K,t,D);D!=p&&W.appendChild(B);K=t;B=V}if(H==E)return W;B=H.nextSibling;H=H.parentNode;V=c(H,s,t,D);D!=p&&V.appendChild(W);W=V}}function c(E,D,B,K){var H;if(D)return i(E,K);if(E.nodeType==3){D=E.nodeValue;if(B){H=a[x];B=D.substring(H);D=D.substring(0,H)}else{H=a[A];B=D.substring(0,H);D=D.substring(H)}if(K!=m)E.nodeValue=D;if(K==p)return;E=E.cloneNode(s);E.nodeValue=B;return E}if(K!=p)return E.cloneNode(s)}function i(E,D){if(D!=p)return D==
+m?E.cloneNode(t):E;E.parentNode.removeChild(E)}var a=this,h=q.doc,m=1,p=2,t=true,s=false,x="startOffset",y="startContainer",C="endContainer",A="endOffset",M=tinymce.extend,X=q.nodeIndex;M(a,{startContainer:h,startOffset:0,endContainer:h,endOffset:0,collapsed:t,commonAncestorContainer:h,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:k,setEnd:j,setStartBefore:b,setStartAfter:function(E){k(E.parentNode,X(E)+1)},setEndBefore:function(E){j(E.parentNode,X(E))},setEndAfter:g,collapse:function(E){if(E){a[C]=
+a[y];a[A]=a[x]}else{a[y]=a[C];a[x]=a[A]}a.collapsed=t},selectNode:function(E){b(E);g(E)},selectNodeContents:function(E){k(E,0);j(E,E.nodeType===1?E.childNodes.length:E.nodeValue.length)},compareBoundaryPoints:function(E){var D=a[y],B=a[x],K=a[C],H=a[A];if(E===0)return n(D,B,D,B);if(E===1)return n(D,B,K,H);if(E===2)return n(K,H,K,H);if(E===3)return n(K,H,D,B)},deleteContents:function(){u(p)},extractContents:function(){return u(0)},cloneContents:function(){return u(m)},insertNode:function(E){var D=
+this[y],B=this[x],K;if((D.nodeType===3||D.nodeType===4)&&D.nodeValue)if(B)if(B>=D.nodeValue.length)q.insertAfter(E,D);else{B=D.splitText(B);D.parentNode.insertBefore(E,B)}else D.parentNode.insertBefore(E,D);else{if(D.childNodes.length>0)K=D.childNodes[B];K?D.insertBefore(E,K):D.appendChild(E)}},surroundContents:function(E){var D=a.extractContents();a.insertNode(E);E.appendChild(D);a.selectNode(E)},cloneRange:function(){return M(new o(q),{startContainer:a[y],startOffset:a[x],endContainer:a[C],endOffset:a[A],
+collapsed:a.collapsed,commonAncestorContainer:a.commonAncestorContainer})}})}l.Range=o})(tinymce.dom);
+(function(){tinymce.dom.TridentSelection=function(l){function o(){function b(r){var u,v,f,e=0,c,i,a,h;f=g.duplicate();f.collapse(r);u=j.create("a");a=f.parentElement();if(a.hasChildNodes()){a.appendChild(u);f.moveToElementText(u);h=g.compareEndPoints(r?"StartToStart":"EndToEnd",f);if(h>0){d[r?"setStartAfter":"setEndAfter"](a);j.remove(u)}else{v=tinymce.grep(a.childNodes);for(c=v.length-1;e<=c;){i=Math.floor((e+c)/2);a.insertBefore(u,v[i]);f.moveToElementText(u);h=g.compareEndPoints(r?"StartToStart":
+"EndToEnd",f);if(h>0)e=i+1;else if(h<0)c=i-1;else{found=true;break}}v=h>0||i==0?u.nextSibling:u.previousSibling;if(v.nodeType==1){j.remove(u);f=j.nodeIndex(v);v=v.parentNode;if(!r||i>0)f++}else{if(h>0||i==0){f.setEndPoint(r?"StartToStart":"EndToEnd",g);f=f.text.length}else{f.setEndPoint(r?"StartToStart":"EndToEnd",g);f=v.nodeValue.length-f.text.length}j.remove(u)}d[r?"setStart":"setEnd"](v,f)}}else d[r?"setStart":"setEnd"](a,0)}var g=l.getRng(),d=j.createRng(),n;n=g.item?g.item(0):g.parentElement();
+if(n.ownerDocument!=j.doc)return d;if(g.item||!n.hasChildNodes()){d.setStart(n.parentNode,j.nodeIndex(n));d.setEnd(d.startContainer,d.startOffset+1);return d}n=l.isCollapsed();b(true);n||b();return d}var q,k,j=l.dom;this.addRange=function(b){var g,d,n=l.dom.doc;d=n.body;var r,u,v,f,e,c;this.destroy();r=b.startContainer;u=b.startOffset;v=b.endContainer;f=b.endOffset;d.createTextRange();if(r==n||v==n){g=d.createTextRange();g.collapse();g.select()}else{if(r.nodeType==1&&r.hasChildNodes()){g=r.childNodes.length-
+1;if(u>g){e=1;r=r.childNodes[g]}else r=r.childNodes[u];if(r.nodeType==3)u=0}if(v.nodeType==1&&v.hasChildNodes()){g=v.childNodes.length-1;if(f==0){c=1;v=v.childNodes[0]}else{v=v.childNodes[Math.min(g,f-1)];if(v.nodeType==3)f=v.nodeValue.length}}if(r==v&&r.nodeType==1){if(/^(IMG|TABLE)$/.test(r.nodeName)&&u!=f){g=d.createControlRange();g.addElement(r)}else{g=d.createTextRange();if(!r.hasChildNodes()&&r.canHaveHTML)r.innerHTML="\ufeff";g.moveToElementText(r);if(r.innerHTML=="\ufeff"){g.collapse(true);
+r.removeChild(r.firstChild)}}u==f&&g.collapse(f<=b.endContainer.childNodes.length-1);g.select();g.scrollIntoView()}else{g=d.createTextRange();b=n.createElement("span");b.innerHTML=" ";if(r.nodeType==3){e?j.insertAfter(b,r):r.parentNode.insertBefore(b,r);g.moveToElementText(b);b.parentNode.removeChild(b);u>0&&g.move("character",u)}else{g.moveToElementText(r);e&&g.collapse(false)}if(r==v&&r.nodeType==3)try{g.moveEnd("character",f-u);g.select();g.scrollIntoView()}catch(i){}else{d=d.createTextRange();
+if(v.nodeType==3){v.parentNode.insertBefore(b,v);d.moveToElementText(b);b.parentNode.removeChild(b);d.move("character",f);g.setEndPoint("EndToStart",d)}else{d.moveToElementText(v);d.collapse(!!c);g.setEndPoint("EndToEnd",d)}g.select();g.scrollIntoView()}}}};this.getRangeAt=function(){if(!q||!tinymce.dom.RangeUtils.compareRanges(k,l.getRng())){q=o();k=l.getRng()}return q};this.destroy=function(){k=q=null};l.dom.boxModel&&function(){function b(f,e){var c=r.createTextRange();try{c.moveToPoint(f,e)}catch(i){c=
+null}return c}function g(f){if(f.button){if(f=b(f.x,f.y)){f.compareEndPoints("StartToStart",v)>0?f.setEndPoint("StartToStart",v):f.setEndPoint("EndToEnd",v);f.select()}}else d()}function d(){j.unbind(n,"mouseup",d);j.unbind(n,"mousemove",g);u=0}var n=j.doc,r=n.body,u,v;n.documentElement.unselectable=true;j.bind(n,"mousedown",function(f){if(f.target.nodeName==="HTML"){u&&d();u=1;if(v=b(f.x,f.y)){j.bind(n,"mouseup",d);j.bind(n,"mousemove",g);v.select()}}})}()}})();
+(function(){function l(a,h,m,p,t,s){t=0;for(var x=p.length;t<x;t++){var y=p[t];if(y){y=y[a];for(var C=false;y;){if(y.sizcache===m){C=p[y.sizset];break}if(y.nodeType===1&&!s){y.sizcache=m;y.sizset=t}if(y.nodeName.toLowerCase()===h){C=y;break}y=y[a]}p[t]=C}}}function o(a,h,m,p,t,s){t=0;for(var x=p.length;t<x;t++){var y=p[t];if(y){y=y[a];for(var C=false;y;){if(y.sizcache===m){C=p[y.sizset];break}if(y.nodeType===1){if(!s){y.sizcache=m;y.sizset=t}if(typeof h!=="string"){if(y===h){C=true;break}}else if(d.filter(h,
+[y]).length>0){C=y;break}}y=y[a]}p[t]=C}}}var q=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,k=0,j=Object.prototype.toString,b=false,g=true;[0,0].sort(function(){g=false;return 0});var d=function(a,h,m,p){m=m||[];var t=h=h||document;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!a||typeof a!=="string")return m;var s=[],x,y,C,A,M=true,X=d.isXML(h),E=a,D;do{q.exec("");if(x=q.exec(E)){E=x[3];s.push(x[1]);if(x[2]){A=
+x[3];break}}}while(x);if(s.length>1&&r.exec(a))if(s.length===2&&n.relative[s[0]])y=i(s[0]+s[1],h);else for(y=n.relative[s[0]]?[h]:d(s.shift(),h);s.length;){a=s.shift();if(n.relative[a])a+=s.shift();y=i(a,y)}else{if(!p&&s.length>1&&h.nodeType===9&&!X&&n.match.ID.test(s[0])&&!n.match.ID.test(s[s.length-1])){x=d.find(s.shift(),h,X);h=x.expr?d.filter(x.expr,x.set)[0]:x.set[0]}if(h){x=p?{expr:s.pop(),set:f(p)}:d.find(s.pop(),s.length===1&&(s[0]==="~"||s[0]==="+")&&h.parentNode?h.parentNode:h,X);y=x.expr?
+d.filter(x.expr,x.set):x.set;if(s.length>0)C=f(y);else M=false;for(;s.length;){x=D=s.pop();if(n.relative[D])x=s.pop();else D="";if(x==null)x=h;n.relative[D](C,x,X)}}else C=[]}C||(C=y);C||d.error(D||a);if(j.call(C)==="[object Array]")if(M)if(h&&h.nodeType===1)for(a=0;C[a]!=null;a++){if(C[a]&&(C[a]===true||C[a].nodeType===1&&d.contains(h,C[a])))m.push(y[a])}else for(a=0;C[a]!=null;a++)C[a]&&C[a].nodeType===1&&m.push(y[a]);else m.push.apply(m,C);else f(C,m);if(A){d(A,t,m,p);d.uniqueSort(m)}return m};
+d.uniqueSort=function(a){if(c){b=g;a.sort(c);if(b)for(var h=1;h<a.length;h++)a[h]===a[h-1]&&a.splice(h--,1)}return a};d.matches=function(a,h){return d(a,null,null,h)};d.find=function(a,h,m){var p;if(!a)return[];for(var t=0,s=n.order.length;t<s;t++){var x=n.order[t],y;if(y=n.leftMatch[x].exec(a)){var C=y[1];y.splice(1,1);if(C.substr(C.length-1)!=="\\"){y[1]=(y[1]||"").replace(/\\/g,"");p=n.find[x](y,h,m);if(p!=null){a=a.replace(n.match[x],"");break}}}}p||(p=h.getElementsByTagName("*"));return{set:p,
+expr:a}};d.filter=function(a,h,m,p){for(var t=a,s=[],x=h,y,C,A=h&&h[0]&&d.isXML(h[0]);a&&h.length;){for(var M in n.filter)if((y=n.leftMatch[M].exec(a))!=null&&y[2]){var X=n.filter[M],E,D;D=y[1];C=false;y.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(x===s)s=[];if(n.preFilter[M])if(y=n.preFilter[M](y,x,m,s,p,A)){if(y===true)continue}else C=E=true;if(y)for(var B=0;(D=x[B])!=null;B++)if(D){E=X(D,y,B,x);var K=p^!!E;if(m&&E!=null)if(K)C=true;else x[B]=false;else if(K){s.push(D);C=true}}if(E!==undefined){m||
+(x=s);a=a.replace(n.match[M],"");if(!C)return[];break}}}if(a===t)if(C==null)d.error(a);else break;t=a}return x};d.error=function(a){throw"Syntax error, unrecognized expression: "+a;};var n=d.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\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")}},relative:{"+":function(a,h){var m=typeof h==="string",p=m&&!/\W/.test(h);m=m&&!p;if(p)h=h.toLowerCase();p=0;for(var t=a.length,s;p<t;p++)if(s=a[p]){for(;(s=s.previousSibling)&&s.nodeType!==1;);a[p]=m||s&&s.nodeName.toLowerCase()===
+h?s||false:s===h}m&&d.filter(h,a,true)},">":function(a,h){var m=typeof h==="string",p,t=0,s=a.length;if(m&&!/\W/.test(h))for(h=h.toLowerCase();t<s;t++){if(p=a[t]){m=p.parentNode;a[t]=m.nodeName.toLowerCase()===h?m:false}}else{for(;t<s;t++)if(p=a[t])a[t]=m?p.parentNode:p.parentNode===h;m&&d.filter(h,a,true)}},"":function(a,h,m){var p=k++,t=o,s;if(typeof h==="string"&&!/\W/.test(h)){s=h=h.toLowerCase();t=l}t("parentNode",h,p,a,s,m)},"~":function(a,h,m){var p=k++,t=o,s;if(typeof h==="string"&&!/\W/.test(h)){s=
+h=h.toLowerCase();t=l}t("previousSibling",h,p,a,s,m)}},find:{ID:function(a,h,m){if(typeof h.getElementById!=="undefined"&&!m)return(a=h.getElementById(a[1]))?[a]:[]},NAME:function(a,h){if(typeof h.getElementsByName!=="undefined"){for(var m=[],p=h.getElementsByName(a[1]),t=0,s=p.length;t<s;t++)p[t].getAttribute("name")===a[1]&&m.push(p[t]);return m.length===0?null:m}},TAG:function(a,h){return h.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,h,m,p,t,s){a=" "+a[1].replace(/\\/g,"")+" ";if(s)return a;
+s=0;for(var x;(x=h[s])!=null;s++)if(x)if(t^(x.className&&(" "+x.className+" ").replace(/[\t\n]/g," ").indexOf(a)>=0))m||p.push(x);else if(m)h[s]=false;return false},ID:function(a){return a[1].replace(/\\/g,"")},TAG:function(a){return a[1].toLowerCase()},CHILD:function(a){if(a[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=h[1]+(h[2]||1)-0;a[3]=h[3]-0}a[0]=k++;return a},ATTR:function(a,h,m,p,t,s){h=a[1].replace(/\\/g,
+"");if(!s&&n.attrMap[h])a[1]=n.attrMap[h];if(a[2]==="~=")a[4]=" "+a[4]+" ";return a},PSEUDO:function(a,h,m,p,t){if(a[1]==="not")if((q.exec(a[3])||"").length>1||/^\w/.test(a[3]))a[3]=d(a[3],null,null,h);else{a=d.filter(a[3],h,m,true^t);m||p.push.apply(p,a);return false}else if(n.match.POS.test(a[0])||n.match.CHILD.test(a[0]))return true;return a},POS:function(a){a.unshift(true);return a}},filters:{enabled:function(a){return a.disabled===false&&a.type!=="hidden"},disabled:function(a){return a.disabled===
+true},checked:function(a){return a.checked===true},selected:function(a){return a.selected===true},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,h,m){return!!d(m[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){return"text"===a.type},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===
+a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,h){return h===0},last:function(a,h,m,p){return h===p.length-1},even:function(a,h){return h%2===0},odd:function(a,h){return h%2===1},lt:function(a,h,m){return h<m[3]-0},gt:function(a,h,m){return h>m[3]-0},nth:function(a,h,m){return m[3]-
+0===h},eq:function(a,h,m){return m[3]-0===h}},filter:{PSEUDO:function(a,h,m,p){var t=h[1],s=n.filters[t];if(s)return s(a,m,h,p);else if(t==="contains")return(a.textContent||a.innerText||d.getText([a])||"").indexOf(h[3])>=0;else if(t==="not"){h=h[3];m=0;for(p=h.length;m<p;m++)if(h[m]===a)return false;return true}else d.error("Syntax error, unrecognized expression: "+t)},CHILD:function(a,h){var m=h[1],p=a;switch(m){case "only":case "first":for(;p=p.previousSibling;)if(p.nodeType===1)return false;if(m===
+"first")return true;p=a;case "last":for(;p=p.nextSibling;)if(p.nodeType===1)return false;return true;case "nth":m=h[2];var t=h[3];if(m===1&&t===0)return true;var s=h[0],x=a.parentNode;if(x&&(x.sizcache!==s||!a.nodeIndex)){var y=0;for(p=x.firstChild;p;p=p.nextSibling)if(p.nodeType===1)p.nodeIndex=++y;x.sizcache=s}p=a.nodeIndex-t;return m===0?p===0:p%m===0&&p/m>=0}},ID:function(a,h){return a.nodeType===1&&a.getAttribute("id")===h},TAG:function(a,h){return h==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===
+h},CLASS:function(a,h){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(a,h){var m=h[1];m=n.attrHandle[m]?n.attrHandle[m](a):a[m]!=null?a[m]:a.getAttribute(m);var p=m+"",t=h[2],s=h[4];return m==null?t==="!=":t==="="?p===s:t==="*="?p.indexOf(s)>=0:t==="~="?(" "+p+" ").indexOf(s)>=0:!s?p&&m!==false:t==="!="?p!==s:t==="^="?p.indexOf(s)===0:t==="$="?p.substr(p.length-s.length)===s:t==="|="?p===s||p.substr(0,s.length+1)===s+"-":false},POS:function(a,h,m,p){var t=n.setFilters[h[2]];
+if(t)return t(a,m,h,p)}}},r=n.match.POS,u=function(a,h){return"\\"+(h-0+1)},v;for(v in n.match){n.match[v]=RegExp(n.match[v].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[v]=RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[v].source.replace(/\\(\d+)/g,u))}var f=function(a,h){a=Array.prototype.slice.call(a,0);if(h){h.push.apply(h,a);return h}return a};try{Array.prototype.slice.call(document.documentElement.childNodes,0)}catch(e){f=function(a,h){var m=h||[],p=0;if(j.call(a)==="[object Array]")Array.prototype.push.apply(m,
+a);else if(typeof a.length==="number")for(var t=a.length;p<t;p++)m.push(a[p]);else for(;a[p];p++)m.push(a[p]);return m}}var c;if(document.documentElement.compareDocumentPosition)c=function(a,h){if(!a.compareDocumentPosition||!h.compareDocumentPosition){if(a==h)b=true;return a.compareDocumentPosition?-1:1}var m=a.compareDocumentPosition(h)&4?-1:a===h?0:1;if(m===0)b=true;return m};else if("sourceIndex"in document.documentElement)c=function(a,h){if(!a.sourceIndex||!h.sourceIndex){if(a==h)b=true;return a.sourceIndex?
+-1:1}var m=a.sourceIndex-h.sourceIndex;if(m===0)b=true;return m};else if(document.createRange)c=function(a,h){if(!a.ownerDocument||!h.ownerDocument){if(a==h)b=true;return a.ownerDocument?-1:1}var m=a.ownerDocument.createRange(),p=h.ownerDocument.createRange();m.setStart(a,0);m.setEnd(a,0);p.setStart(h,0);p.setEnd(h,0);m=m.compareBoundaryPoints(Range.START_TO_END,p);if(m===0)b=true;return m};d.getText=function(a){for(var h="",m,p=0;a[p];p++){m=a[p];if(m.nodeType===3||m.nodeType===4)h+=m.nodeValue;
+else if(m.nodeType!==8)h+=d.getText(m.childNodes)}return h};(function(){var a=document.createElement("div"),h="script"+(new Date).getTime();a.innerHTML="<a name='"+h+"'/>";var m=document.documentElement;m.insertBefore(a,m.firstChild);if(document.getElementById(h)){n.find.ID=function(p,t,s){if(typeof t.getElementById!=="undefined"&&!s)return(t=t.getElementById(p[1]))?t.id===p[1]||typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id").nodeValue===p[1]?[t]:undefined:[]};n.filter.ID=function(p,
+t){var s=typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id");return p.nodeType===1&&s&&s.nodeValue===t}}m.removeChild(a);m=a=null})();(function(){var a=document.createElement("div");a.appendChild(document.createComment(""));if(a.getElementsByTagName("*").length>0)n.find.TAG=function(h,m){var p=m.getElementsByTagName(h[1]);if(h[1]==="*"){for(var t=[],s=0;p[s];s++)p[s].nodeType===1&&t.push(p[s]);p=t}return p};a.innerHTML="<a href='#'></a>";if(a.firstChild&&typeof a.firstChild.getAttribute!==
+"undefined"&&a.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};a=null})();document.querySelectorAll&&function(){var a=d,h=document.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){d=function(p,t,s,x){t=t||document;if(!x&&t.nodeType===9&&!d.isXML(t))try{return f(t.querySelectorAll(p),s)}catch(y){}return a(p,t,s,x)};for(var m in a)d[m]=a[m];h=null}}();(function(){var a=document.createElement("div");
+a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!a.getElementsByClassName||a.getElementsByClassName("e").length===0)){a.lastChild.className="e";if(a.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,m,p){if(typeof m.getElementsByClassName!=="undefined"&&!p)return m.getElementsByClassName(h[1])};a=null}}})();d.contains=document.compareDocumentPosition?function(a,h){return!!(a.compareDocumentPosition(h)&16)}:function(a,h){return a!==h&&
+(a.contains?a.contains(h):true)};d.isXML=function(a){return(a=(a?a.ownerDocument||a:0).documentElement)?a.nodeName!=="HTML":false};var i=function(a,h){for(var m=[],p="",t,s=h.nodeType?[h]:h;t=n.match.PSEUDO.exec(a);){p+=t[0];a=a.replace(n.match.PSEUDO,"")}a=n.relative[a]?a+"*":a;t=0;for(var x=s.length;t<x;t++)d(a,s[t],m);return d.filter(p,m)};window.tinymce.dom.Sizzle=d})();
+(function(l){var o=l.each,q=l.DOM,k=l.isIE,j;l.create("tinymce.dom.EventUtils",{EventUtils:function(){this.inits=[];this.events=[]},add:function(b,g,d,n){var r,u=this,v=u.events,f;if(g instanceof Array){f=[];o(g,function(e){f.push(u.add(b,e,d,n))});return f}if(b&&b.hasOwnProperty&&b instanceof Array){f=[];o(b,function(e){e=q.get(e);f.push(u.add(e,g,d,n))});return f}if(b=q.get(b)){r=function(e){if(!u.disabled){if((e=e||window.event)&&k){if(!e.target)e.target=e.srcElement;l.extend(e,u._stoppers)}if(!n)return d(e);
+return d.call(n,e)}};if(g=="unload"){l.unloads.unshift({func:r});return r}if(g=="init"){u.domLoaded?r():u.inits.push(r);return r}v.push({obj:b,name:g,func:d,cfunc:r,scope:n});u._add(b,g,r);return d}},remove:function(b,g,d){var n=this,r=n.events,u=false,v;if(b&&b.hasOwnProperty&&b instanceof Array){v=[];o(b,function(f){f=q.get(f);v.push(n.remove(f,g,d))});return v}b=q.get(b);o(r,function(f,e){if(f.obj==b&&f.name==g&&(!d||f.func==d||f.cfunc==d)){r.splice(e,1);n._remove(b,g,f.cfunc);u=true;return false}});
+return u},clear:function(b){var g=this.events,d,n;if(b){b=q.get(b);for(d=g.length-1;d>=0;d--){n=g[d];if(n.obj===b){this._remove(n.obj,n.name,n.cfunc);n.obj=n.cfunc=null;g.splice(d,1)}}}},cancel:function(b){if(!b)return false;this.stop(b);return this.prevent(b)},stop:function(b){if(b.stopPropagation)b.stopPropagation();else b.cancelBubble=true;return false},prevent:function(b){if(b.preventDefault)b.preventDefault();else b.returnValue=false;return false},destroy:function(){var b=this;o(b.events,function(g){b._remove(g.obj,
+g.name,g.cfunc);g.obj=g.cfunc=null});b.events=[];b=null},_add:function(b,g,d){if(b.attachEvent)b.attachEvent("on"+g,d);else if(b.addEventListener)b.addEventListener(g,d,false);else b["on"+g]=d},_remove:function(b,g,d){if(b)try{if(b.detachEvent)b.detachEvent("on"+g,d);else if(b.removeEventListener)b.removeEventListener(g,d,false);else b["on"+g]=null}catch(n){}},_pageInit:function(){if(!this.domLoaded){this.domLoaded=true;o(this.inits,function(b){b()});this.inits=[]}},_wait:function(b){var g=this,d=
+b.document;if(b.tinyMCE_GZ&&tinyMCE_GZ.loaded)g.domLoaded=1;else{if(d.attachEvent){d.attachEvent("onreadystatechange",function(){if(d.readyState==="complete"){d.detachEvent("onreadystatechange",arguments.callee);g._pageInit(b)}});d.documentElement.doScroll&&b==b.top&&function(){if(!g.domLoaded){try{d.documentElement.doScroll("left")}catch(n){setTimeout(arguments.callee,0);return}g._pageInit(b)}}()}else d.addEventListener&&g._add(b,"DOMContentLoaded",function(){g._pageInit(b)});g._add(b,"load",function(){g._pageInit(b)})}},
+_stoppers:{preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}}});j=l.dom.Event=new l.dom.EventUtils;j._wait(window);l.addUnload(function(){j.destroy()})})(tinymce);
+(function(l){l.dom.Element=function(o,q){var k=this,j;k.settings=q=q||{};k.id=o;k.dom=j=q.dom||l.DOM;l.isIE||j.get(k.id);l.each("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get".split(/,/),function(b){k[b]=function(){var g=[o],d;for(d=0;d<arguments.length;d++)g.push(arguments[d]);g=j[b].apply(j,g);k.update(b);return g}});l.extend(k,{on:function(b,g,d){return l.dom.Event.add(k.id,
+b,g,d)},getXY:function(){return{x:parseInt(k.getStyle("left")),y:parseInt(k.getStyle("top"))}},getSize:function(){var b=j.get(k.id);return{w:parseInt(k.getStyle("width")||b.clientWidth),h:parseInt(k.getStyle("height")||b.clientHeight)}},moveTo:function(b,g){k.setStyles({left:b,top:g})},moveBy:function(b,g){var d=k.getXY();k.moveTo(d.x+b,d.y+g)},resizeTo:function(b,g){k.setStyles({width:b,height:g})},resizeBy:function(b,g){var d=k.getSize();k.resizeTo(d.w+b,d.h+g)},update:function(b){if(l.isIE6&&q.blocker){b=
+b||"";if(!(b.indexOf("get")===0||b.indexOf("has")===0||b.indexOf("is")===0))if(b=="remove")j.remove(k.blocker);else{if(k.blocker)b=j.get(k.blocker);else{k.blocker=j.uniqueId();b=j.add(q.container||j.getRoot(),"iframe",{id:k.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'});j.setStyle(b,"opacity",0)}j.setStyles(b,{left:k.getStyle("left",1),top:k.getStyle("top",1),width:k.getStyle("width",1),height:k.getStyle("height",1),display:k.getStyle("display",1),zIndex:parseInt(k.getStyle("zIndex",
+1)||0)-1})}}}})}})(tinymce);
+(function(l){var o=l.is,q=l.isIE,k=l.each;l.create("tinymce.dom.Selection",{Selection:function(j,b,g){var d=this;d.dom=j;d.win=b;d.serializer=g;k(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(n){d[n]=new l.util.Dispatcher(d)});if(!d.win.getSelection)d.tridentSel=new l.dom.TridentSelection(d);l.addUnload(d.destroy,d)},getContent:function(j){var b=this.getRng(),g=this.dom.create("body"),d=this.getSel(),n,r;j=j||{};n=r="";j.get=true;j.format=j.format||"html";this.onBeforeGetContent.dispatch(this,
+j);if(j.format=="text")return this.isCollapsed()?"":b.text||(d.toString?d.toString():"");if(b.cloneContents)(b=b.cloneContents())&&g.appendChild(b);else g.innerHTML=o(b.item)||o(b.htmlText)?b.item?b.item(0).outerHTML:b.htmlText:b.toString();if(/^\s/.test(g.innerHTML))n=" ";if(/\s+$/.test(g.innerHTML))r=" ";j.getInner=true;j.content=this.isCollapsed()?"":n+this.serializer.serialize(g,j)+r;this.onGetContent.dispatch(this,j);return j.content},setContent:function(j,b){var g=this.getRng(),d,n=this.win.document;
+b=b||{format:"html"};b.set=true;b.content=this.dom.processHTML(j);this.onBeforeSetContent.dispatch(this,b);j=b.content;if(g.insertNode){j+='<span id="__caret">_</span>';if(g.startContainer==n&&g.endContainer==n)n.body.innerHTML=j;else{g.deleteContents();if(n.body.childNodes.length==0)n.body.innerHTML=j;else g.insertNode(g.createContextualFragment(j))}d=this.dom.get("__caret");g=n.createRange();g.setStartBefore(d);g.setEndBefore(d);this.setRng(g);this.dom.remove("__caret")}else{if(g.item){n.execCommand("Delete",
+false,null);g=this.getRng()}g.pasteHTML(j)}this.onSetContent.dispatch(this,b)},getStart:function(){var j=this.getRng(),b,g;if(j.duplicate||j.item){if(j.item)return j.item(0);b=j.duplicate();b.collapse(1);b=b.parentElement();for(j=g=j.parentElement();g=g.parentNode;)if(g==b){b=j;break}if(b&&b.nodeName=="BODY")return b.firstChild||b}else{b=j.startContainer;if(b.nodeType==1&&b.hasChildNodes())b=b.childNodes[Math.min(b.childNodes.length-1,j.startOffset)];if(b&&b.nodeType==3)return b.parentNode}return b},
+getEnd:function(){var j=this.getRng(),b;if(j.duplicate||j.item){if(j.item)return j.item(0);j=j.duplicate();j.collapse(0);if((b=j.parentElement())&&b.nodeName=="BODY")return b.lastChild||b}else{b=j.endContainer;j=j.endOffset;if(b.nodeType==1&&b.hasChildNodes())b=b.childNodes[j>0?j-1:j];if(b&&b.nodeType==3)return b.parentNode}return b},getBookmark:function(j,b){function g(c,i){var a=0;k(n.select(c),function(h,m){if(h==i)a=m});return a}var d=this,n=d.dom,r,u,v,f,e;if(j==2)return function(){function c(m,
+p){var t=m[p?"startContainer":"endContainer"],s=m[p?"startOffset":"endOffset"],x=[],y,C=0;if(t.nodeType==3){if(b)for(y=t.previousSibling;y&&y.nodeType==3;y=y.previousSibling)s+=y.nodeValue.length;x.push(s)}else{y=t.childNodes;if(s>=y.length&&y.length){C=1;s=Math.max(0,y.length-1)}x.push(d.dom.nodeIndex(y[s],b)+C)}for(;t&&t!=a;t=t.parentNode)x.push(d.dom.nodeIndex(t,b));return x}var i=d.getRng(true),a=n.getRoot(),h={};h.start=c(i,true);if(!d.isCollapsed())h.end=c(i);return h}();if(j)return{rng:d.getRng()};
+r=d.getRng();v=n.uniqueId();f=tinyMCE.activeEditor.selection.isCollapsed();if(r.duplicate||r.item)if(r.item){e=r.item(0);u=e.nodeName;return{name:u,index:g(u,e)}}else{u=r.duplicate();r.collapse();r.pasteHTML('<span _mce_type="bookmark" id="'+v+'_start" style="overflow:hidden;line-height:0px">\ufeff</span>');if(!f){u.collapse(false);u.pasteHTML('<span _mce_type="bookmark" id="'+v+'_end" style="overflow:hidden;line-height:0px">\ufeff</span>')}}else{e=d.getNode();u=e.nodeName;if(u=="IMG")return{name:u,
+index:g(u,e)};u=r.cloneRange();if(!f){u.collapse(false);u.insertNode(n.create("span",{_mce_type:"bookmark",id:v+"_end",style:"overflow:hidden;line-height:0px"},"\ufeff"))}r.collapse(true);r.insertNode(n.create("span",{_mce_type:"bookmark",id:v+"_start",style:"overflow:hidden;line-height:0px"},"\ufeff"))}d.moveToBookmark({id:v,keep:1});return{id:v}},moveToBookmark:function(j){var b=this.dom,g,d,n,r,u,v;this.tridentSel&&this.tridentSel.destroy();if(j)if(j.start){g=b.createRng();d=b.getRoot();var f=
+function(c){var i=j[c?"start":"end"],a,h,m;if(i){h=d;for(a=i.length-1;a>=1;a--){m=h.childNodes;if(m.length)h=m[i[a]]}c?g.setStart(h,i[0]):g.setEnd(h,i[0])}};f(true);f();this.setRng(g)}else if(j.id){f=function(c){var i=b.get(j.id+"_"+c),a,h,m;m=j.keep;if(i){a=i.parentNode;if(c=="start"){if(m){a=i.firstChild;h=1}else h=b.nodeIndex(i);n=r=a;u=v=h}else{if(m){a=i.firstChild;h=1}else h=b.nodeIndex(i);r=a;v=h}if(!m){m=i.previousSibling;a=i.nextSibling;for(k(l.grep(i.childNodes),function(p){if(p.nodeType==
+3)p.nodeValue=p.nodeValue.replace(/\uFEFF/g,"")});i=b.get(j.id+"_"+c);)b.remove(i,1);if(m&&a&&m.nodeType==a.nodeType&&m.nodeType==3){h=m.nodeValue.length;m.appendData(a.nodeValue);b.remove(a);if(c=="start"){n=r=m;u=v=h}else{r=m;v=h}}}}};var e=function(c){if(!q&&b.isBlock(c)&&!c.innerHTML)c.innerHTML='<br _mce_bogus="1" />';return c};f("start");f("end");g=b.createRng();g.setStart(e(n),u);g.setEnd(e(r),v);this.setRng(g)}else if(j.name)this.select(b.select(j.name)[j.index]);else j.rng&&this.setRng(j.rng)},
+select:function(j,b){var g=this.dom,d=g.createRng();g=g.nodeIndex(j);d.setStart(j.parentNode,g);d.setEnd(j.parentNode,g+1);if(b){g=function(n,r){var u=new l.dom.TreeWalker(n,n);do{if(n.nodeType==3&&l.trim(n.nodeValue).length!=0){r?d.setStart(n,0):d.setEnd(n,n.nodeValue.length);break}if(n.nodeName=="BR"){r?d.setStartBefore(n):d.setEndBefore(n);break}}while(n=r?u.next():u.prev())};g(j,1);g(j)}this.setRng(d);return j},isCollapsed:function(){var j=this.getRng(),b=this.getSel();if(!j||j.item)return false;
+if(j.compareEndPoints)return j.compareEndPoints("StartToEnd",j)===0;return!b||j.collapsed},collapse:function(j){var b=this.getRng(),g;if(b.item){g=b.item(0);b=this.win.document.body.createTextRange();b.moveToElementText(g)}b.collapse(!!j);this.setRng(b)},getSel:function(){var j=this.win;return j.getSelection?j.getSelection():j.document.selection},getRng:function(j){var b,g;if(j&&this.tridentSel)return this.tridentSel.getRangeAt(0);try{if(b=this.getSel())g=b.rangeCount>0?b.getRangeAt(0):b.createRange?
+b.createRange():this.win.document.createRange()}catch(d){}g||(g=this.win.document.createRange?this.win.document.createRange():this.win.document.body.createTextRange());if(this.selectedRange&&this.explicitRange)if(g.compareBoundaryPoints(g.START_TO_START,this.selectedRange)===0&&g.compareBoundaryPoints(g.END_TO_END,this.selectedRange)===0)g=this.explicitRange;else this.explicitRange=this.selectedRange=null;return g},setRng:function(j){var b;if(this.tridentSel)if(j.cloneRange)this.tridentSel.addRange(j);
+else try{j.select()}catch(g){}else if(b=this.getSel()){this.explicitRange=j;b.removeAllRanges();b.addRange(j);this.selectedRange=b.getRangeAt(0)}},setNode:function(j){this.setContent(this.dom.getOuterHTML(j));return j},getNode:function(){var j=this.getRng(),b=this.getSel(),g;if(j.setStart){if(!j)return this.dom.getRoot();g=j.commonAncestorContainer;if(!j.collapsed){if(j.startContainer==j.endContainer)if(j.startOffset-j.endOffset<2)if(j.startContainer.hasChildNodes())g=j.startContainer.childNodes[j.startOffset];
+if(l.isWebKit&&b.anchorNode&&b.anchorNode.nodeType==1)return b.anchorNode.childNodes[b.anchorOffset]}if(g&&g.nodeType==3)return g.parentNode;return g}return j.item?j.item(0):j.parentElement()},getSelectedBlocks:function(j,b){var g=this.dom,d,n,r,u=[];d=g.getParent(j||this.getStart(),g.isBlock);n=g.getParent(b||this.getEnd(),g.isBlock);d&&u.push(d);if(d&&n&&d!=n)for(r=d;(r=r.nextSibling)&&r!=n;)g.isBlock(r)&&u.push(r);n&&d!=n&&u.push(n);return u},destroy:function(j){this.win=null;this.tridentSel&&
+this.tridentSel.destroy();j||l.removeUnload(this.destroy)}})})(tinymce);
+(function(l){l.create("tinymce.dom.XMLWriter",{node:null,XMLWriter:function(){this.doc=function(){var o=document.implementation;if(!o||!o.createDocument){try{return new ActiveXObject("MSXML2.DOMDocument")}catch(q){}try{return new ActiveXObject("Microsoft.XmlDom")}catch(k){}}else return o.createDocument("","",null)}();this.valid=l.isOpera||l.isWebKit;this.reset()},reset:function(){var o=this.doc;o.firstChild&&o.removeChild(o.firstChild);this.node=o.appendChild(o.createElement("html"))},writeStartElement:function(o){this.node=
+this.node.appendChild(this.doc.createElement(o))},writeAttribute:function(o,q){if(this.valid)q=q.replace(/>/g,"%MCGT%");this.node.setAttribute(o,q)},writeEndElement:function(){this.node=this.node.parentNode},writeFullEndElement:function(){var o=this.node;o.appendChild(this.doc.createTextNode(""));this.node=o.parentNode},writeText:function(o){if(this.valid)o=o.replace(/>/g,"%MCGT%");this.node.appendChild(this.doc.createTextNode(o))},writeCDATA:function(o){this.node.appendChild(this.doc.createCDATASection(o))},
+writeComment:function(o){if(l.isIE)o=o.replace(/^\-|\-$/g," ");this.node.appendChild(this.doc.createComment(o.replace(/\-\-/g," ")))},getContent:function(){var o;o=this.doc.xml||(new XMLSerializer).serializeToString(this.doc);o=o.replace(/<\?[^?]+\?>|<html>|<\/html>|<html\/>|<!DOCTYPE[^>]+>/g,"");o=o.replace(/ ?\/>/g," />");if(this.valid)o=o.replace(/\%MCGT%/g,"&gt;");return o}})})(tinymce);
+(function(l){l.create("tinymce.dom.StringWriter",{str:null,tags:null,count:0,settings:null,indent:null,StringWriter:function(o){this.settings=l.extend({indent_char:" ",indentation:0},o);this.reset()},reset:function(){this.str=this.indent="";this.tags=[];this.count=0},writeStartElement:function(o){this._writeAttributesEnd();this.writeRaw("<"+o);this.tags.push(o);this.inAttr=true;this.count++;this.elementCount=this.count},writeAttribute:function(o,q){this.writeRaw(" "+this.encode(o)+'="'+this.encode(q)+
+'"')},writeEndElement:function(){var o;if(this.tags.length>0){o=this.tags.pop();this._writeAttributesEnd(1)&&this.writeRaw("</"+o+">");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(o){this._writeAttributesEnd();this.writeRaw(this.encode(o));this.count++},writeCDATA:function(o){this._writeAttributesEnd();
+this.writeRaw("<![CDATA["+o+"]]\>");this.count++},writeComment:function(o){this._writeAttributesEnd();this.writeRaw("<\!-- "+o+"--\>");this.count++},writeRaw:function(o){this.str+=o},encode:function(o){return o.replace(/[<>&"]/g,function(q){switch(q){case "<":return"&lt;";case ">":return"&gt;";case "&":return"&amp;";case '"':return"&quot;"}return q})},getContent:function(){return this.str},_writeAttributesEnd:function(o){if(this.inAttr){this.inAttr=false;if(o&&this.elementCount==this.count){this.writeRaw(" />");
+return false}this.writeRaw(">");return true}}})})(tinymce);
+(function(l){function o(d){return d.replace(/([?+*])/g,".$1")}var q=l.extend,k=l.each,j=l.util.Dispatcher,b=l.isIE,g=l.isGecko;l.create("tinymce.dom.Serializer",{Serializer:function(d){var n=this;n.key=0;n.onPreProcess=new j(n);n.onPostProcess=new j(n);try{n.writer=new l.dom.XMLWriter}catch(r){n.writer=new l.dom.StringWriter}n.settings=d=q({dom:l.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"},d);n.dom=d.dom;n.schema=d.schema;if(d.entity_encoding=="named"&&!d.entities)d.entity_encoding="raw";d.remove_redundant_brs&&n.onPostProcess.add(function(u,v){v.content=
+v.content.replace(/(<br \/>\s*)+<\/(p|h[1-6]|div|li)>/gi,function(f,e,c){if(/^<br \/>\s*<\//.test(f))return"</"+c+">";return f})});d.element_format=="html"&&n.onPostProcess.add(function(u,v){v.content=v.content.replace(/<([^>]+) \/>/g,"<$1>")});d.fix_list_elements&&n.onPreProcess.add(function(u,v){function f(s,x){for(var y=x.split(","),C;(s=s.previousSibling)!=null;)for(C=0;C<y.length;C++)if(s.nodeName==y[C])return s;return null}var e,c,i=["ol","ul"],a,h,m,p=/^(OL|UL)$/,t;for(c=0;c<i.length;c++){e=
+n.dom.select(i[c],v.node);for(a=0;a<e.length;a++){h=e[a];m=h.parentNode;if(p.test(m.nodeName))if(t=f(h,"LI"))t.appendChild(h);else{t=n.dom.create("li");t.innerHTML="&nbsp;";t.appendChild(h);m.insertBefore(t,m.firstChild)}}}});d.fix_table_elements&&n.onPreProcess.add(function(u,v){if(!l.isOpera||opera.buildNumber()>=1767)k(n.dom.select("p table",v.node).reverse(),function(f){var e=n.dom.getParent(f.parentNode,"table,p");if(e.nodeName!="TABLE")try{n.dom.split(e,f)}catch(c){}})})},setEntities:function(d){var n,
+r={},u;if(!this.entityLookup){d=d.split(",");for(n=0;n<d.length;n+=2){u=d[n];if(!(u==34||u==38||u==60||u==62)){r[String.fromCharCode(d[n])]=d[n+1];parseInt(d[n]).toString(16)}}this.entityLookup=r}},setRules:function(d){this._setup();this.rules={};this.wildRules=[];this.validElements={};return this.addRules(d)},addRules:function(d){var n=this,r;if(d){n._setup();k(d.split(","),function(u){u=u.split(/\[|\]/);var v=u[0].split("/"),f,e,c,i=[];if(r)e=l.extend([],r.attribs);u.length>1&&k(u[1].split("|"),
+function(a){var h={},m;e=e||[];a=a.replace(/::/g,"~");a=/^([!\-])?([\w*.?~_\-]+|)([=:<])?(.+)?$/.exec(a);a[2]=a[2].replace(/~/g,":");if(a[1]=="!"){f=f||[];f.push(a[2])}if(a[1]=="-")for(m=0;m<e.length;m++)if(e[m].name==a[2]){e.splice(m,1);return}switch(a[3]){case "=":h.defaultVal=a[4]||"";break;case ":":h.forcedVal=a[4];break;case "<":h.validVals=a[4].split("?")}if(/[*.?]/.test(a[2])){c=c||[];h.nameRE=RegExp("^"+o(a[2])+"$");c.push(h)}else{h.name=a[2];e.push(h)}i.push(a[2])});k(v,function(a,h){var m=
+a.charAt(0),p=1,t={};if(r){if(r.noEmpty)t.noEmpty=r.noEmpty;if(r.fullEnd)t.fullEnd=r.fullEnd;if(r.padd)t.padd=r.padd}switch(m){case "-":t.noEmpty=true;break;case "+":t.fullEnd=true;break;case "#":t.padd=true;break;default:p=0}v[h]=a=a.substring(p);n.validElements[a]=1;if(/[*.?]/.test(v[0])){t.nameRE=RegExp("^"+o(v[0])+"$");n.wildRules=n.wildRules||{};n.wildRules.push(t)}else{t.name=v[0];if(v[0]=="@")r=t;n.rules[a]=t}t.attribs=e;if(f)t.requiredAttribs=f;if(c){a="";k(i,function(s){if(a)a+="|";a+="("+
+o(s)+")"});t.validAttribsRE=RegExp("^"+a.toLowerCase()+"$");t.wildAttribs=c}})});d="";k(n.validElements,function(u,v){if(d)d+="|";if(v!="@")d+=v});n.validElementsRE=RegExp("^("+o(d.toLowerCase())+")$")}},findRule:function(d){var n=this.rules,r;this._setup();if(n=n[d])return n;n=this.wildRules;for(r=0;r<n.length;r++)if(n[r].nameRE.test(d))return n[r];return null},findAttribRule:function(d,n){var r,u=d.wildAttribs;for(r=0;r<u.length;r++)if(u[r].nameRE.test(n))return u[r];return null},serialize:function(d,
+n){var r=this,u,v,f,e;r._setup();n=n||{};n.format=n.format||"html";r.processObj=n;if(b){e=[];k(d.getElementsByTagName("option"),function(c){c=r.dom.getAttrib(c,"selected");e.push(c?c:null)})}d=d.cloneNode(true);b&&k(d.getElementsByTagName("option"),function(c,i){r.dom.setAttrib(c,"selected",e[i])});f=d.ownerDocument.implementation;if(f.createHTMLDocument&&l.isOpera&&opera.buildNumber()>=1767){u=f.createHTMLDocument("");k(d.nodeName=="BODY"?d.childNodes:[d],function(c){u.body.appendChild(u.importNode(c,
+true))});d=d.nodeName!="BODY"?u.body.firstChild:u.body;v=r.dom.doc;r.dom.doc=u}r.key=""+(parseInt(r.key)+1);if(!n.no_events){n.node=d;r.onPreProcess.dispatch(r,n)}r.writer.reset();r._info=n;r._serializeNode(d,n.getInner);n.content=r.writer.getContent();if(v)r.dom.doc=v;n.no_events||r.onPostProcess.dispatch(r,n);r._postProcess(n);n.node=null;return l.trim(n.content)},_postProcess:function(d){var n=this,r=n.settings,u=d.content,v;if(d.format=="html"){v=n._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(r.entity_encoding!=="raw")u=n._encode(u);if(!d.set){u=u.replace(/<p>\s+<\/p>|<p([^>]+)>\s+<\/p>/g,r.entity_encoding=="numeric"?"<p$1>&#160;</p>":"<p$1>&nbsp;</p>");if(r.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(r.apply_source_formatting&&r.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=n._unprotect(u,v);u=u.replace(/<\!--\[CDATA\[([\s\S]+)\]\]--\>/g,"<![CDATA[$1]]\>");if(r.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(f,e,c){return"<noscript"+e+">"+n.dom.decode(c.replace(/<\!--|--\>/g,""))+"</noscript>"})}d.content=u},_serializeNode:function(d,
+n){var r=this.settings,u=this.writer,v,f,e,c,i,a,h,m,p,t,s,x,y;if(!r.node_filter||r.node_filter(d))switch(d.nodeType){case 1:if(d.hasAttribute?d.hasAttribute("_mce_bogus"):d.getAttribute("_mce_bogus"))return;t=x=false;v=d.hasChildNodes();m=d.getAttribute("_mce_name")||d.nodeName.toLowerCase();if(y=d.getAttribute("_mce_type"))if(this._info.cleanup)x=1;else return;if(b)if(d.scopeName!=="HTML"&&d.scopeName!=="html")m=d.scopeName+":"+m;if(m.indexOf("mce:")===0)m=m.substring(4);if(!x)if(!this.validElementsRE||
+!this.validElementsRE.test(m)||this.invalidElementsRE&&this.invalidElementsRE.test(m)||n){t=true;break}if(b){if(r.fix_content_duplication){if(d._mce_serialized==this.key)return;d._mce_serialized=this.key}if(m.charAt(0)=="/")m=m.substring(1)}else if(g)if(d.nodeName==="BR"&&d.getAttribute("type")=="_moz")return;if(r.validate_children){if(this.elementName&&!this.schema.isValid(this.elementName,m)){t=true;break}this.elementName=m}p=this.findRule(m);if(!p){t=true;break}m=p.name||m;s=r.closed.test(m);if(!v&&
+p.noEmpty||b&&!m){t=true;break}if(p.requiredAttribs){i=p.requiredAttribs;for(e=i.length-1;e>=0;e--)if(this.dom.getAttrib(d,i[e])!=="")break;if(e==-1){t=true;break}}u.writeStartElement(m);if(p.attribs){e=0;a=p.attribs;for(c=a.length;e<c;e++){i=a[e];h=this._getAttrib(d,i);h!==null&&u.writeAttribute(i.name,h)}}if(p.validAttribsRE){a=this.dom.getAttribs(d);for(e=a.length-1;e>-1;e--){i=a[e];if(i.specified){i=i.nodeName.toLowerCase();if(!(r.invalid_attrs.test(i)||!p.validAttribsRE.test(i))){c=this.findAttribRule(p,
+i);h=this._getAttrib(d,c,i);h!==null&&u.writeAttribute(i,h)}}}}y&&x&&u.writeAttribute("_mce_type",y);if(m==="script"&&l.trim(d.innerHTML)){u.writeText("// ");u.writeCDATA(d.innerHTML.replace(/<\!--|--\>|<\[CDATA\[|\]\]>/g,""));v=false;break}if(p.padd)if(v&&(f=d.firstChild)&&f.nodeType===1&&d.childNodes.length===1){if(f.hasAttribute?f.hasAttribute("_mce_bogus"):f.getAttribute("_mce_bogus"))u.writeText("\u00a0")}else v||u.writeText("\u00a0");break;case 3:if(r.validate_children&&this.elementName&&!this.schema.isValid(this.elementName,
+"#text"))return;return u.writeText(d.nodeValue);case 4:return u.writeCDATA(d.nodeValue);case 8:return u.writeComment(d.nodeValue)}else if(d.nodeType==1)v=d.hasChildNodes();if(v&&!s)for(f=d.firstChild;f;){this._serializeNode(f);this.elementName=m;f=f.nextSibling}t||(s?u.writeEndElement():u.writeFullEndElement())},_protect:function(d){function n(v){return v.replace(/[\r\n\\]/g,function(f){if(f==="\n")return"\\n";else if(f==="\\")return"\\\\";return"\\r"})}function r(v){return v.replace(/\\[\\rn]/g,
+function(f){if(f==="\\n")return"\n";else if(f==="\\\\")return"\\";return"\r"})}var u=this;d.items=d.items||[];k(d.patterns,function(v){d.content=r(n(d.content).replace(v.pattern,function(f,e,c,i){c=r(c);if(v.encode)c=u._encode(c);d.items.push(c);return e+"<\!--mce:"+(d.items.length-1)+"--\>"+i}))});return d},_unprotect:function(d,n){d=d.replace(/\<\!--mce:([0-9]+)--\>/g,function(r,u){return n.items[parseInt(u)]});n.items=[];return d},_encode:function(d){var n=this.settings,r;if(n.entity_encoding!==
+"raw"){if(n.entity_encoding.indexOf("named")!=-1){this.setEntities(n.entities);r=this.entityLookup;d=d.replace(/[\u007E-\uFFFF]/g,function(u){var v;if(v=r[u])u="&"+v+";";return u})}if(n.entity_encoding.indexOf("numeric")!=-1)d=d.replace(/[\u007E-\uFFFF]/g,function(u){return"&#"+u.charCodeAt(0)+";"})}return d},_setup:function(){var d=this.settings;if(!this.done){this.done=1;this.setRules(d.valid_elements);this.addRules(d.extended_valid_elements);if(d.invalid_elements)this.invalidElementsRE=RegExp("^("+
+o(d.invalid_elements.replace(/,/g,"|").toLowerCase())+")$");if(d.attrib_value_filter)this.attribValueFilter=d.attribValueFilter}},_getAttrib:function(d,n,r){var u;r=r||n.name;if(n.forcedVal&&(u=n.forcedVal)){if(u==="{$uid}")return this.dom.uniqueId();return u}u=this.dom.getAttrib(d,r);switch(r){case "rowspan":case "colspan":if(u=="1")u=""}if(this.attribValueFilter)u=this.attribValueFilter(r,u,d);if(n.validVals){for(d=n.validVals.length-1;d>=0;d--)if(u==n.validVals[d])break;if(d==-1)return null}if(u===
+""&&typeof n.defaultVal!="undefined"){u=n.defaultVal;if(u==="{$uid}")return this.dom.uniqueId();return u}else if(r=="class"&&this.processObj.get)u=u.replace(/\s?mceItem\w+\s?/g,"");if(u==="")return null;return u}})})(tinymce);
+(function(l){l.dom.ScriptLoader=function(){function o(d,n){function r(){u.remove(c);if(v)v.onreadystatechange=v.onload=v=null;n()}var u=l.DOM,v,f,e,c;c=u.uniqueId();if(l.isIE6){f=new l.util.URI(d);e=location;if(f.host==e.hostname&&f.port==e.port&&f.protocol+":"==e.protocol){l.util.XHR.send({url:l._addVer(f.getURI()),success:function(i){var a=u.create("script",{type:"text/javascript"});a.text=i;document.getElementsByTagName("head")[0].appendChild(a);u.remove(a);r()}});return}}v=u.create("script",{id:c,
+type:"text/javascript",src:l._addVer(d)});v.onload=r;v.onreadystatechange=function(){var i=v.readyState;if(i=="complete"||i=="loaded")r()};(document.getElementsByTagName("head")[0]||document.body).appendChild(v)}var q={},k=[],j={},b=[],g=0;this.isDone=function(d){return q[d]==2};this.markDone=function(d){q[d]=2};this.add=this.load=function(d,n,r){if(q[d]==void 0){k.push(d);q[d]=0}if(n){j[d]||(j[d]=[]);j[d].push({func:n,scope:r||this})}};this.loadQueue=function(d,n){this.loadScripts(k,d,n)};this.loadScripts=
+function(d,n,r){function u(f){l.each(j[f],function(e){e.func.call(e.scope)});j[f]=void 0}var v;b.push({func:n,scope:r||this});v=function(){var f=l.grep(d);d.length=0;l.each(f,function(e){if(q[e]==2)u(e);else if(q[e]!=1){q[e]=1;g++;o(e,function(){q[e]=2;g--;u(e);v()})}});if(!g){l.each(b,function(e){e.func.call(e.scope)});b.length=0}};v()}};l.ScriptLoader=new l.dom.ScriptLoader})(tinymce);
+tinymce.dom.TreeWalker=function(l,o){function q(j,b,g,d){if(j){if(!d&&j[b])return j[b];if(j!=o){if(b=j[g])return b;for(j=j.parentNode;j&&j!=o;j=j.parentNode)if(b=j[g])return b}}}var k=l;this.current=function(){return k};this.next=function(j){return k=q(k,"firstChild","nextSibling",j)};this.prev=function(j){return k=q(k,"lastChild","lastSibling",j)}};
+(function(){var l={};(function(o,q){function k(b){return b.replace(/[A-Z]+/g,function(g){return k(o[g])})}for(var j in o)if(o.hasOwnProperty(j))o[j]=k(o[j]);k(q).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]/g,function(b,g,d){var n={};d=d.split(/\|/);for(b=d.length-1;b>=0;b--)n[d[b]]=1;l[g]=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(){this.isValid=function(o,q){var k=l[o];return!!(k&&(!q||k[q]))}}})();
+(function(l){l.dom.RangeUtils=function(o){this.walk=function(q,k){function j(i,a,h){for(var m=[];i&&i!=h;i=i[a])m.push(i);return m}function b(i,a){do{if(i.parentNode==a)return i;i=i.parentNode}while(i)}function g(i,a,h){var m=h?"nextSibling":"previousSibling";v=i;for(f=v.parentNode;v&&v!=a;v=f){f=v.parentNode;e=j(v==i?v:v[m],m);if(e.length){h||e.reverse();k(e)}}}var d=q.startContainer,n=q.startOffset,r=q.endContainer,u=q.endOffset,v,f,e,c;c=o.select("td.mceSelected,th.mceSelected");if(c.length>0)l.each(c,
+function(i){k([i])});else{if(d.nodeType==1&&d.hasChildNodes())d=d.childNodes[n];if(r.nodeType==1&&r.hasChildNodes())r=r.childNodes[Math.min(n==u?u:u-1,r.childNodes.length-1)];u=o.findCommonAncestor(d,r);if(d==r)return k([d]);for(v=d;v;v=v.parentNode){if(v==r)return g(d,u,true);if(v==u)break}for(v=r;v;v=v.parentNode){if(v==d)return g(r,u);if(v==u)break}n=b(d,u)||d;u=b(r,u)||r;g(d,n,true);e=j(n==d?n:n.nextSibling,"nextSibling",u==r?u.nextSibling:u);e.length&&k(e);g(r,u)}}};l.dom.RangeUtils.compareRanges=
+function(o,q){if(o&&q)if(o.item||o.duplicate){if(o.item&&q.item&&o.item(0)===q.item(0))return true;if(o.isEqual&&q.isEqual&&q.isEqual(o))return true}else return o.startContainer==q.startContainer&&o.startOffset==q.startOffset;return false}})(tinymce);
+(function(l){var o=l.DOM,q=l.is;l.create("tinymce.ui.Control",{Control:function(k,j){this.id=k;this.settings=j=j||{};this.rendered=false;this.onRender=new l.util.Dispatcher(this);this.classPrefix="";this.scope=j.scope||this;this.active=this.disabled=0},setDisabled:function(k){var j;if(k!=this.disabled){if((j=o.get(this.id))&&this.settings.unavailable_prefix)if(k){this.prevTitle=j.title;j.title=this.settings.unavailable_prefix+": "+j.title}else j.title=this.prevTitle;this.setState("Disabled",k);this.setState("Enabled",
+!k);this.disabled=k}},isDisabled:function(){return this.disabled},setActive:function(k){if(k!=this.active){this.setState("Active",k);this.active=k}},isActive:function(){return this.active},setState:function(k,j){var b=o.get(this.id);k=this.classPrefix+k;j?o.addClass(b,k):o.removeClass(b,k)},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(k){o.setHTML(k,this.renderHTML())},postRender:function(){var k;if(q(this.disabled)){k=this.disabled;this.disabled=-1;this.setDisabled(k)}if(q(this.active)){k=
+this.active;this.active=-1;this.setActive(k)}},remove:function(){o.remove(this.id);this.destroy()},destroy:function(){l.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(l,o){this.parent(l,o);this.controls=[];this.lookup={}},add:function(l){this.lookup[l.id]=l;this.controls.push(l);return l},get:function(l){return this.lookup[l]}});
+tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(l,o){this.parent(l,o);this.classPrefix="mceSeparator"},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix})}});
+(function(l){var o=l.is;l.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(q,k){this.parent(q,k);this.classPrefix="mceMenuItem"},setSelected:function(q){this.setState("Selected",q);this.selected=q},isSelected:function(){return this.selected},postRender:function(){this.parent();o(this.selected)&&this.setSelected(this.selected)}})})(tinymce);
+(function(l){var o=l.DOM,q=l.walk;l.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(k,j){this.parent(k,j);this.items={};this.collapsed=false;this.menuCount=0;this.onAddItem=new l.util.Dispatcher(this)},expand:function(k){k&&q(this,function(j){j.expand&&j.expand()},"items",this);this.collapsed=false},collapse:function(k){k&&q(this,function(j){j.collapse&&j.collapse()},"items",this);this.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(k){k.settings||(k=new l.ui.MenuItem(k.id||
+o.uniqueId(),k));this.onAddItem.dispatch(this,k);return this.items[k.id]=k},addSeparator:function(){return this.add({separator:true})},addMenu:function(k){k.collapse||(k=this.createMenu(k));this.menuCount++;return this.add(k)},hasMenus:function(){return this.menuCount!==0},remove:function(k){delete this.items[k.id]},removeAll:function(){q(this,function(k){k.removeAll?k.removeAll():k.remove();k.destroy()},"items",this);this.items={}},createMenu:function(k){k=new l.ui.Menu(k.id||o.uniqueId(),k);k.onAddItem.add(this.onAddItem.dispatch,
+this.onAddItem);return k}})})(tinymce);
+(function(l){var o=l.is,q=l.DOM,k=l.each,j=l.dom.Event,b=l.dom.Element;l.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(g,d){d=d||{};d.container=d.container||q.doc.body;d.offset_x=d.offset_x||0;d.offset_y=d.offset_y||0;d.vp_offset_x=d.vp_offset_x||0;d.vp_offset_y=d.vp_offset_y||0;if(o(d.icons)&&!d.icons)d["class"]+=" mceNoIcons";this.parent(g,d);this.onShowMenu=new l.util.Dispatcher(this);this.onHideMenu=new l.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(g){var d=
+this.settings;g.container=g.container||d.container;g.parent=this;g.constrain=g.constrain||d.constrain;g["class"]=g["class"]||d["class"];g.vp_offset_x=g.vp_offset_x||d.vp_offset_x;g.vp_offset_y=g.vp_offset_y||d.vp_offset_y;g=new l.ui.DropMenu(g.id||q.uniqueId(),g);g.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return g},update:function(){var g=this.settings,d=q.get("menu_"+this.id+"_tbl"),n=q.get("menu_"+this.id+"_co"),r,u;r=g.max_width?Math.min(d.clientWidth,g.max_width):d.clientWidth;u=
+g.max_height?Math.min(d.clientHeight,g.max_height):d.clientHeight;q.boxModel?this.element.setStyles({width:r,height:u}):this.element.setStyles({width:r+2,height:u+2});g.max_width&&q.setStyle(n,"width",r);if(g.max_height){q.setStyle(n,"height",u);d.clientHeight<g.max_height&&q.setStyle(n,"overflow","hidden")}},showMenu:function(g,d,n){var r=this,u=r.settings,v,f=q.getViewPort(),e,c,i,a,h=r.classPrefix;r.collapse(1);if(!r.isMenuVisible){if(r.rendered)v=q.get("menu_"+r.id);else{v=q.add(r.settings.container,
+r.renderNode());k(r.items,function(m){m.postRender()});r.element=new b("menu_"+r.id,{blocker:1,container:u.container})}l.isOpera||q.setStyles(v,{left:-65535,top:-65535});q.show(v);r.update();g+=u.offset_x||0;d+=u.offset_y||0;f.w-=4;f.h-=4;if(u.constrain){e=v.clientWidth-2;c=v.clientHeight-2;i=f.x+f.w;f=f.y+f.h;if(g+u.vp_offset_x+e>i)g=n?n-e:Math.max(0,i-u.vp_offset_x-e);if(d+u.vp_offset_y+c>f)d=Math.max(0,f-u.vp_offset_y-c)}q.setStyles(v,{left:g,top:d});r.element.update();r.isMenuVisible=1;r.mouseClickFunc=
+j.add(v,"click",function(m){var p;if((m=m.target)&&(m=q.getParent(m,"tr"))&&!q.hasClass(m,h+"ItemSub")){p=r.items[m.id];if(!p.isDisabled()){for(a=r;a;){a.hideMenu&&a.hideMenu();a=a.settings.parent}if(p.settings.onclick)p.settings.onclick(m);return j.cancel(m)}}});if(r.hasMenus())r.mouseOverFunc=j.add(v,"mouseover",function(m){var p;if((m=m.target)&&(m=q.getParent(m,"tr"))){p=r.items[m.id];r.lastMenu&&r.lastMenu.collapse(1);if(!p.isDisabled())if(m&&q.hasClass(m,h+"ItemSub")){m=q.getRect(m);p.showMenu(m.x+
+m.w-2,m.y-2,m.x);r.lastMenu=p;q.addClass(q.get(p.id).firstChild,h+"ItemActive")}}});r.onShowMenu.dispatch(r);if(u.keyboard_focus){j.add(v,"keydown",r._keyHandler,r);q.select("a","menu_"+r.id)[0].focus();r._focusIdx=0}}},hideMenu:function(g){var d=q.get("menu_"+this.id);if(this.isMenuVisible){j.remove(d,"mouseover",this.mouseOverFunc);j.remove(d,"click",this.mouseClickFunc);j.remove(d,"keydown",this._keyHandler);q.hide(d);this.isMenuVisible=0;g||this.collapse(1);this.element&&this.element.hide();if(g=
+q.get(this.id))q.removeClass(g.firstChild,this.classPrefix+"ItemActive");this.onHideMenu.dispatch(this)}},add:function(g){var d;g=this.parent(g);if(this.isRendered&&(d=q.get("menu_"+this.id)))this._add(q.select("tbody",d)[0],g);return g},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){q.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=q.get("menu_"+this.id);j.remove(g,"mouseover",this.mouseOverFunc);j.remove(g,"click",this.mouseClickFunc);this.element&&
+this.element.remove();q.remove(g)},renderNode:function(){var g=this,d=g.settings,n,r,u;u=q.create("div",{id:"menu_"+g.id,"class":d["class"],style:"position:absolute;left:0;top:0;z-index:200000"});r=q.add(u,"div",{id:"menu_"+g.id+"_co","class":g.classPrefix+(d["class"]?" "+d["class"]:"")});g.element=new b("menu_"+g.id,{blocker:1,container:d.container});d.menu_line&&q.add(r,"span",{"class":g.classPrefix+"Line"});d=q.add(r,"table",{id:"menu_"+g.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});n=q.add(d,
+"tbody");k(g.items,function(v){g._add(n,v)});g.rendered=true;return u},_keyHandler:function(g){function d(r){r=n._focusIdx+r;var u=q.select("a","menu_"+n.id)[r];if(u){n._focusIdx=r;u.focus()}}var n=this;switch(g.keyCode){case 38:d(-1);break;case 40:d(1);break;case 27:return this.hideMenu()}},_add:function(g,d){var n,r=d.settings,u,v,f=this.classPrefix;if(r.separator){u=q.add(g,"tr",{id:d.id,"class":f+"ItemSeparator"});q.add(u,"td",{"class":f+"ItemSeparator"});if(n=u.previousSibling)q.addClass(n,"mceLast")}else{n=
+u=q.add(g,"tr",{id:d.id,"class":f+"Item "+f+"ItemEnabled"});n=v=q.add(n,"td");n=q.add(n,"a",{href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});q.addClass(v,r["class"]);v=q.add(n,"span",{"class":"mceIcon"+(r.icon?" mce_"+r.icon:"")});r.icon_src&&q.add(v,"img",{src:r.icon_src});n=q.add(n,r.element||"span",{"class":"mceText",title:d.settings.title},d.settings.title);d.settings.style&&q.setAttrib(n,"style",d.settings.style);g.childNodes.length==1&&q.addClass(u,"mceFirst");if((n=
+u.previousSibling)&&q.hasClass(n,f+"ItemSeparator"))q.addClass(u,"mceFirst");d.collapse&&q.addClass(u,f+"ItemSub");if(n=u.previousSibling)q.removeClass(n,"mceLast");q.addClass(u,"mceLast")}}})})(tinymce);
+(function(l){var o=l.DOM;l.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(q,k){this.parent(q,k);this.classPrefix="mceButton"},renderHTML:function(){var q=this.classPrefix,k=this.settings,j,b;b=o.encode(k.label||"");j='<a id="'+this.id+'" href="javascript:;" class="'+q+" "+q+"Enabled "+k["class"]+(b?" "+q+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" title="'+o.encode(k.title)+'">';j+=k.image?'<img class="mceIcon" src="'+k.image+'" />'+b+"</a>":'<span class="mceIcon '+
+k["class"]+'"></span>'+(b?'<span class="'+q+'Label">'+b+"</span>":"")+"</a>";return j},postRender:function(){var q=this,k=q.settings;l.dom.Event.add(q.id,"click",function(j){if(!q.isDisabled())return k.onclick.call(k.scope,j)})}})})(tinymce);
+(function(l){var o=l.DOM,q=l.dom.Event,k=l.each,j=l.util.Dispatcher;l.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(b,g){this.parent(b,g);this.items=[];this.onChange=new j(this);this.onPostRender=new j(this);this.onAdd=new j(this);this.onRenderMenu=new l.util.Dispatcher(this);this.classPrefix="mceListBox"},select:function(b){var g=this,d,n;if(b==undefined)return g.selectByIndex(-1);n=b&&b.call?b:function(r){return r==b};if(b!=g.selectedValue){k(g.items,function(r,u){if(n(r.value)){d=
+1;g.selectByIndex(u);return false}});d||g.selectByIndex(-1)}},selectByIndex:function(b){var g,d;if(b!=this.selectedIndex){g=o.get(this.id+"_text");if(d=this.items[b]){this.selectedValue=d.value;this.selectedIndex=b;o.setHTML(g,o.encode(d.title));o.removeClass(g,"mceTitle")}else{o.setHTML(g,o.encode(this.settings.title));o.addClass(g,"mceTitle");this.selectedValue=this.selectedIndex=null}}},add:function(b,g,d){d=d||{};d=l.extend(d,{title:b,value:g});this.items.push(d);this.onAdd.dispatch(this,d)},
+getLength:function(){return this.items.length},renderHTML:function(){var b="";b=this.settings;var g=this.classPrefix;b='<table id="'+this.id+'" cellpadding="0" cellspacing="0" class="'+g+" "+g+"Enabled"+(b["class"]?" "+b["class"]:"")+'"><tbody><tr>';b+="<td>"+o.createHTML("a",{id:this.id+"_text",href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},o.encode(this.settings.title))+"</td>";b+="<td>"+o.createHTML("a",{id:this.id+"_open",tabindex:-1,href:"javascript:;",
+"class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},"<span></span>")+"</td>";b+="</tr></tbody></table>";return b},showMenu:function(){var b=this,g,d=o.get(this.id),n;if(!(b.isDisabled()||b.items.length==0)){if(b.menu&&b.menu.isMenuVisible)return b.hideMenu();if(!b.isMenuRendered){b.renderMenu();b.isMenuRendered=true}o.getPos(this.settings.menu_container);g=o.getPos(d);n=b.menu;n.settings.offset_x=g.x;n.settings.offset_y=g.y;n.settings.keyboard_focus=!l.isOpera;b.oldID&&n.items[b.oldID].setSelected(0);
+k(b.items,function(r){if(r.value===b.selectedValue){n.items[r.id].setSelected(1);b.oldID=r.id}});n.showMenu(0,d.clientHeight);q.add(o.doc,"mousedown",b.hideMenu,b);o.addClass(b.id,b.classPrefix+"Selected")}},hideMenu:function(b){if(this.menu&&this.menu.isMenuVisible)if(!(b&&b.type=="mousedown"&&(b.target.id==this.id+"_text"||b.target.id==this.id+"_open")))if(!b||!o.getParent(b.target,".mceMenu")){o.removeClass(this.id,this.classPrefix+"Selected");q.remove(o.doc,"mousedown",this.hideMenu,this);this.menu.hideMenu()}},
+renderMenu:function(){var b=this,g;g=b.settings.control_manager.createDropMenu(b.id+"_menu",{menu_line:1,"class":b.classPrefix+"Menu mceNoIcons",max_width:150,max_height:150});g.onHideMenu.add(b.hideMenu,b);g.add({title:b.settings.title,"class":"mceMenuItemTitle",onclick:function(){b.settings.onselect("")!==false&&b.select("")}});k(b.items,function(d){if(d.value===undefined)g.add({title:d.title,"class":"mceMenuItemTitle",onclick:function(){b.settings.onselect("")!==false&&b.select("")}});else{d.id=
+o.uniqueId();d.onclick=function(){b.settings.onselect(d.value)!==false&&b.select(d.value)};g.add(d)}});b.onRenderMenu.dispatch(b,g);b.menu=g},postRender:function(){var b=this,g=b.classPrefix;q.add(b.id,"click",b.showMenu,b);q.add(b.id+"_text","focus",function(){if(!b._focused)b.keyDownHandler=q.add(b.id+"_text","keydown",function(d){var n=-1,r,u=d.keyCode;k(b.items,function(v,f){if(b.selectedValue==v.value)n=f});if(u==38)r=b.items[n-1];else if(u==40)r=b.items[n+1];else if(u==13){r=b.selectedValue;
+b.selectedValue=null;b.settings.onselect(r);return q.cancel(d)}if(r){b.hideMenu();b.select(r.value)}});b._focused=1});q.add(b.id+"_text","blur",function(){q.remove(b.id+"_text","keydown",b.keyDownHandler);b._focused=0});if(l.isIE6||!o.boxModel){q.add(b.id,"mouseover",function(){o.hasClass(b.id,g+"Disabled")||o.addClass(b.id,g+"Hover")});q.add(b.id,"mouseout",function(){o.hasClass(b.id,g+"Disabled")||o.removeClass(b.id,g+"Hover")})}b.onPostRender.dispatch(b,o.get(b.id))},destroy:function(){this.parent();
+q.clear(this.id+"_text");q.clear(this.id+"_open")}})})(tinymce);
+(function(l){var o=l.DOM,q=l.dom.Event,k=l.each;l.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(j,b){this.parent(j,b);this.classPrefix="mceNativeListBox"},setDisabled:function(j){o.get(this.id).disabled=j},isDisabled:function(){return o.get(this.id).disabled},select:function(j){var b=this,g,d;if(j==undefined)return b.selectByIndex(-1);d=j&&j.call?j:function(n){return n==j};if(j!=b.selectedValue){k(b.items,function(n,r){if(d(n.value)){g=1;b.selectByIndex(r);return false}});
+g||b.selectByIndex(-1)}},selectByIndex:function(j){o.get(this.id).selectedIndex=j+1;this.selectedValue=this.items[j]?this.items[j].value:null},add:function(j,b,g){g=g||{};g.value=b;this.isRendered()&&o.add(o.get(this.id),"option",g,j);j={title:j,value:b,attribs:g};this.items.push(j);this.onAdd.dispatch(this,j)},getLength:function(){return this.items.length},renderHTML:function(){var j;j=o.createHTML("option",{value:""},"-- "+this.settings.title+" --");k(this.items,function(b){j+=o.createHTML("option",
+{value:b.value},b.title)});return j=o.createHTML("select",{id:this.id,"class":"mceNativeListBox"},j)},postRender:function(){function j(g){if((g=b.items[g.target.selectedIndex-1])&&(g=g.value)){b.onChange.dispatch(b,g);if(b.settings.onselect)b.settings.onselect(g)}}var b=this;b.rendered=true;q.add(b.id,"change",j);q.add(b.id,"keydown",function(g){var d;q.remove(b.id,"change",void 0);d=q.add(b.id,"blur",function(){q.add(b.id,"change",j);q.remove(b.id,"blur",d)});if(g.keyCode==13||g.keyCode==32){j(g);
+return q.cancel(g)}});b.onPostRender.dispatch(b,o.get(b.id))}})})(tinymce);
+(function(l){var o=l.DOM,q=l.dom.Event;l.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(k,j){this.parent(k,j);this.onRenderMenu=new l.util.Dispatcher(this);j.menu_container=j.menu_container||o.doc.body},showMenu:function(){var k,j=o.get(this.id),b;if(!this.isDisabled()){if(!this.isMenuRendered){this.renderMenu();this.isMenuRendered=true}if(this.isMenuVisible)return this.hideMenu();o.getPos(this.settings.menu_container);k=o.getPos(j);b=this.menu;b.settings.offset_x=k.x;b.settings.offset_y=
+k.y;b.settings.vp_offset_x=k.x;b.settings.vp_offset_y=k.y;b.settings.keyboard_focus=this._focused;b.showMenu(0,j.clientHeight);q.add(o.doc,"mousedown",this.hideMenu,this);this.setState("Selected",1);this.isMenuVisible=1}},renderMenu:function(){var k;k=this.settings.control_manager.createDropMenu(this.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:this.settings.icons});k.onHideMenu.add(this.hideMenu,this);this.onRenderMenu.dispatch(this,k);this.menu=k},hideMenu:function(k){var j=this;
+if(!(k&&k.type=="mousedown"&&o.getParent(k.target,function(b){return b.id===j.id||b.id===j.id+"_open"}))){if(!k||!o.getParent(k.target,".mceMenu")){j.setState("Selected",0);q.remove(o.doc,"mousedown",j.hideMenu,j);j.menu&&j.menu.hideMenu()}j.isMenuVisible=0}},postRender:function(){var k=this,j=k.settings;q.add(k.id,"click",function(){if(!k.isDisabled()){if(j.onclick)j.onclick(k.value);k.showMenu()}})}})})(tinymce);
+(function(l){var o=l.DOM,q=l.dom.Event;l.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(k,j){this.parent(k,j);this.classPrefix="mceSplitButton"},renderHTML:function(){var k,j=this.settings,b;k="<tbody><tr>";b=j.image?o.createHTML("img ",{src:j.image,"class":"mceAction "+j["class"]}):o.createHTML("span",{"class":"mceAction "+j["class"]},"");k+="<td>"+o.createHTML("a",{id:this.id+"_action",href:"javascript:;","class":"mceAction "+j["class"],onclick:"return false;",onmousedown:"return false;",
+title:j.title},b)+"</td>";b=o.createHTML("span",{"class":"mceOpen "+j["class"]});k+="<td>"+o.createHTML("a",{id:this.id+"_open",href:"javascript:;","class":"mceOpen "+j["class"],onclick:"return false;",onmousedown:"return false;",title:j.title},b)+"</td>";k+="</tr></tbody>";return o.createHTML("table",{id:this.id,"class":"mceSplitButton mceSplitButtonEnabled "+j["class"],cellpadding:"0",cellspacing:"0",onmousedown:"return false;",title:j.title},k)},postRender:function(){var k=this,j=k.settings;j.onclick&&
+q.add(k.id+"_action","click",function(){if(!k.isDisabled())j.onclick(k.value)});q.add(k.id+"_open","click",k.showMenu,k);q.add(k.id+"_open","focus",function(){k._focused=1});q.add(k.id+"_open","blur",function(){k._focused=0});if(l.isIE6||!o.boxModel){q.add(k.id,"mouseover",function(){o.hasClass(k.id,"mceSplitButtonDisabled")||o.addClass(k.id,"mceSplitButtonHover")});q.add(k.id,"mouseout",function(){o.hasClass(k.id,"mceSplitButtonDisabled")||o.removeClass(k.id,"mceSplitButtonHover")})}},destroy:function(){this.parent();
+q.clear(this.id+"_action");q.clear(this.id+"_open")}})})(tinymce);
+(function(l){var o=l.DOM,q=l.dom.Event,k=l.is,j=l.each;l.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(b,g){this.parent(b,g);this.settings=g=l.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 l.util.Dispatcher(this);this.onHideMenu=new l.util.Dispatcher(this);this.value=g.default_color},showMenu:function(){var b=this,g,d;if(!b.isDisabled()){if(!b.isMenuRendered){b.renderMenu();b.isMenuRendered=true}if(b.isMenuVisible)return b.hideMenu();g=o.get(b.id);o.show(b.id+"_menu");o.addClass(g,"mceSplitButtonSelected");d=o.getPos(g);o.setStyles(b.id+"_menu",{left:d.x,top:d.y+g.clientHeight,zIndex:2E5});g=0;q.add(o.doc,"mousedown",b.hideMenu,b);b.onShowMenu.dispatch(b);
+if(b._focused){b._keyHandler=q.add(b.id+"_menu","keydown",function(n){n.keyCode==27&&b.hideMenu()});o.select("a",b.id+"_menu")[0].focus()}b.isMenuVisible=1}},hideMenu:function(b){var g=this;if(!(b&&b.type=="mousedown"&&o.getParent(b.target,function(d){return d.id===g.id+"_open"}))){if(!b||!o.getParent(b.target,".mceSplitButtonMenu")){o.removeClass(g.id,"mceSplitButtonSelected");q.remove(o.doc,"mousedown",g.hideMenu,g);q.remove(g.id+"_menu","keydown",g._keyHandler);o.hide(g.id+"_menu")}g.onHideMenu.dispatch(g);
+g.isMenuVisible=0}},renderMenu:function(){var b=this,g,d=0,n=b.settings,r,u,v,f;f=o.add(n.menu_container,"div",{id:b.id+"_menu","class":n.menu_class+" "+n["class"],style:"position:absolute;left:0;top:-1000px;"});g=o.add(f,"div",{"class":n["class"]+" mceSplitButtonMenu"});o.add(g,"span",{"class":"mceMenuLine"});r=o.add(g,"table",{"class":"mceColorSplitMenu"});u=o.add(r,"tbody");d=0;j(k(n.colors,"array")?n.colors:n.colors.split(","),function(e){e=e.replace(/^#/,"");if(!d--){v=o.add(u,"tr");d=n.grid_width-
+1}r=o.add(v,"td");r=o.add(r,"a",{href:"javascript:;",style:{backgroundColor:"#"+e},_mce_color:"#"+e})});if(n.more_colors_func){r=o.add(u,"tr");r=o.add(r,"td",{colspan:n.grid_width,"class":"mceMoreColors"});r=o.add(r,"a",{id:b.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},n.more_colors_title);q.add(r,"click",function(e){n.more_colors_func.call(n.more_colors_scope||this);return q.cancel(e)})}o.addClass(g,"mceColorSplitMenu");q.add(b.id+"_menu","click",function(e){var c;
+e=e.target;if(e.nodeName=="A"&&(c=e.getAttribute("_mce_color")))b.setColor(c);return q.cancel(e)});return f},setColor:function(b){o.setStyle(this.id+"_preview","backgroundColor",b);this.value=b;this.hideMenu();this.settings.onselect(b)},postRender:function(){var b=this.id;this.parent();o.add(b+"_action","div",{id:b+"_preview","class":"mceColorPreview"});o.setStyle(this.id+"_preview","backgroundColor",this.value)},destroy:function(){this.parent();q.clear(this.id+"_menu");q.clear(this.id+"_more");o.remove(this.id+
+"_menu")}})})(tinymce);
+tinymce.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var l="",o,q,k=tinymce.DOM,j=this.settings,b,g,d,n;n=this.controls;for(b=0;b<n.length;b++){q=n[b];g=n[b-1];d=n[b+1];if(b===0){o="mceToolbarStart";if(q.Button)o+=" mceToolbarStartButton";else if(q.SplitButton)o+=" mceToolbarStartSplitButton";else if(q.ListBox)o+=" mceToolbarStartListBox";l+=k.createHTML("td",{"class":o},k.createHTML("span",null,"<\!-- IE --\>"))}if(g&&q.ListBox)if(g.Button||g.SplitButton)l+=k.createHTML("td",
+{"class":"mceToolbarEnd"},k.createHTML("span",null,"<\!-- IE --\>"));l+=k.stdMode?'<td style="position: relative">'+q.renderHTML()+"</td>":"<td>"+q.renderHTML()+"</td>";if(d&&q.ListBox)if(d.Button||d.SplitButton)l+=k.createHTML("td",{"class":"mceToolbarStart"},k.createHTML("span",null,"<\!-- IE --\>"))}o="mceToolbarEnd";if(q.Button)o+=" mceToolbarEndButton";else if(q.SplitButton)o+=" mceToolbarEndSplitButton";else if(q.ListBox)o+=" mceToolbarEndListBox";l+=k.createHTML("td",{"class":o},k.createHTML("span",
+null,"<\!-- IE --\>"));return k.createHTML("table",{id:this.id,"class":"mceToolbar"+(j["class"]?" "+j["class"]:""),cellpadding:"0",cellspacing:"0",align:this.settings.align||""},"<tbody><tr>"+l+"</tr></tbody>")}});
+(function(l){l.create("tinymce.AddOnManager",{items:[],urls:{},lookup:{},onAdd:new l.util.Dispatcher(this),get:function(o){return this.lookup[o]},requireLangPack:function(o){var q=l.settings;q&&q.language&&l.ScriptLoader.add(this.urls[o]+"/langs/"+q.language+".js")},add:function(o,q){this.items.push(q);this.lookup[o]=q;this.onAdd.dispatch(this,o,q);return q},load:function(o,q,k,j){if(!this.urls[o]){if(q.indexOf("/")!=0&&q.indexOf("://")==-1)q=l.baseURL+"/"+q;this.urls[o]=q.substring(0,q.lastIndexOf("/"));
+l.ScriptLoader.add(q,k,j)}}});l.PluginManager=new l.AddOnManager;l.ThemeManager=new l.AddOnManager})(tinymce);
+(function(l){var o=l.each,q=l.extend,k=l.DOM,j=l.dom.Event,b=l.explode,g=l.util.Dispatcher,d=0;l.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");/[\/\\]$/.test(l.documentBaseURL)||(l.documentBaseURL+="/");l.baseURL=(new l.util.URI(l.documentBaseURL)).toAbsolute(l.baseURL);l.baseURI=new l.util.URI(l.baseURL);l.onBeforeUnload=new g(l);j.add(window,"beforeunload",function(n){l.onBeforeUnload.dispatch(l,n)});l.onAddEditor=new g(l);l.onRemoveEditor=new g(l);l.EditorManager=
+q(l,{editors:[],i18n:{},activeEditor:null,init:function(n){function r(c,i,a){var h=c[i];if(h){if(l.is(h,"string")){a=(a=h.replace(/\.\w+$/,""))?l.resolve(a):0;h=l.resolve(h)}return h.apply(a||this,Array.prototype.slice.call(arguments,2))}}var u=this,v,f=[],e;n=q({theme:"simple",language:"en"},n);u.settings=n;j.add(document,"init",function(){var c,i;r(n,"onpageload");switch(n.mode){case "exact":c=n.elements||"";c.length>0&&o(b(c),function(a){if(k.get(a)){e=new l.Editor(a,n);f.push(e);e.render(1)}else o(document.forms,
+function(h){o(h.elements,function(m){if(m.name===a){a="mce_editor_"+d++;k.setAttrib(m,"id",a);e=new l.Editor(a,n);f.push(e);e.render(1)}})})});break;case "textareas":case "specific_textareas":o(k.select("textarea"),function(a){if(!(n.editor_deselector&&(n.editor_deselector.constructor===RegExp?n.editor_deselector.test(a.className):k.hasClass(a,n.editor_deselector))))if(!n.editor_selector||(n.editor_selector.constructor===RegExp?n.editor_selector.test(a.className):k.hasClass(a,n.editor_selector))){v=
+k.get(a.name);if(!a.id&&!v)a.id=a.name;if(!a.id||u.get(a.id))a.id=k.uniqueId();e=new l.Editor(a.id,n);f.push(e);e.render(1)}})}if(n.oninit){c=i=0;o(f,function(a){i++;if(a.initialized)c++;else a.onInit.add(function(){c++;c==i&&r(n,"oninit")});c==i&&r(n,"oninit")})}})},get:function(n){if(n===void 0)return this.editors;return this.editors[n]},getInstanceById:function(n){return this.get(n)},add:function(n){var r=this.editors;r[n.id]=n;r.push(n);this._setActive(n);this.onAddEditor.dispatch(this,n);return n},
+remove:function(n){var r,u=this.editors;if(!u[n.id])return null;delete u[n.id];for(r=0;r<u.length;r++)if(u[r]==n){u.splice(r,1);break}this.activeEditor==n&&this._setActive(u[0]);n.destroy();this.onRemoveEditor.dispatch(this,n);return n},execCommand:function(n,r,u){var v=this.get(u),f;switch(n){case "mceFocus":v.focus();return true;case "mceAddEditor":case "mceAddControl":this.get(u)||(new l.Editor(u,this.settings)).render();return true;case "mceAddFrameControl":f=u.window;f.tinyMCE=tinyMCE;f.tinymce=
+l;l.DOM.doc=f.document;l.DOM.win=f;v=new l.Editor(u.element_id,u);v.render();if(l.isIE){var e=function(){v.destroy();f.detachEvent("onunload",e);f=f.tinyMCE=f.tinymce=null};f.attachEvent("onunload",e)}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(n,r,u);return false},
+execInstanceCommand:function(n,r,u,v){if(n=this.get(n))return n.execCommand(r,u,v);return false},triggerSave:function(){o(this.editors,function(n){n.save()})},addI18n:function(n,r){var u=this.i18n;l.is(n,"string")?o(r,function(v,f){u[n+"."+f]=v}):o(n,function(v,f){o(v,function(e,c){o(e,function(i,a){if(c==="common")u[f+"."+a]=i;else u[f+"."+c+"."+a]=i})})})},_setActive:function(n){this.selectedInstance=this.activeEditor=n}})})(tinymce);
+(function(l){var o=l.DOM,q=l.dom.Event,k=l.extend,j=l.util.Dispatcher,b=l.each,g=l.isGecko,d=l.isIE,n=l.is,r=l.ThemeManager,u=l.PluginManager,v=l.explode;l.create("tinymce.Editor",{Editor:function(f,e){var c=this;c.id=c.editorId=f;c.execCommands={};c.queryStateCommands={};c.queryValueCommands={};c.isNotDirty=false;c.plugins={};b(["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(i){c[i]=new j(c)});c.settings=e=k({id:f,language:"en",docs_language:"en",theme:"simple",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:l.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:l.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},e);c.documentBaseURI=new l.util.URI(e.document_base_url||l.documentBaseURL,{base_uri:tinyMCE.baseURI});c.baseURI=l.baseURI;c.execCallback("setup",c)},render:function(){var f=this,e=f.settings,c=f.id,i=l.ScriptLoader;if(q.domLoaded){tinyMCE.settings=e;if(f.getElement())if(!l.isIDevice){!/TEXTAREA|INPUT/i.test(f.getElement().nodeName)&&
+e.hidden_input&&o.getParent(c,"form")&&o.insertAfter(o.create("input",{type:"hidden",name:c}),c);if(l.WindowManager)f.windowManager=new l.WindowManager(f);e.encoding=="xml"&&f.onGetContent.add(function(a,h){if(h.save)h.content=o.encode(h.content)});e.add_form_submit_trigger&&f.onSubmit.addToTop(function(){if(f.initialized){f.save();f.isNotDirty=1}});if(e.add_unload_trigger)f._beforeUnload=tinyMCE.onBeforeUnload.add(function(){f.initialized&&!f.destroyed&&!f.isHidden()&&f.save({format:"raw",no_events:true})});
+l.addUnload(f.destroy,f);e.submit_patch&&f.onBeforeRenderUI.add(function(){var a=f.getElement().form;if(a)if(!a._mceOldSubmit){if(!a.submit.nodeType&&!a.submit.length){f.formElement=a;a._mceOldSubmit=a.submit;a.submit=function(){l.triggerSave();f.isNotDirty=1;return f.formElement._mceOldSubmit(f.formElement)}}a=null}});(function(){e.language&&i.add(l.baseURL+"/langs/"+e.language+".js");e.theme&&e.theme.charAt(0)!="-"&&!r.urls[e.theme]&&r.load(e.theme,"themes/"+e.theme+"/editor_template"+l.suffix+
+".js");b(v(e.plugins),function(a){a&&a.charAt(0)!="-"&&!u.urls[a]&&a!="safari"&&u.load(a,"plugins/"+a+"/editor_plugin"+l.suffix+".js")});i.loadQueue(function(){f.removed||f.init()})})()}}else q.add(document,"init",function(){f.render()})},init:function(){var f=this,e=f.settings,c,i,a=f.getElement(),h,m,p;l.add(f);if(e.theme){e.theme=e.theme.replace(/-/,"");h=r.get(e.theme);f.theme=new h;if(f.theme.init&&e.init_theme)f.theme.init(f,r.urls[e.theme]||l.documentBaseURL.replace(/\/$/,""))}b(v(e.plugins.replace(/\-/g,
+"")),function(t){var s=u.get(t),x=u.urls[t]||l.documentBaseURL.replace(/\/$/,"");if(s){s=new s(f,x);f.plugins[t]=s;s.init&&s.init(f,x)}});if(e.popup_css!==false)e.popup_css=e.popup_css?f.documentBaseURI.toAbsolute(e.popup_css):f.baseURI.toAbsolute("themes/"+e.theme+"/skins/"+e.skin+"/dialog.css");if(e.popup_css_add)e.popup_css+=","+f.documentBaseURI.toAbsolute(e.popup_css_add);f.controlManager=new l.ControlManager(f);if(e.custom_undo_redo){f.onBeforeExecCommand.add(function(t,s,x,y,C){if(s!="Undo"&&
+s!="Redo"&&s!="mceRepaint"&&(!C||!C.skip_undo))f.undoManager.hasUndo()||f.undoManager.add()});f.onExecCommand.add(function(t,s,x,y,C){if(s!="Undo"&&s!="Redo"&&s!="mceRepaint"&&(!C||!C.skip_undo))f.undoManager.add()})}f.onExecCommand.add(function(t,s){/^(FontName|FontSize)$/.test(s)||f.nodeChanged()});if(g){p=function(t,s){if(!s||!s.initial)f.execCommand("mceRepaint")};f.onUndo.add(p);f.onRedo.add(p);f.onSetContent.add(p)}f.onBeforeRenderUI.dispatch(f,f.controlManager);if(e.render_ui){c=e.width||a.style.width||
+a.offsetWidth;i=e.height||a.style.height||a.offsetHeight;f.orgDisplay=a.style.display;p=/^[0-9\.]+(|px)$/i;if(p.test(""+c))c=Math.max(parseInt(c)+(h.deltaWidth||0),100);if(p.test(""+i))i=Math.max(parseInt(i)+(h.deltaHeight||0),100);h=f.theme.renderUI({targetNode:a,width:c,height:i,deltaWidth:e.delta_width,deltaHeight:e.delta_height});f.editorContainer=h.editorContainer}if(document.domain&&location.hostname!=document.domain)l.relaxedDomain=document.domain;o.setStyles(h.sizeContainer||h.editorContainer,
+{width:c,height:i});i=(h.iframeHeight||i)+(typeof i=="number"?h.deltaHeight||0:"");if(i<100)i=100;f.iframeHTML=e.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">';if(e.document_base_url!=l.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(l.relaxedDomain)f.iframeHTML+='<script type="text/javascript">document.domain = "'+
+l.relaxedDomain+'";<\/script>';c=e.body_id||"tinymce";if(c.indexOf("=")!=-1){c=f.getParam("body_id","","hash");c=c[f.id]||c}e=e.body_class||"";if(e.indexOf("=")!=-1){e=f.getParam("body_class","","hash");e=e[f.id]||""}f.iframeHTML+='</head><body id="'+c+'" class="mceContentBody '+e+'"></body></html>';if(l.relaxedDomain)if(d||l.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(l.isOpera)m='javascript:(function(){document.open();document.domain="'+document.domain+'";document.close();ed.setupIframe();})()';o.add(h.iframeContainer,"iframe",{id:f.id+"_ifr",src:m||'javascript:""',frameBorder:"0",style:{width:"100%",height:i}});f.contentAreaContainer=h.iframeContainer;o.get(h.editorContainer).style.display=f.orgDisplay;o.get(f.id).style.display="none";if(!d||!l.relaxedDomain)f.setupIframe();a=h=null},setupIframe:function(){var f=this,e=f.settings;o.get(f.id);var c=f.getDoc(),
+i;if(!d||!l.relaxedDomain){c.open();c.write(f.iframeHTML);c.close()}if(!d)try{if(!e.readonly)c.designMode="On"}catch(a){}if(d){i=f.getBody();o.hide(i);if(!e.readonly)i.contentEditable=true;o.show(i)}f.dom=new l.dom.DOMUtils(f.getDoc(),{keep_values:true,url_converter:f.convertURL,url_converter_scope:f,hex_colors:e.force_hex_style_colors,class_filter:e.class_filter,update_styles:1,fix_ie_paragraphs:1,valid_styles:e.valid_styles});f.schema=new l.dom.Schema;f.serializer=new l.dom.Serializer(k(e,{valid_elements:e.verify_html===
+false?"*[*]":e.valid_elements,dom:f.dom,schema:f.schema}));f.selection=new l.dom.Selection(f.dom,f.getWin(),f.serializer);f.formatter=new l.Formatter(this);f.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"}},fontsize_class:{inline:"span",attributes:{"class":"%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}]});b("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(t){f.formatter.register(t,{block:t,remove:"all"})});f.formatter.register(f.settings.formats);f.undoManager=new l.UndoManager(f);f.undoManager.onAdd.add(function(t,s){if(!s.initial)return f.onChange.dispatch(f,
+s,t)});f.undoManager.onUndo.add(function(t,s){return f.onUndo.dispatch(f,s,t)});f.undoManager.onRedo.add(function(t,s){return f.onRedo.dispatch(f,s,t)});f.forceBlocks=new l.ForceBlocks(f,{forced_root_block:e.forced_root_block});f.editorCommands=new l.EditorCommands(f);f.serializer.onPreProcess.add(function(t,s){return f.onPreProcess.dispatch(f,s,t)});f.serializer.onPostProcess.add(function(t,s){return f.onPostProcess.dispatch(f,s,t)});f.onPreInit.dispatch(f);if(!e.gecko_spellcheck)f.getBody().spellcheck=
+0;e.readonly||f._addEvents();f.controlManager.onPostRender.dispatch(f,f.controlManager);f.onPostRender.dispatch(f);if(e.directionality)f.getBody().dir=e.directionality;if(e.nowrap)f.getBody().style.whiteSpace="nowrap";if(e.custom_elements){var h=function(t,s){b(v(e.custom_elements),function(x){var y;if(x.indexOf("~")===0){x=x.substring(1);y="span"}else y="div";s.content=s.content.replace(RegExp("<("+x+")([^>]*)>","g"),"<"+y+' _mce_name="$1"$2>');s.content=s.content.replace(RegExp("</("+x+")>","g"),
+"</"+y+">")})};f.onBeforeSetContent.add(h);f.onPostProcess.add(function(t,s){s.set&&h(t,s)})}e.handle_node_change_callback&&f.onNodeChange.add(function(t,s,x){f.execCallback("handle_node_change_callback",f.id,x,-1,-1,true,f.selection.isCollapsed())});e.save_callback&&f.onSaveContent.add(function(t,s){var x=f.execCallback("save_callback",f.id,s.content,f.getBody());if(x)s.content=x});e.onchange_callback&&f.onChange.add(function(t,s){f.execCallback("onchange_callback",f,s)});e.convert_newlines_to_brs&&
+f.onBeforeSetContent.add(function(t,s){if(s.initial)s.content=s.content.replace(/\r?\n/g,"<br />")});e.fix_nesting&&d&&f.onBeforeSetContent.add(function(t,s){s.content=f._fixNesting(s.content)});e.preformatted&&f.onPostProcess.add(function(t,s){s.content=s.content.replace(/^\s*<pre.*?>/,"");s.content=s.content.replace(/<\/pre>\s*$/,"");if(s.set)s.content='<pre class="mceItemHidden">'+s.content+"</pre>"});if(e.verify_css_classes)f.serializer.attribValueFilter=function(t,s){var x,y;if(t=="class"){if(!f.classesRE){y=
+f.dom.getClasses();if(y.length>0){x="";b(y,function(C){x+=(x?"|":"")+C["class"]});f.classesRE=RegExp("("+x+")","gi")}}return!f.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(s)||f.classesRE.test(s)?s:""}return s};if(e.cleanup_callback){f.onBeforeSetContent.add(function(t,s){s.content=f.execCallback("cleanup_callback","insert_to_editor",s.content,s)});f.onPreProcess.add(function(t,s){s.set&&f.execCallback("cleanup_callback","insert_to_editor_dom",s.node,s);s.get&&f.execCallback("cleanup_callback",
+"get_from_editor_dom",s.node,s)});f.onPostProcess.add(function(t,s){if(s.set)s.content=f.execCallback("cleanup_callback","insert_to_editor",s.content,s);if(s.get)s.content=f.execCallback("cleanup_callback","get_from_editor",s.content,s)})}e.save_callback&&f.onGetContent.add(function(t,s){if(s.save)s.content=f.execCallback("save_callback",f.id,s.content,f.getBody())});e.handle_event_callback&&f.onEvent.add(function(t,s,x){f.execCallback("handle_event_callback",s,t,x)===false&&q.cancel(s)});f.onSetContent.add(function(){f.addVisual(f.getBody())});
+e.padd_empty_editor&&f.onPostProcess.add(function(t,s){s.content=s.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")});if(g){var m=function(t){b(t.dom.select("a"),function(s){var x=s.parentNode;t.dom.isBlock(x)&&x.lastChild===s&&t.dom.add(x,"br",{_mce_bogus:1})})};f.onExecCommand.add(function(t,s){s==="CreateLink"&&m(t)});f.onSetContent.add(f.selection.onSetContent.add(m));if(!e.readonly)try{c.designMode="Off";c.designMode="On"}catch(p){}}setTimeout(function(){if(!f.removed){f.load({initial:true,
+format:e.cleanup_on_startup?"html":"raw"});f.startContent=f.getContent({format:"raw"});f.initialized=true;f.onInit.dispatch(f);f.execCallback("setupcontent_callback",f.id,f.getBody(),f.getDoc());f.execCallback("init_instance_callback",f);f.focus(true);f.nodeChanged({initial:1});e.content_css&&l.each(v(e.content_css),function(t){f.dom.loadCSS(f.documentBaseURI.toAbsolute(t))});e.auto_focus&&setTimeout(function(){var t=l.get(e.auto_focus);t.selection.select(t.getBody(),1);t.selection.collapse(1);t.getWin().focus()},
+100)}},1)},focus:function(f){var e;e=this.settings.content_editable;var c,i=this.getDoc();if(!f){f=this.selection.getRng();if(f.item)c=f.item(0);e||this.getWin().focus();if(c&&c.ownerDocument==i){f=i.body.createControlRange();f.addElement(c);f.select()}}if(l.activeEditor!=this){if((e=l.activeEditor)!=null)e.onDeactivate.dispatch(e,this);this.onActivate.dispatch(this,e)}l._setActive(this)},execCallback:function(f){var e=this.settings[f],c;if(e){if(this.callbackLookup&&(c=this.callbackLookup[f])){e=
+c.func;c=c.scope}if(n(e,"string")){c=(c=e.replace(/\.\w+$/,""))?l.resolve(c):0;e=l.resolve(e);this.callbackLookup=this.callbackLookup||{};this.callbackLookup[f]={func:e,scope:c}}return e.apply(c||this,Array.prototype.slice.call(arguments,1))}},translate:function(f){var e=this.settings.language||"en",c=l.i18n;if(!f)return"";return c[e+"."+f]||f.replace(/{\#([^}]+)\}/g,function(i,a){return c[e+"."+a]||"{#"+a+"}"})},getLang:function(f,e){return l.i18n[(this.settings.language||"en")+"."+f]||(n(e)?e:"{#"+
+f+"}")},getParam:function(f,e,c){var i=l.trim;f=n(this.settings[f])?this.settings[f]:e;var a;if(c==="hash"){a={};if(n(f,"string"))b(f.indexOf("=")>0?f.split(/[;,](?![^=;,]*(?:[;,]|$))/):f.split(","),function(h){h=h.split("=");if(h.length>1)a[i(h[0])]=i(h[1]);else a[i(h[0])]=i(h)});else a=f;return a}return f},nodeChanged:function(f){var e=this.selection,c=(d?e.getNode():e.getStart())||this.getBody();if(this.initialized){f=f||{};c=d&&c.ownerDocument!=this.getDoc()?this.getBody():c;f.parents=[];this.dom.getParent(c,
+function(i){if(i.nodeName=="BODY")return true;f.parents.push(i)});this.onNodeChange.dispatch(this,f?f.controlManager||this.controlManager:this.controlManager,c,e.isCollapsed(),f)}},addButton:function(f,e){this.buttons=this.buttons||{};this.buttons[f]=e},addCommand:function(f,e,c){this.execCommands[f]={func:e,scope:c||this}},addQueryStateHandler:function(f,e,c){this.queryStateCommands[f]={func:e,scope:c||this}},addQueryValueHandler:function(f,e,c){this.queryValueCommands[f]={func:e,scope:c||this}},
+addShortcut:function(f,e,c,i){var a=this,h;if(!a.settings.custom_shortcuts)return false;a.shortcuts=a.shortcuts||{};if(n(c,"string")){h=c;c=function(){a.execCommand(h,false,null)}}if(n(c,"object")){h=c;c=function(){a.execCommand(h[0],h[1],h[2])}}b(v(f),function(m){var p={func:c,scope:i||this,desc:e,alt:false,ctrl:false,shift:false};b(v(m,"+"),function(t){switch(t){case "alt":case "ctrl":case "shift":p[t]=true;break;default:p.charCode=t.charCodeAt(0);p.keyCode=t.toUpperCase().charCodeAt(0)}});a.shortcuts[(p.ctrl?
+"ctrl":"")+","+(p.alt?"alt":"")+","+(p.shift?"shift":"")+","+p.keyCode]=p});return true},execCommand:function(f,e,c,i){var a=this,h=0,m;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(f)&&(!i||!i.skip_focus))a.focus();m={};a.onBeforeExecCommand.dispatch(a,f,e,c,m);if(m.terminate)return false;if(a.execCallback("execcommand_callback",a.id,a.selection.getNode(),f,e,c)){a.onExecCommand.dispatch(a,f,e,c,i);return true}if(m=a.execCommands[f]){m=m.func.call(m.scope,
+e,c);if(m!==true){a.onExecCommand.dispatch(a,f,e,c,i);return m}}b(a.plugins,function(p){if(p.execCommand&&p.execCommand(f,e,c)){a.onExecCommand.dispatch(a,f,e,c,i);h=1;return false}});if(h)return true;if(a.theme&&a.theme.execCommand&&a.theme.execCommand(f,e,c)){a.onExecCommand.dispatch(a,f,e,c,i);return true}if(l.GlobalCommands.execCommand(a,f,e,c)){a.onExecCommand.dispatch(a,f,e,c,i);return true}if(a.editorCommands.execCommand(f,e,c)){a.onExecCommand.dispatch(a,f,e,c,i);return true}a.getDoc().execCommand(f,
+e,c);a.onExecCommand.dispatch(a,f,e,c,i)},queryCommandState:function(f){var e;if(!this._isHidden()){if(e=this.queryStateCommands[f]){e=e.func.call(e.scope);if(e!==true)return e}e=this.editorCommands.queryCommandState(f);if(e!==-1)return e;try{return this.getDoc().queryCommandState(f)}catch(c){}}},queryCommandValue:function(f){var e;if(!this._isHidden()){if(e=this.queryValueCommands[f]){e=e.func.call(e.scope);if(e!==true)return e}e=this.editorCommands.queryCommandValue(f);if(n(e))return e;try{return this.getDoc().queryCommandValue(f)}catch(c){}}},
+show:function(){o.show(this.getContainer());o.hide(this.id);this.load()},hide:function(){var f=this.getDoc();d&&f&&f.execCommand("SelectAll");this.save();o.hide(this.getContainer());o.setStyle(this.id,"display",this.orgDisplay)},isHidden:function(){return!o.isHidden(this.id)},setProgressState:function(f,e,c){this.onSetProgressState.dispatch(this,f,e,c);return f},load:function(f){var e=this.getElement(),c;if(e){f=f||{};f.load=true;c=this.setContent(n(e.value)?e.value:e.innerHTML,f);f.element=e;f.no_events||
+this.onLoadContent.dispatch(this,f);f.element=null;return c}},save:function(f){var e=this,c=e.getElement(),i;if(c&&e.initialized){f=f||{};f.save=true;if(!f.no_events){e.undoManager.typing=0;e.undoManager.add()}f.element=c;i=f.content=e.getContent(f);f.no_events||e.onSaveContent.dispatch(e,f);i=f.content;if(/TEXTAREA|INPUT/i.test(c.nodeName))c.value=i;else{c.innerHTML=i;if(c=o.getParent(e.id,"form"))b(c.elements,function(a){if(a.name==e.id){a.value=i;return false}})}f.element=c=null;return i}},setContent:function(f,
+e){e=e||{};e.format=e.format||"html";e.set=true;e.content=f;e.no_events||this.onBeforeSetContent.dispatch(this,e);if(!l.isIE&&(f.length===0||/^\s+$/.test(f))){e.content=this.dom.setHTML(this.getBody(),'<br _mce_bogus="1" />');e.format="raw"}e.content=this.dom.setHTML(this.getBody(),l.trim(e.content));if(e.format!="raw"&&this.settings.cleanup){e.getInner=true;e.content=this.dom.setHTML(this.getBody(),this.serializer.serialize(this.getBody(),e))}e.no_events||this.onSetContent.dispatch(this,e);return e.content},
+getContent:function(f){var e;f=f||{};f.format=f.format||"html";f.get=true;f.no_events||this.onBeforeGetContent.dispatch(this,f);if(f.format!="raw"&&this.settings.cleanup){f.getInner=true;e=this.serializer.serialize(this.getBody(),f)}else e=this.getBody().innerHTML;e=e.replace(/^\s*|\s*$/g,"");f.content=e;f.no_events||this.onGetContent.dispatch(this,f);return f.content},isDirty:function(){return l.trim(this.startContent)!=l.trim(this.getContent({format:"raw",no_events:1}))&&!this.isNotDirty},getContainer:function(){if(!this.container)this.container=
+o.get(this.editorContainer||this.id+"_parent");return this.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return o.get(this.settings.content_element||this.id)},getWin:function(){var f;if(!this.contentWindow)if(f=o.get(this.id+"_ifr"))this.contentWindow=f.contentWindow;return this.contentWindow},getDoc:function(){var f;if(!this.contentDocument)if(f=this.getWin())this.contentDocument=f.document;return this.contentDocument},getBody:function(){return this.bodyElement||
+this.getDoc().body},convertURL:function(f,e,c){var i=this.settings;if(i.urlconverter_callback)return this.execCallback("urlconverter_callback",f,c,true,e);if(!i.convert_urls||c&&c.nodeName=="LINK"||f.indexOf("file:")===0)return f;if(i.relative_urls)return this.documentBaseURI.toRelative(f);return f=this.documentBaseURI.toAbsolute(f,i.remove_script_host)},addVisual:function(f){var e=this,c=e.settings;f=f||e.getBody();if(!n(e.hasVisual))e.hasVisual=c.visual;b(e.dom.select("table,a",f),function(i){var a;
+switch(i.nodeName){case "TABLE":a=e.dom.getAttrib(i,"border");if(!a||a=="0")e.hasVisual?e.dom.addClass(i,c.visual_table_class):e.dom.removeClass(i,c.visual_table_class);break;case "A":if(a=e.dom.getAttrib(i,"name"))e.hasVisual?e.dom.addClass(i,"mceItemAnchor"):e.dom.removeClass(i,"mceItemAnchor")}});e.onVisualAid.dispatch(e,f,e.hasVisual)},remove:function(){var f=this.getContainer();this.removed=1;this.hide();this.execCallback("remove_instance_callback",this);this.onRemove.dispatch(this);this.onExecCommand.listeners=
+[];l.remove(this);o.remove(f)},destroy:function(f){if(!this.destroyed){if(!f){l.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){q.clear(this.getWin());q.clear(this.getDoc())}q.clear(this.getBody());q.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 f(p,t){if(!e.removed)if(e.onEvent.dispatch(e,p,t)!==false)e[a[p.fakeType||p.type]].dispatch(e,p,t)}var e=this,c,i=e.settings,a={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",
+keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};b(a,function(p,t){switch(t){case "contextmenu":l.isOpera?e.dom.bind(e.getBody(),"mousedown",function(s){if(s.ctrlKey){s.fakeType="contextmenu";f(s)}}):e.dom.bind(e.getBody(),t,f);break;case "paste":e.dom.bind(e.getBody(),t,function(s){f(s)});break;case "submit":case "reset":e.dom.bind(e.getElement().form||o.getParent(e.id,"form"),t,f);break;default:e.dom.bind(i.content_editable?
+e.getBody():e.getDoc(),t,f)}});e.dom.bind(i.content_editable?e.getBody():g?e.getDoc():e.getWin(),"focus",function(){e.focus(true)});l.isGecko&&e.dom.bind(e.getDoc(),"DOMNodeInserted",function(p){var t;p=p.target;if(p.nodeType===1&&p.nodeName==="IMG"&&(t=p.getAttribute("_mce_src")))p.src=e.documentBaseURI.toAbsolute(t)});if(g){c=function(){var p=this.getDoc(),t=this.settings;if(g&&!t.readonly){if(this._isHidden())try{if(!t.content_editable)p.designMode="On"}catch(s){}try{p.execCommand("styleWithCSS",
+0,false)}catch(x){if(!this._isHidden())try{p.execCommand("useCSS",0,true)}catch(y){}}if(!t.table_inline_editing)try{p.execCommand("enableInlineTableEditing",false,false)}catch(C){}if(!t.object_resizing)try{p.execCommand("enableObjectResizing",false,false)}catch(A){}}};e.onBeforeExecCommand.add(c);e.onMouseDown.add(c)}l.isWebKit&&e.onClick.add(function(p,t){t=t.target;if(t.nodeName=="IMG"||t.nodeName=="A"&&e.dom.hasClass(t,"mceItemAnchor"))e.selection.getSel().setBaseAndExtent(t,0,t,1)});e.onMouseUp.add(e.nodeChanged);
+e.onKeyUp.add(function(p,t){var s=t.keyCode;if(s>=33&&s<=36||s>=37&&s<=40||s==13||s==45||s==46||s==8||l.isMac&&(s==91||s==93)||t.ctrlKey)e.nodeChanged()});e.onReset.add(function(){e.setContent(e.startContent,{format:"raw"})});if(i.custom_shortcuts){if(i.custom_undo_redo_keyboard_shortcuts){e.addShortcut("ctrl+z",e.getLang("undo_desc"),"Undo");e.addShortcut("ctrl+y",e.getLang("redo_desc"),"Redo")}e.addShortcut("ctrl+b",e.getLang("bold_desc"),"Bold");e.addShortcut("ctrl+i",e.getLang("italic_desc"),
+"Italic");e.addShortcut("ctrl+u",e.getLang("underline_desc"),"Underline");for(c=1;c<=6;c++)e.addShortcut("ctrl+"+c,"",["FormatBlock",false,"h"+c]);e.addShortcut("ctrl+7","",["FormatBlock",false,"<p>"]);e.addShortcut("ctrl+8","",["FormatBlock",false,"<div>"]);e.addShortcut("ctrl+9","",["FormatBlock",false,"<address>"]);var h=function(p){var t=null;if(!p.altKey&&!p.ctrlKey&&!p.metaKey)return t;b(e.shortcuts,function(s){if(!(l.isMac&&s.ctrl!=p.metaKey))if(!(!l.isMac&&s.ctrl!=p.ctrlKey))if(s.alt==p.altKey)if(s.shift==
+p.shiftKey)if(p.keyCode==s.keyCode||p.charCode&&p.charCode==s.charCode){t=s;return false}});return t};e.onKeyUp.add(function(p,t){if(h(t))return q.cancel(t)});e.onKeyPress.add(function(p,t){if(h(t))return q.cancel(t)});e.onKeyDown.add(function(p,t){var s=h(t);if(s){s.func.call(s.scope);return q.cancel(t)}})}if(l.isIE){e.dom.bind(e.getDoc(),"controlselect",function(p){var t=e.resizeInfo;p=p.target;if(p.nodeName==="IMG"){t&&e.dom.unbind(t.node,t.ev,t.cb);if(e.dom.hasClass(p,"mceItemNoResize")){ev="resizestart";
+t=e.dom.bind(p,"resizestart",q.cancel,q)}else{ev="resizeend";t=e.dom.bind(p,ev,function(s){var x;s=s.target;if(x=e.dom.getStyle(s,"width")){e.dom.setAttrib(s,"width",x.replace(/[^0-9%]+/g,""));e.dom.setStyle(s,"width","")}if(x=e.dom.getStyle(s,"height")){e.dom.setAttrib(s,"height",x.replace(/[^0-9%]+/g,""));e.dom.setStyle(s,"height","")}})}t=e.resizeInfo={node:p,ev:ev,cb:t}}});e.onKeyDown.add(function(p,t){switch(t.keyCode){case 8:if(e.selection.getRng().item){p.dom.remove(e.selection.getRng().item(0));
+return q.cancel(t)}}})}l.isOpera&&e.onClick.add(function(p,t){q.prevent(t)});if(i.custom_undo_redo){var m=function(){e.undoManager.typing=0;e.undoManager.add()};e.dom.bind(e.getDoc(),"focusout",function(){!e.removed&&e.undoManager.typing&&m()});e.onKeyUp.add(function(p,t){if(t.keyCode>=33&&t.keyCode<=36||t.keyCode>=37&&t.keyCode<=40||t.keyCode==13||t.keyCode==45||t.ctrlKey)m()});e.onKeyDown.add(function(p,t){var s,x,y,C;if(d&&t.keyCode==46){s=e.selection.getRng();if(s.parentElement){y=s.parentElement();
+x=s.duplicate();x.moveToElementText(y);x.setEndPoint("EndToEnd",s);C=x.text.length;if(t.ctrlKey){s.moveEnd("word",1);s.select()}e.selection.getSel().clear();if(s.parentElement()==y){try{y.innerHTML=y.innerHTML}catch(A){}x.moveToElementText(y);x.collapse();x.move("character",C);x.select()}t.preventDefault();return}}if(t.keyCode>=33&&t.keyCode<=36||t.keyCode>=37&&t.keyCode<=40||t.keyCode==13||t.keyCode==45)e.undoManager.typing&&m();else if(!e.undoManager.typing){e.undoManager.add();e.undoManager.typing=
+1}});e.onMouseDown.add(function(){e.undoManager.typing&&m()})}},_isHidden:function(){var f;if(!g)return 0;f=this.selection.getSel();return!f||!f.rangeCount||f.rangeCount==0},_fixNesting:function(f){var e=[],c;f=f.replace(/<(\/)?([^\s>]+)[^>]*?>/g,function(i,a,h){if(a==="/"){if(!e.length)return"";if(h!==e[e.length-1].tag){for(c=e.length-1;c>=0;c--)if(e[c].tag===h){e[c].close=1;break}return""}else{e.pop();if(e.length&&e[e.length-1].close){i=i+"</"+e[e.length-1].tag+">";e.pop()}}}else{if(/^(br|hr|input|meta|img|link|param)$/i.test(h))return i;
+if(/\/>$/.test(i))return i;e.push({tag:h})}return i});for(c=e.length-1;c>=0;c--)f+="</"+e[c].tag+">";return f}})})(tinymce);
+(function(l){var o=l.each,q=false;l.EditorCommands=function(k){function j(e){var c;e=e.toLowerCase();if(c=u.state[e])return c(e);return-1}function b(e,c){c=c||"exec";o(e,function(i,a){o(a.toLowerCase().split(","),function(h){u[c][h]=i})})}function g(e,c,i){if(c===void 0)c=q;if(i===void 0)i=null;return k.getDoc().execCommand(e,c,i)}function d(e,c){k.formatter.toggle(e,c?{value:c}:void 0)}var n=k.dom,r=k.selection,u={state:{},exec:{},value:{}},v=k.settings,f;l.extend(this,{execCommand:function(e,c,
+i){var a;e=e.toLowerCase();if(a=u.exec[e]){a(e,c,i);return true}return q},queryCommandState:j,queryCommandValue:function(e){var c;e=e.toLowerCase();if(c=u.value[e])return c(e);return q},addCommands:b});b({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){k.undoManager.add()},"Cut,Copy,Paste":function(e){var c=k.getDoc(),i;try{g(e)}catch(a){i=true}if(i||!c.queryCommandSupported(e))l.isGecko?k.windowManager.confirm(k.getLang("clipboard_msg"),function(h){h&&
+open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}):k.windowManager.alert(k.getLang("clipboard_no_support"))},unlink:function(e){r.isCollapsed()&&r.select(r.getNode());g(e);r.collapse(q)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var c=e.substring(7);o("left,center,right,full".split(","),function(i){c!=i&&k.formatter.remove("align"+i)});d("align"+c)},"InsertUnorderedList,InsertOrderedList":function(e){var c;g(e);if(e=n.getParent(r.getNode(),"ol,ul")){c=
+e.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(c.nodeName)){f=r.getBookmark(void 0);n.split(c,e);r.moveToBookmark(f)}}},"Bold,Italic,Underline,Strikethrough":function(e){d(e)},"ForeColor,HiliteColor,FontName":function(e,c,i){d(e,i)},FontSize:function(e,c,i){var a;if(i>=1&&i<=7){a=l.explode(v.font_size_style_values);i=(c=l.explode(v.font_size_classes))?c[i-1]||i:a[i-1]||i}d(e,i)},RemoveFormat:function(e){k.formatter.remove(e)},mceBlockQuote:function(){d("blockquote")},FormatBlock:function(e,c,i){return d(i)},
+mceCleanup:function(){var e=r.getBookmark();k.setContent(k.getContent({cleanup:true}),{cleanup:true});r.moveToBookmark(e)},mceRemoveNode:function(e,c,i){e=i||r.getNode();if(e!=k.getBody()){f=r.getBookmark(void 0);k.dom.remove(e,true);r.moveToBookmark(f)}},mceSelectNodeDepth:function(e,c,i){var a=0;n.getParent(r.getNode(),function(h){if(h.nodeType==1&&a++==i){r.select(h);return q}},k.getBody())},mceSelectNode:function(e,c,i){r.select(i)},mceInsertContent:function(e,c,i){r.setContent(i)},mceInsertRawHTML:function(e,
+c,i){r.setContent("tiny_mce_marker");k.setContent(k.getContent().replace(/tiny_mce_marker/g,i))},mceSetContent:function(e,c,i){k.setContent(i)},"Indent,Outdent":function(e){var c,i,a;c=v.indentation;i=/[a-z%]+$/i.exec(c);c=parseInt(c);!j("InsertUnorderedList")&&!j("InsertOrderedList")?o(r.getSelectedBlocks(),function(h){if(e=="outdent"){a=Math.max(0,parseInt(h.style.paddingLeft||0)-c);n.setStyle(h,"paddingLeft",a?a+i:"")}else n.setStyle(h,"paddingLeft",parseInt(h.style.paddingLeft||0)+c+i)}):g(e)},
+mceRepaint:function(){if(l.isGecko)try{f=r.getBookmark(true);r.getSel()&&r.getSel().selectAllChildren(k.getBody());r.collapse(true);r.moveToBookmark(f)}catch(e){}},mceToggleFormat:function(e,c,i){k.formatter.toggle(i)},InsertHorizontalRule:function(){r.setContent("<hr />")},mceToggleVisualAid:function(){k.hasVisual=!k.hasVisual;k.addVisual()},mceReplaceContent:function(e,c,i){r.setContent(i.replace(/\{\$selection\}/g,r.getContent({format:"text"})))},mceInsertLink:function(e,c,i){e=n.getParent(r.getNode(),
+"a");if(l.is(i,"string"))i={href:i};if(e)i.href?n.setAttribs(e,i):k.dom.remove(e,true);else{g("CreateLink",q,"javascript:mctmp(0);");o(n.select("a[href=javascript:mctmp(0);]"),function(a){n.setAttribs(a,i)})}},selectAll:function(){var e=n.getRoot(),c=n.createRng();c.setStart(e,0);c.setEnd(e,e.childNodes.length);k.selection.setRng(c)}});b({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){e="align"+e.substring(7);return k.formatter.match(e)},"Bold,Italic,Underline,Strikethrough":function(e){return k.formatter.match(e)},
+mceBlockQuote:function(){return k.formatter.match("blockquote")},Outdent:function(){var e;if(v.inline_styles){if((e=n.getParent(r.getStart(),n.isBlock))&&parseInt(e.style.paddingLeft)>0)return true;if((e=n.getParent(r.getEnd(),n.isBlock))&&parseInt(e.style.paddingLeft)>0)return true}return j("InsertUnorderedList")||j("InsertOrderedList")||!v.inline_styles&&!!n.getParent(r.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){return n.getParent(r.getNode(),e=="insertunorderedlist"?
+"UL":"OL")}},"state");b({"FontSize,FontName":function(e){var c=0,i;if(i=n.getParent(r.getNode(),"span"))c=e=="fontsize"?i.style.fontSize:i.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase();return c}},"value");v.custom_undo_redo&&b({Undo:function(){k.undoManager.undo()},Redo:function(){k.undoManager.redo()}})}})(tinymce);
+(function(l){var o=l.util.Dispatcher;l.UndoManager=function(q){var k,j=0,b=[];return k={typing:0,onAdd:new o(k),onUndo:new o(k),onRedo:new o(k),add:function(g){var d;d=q.settings;var n;g=g||{};g.content=l.trim(q.getContent({format:"raw",no_events:1}));if((n=b[j])&&n.content==g.content)if(j>0||b.length==1)return null;if(d.custom_undo_redo_levels)if(b.length>d.custom_undo_redo_levels){for(d=0;d<b.length-1;d++)b[d]=b[d+1];b.length--;j=b.length}g.bookmark=q.selection.getBookmark(2,true);if(j<b.length-
+1)if(j==0)b=[];else b.length=j+1;b.push(g);j=b.length-1;k.onAdd.dispatch(k,g);q.isNotDirty=0;return g},undo:function(){var g;if(k.typing){k.add();k.typing=0}if(j>0){g=b[--j];q.setContent(g.content,{format:"raw"});q.selection.moveToBookmark(g.bookmark);k.onUndo.dispatch(k,g)}return g},redo:function(){var g;if(j<b.length-1){g=b[++j];q.setContent(g.content,{format:"raw"});q.selection.moveToBookmark(g.bookmark);k.onRedo.dispatch(k,g)}return g},clear:function(){b=[];j=k.typing=0},hasUndo:function(){return j>
+0||k.typing},hasRedo:function(){return j<b.length-1}}}})(tinymce);
+(function(l){function o(v,f){var e=f.ownerDocument.createRange();e.setStart(v.endContainer,v.endOffset);e.setEndAfter(f);return e.cloneContents().textContent.length==0}function q(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 k(v,f,e){var c;if(q(e)){c=f.getParent(e,"ul,ol");if(!f.getParent(c.parentNode,"ul,ol")){f.split(c,e);c=f.create("p",0,'<br _mce_bogus="1" />');f.replace(c,e);v.select(c,
+1)}return u}return r}var j=l.dom.Event,b=l.isIE,g=l.isGecko,d=l.isOpera,n=l.each,r=true,u=false;l.create("tinymce.ForceBlocks",{ForceBlocks:function(v){function f(a,h){if(d)h.content=h.content.replace(e.reOpera,"</"+i+">");h.content=h.content.replace(e.rePadd,"<"+i+"$1$2$3$4$5$6>\u00a0</"+i+">");if(!b&&!d&&h.set){h.content=h.content.replace(e.reNbsp2BR1,"<"+i+"$1$2><br /></"+i+">");h.content=h.content.replace(e.reNbsp2BR2,"<"+i+"$1$2><br /></"+i+">")}else h.content=h.content.replace(e.reBR2Nbsp,"<"+
+i+"$1$2>\u00a0</"+i+">")}var e=this,c=v.settings,i;e.editor=v;e.dom=v.dom;i=(c.forced_root_block||"p").toLowerCase();c.element=i.toUpperCase();v.onPreInit.add(e.setup,e);e.reOpera=RegExp("(\\u00a0|&#160;|&nbsp;)</"+i+">","gi");e.rePadd=RegExp("<p( )([^>]+)><\\/p>|<p( )([^>]+)\\/>|<p( )([^>]+)>\\s+<\\/p>|<p><\\/p>|<p\\/>|<p>\\s+<\\/p>".replace(/p/g,i),"gi");e.reNbsp2BR1=RegExp("<p( )([^>]+)>[\\s\\u00a0]+<\\/p>|<p>[\\s\\u00a0]+<\\/p>".replace(/p/g,i),"gi");e.reNbsp2BR2=RegExp("<%p()([^>]+)>(&nbsp;|&#160;)<\\/%p>|<%p>(&nbsp;|&#160;)<\\/%p>".replace(/%p/g,
+i),"gi");e.reBR2Nbsp=RegExp("<p( )([^>]+)>\\s*<br \\/>\\s*<\\/p>|<p>\\s*<br \\/>\\s*<\\/p>".replace(/p/g,i),"gi");v.onBeforeSetContent.add(f);v.onPostProcess.add(f);if(c.forced_root_block){v.onInit.add(e.forceRoots,e);v.onSetContent.add(e.forceRoots,e);v.onBeforeGetContent.add(e.forceRoots,e)}},setup:function(){var v=this,f=v.editor,e=f.settings,c=f.dom,i=f.selection;if(e.forced_root_block){f.onBeforeExecCommand.add(v.forceRoots,v);f.onKeyUp.add(v.forceRoots,v);f.onPreProcess.add(v.forceRoots,v)}e.force_br_newlines&&
+b&&f.onKeyPress.add(function(a,h){var m;if(h.keyCode==13&&i.getNode().nodeName!="LI"){i.setContent('<br id="__" /> ',{format:"raw"});m=c.get("__");m.removeAttribute("id");i.select(m);i.collapse();return j.cancel(h)}});if(e.force_p_newlines){if(b){l.addUnload(function(){v._previousFormats=0});f.onKeyPress.add(function(a,h){v._previousFormats=0;if(h.keyCode==13&&!h.shiftKey&&a.selection.isCollapsed()&&e.keep_styles){var m;var p=a.selection.getStart(),t,s,x;do if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(p.nodeName)){if(t){s=
+p.cloneNode(false);s.appendChild(t);t=s}else t=x=p.cloneNode(false);t.removeAttribute("id")}while(p=p.parentNode);if(t)m={wrapper:t,inner:x};v._previousFormats=m}});f.onKeyUp.add(function(a,h){if(h.keyCode==13&&!h.shiftKey){var m=a.selection.getStart(),p=v._previousFormats;if(!m.hasChildNodes())if(m=c.getParent(m,c.isBlock)){m.innerHTML="";if(v._previousFormats){m.appendChild(p.wrapper);p.inner.innerHTML="\ufeff"}else m.innerHTML="\ufeff";i.select(m,1);a.getDoc().execCommand("Delete",false,null)}}})}else f.onKeyPress.add(function(a,
+h){h.keyCode==13&&!h.shiftKey&&!v.insertPara(h)&&j.cancel(h)});g&&f.onKeyDown.add(function(a,h){if((h.keyCode==8||h.keyCode==46)&&!h.shiftKey)v.backspaceDelete(h,h.keyCode==8)})}l.isWebKit&&f.onKeyPress.add(function(a,h){if(h.keyCode==13&&(h.shiftKey||e.force_br_newlines&&!c.getParent(i.getNode(),"h1,h2,h3,h4,h5,h6,ol,ul"))){var m=i.getRng(),p,t=c.create("div",null," "),s=c.getViewPort(a.getWin()).h;m.insertNode(p=c.create("br"));m.setStartAfter(p);m.setEndAfter(p);i.setRng(m);if(i.getSel().focusNode==
+p.previousSibling){i.select(c.insertAfter(c.doc.createTextNode("\u00a0"),p));i.collapse(r)}c.insertAfter(t,p);m=c.getPos(t).y;c.remove(t);m>s&&a.getWin().scrollTo(0,m);j.cancel(h)}});f.onPreProcess.add(function(a,h){n(c.select("p,h1,h2,h3,h4,h5,h6,div",h.node),function(m){q(m)&&n(c.select("span,em,strong,b,i",h.node),function(p){if(!p.hasChildNodes()){p.appendChild(a.getDoc().createTextNode("\u00a0"));return u}})})});if(b)if(e.element!="P"){f.onKeyPress.add(function(){v.lastElm=i.getNode().nodeName});
+f.onKeyUp.add(function(a,h){var m;m=i.getNode();if(a.getBody().childNodes.length===1&&m.nodeName=="P"){m=c.rename(m,e.element);i.select(m);i.collapse();a.nodeChanged()}else if(h.keyCode==13&&!h.shiftKey&&v.lastElm!="P")if(m=c.getParent(m,"p")){c.rename(m,e.element);a.nodeChanged()}})}},find:function(v,f,e){for(var c=this.editor.getDoc().createTreeWalker(v,4,null,u),i=-1;v=c.nextNode();){i++;if(f==0&&v==e)return i;if(f==1&&i==e)return v}return-1},forceRoots:function(v){v=this.editor;var f=v.getBody(),
+e=v.getDoc(),c=v.selection,i=c.getSel(),a=c.getRng(),h=-2,m,p,t,s,x,y=f.childNodes,C,A,M;for(C=y.length-1;C>=0;C--){x=y[C];if(x.nodeType===1&&x.getAttribute("_mce_type"))s=null;else if(x.nodeType===3||!this.dom.isBlock(x)&&x.nodeType!==8&&!/^(script|mce:script|style|mce:style)$/i.test(x.nodeName))if(s)s.hasChildNodes()?s.insertBefore(x,s.firstChild):s.appendChild(x);else{if(x.nodeType!=3||/[^\s]/g.test(x.nodeValue)){if(h==-2&&a)if(b){if(a.item){s=e.body.createTextRange();s.moveToElementText(a.item(0));
+a=s}s=e.body.createTextRange();s.moveToElementText(f);s.collapse(1);h=s.move("character",-16777215)*-1;s=a.duplicate();s.collapse(1);m=s.move("character",-16777215)*-1;s=a.duplicate();s.collapse(0);s=s.move("character",-16777215)*-1-m;h=m-h;m=s}else if(a.startContainer.nodeType==1&&(A=a.startContainer.childNodes[a.startOffset])&&A.nodeType==1){M=A.getAttribute("id");A.setAttribute("id","__mce")}else if(v.dom.getParent(a.startContainer,function(E){return E===f})){p=a.startOffset;t=a.endOffset;h=this.find(f,
+0,a.startContainer);m=this.find(f,0,a.endContainer)}s=v.dom.create(v.settings.forced_root_block);x.parentNode.replaceChild(s,x);s.appendChild(x)}}else s=null}if(h!=-2)if(b)try{a=i.createRange();a.moveToElementText(f);a.collapse(1);a.moveStart("character",h);a.moveEnd("character",m);a.select()}catch(X){}else{s=f.getElementsByTagName(v.settings.element)[0];a=e.createRange();h!=-1?a.setStart(this.find(f,1,h),p):a.setStart(s,0);m!=-1?a.setEnd(this.find(f,1,m),t):a.setEnd(s,0);if(i){i.removeAllRanges();
+i.addRange(a)}}else if(!b&&(A=v.dom.get("__mce"))){M?A.setAttribute("id",M):A.removeAttribute("id");a=e.createRange();a.setStartBefore(A);a.setEndBefore(A);c.setRng(a)}},getParentBlock:function(v){var f=this.dom;return f.getParent(v,f.isBlock)},insertPara:function(){function v(V,aa){var ea=[],Z,z;V.innerHTML="";if(i.keep_styles){z=aa;do if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(z.nodeName)){Z=z.cloneNode(u);e.setAttrib(Z,"id","");ea.push(Z)}while(z=z.parentNode)}if(ea.length>0){z=ea.length-1;
+for(Z=V;z>=0;z--)Z=Z.appendChild(ea[z]);ea[0].innerHTML=d?"&nbsp;":"<br />";return ea[0]}else V.innerHTML=d?"&nbsp;":"<br />"}var f=this.editor,e=f.dom,c=f.getDoc(),i=f.settings,a=f.selection.getSel(),h=a.getRangeAt(0),m=c.body,p,t,s,x,y,C,A,M,X,E,D,B,K=e.getViewPort(f.getWin()),H;p=c.createRange();p.setStart(a.anchorNode,a.anchorOffset);p.collapse(r);t=c.createRange();t.setStart(a.focusNode,a.focusOffset);t.collapse(r);x=(s=p.compareBoundaryPoints(p.START_TO_END,t)<0)?a.anchorNode:a.focusNode;y=
+s?a.anchorOffset:a.focusOffset;C=s?a.focusNode:a.anchorNode;s=s?a.focusOffset:a.anchorOffset;if(x===C&&/^(TD|TH)$/.test(x.nodeName)){x.firstChild.nodeName=="BR"&&e.remove(x.firstChild);if(x.childNodes.length==0)f.dom.add(x,i.element,null,"<br />");else{B=x.innerHTML;x.innerHTML="";f.dom.add(x,i.element,null,B)}M=f.dom.add(x,i.element,null,"<br />");h=c.createRange();h.selectNodeContents(M);h.collapse(1);f.selection.setRng(h);return u}if(x==m&&C==m&&m.firstChild&&f.dom.isBlock(m.firstChild)){x=C=x.firstChild;
+y=s=0;p=c.createRange();p.setStart(x,0);t=c.createRange();t.setStart(C,0)}x=x.nodeName=="HTML"?c.body:x;x=x.nodeName=="BODY"?x.firstChild:x;C=C.nodeName=="HTML"?c.body:C;C=C.nodeName=="BODY"?C.firstChild:C;A=this.getParentBlock(x);M=this.getParentBlock(C);X=A?A.nodeName:i.element;if(B=this.dom.getParent(A,"li,pre")){if(B.nodeName=="LI")return k(f.selection,this.dom,B);return r}if(A&&(A.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(e.getStyle(A,"position",1)))){X=i.element;A=null}if(M&&(M.nodeName==
+"CAPTION"||/absolute|relative|fixed/gi.test(e.getStyle(A,"position",1)))){X=i.element;M=null}if(/(TD|TABLE|TH|CAPTION)/.test(X)||A&&X=="DIV"&&/left|right/gi.test(e.getStyle(A,"float",1))){X=i.element;A=M=null}E=A&&A.nodeName==X?A.cloneNode(0):f.dom.create(X);M=M&&M.nodeName==X?M.cloneNode(0):f.dom.create(X);M.removeAttribute("id");if(/^(H[1-6])$/.test(X)&&o(h,A))M=f.dom.create(i.element);B=A=x;do{if(B==m||B.nodeType==9||this.dom.isBlock(B)||/(TD|TABLE|TH|CAPTION)/.test(B.nodeName))break;A=B}while(B=
+B.previousSibling?B.previousSibling:B.parentNode);B=D=C;do{if(B==m||B.nodeType==9||this.dom.isBlock(B)||/(TD|TABLE|TH|CAPTION)/.test(B.nodeName))break;D=B}while(B=B.nextSibling?B.nextSibling:B.parentNode);A.nodeName==X?p.setStart(A,0):p.setStartBefore(A);p.setEnd(x,y);E.appendChild(p.cloneContents()||c.createTextNode(""));try{t.setEndAfter(D)}catch(W){}t.setStart(C,s);M.appendChild(t.cloneContents()||c.createTextNode(""));h=c.createRange();if(!A.previousSibling&&A.parentNode.nodeName==X)h.setStartBefore(A.parentNode);
+else p.startContainer.nodeName==X&&p.startOffset==0?h.setStartBefore(p.startContainer):h.setStart(p.startContainer,p.startOffset);!D.nextSibling&&D.parentNode.nodeName==X?h.setEndAfter(D.parentNode):h.setEnd(t.endContainer,t.endOffset);h.deleteContents();d&&f.getWin().scrollTo(0,K.y);if(E.firstChild&&E.firstChild.nodeName==X)E.innerHTML=E.firstChild.innerHTML;if(M.firstChild&&M.firstChild.nodeName==X)M.innerHTML=M.firstChild.innerHTML;if(q(E))E.innerHTML="<br />";if(q(M))H=v(M,C);if(d&&parseFloat(opera.version())<
+9.5){h.insertNode(E);h.insertNode(M)}else{h.insertNode(M);h.insertNode(E)}M.normalize();E.normalize();h=c.createRange();h.selectNodeContents(g?c.createTreeWalker(H||M,NodeFilter.SHOW_TEXT,null,u).nextNode()||H||M:H||M);h.collapse(1);a.removeAllRanges();a.addRange(h);c=f.dom.getPos(M).y;a=M.clientHeight;if(c<K.y||c+a>K.y+K.h)f.getWin().scrollTo(0,c<K.y?c:c-K.h+25);return u},backspaceDelete:function(v,f){var e=this.editor,c=e.getBody(),i,a=e.selection,h=a.getRng(),m=h.startContainer,p;if(!f&&h.collapsed&&
+m.nodeType==1&&h.startOffset==m.childNodes.length){p=new l.dom.TreeWalker(m.lastChild,m);for(i=m.lastChild;i;i=p.prev())if(i.nodeType==3){h.setStart(i,i.nodeValue.length);h.collapse(true);a.setRng(h);return}}if(m&&e.dom.isBlock(m)&&!/^(TD|TH)$/.test(m.nodeName)&&f)if(m.childNodes.length==0||m.childNodes.length==1&&m.firstChild.nodeName=="BR"){for(i=m;(i=i.previousSibling)&&!e.dom.isBlock(i););if(i){if(m!=c.firstChild){for(c=e.dom.doc.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,u);h=c.nextNode();)i=
+h;h=e.getDoc().createRange();h.setStart(i,i.nodeValue?i.nodeValue.length:0);h.setEnd(i,i.nodeValue?i.nodeValue.length:0);a.setRng(h);e.dom.remove(m)}return j.cancel(v)}}}})})(tinymce);
+(function(l){var o=l.dom.Event,q=l.each,k=l.extend;l.create("tinymce.ControlManager",{ControlManager:function(j,b){var g=this;b=b||{};g.editor=j;g.controls={};g.onAdd=new l.util.Dispatcher(g);g.onPostRender=new l.util.Dispatcher(g);g.prefix=b.prefix||j.id+"_";g._cls={};g.onPostRender.add(function(){q(g.controls,function(d){d.postRender()})})},get:function(j){return this.controls[this.prefix+j]||this.controls[j]},setActive:function(j,b){var g=null;if(g=this.get(j))g.setActive(b);return g},setDisabled:function(j,
+b){var g=null;if(g=this.get(j))g.setDisabled(b);return g},add:function(j){if(j){this.controls[j.id]=j;this.onAdd.dispatch(j,this)}return j},createControl:function(j){var b,g=this,d=g.editor;q(d.plugins,function(n){if(n.createControl)if(b=n.createControl(j,g))return false});switch(j){case "|":case "separator":return g.createSeparator()}if(!b&&d.buttons&&(b=d.buttons[j]))return g.createButton(j,b);return g.add(b)},createDropMenu:function(j,b,g){var d=this.editor,n,r,u;b=k({"class":"mceDropDown",constrain:d.settings.constrain_menus},
+b);b["class"]=b["class"]+" "+d.getParam("skin")+"Skin";if(u=d.getParam("skin_variant"))b["class"]+=" "+d.getParam("skin")+"Skin"+u.substring(0,1).toUpperCase()+u.substring(1);j=this.prefix+j;n=this.controls[j]=new (g||this._cls.dropmenu||l.ui.DropMenu)(j,b);n.onAddItem.add(function(v,f){var e=f.settings;e.title=d.getLang(e.title,e.title);if(!e.onclick)e.onclick=function(){if(e.cmd)d.execCommand(e.cmd,e.ui||false,e.value)}});d.onRemove.add(function(){n.destroy()});if(l.isIE){n.onShowMenu.add(function(){d.focus();
+r=d.selection.getBookmark(1)});n.onHideMenu.add(function(){if(r){d.selection.moveToBookmark(r);r=0}})}return this.add(n)},createListBox:function(j,b,g){var d=this.editor;if(this.get(j))return null;b.title=d.translate(b.title);b.scope=b.scope||d;if(!b.onselect)b.onselect=function(n){d.execCommand(b.cmd,b.ui||false,n||b.value)};b=k({title:b.title,"class":"mce_"+j,scope:b.scope,control_manager:this},b);j=this.prefix+j;if(d.settings.use_native_selects)g=new l.ui.NativeListBox(j,b);else{g=g||this._cls.listbox||
+l.ui.ListBox;g=new g(j,b)}this.controls[j]=g;l.isWebKit&&g.onPostRender.add(function(n,r){o.add(r,"mousedown",function(){d.bookmark=d.selection.getBookmark(1)});o.add(r,"focus",function(){d.selection.moveToBookmark(d.bookmark);d.bookmark=null})});g.hideMenu&&d.onMouseDown.add(g.hideMenu,g);return this.add(g)},createButton:function(j,b,g){var d=this.editor;if(this.get(j))return null;b.title=d.translate(b.title);b.label=d.translate(b.label);b.scope=b.scope||d;if(!b.onclick&&!b.menu_button)b.onclick=
+function(){d.execCommand(b.cmd,b.ui||false,b.value)};b=k({title:b.title,"class":"mce_"+j,unavailable_prefix:d.getLang("unavailable",""),scope:b.scope,control_manager:this},b);j=this.prefix+j;if(b.menu_button){g=g||this._cls.menubutton||l.ui.MenuButton;j=new g(j,b);d.onMouseDown.add(j.hideMenu,j)}else{g=this._cls.button||l.ui.Button;j=new g(j,b)}return this.add(j)},createMenuButton:function(j,b,g){b=b||{};b.menu_button=1;return this.createButton(j,b,g)},createSplitButton:function(j,b,g){var d=this.editor;
+if(this.get(j))return null;b.title=d.translate(b.title);b.scope=b.scope||d;if(!b.onclick)b.onclick=function(n){d.execCommand(b.cmd,b.ui||false,n||b.value)};if(!b.onselect)b.onselect=function(n){d.execCommand(b.cmd,b.ui||false,n||b.value)};b=k({title:b.title,"class":"mce_"+j,scope:b.scope,control_manager:this},b);j=this.prefix+j;j=this.add(new (g||this._cls.splitbutton||l.ui.SplitButton)(j,b));d.onMouseDown.add(j.hideMenu,j);return j},createColorSplitButton:function(j,b,g){var d=this.editor,n,r;if(this.get(j))return null;
+b.title=d.translate(b.title);b.scope=b.scope||d;if(!b.onclick)b.onclick=function(u){if(l.isIE)r=d.selection.getBookmark(1);d.execCommand(b.cmd,b.ui||false,u||b.value)};if(!b.onselect)b.onselect=function(u){d.execCommand(b.cmd,b.ui||false,u||b.value)};b=k({title:b.title,"class":"mce_"+j,menu_class:d.getParam("skin")+"Skin",scope:b.scope,more_colors_title:d.getLang("more_colors")},b);j=this.prefix+j;n=new (g||this._cls.colorsplitbutton||l.ui.ColorSplitButton)(j,b);d.onMouseDown.add(n.hideMenu,n);d.onRemove.add(function(){n.destroy()});
+if(l.isIE){n.onShowMenu.add(function(){d.focus();r=d.selection.getBookmark(1)});n.onHideMenu.add(function(){if(r){d.selection.moveToBookmark(r);r=0}})}return this.add(n)},createToolbar:function(j,b,g){j=this.prefix+j;b=new (g||this._cls.toolbar||l.ui.Toolbar)(j,b);if(this.get(j))return null;return this.add(b)},createSeparator:function(j){return new (j||this._cls.separator||l.ui.Separator)},setControlType:function(j,b){return this._cls[j.toLowerCase()]=b},destroy:function(){q(this.controls,function(j){j.destroy()});
+this.controls=null}})})(tinymce);
+(function(l){var o=l.util.Dispatcher,q=l.each,k=l.isIE,j=l.isOpera;l.create("tinymce.WindowManager",{WindowManager:function(b){this.editor=b;this.onOpen=new o(this);this.onClose=new o(this);this.params={};this.features={}},open:function(b,g){var d="",n=this.editor.settings.dialog_type=="modal",r,u,v;v=l.DOM.getViewPort();b=b||{};g=g||{};u=j?v.w:screen.width;v=j?v.h:screen.height;b.name=b.name||"mc_"+(new Date).getTime();b.width=parseInt(b.width||320);b.height=parseInt(b.height||240);b.resizable=true;
+b.left=b.left||parseInt(u/2)-b.width/2;b.top=b.top||parseInt(v/2)-b.height/2;g.inline=false;g.mce_width=b.width;g.mce_height=b.height;g.mce_auto_focus=b.auto_focus;if(n)if(k){b.center=true;b.help=false;b.dialogWidth=b.width+"px";b.dialogHeight=b.height+"px";b.scroll=b.scrollbars||false}q(b,function(e,c){if(l.is(e,"boolean"))e=e?"yes":"no";/^(name|url)$/.test(c)||(d+=k&&n?(d?";":"")+c+":"+e:(d?",":"")+c+"="+e)});this.features=b;this.params=g;this.onOpen.dispatch(this,b,g);u=b.url||b.file;u=l._addVer(u);
+try{if(k&&n){r=1;window.showModalDialog(u,window,d)}else r=window.open(u,b.name,d)}catch(f){}r||alert(this.editor.getLang("popup_blocked"))},close:function(b){b.close();this.onClose.dispatch(this)},createInstance:function(b,g,d,n,r,u){return new (l.resolve(b))(g,d,n,r,u)},confirm:function(b,g,d,n){g.call(d||this,(n||window).confirm(this._decode(this.editor.getLang(b,b))))},alert:function(b,g,d,n){(n||window).alert(this._decode(this.editor.getLang(b,b)));if(g)g.call(d||this)},resizeBy:function(b,g,
+d){d.resizeBy(b,g)},_decode:function(b){return l.DOM.decode(b).replace(/\\n/g,"\n")}})})(tinymce);
+(function(l){l.GlobalCommands=new function(){function o(b,g,d,n){if(typeof g=="string")g=[g];l.each(g,function(r){b[r.toLowerCase()]={func:d,scope:n}})}var q={},k={},j={};l.extend(this,{add:function(b,g,d){o(q,b,g,d)},addQueryStateHandler:function(b,g,d){o(k,b,g,d)},addQueryValueHandler:function(b,g,d){o(j,b,g,d)},execCommand:function(b,g,d,n,r){if(g=q[g.toLowerCase()])if(g.func.call(b||g.scope,d,n,r)!==false)return true},queryCommandValue:function(){if(cmd=j[cmd.toLowerCase()])return cmd.func.call(scope||
+cmd.scope,ui,value,args)},queryCommandState:function(){if(cmd=k[cmd.toLowerCase()])return cmd.func.call(scope||cmd.scope,ui,value,args)}})}})(tinymce);
+(function(l){l.Formatter=function(o){function q(z){return z.nodeType===1&&(z.face==="mceinline"||z.style.fontFamily==="mceinline")}function k(z){return z?y[z]:y}function j(z,F){if(z)if(typeof z!=="string")C(z,function(G,I){j(I,G)});else{F=F.length?F:[F];C(F,function(G){if(G.deep===ea)G.deep=!G.selector;if(G.split===ea)G.split=!G.selector||G.inline;if(G.remove===ea&&G.selector&&!G.inline)G.remove="none";if(G.selector&&G.inline){G.mixed=true;G.block_expand=true}if(typeof G.classes==="string")G.classes=
+G.classes.split(/\s+/)});y[z]=F}}function b(z,F,G){function I(O){var P=O.startContainer,J=O.startOffset;if(P.nodeType==1||P.nodeValue==="")if(P=P.nodeType==1?P.childNodes[J]:P){P=new X(P,P.parentNode);for(J=P.current();J;J=P.next())if(J.nodeType==3&&!e(J)){O.setStart(J,0);break}}return O}function T(O,P){P=P||N;if(O){C(P.styles,function(J,Q){A.setStyle(O,Q,f(J,F))});C(P.attributes,function(J,Q){A.setAttrib(O,Q,f(J,F))});C(P.classes,function(J){J=f(J,F);A.hasClass(O,J)||A.addClass(O,J)})}}function L(O){var P=
+[],J,Q;J=N.inline||N.block;Q=A.create(J);T(Q);E.walk(O,function(R){function ca(Y){var ba=Y.nodeName.toLowerCase(),da=Y.parentNode.nodeName.toLowerCase(),fa;if(u(ba,"br")){$=0;N.block&&A.remove(Y)}else if(N.wrapper&&d(Y,z,F))$=0;else if(N.block&&!N.wrapper&&/^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(ba)){Y=A.rename(Y,J);T(Y);P.push(Y);$=0}else{if(N.selector){C(U,function(ga){if(A.is(Y,ga.selector)&&!q(Y)){T(Y,ga);fa=true}});if(!N.inline||fa){$=0;return}}if(D(J,ba)&&D(da,J)){if(!$){$=Q.cloneNode(V);
+Y.parentNode.insertBefore($,Y);P.push($)}$.appendChild(Y)}else{$=0;C(l.grep(Y.childNodes),ca);$=0}}}var $;C(R,ca)});C(P,function(R){function ca(Y){var ba,da;C(Y.childNodes,function(fa){if(fa.nodeType==1&&!p(fa)&&!q(fa)){ba=fa;return V}});if(ba&&r(ba,N)){da=ba.cloneNode(V);T(da);A.replace(da,Y,aa);A.remove(ba,1)}return da||Y}var $;$=function(Y){var ba=0;C(Y.childNodes,function(da){!e(da)&&!p(da)&&ba++});return ba}(R);if($===0)A.remove(R,1);else if(N.inline||N.wrapper){if(!N.exact&&$===1)R=ca(R);C(U,
+function(Y){C(A.select(Y.inline,R),function(ba){a(Y,F,ba,Y.exact?ba:null)})});if(d(R.parentNode,z,F)){A.remove(R,1);R=0;return aa}N.merge_with_parents&&A.getParent(R.parentNode,function(Y){if(d(Y,z,F)){A.remove(R,1);R=0;return aa}});if(R){R=t(m(R),R);R=t(R,m(R,aa))}}})}var U=k(z),N=U[0],S;if(N)if(G){S=A.createRng();S.setStartBefore(G);S.setEndAfter(G);L(i(S,U))}else if(!M.isCollapsed()||!N.inline){G=M.getBookmark();L(i(M.getRng(aa),U));M.moveToBookmark(G);M.setRng(I(M.getRng(aa)));o.nodeChanged()}else x("apply",
+z,F)}function g(z,F,G){function I(J){var Q,R,ca;Q=l.grep(J.childNodes);R=0;for(ca=S.length;R<ca;R++)if(a(S[R],F,J,J))break;if(O.deep){R=0;for(ca=Q.length;R<ca;R++)I(Q[R])}}function T(J){var Q;C(A.getParents(J.parentNode,void 0,A.getRoot()).reverse(),function(R){var ca;if(!Q&&R.id!="_start"&&R.id!="_end")if((ca=d(R,z,F))&&ca.split!==false)Q=R});return Q}function L(J,Q,R,ca){var $,Y,ba,da,fa,ga;if(J){ga=J.parentNode;for($=Q.parentNode;$&&$!=ga;$=$.parentNode){Y=$.cloneNode(V);for(fa=0;fa<S.length;fa++)if(a(S[fa],
+F,Y,Y)){Y=0;break}if(Y){ba&&Y.appendChild(ba);da||(da=Y);ba=Y}}if(ca&&(!O.mixed||!B(J)))Q=A.split(J,Q);if(ba){R.parentNode.insertBefore(ba,R);da.appendChild(R)}}return Q}function U(J){var Q=A.get(J?"_start":"_end"),R=Q[J?"firstChild":"lastChild"];if(p(R))R=R[J?"firstChild":"lastChild"];A.remove(Q,true);return R}function N(J){var Q,R;J=i(J,S,aa);if(O.split){Q=s(J,aa);R=s(J);if(Q!=R){Q=c(Q,"span",{id:"_start",_mce_type:"bookmark"});R=c(R,"span",{id:"_end",_mce_type:"bookmark"});L(T(Q),Q,Q,true);L(T(R),
+R,R,true);Q=U(aa);R=U()}else Q=R=L(T(Q),Q,Q,true);J.startContainer=Q.parentNode;J.startOffset=H(Q);J.endContainer=R.parentNode;J.endOffset=H(R)+1}E.walk(J,function(ca){C(ca,function($){I($)})})}var S=k(z),O=S[0],P;if(G){P=A.createRng();P.setStartBefore(G);P.setEndAfter(G);N(P)}else if(!M.isCollapsed()||!O.inline){G=M.getBookmark();N(M.getRng(aa));M.moveToBookmark(G);o.nodeChanged()}else x("remove",z,F)}function d(z,F,G,I){function T(N,S,O){var P,J,Q=S[O];if(Q)if(Q.length===ea)for(P in Q){if(Q.hasOwnProperty(P)){J=
+O==="attributes"?A.getAttrib(N,P):v(N,P);if(I&&!J&&!S.exact)return;if((!I||S.exact)&&!u(J,f(Q[P],G)))return}}else for(P=0;P<Q.length;P++)if(O==="attributes"?A.getAttrib(N,Q[P]):v(N,Q[P]))break;return S}var L=k(F),U;if(L&&z)for(U=0;U<L.length;U++){F=L[U];if(r(z,F)&&T(z,F,"attributes")&&T(z,F,"styles")){if(L=F.classes)for(U=0;U<L.length;U++)if(!A.hasClass(z,L[U]))return;return F}}}function n(z,F,G){function I(L){L=A.getParent(L,function(U){return!!d(U,z,F,true)});return d(L,z,F)}var T;if(G)return I(G);
+if(M.isCollapsed()){for(G=Z.apply.length-1;G>=0;G--)if(Z.apply[G].name==z)return true;for(G=Z.remove.length-1;G>=0;G--)if(Z.remove[G].name==z)return false;return I(M.getNode())}G=M.getNode();if(I(G))return aa;T=M.getStart();if(T!=G)if(I(T))return aa;return V}function r(z,F){if(u(z,F.inline))return aa;if(u(z,F.block))return aa;if(F.selector)return A.is(z,F.selector)}function u(z,F){z=z||"";F=F||"";z=""+(z.nodeName||z);F=""+(F.nodeName||F);return z.toLowerCase()==F.toLowerCase()}function v(z,F){var G=
+A.getStyle(z,F);if(F=="color"||F=="backgroundColor")G=A.toHex(G);if(F=="fontWeight"&&G==700)G="bold";return""+G}function f(z,F){if(typeof z!="string")z=z(F);else if(F)z=z.replace(/%(\w+)/g,function(G,I){return F[I]||G});return z}function e(z){return z&&z.nodeType===3&&/^([\s\r\n]+|)$/.test(z.nodeValue)}function c(z,F,G){F=A.create(F,G);z.parentNode.insertBefore(F,z);F.appendChild(z);return F}function i(z,F){function G(O,P,J,Q){var R;for(Q=Q||A.getRoot();;){R=O.parentNode;if(R==Q||!F[0].block_expand&&
+B(R))break;for(N=R[P];N&&N!=O;N=N[J]){if(N.nodeType==1&&!p(N))return O;if(N.nodeType==3&&!e(N))return O}O=O.parentNode}return O}var I=z.startContainer,T=z.startOffset,L=z.endContainer,U=z.endOffset,N,S;if(I.nodeType==1&&I.hasChildNodes()){S=I.childNodes.length-1;I=I.childNodes[T>S?S:T];if(I.nodeType==3)T=0}if(L.nodeType==1&&L.hasChildNodes()){S=L.childNodes.length-1;L=L.childNodes[U>S?S:U-1];if(L.nodeType==3)U=L.nodeValue.length}if(p(I.parentNode))I=I.parentNode;if(p(I))I=I.nextSibling||I;if(p(L.parentNode))L=
+L.parentNode;if(p(L))L=L.previousSibling||L;if(F[0].inline||F[0].block_expand){I=G(I,"firstChild","nextSibling");L=G(L,"lastChild","previousSibling")}if(F[0].selector&&F[0].expand!==V&&!F[0].inline){S=function(O,P){var J,Q,R;if(O.nodeType==3&&O.nodeValue.length==0&&O[P])O=O[P];J=A.getParents(O,void 0,A.getRoot());for(Q=0;Q<J.length;Q++)for(R=0;R<F.length;R++)if(A.is(J[Q],F[R].selector))return J[Q];return O};I=S(I,"previousSibling");L=S(L,"nextSibling")}if(F[0].block||F[0].selector){S=function(O,P){var J;
+F[0].wrapper||(J=A.getParent(O,F[0].block));J||(J=A.getParent(O.nodeType==3?O.parentNode:O,B));if(J&&F[0].wrapper)J=A.getParents(J,"ul,ol",A.getRoot()).reverse()[0]||J;if(!J)for(J=O;J[P]&&!B(J[P]);){J=J[P];if(u(J,"br"))break}return J||O};I=S(I,"previousSibling");L=S(L,"nextSibling");if(F[0].block){B(I)||(I=G(I,"firstChild","nextSibling"));B(L)||(L=G(L,"lastChild","previousSibling"))}}if(I.nodeType==1){T=H(I);I=I.parentNode}if(L.nodeType==1){U=H(L)+1;L=L.parentNode}return{startContainer:I,startOffset:T,
+endContainer:L,endOffset:U}}function a(z,F,G,I){var T,L,U;if(!r(G,z))return V;if(z.remove!="all"){C(z.styles,function(N,S){N=f(N,F);if(typeof S==="number"){S=N;I=0}if(!I||u(v(I,S),N))A.setStyle(G,S,"");U=1});if(U&&A.getAttrib(G,"style")==""){G.removeAttribute("style");G.removeAttribute("_mce_style")}C(z.attributes,function(N,S){var O;N=f(N,F);if(typeof S==="number"){S=N;I=0}if(!I||u(A.getAttrib(I,S),N)){if(S=="class")if(N=A.getAttrib(G,S)){O="";C(N.split(/\s+/),function(P){if(/mce\w+/.test(P))O+=
+(O?" ":"")+P});if(O){A.setAttrib(G,S,O);return}}S=="class"&&G.removeAttribute("className");W.test(S)&&G.removeAttribute("_mce_"+S);G.removeAttribute(S)}});C(z.classes,function(N){N=f(N,F);if(!I||A.hasClass(I,N))A.removeClass(G,N)});L=A.getAttribs(G);for(T=0;T<L.length;T++)if(L[T].nodeName.indexOf("_")!==0)return V}if(z.remove!="none"){h(G,z);return aa}}function h(z,F){var G=z.parentNode,I;if(F.block)if(K){if(G==A.getRoot())if(!F.list_block||!u(z,F.list_block))C(l.grep(z.childNodes),function(L){if(D(K,
+L.nodeName.toLowerCase()))if(I)I.appendChild(L);else I=c(L,K);else I=0})}else{var T=function(L,U,N){L=m(L,U,N);return!L||L.nodeName=="BR"||B(L)};if(B(z)&&!B(G)){!T(z,V)&&!T(z.firstChild,aa,1)&&z.insertBefore(A.create("br"),z.firstChild);!T(z,aa)&&!T(z.lastChild,V,1)&&z.appendChild(A.create("br"))}}F.selector&&F.inline&&!u(F.inline,z)||A.remove(z,1)}function m(z,F,G){if(z){F=F?"nextSibling":"previousSibling";for(z=G?z:z[F];z;z=z[F])if(z.nodeType==1||!e(z))return z}}function p(z){return z&&z.nodeType==
+1&&z.getAttribute("_mce_type")=="bookmark"}function t(z,F){function G(L,U){function N(O){var P={};C(A.getAttribs(O),function(J){J=J.nodeName.toLowerCase();if(J.indexOf("_")!==0&&J!=="style")P[J]=A.getAttrib(O,J)});return P}function S(O,P){var J,Q;for(Q in O)if(O.hasOwnProperty(Q)){J=P[Q];if(J===ea)return V;if(O[Q]!=J)return V;delete P[Q]}for(Q in P)if(P.hasOwnProperty(Q))return V;return aa}if(L.nodeName!=U.nodeName)return V;if(!S(N(L),N(U)))return V;if(!S(A.parseStyle(A.getAttrib(L,"style")),A.parseStyle(A.getAttrib(U,
+"style"))))return V;return aa}var I,T;if(z&&F){T=function(L,U){for(I=L;I;I=I[U]){if(I.nodeType==3&&!e(I))break;if(I.nodeType==1&&!p(I))return I}return L};z=T(z,"previousSibling");F=T(F,"nextSibling");if(G(z,F)){for(I=z.nextSibling;I&&I!=F;){T=I;I=I.nextSibling;z.appendChild(T)}A.remove(F);C(l.grep(F.childNodes),function(L){z.appendChild(L)});return z}}return F}function s(z,F){var G,I,T;G=z[F?"startContainer":"endContainer"];I=z[F?"startOffset":"endOffset"];if(G.nodeType==1){T=G.childNodes.length-
+1;!F&&I&&I--;G=G.childNodes[I>T?T:I]}return G}function x(z,F,G){function I(){return Z.apply.length||Z.remove.length}function T(N){C(Z.apply.reverse(),function(S){b(S.name,S.vars,N)});C(Z.remove.reverse(),function(S){g(S.name,S.vars,N)});A.remove(N,1);Z.apply=[];Z.remove=[]}var L=Z[z],U=Z[z=="apply"?"remove":"apply"];for(z=L.length-1;z>=0;z--)if(L[z].name==F)return;L.push({name:F,vars:G});for(z=U.length-1;z>=0;z--)U[z].name==F&&U.splice(z,1);if(I()){o.getDoc().execCommand("FontName",false,"mceinline");
+Z.lastRng=M.getRng();C(A.select("font,span"),function(N){var S;if(q(N)){S=M.getBookmark();T(N);M.moveToBookmark(S);o.nodeChanged()}});if(!Z.isListening&&I()){Z.isListening=true;C("onKeyDown,onKeyUp,onKeyPress,onMouseUp".split(","),function(N){o[N].addToTop(function(S,O){if(I()&&!l.dom.RangeUtils.compareRanges(Z.lastRng,M.getRng())){C(A.select("font,span"),function(P){var J;if(q(P))if(J=P.firstChild){T(P);P=A.createRng();P.setStart(J,J.nodeValue.length);P.setEnd(J,J.nodeValue.length);M.setRng(P);S.nodeChanged()}else A.remove(P)});
+if(O.type=="keyup"||O.type=="mouseup"){Z.apply=[];Z.remove=[]}}})})}}}var y={},C=l.each,A=o.dom,M=o.selection,X=l.dom.TreeWalker,E=new l.dom.RangeUtils(A),D=o.schema.isValid,B=A.isBlock,K=o.settings.forced_root_block,H=A.nodeIndex,W=/^(src|href|style)$/,V=false,aa=true,ea,Z={apply:[],remove:[]};l.extend(this,{get:k,register:j,apply:b,remove:g,toggle:function(z,F,G){n(z,F,G)?g(z,F,G):b(z,F,G)},match:n,matchAll:function(z,F){var G,I=[],T={},L,U;if(M.isCollapsed()){for(L=0;L<z.length;L++)for(G=Z.remove.length-
+1;G>=0;G--){U=z[L];if(Z.remove[G].name==U){T[U]=true;break}}for(G=Z.apply.length-1;G>=0;G--)for(L=0;L<z.length;L++){U=z[L];if(!T[U]&&Z.apply[G].name==U){T[U]=true;I.push(U)}}}G=M.getStart();A.getParent(G,function(N){var S,O;for(S=0;S<z.length;S++){O=z[S];if(!T[O]&&d(N,O,F)){T[O]=true;I.push(O)}}});return I},matchNode:d,canApply:function(z){z=k(z);var F,G,I,T;if(z){F=M.getStart();F=A.getParents(F,void 0,A.getRoot());for(I=z.length-1;I>=0;I--){T=z[I].selector;if(!T)return aa;for(G=F.length-1;G>=0;G--)if(A.is(F[G],
+T))return aa}}return V}})}})(tinymce);
+tinymce.onAddEditor.add(function(l,o){var q,k,j,b=o.settings;if(b.inline_styles){k=l.explode(b.font_size_style_values);var g=function(n,r){j.replace(j.create("span",{style:r}),n,1)};q={font:function(n,r){g(r,{backgroundColor:r.style.backgroundColor,color:r.color,fontFamily:r.face,fontSize:k[parseInt(r.size)-1]})},u:function(n,r){g(r,{textDecoration:"underline"})},strike:function(n,r){g(r,{textDecoration:"line-through"})}};var d=function(n,r){j=n.dom;b.convert_fonts_to_spans&&l.each(j.select("font,u,strike",
+r.node),function(u){q[u.nodeName.toLowerCase()](o.dom,u)})};o.onPreProcess.add(d);o.onInit.add(function(){o.selection.onSetContent.add(d)})}});