var jsfilename;



jsfilename = "tiny_mce/tiny_mce.js";

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