var tinymce={majorVersion:"3",minorVersion:"0.7",releaseDate:"2008-04-14",_init:function(){var p=this,m=document,o=window,l=navigator,c=l.userAgent,j,b,h,g;
p.isOpera=o.opera&&opera.buildNumber;
p.isWebKit=/WebKit/.test(c);
p.isOldWebKit=p.isWebKit&&!o.getSelection().getRangeAt;
p.isIE=!p.isWebKit&&!p.isOpera&&(/MSIE/gi).test(c)&&(/Explorer/gi).test(l.appName);
p.isIE6=p.isIE&&/MSIE [56]/.test(c);
p.isGecko=!p.isWebKit&&/Gecko/.test(c);
p.isMac=c.indexOf("Mac")!=-1;
if(o.tinyMCEPreInit){p.suffix=tinyMCEPreInit.suffix;
p.baseURL=tinyMCEPreInit.base;
return;
}p.suffix="";
b=m.getElementsByTagName("base");
for(j=0;
j<b.length;
j++){if(b[j].href){g=b[j].href;
}}function f(d){if(d.src&&/tiny_mce(|_dev|_src|_gzip|_jquery|_prototype).js/.test(d.src)){if(/_(src|dev)\.js/g.test(d.src)){p.suffix="_src";
}p.baseURL=d.src.substring(0,d.src.lastIndexOf("/"));
if(g&&p.baseURL.indexOf("://")==-1){p.baseURL=g+p.baseURL;
}return p.baseURL;
}return null;
}b=m.getElementsByTagName("script");
for(j=0;
j<b.length;
j++){if(f(b[j])){return;
}}h=m.getElementsByTagName("head")[0];
if(h){b=h.getElementsByTagName("script");
for(j=0;
j<b.length;
j++){if(f(b[j])){return;
}}}return;
},is:function(c,b){var d=typeof(c);
if(!b){return d!="undefined";
}if(b=="array"&&(c instanceof Array)){return true;
}return d==b;
},each:function(f,b,d){var g,c;
if(!f){return 0;
}d=d||f;
if(typeof(f.length)!="undefined"){for(g=0,c=f.length;
g<c;
g++){if(b.call(d,f[g],g,f)===false){return 0;
}}}else{for(g in f){if(f.hasOwnProperty(g)){if(b.call(d,f[g],g,f)===false){return 0;
}}}}return 1;
},map:function(b,c){var d=[];
tinymce.each(b,function(f){d.push(c(f));
});
return d;
},grep:function(b,c){var d=[];
tinymce.each(b,function(f){if(!c||c(f)){d.push(f);
}});
return d;
},inArray:function(c,d){var f,b;
if(c){for(f=0,b=c.length;
f<b;
f++){if(c[f]===d){return f;
}}}return -1;
},extend:function(f,d){var c,b=arguments;
for(c=1;
c<b.length;
c++){d=b[c];
tinymce.each(d,function(g,h){if(typeof(g)!=="undefined"){f[h]=g;
}});
}return f;
},trim:function(b){return(b?""+b:"").replace(/^\s*|\s*$/g,"");
},create:function(m,b){var l=this,d,g,h,i,f,j=0;
m=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(m);
h=m[3].match(/(^|\.)(\w+)$/i)[2];
g=l.createNS(m[3].replace(/\.\w+$/,""));
if(g[h]){return;
}if(m[2]=="static"){g[h]=b;
if(this.onCreate){this.onCreate(m[2],m[3],g[h]);
}return;
}if(!b[h]){b[h]=function(){};
j=1;
}g[h]=b[h];
l.extend(g[h].prototype,b);
if(m[5]){d=l.resolve(m[5]).prototype;
i=m[5].match(/\.(\w+)$/i)[1];
f=g[h];
if(j){g[h]=function(){return d[i].apply(this,arguments);
};
}else{g[h]=function(){this.parent=d[i];
return f.apply(this,arguments);
};
}g[h].prototype[h]=g[h];
l.each(d,function(c,o){g[h].prototype[o]=d[o];
});
l.each(b,function(c,o){if(d[o]){g[h].prototype[o]=function(){this.parent=d[o];
return c.apply(this,arguments);
};
}else{if(o!=h){g[h].prototype[o]=c;
}}});
}l.each(b["static"],function(c,o){g[h][o]=c;
});
if(this.onCreate){this.onCreate(m[2],m[3],g[h].prototype);
}},walk:function(d,c,g,b){b=b||this;
if(d){if(g){d=d[g];
}tinymce.each(d,function(h,f){if(c.call(b,h,f,g)===false){return false;
}tinymce.walk(h,c,g,b);
});
}},createNS:function(f,d){var c,b;
d=d||window;
f=f.split(".");
for(c=0;
c<f.length;
c++){b=f[c];
if(!d[b]){d[b]={};
}d=d[b];
}return d;
},resolve:function(f,d){var c,b;
d=d||window;
f=f.split(".");
for(c=0,b=f.length;
c<b;
c++){d=d[f[c]];
if(!d){break;
}}return d;
},addUnload:function(h,g){var d=this,b=window;
h={func:h,scope:g||this};
if(!d.unloads){function c(){var f=d.unloads,j,l;
if(f){for(l in f){j=f[l];
if(j&&j.func){j.func.call(j.scope,1);
}}if(b.detachEvent){b.detachEvent("onbeforeunload",i);
b.detachEvent("onunload",c);
}else{if(b.removeEventListener){b.removeEventListener("unload",c,false);
}}d.unloads=j=f=b=c=null;
if(window.CollectGarbage){window.CollectGarbage();
}}}function i(){var j=document;
if(j.readyState=="interactive"){function f(){j.detachEvent("onstop",f);
c();
j=null;
}j.attachEvent("onstop",f);
window.setTimeout(function(){j.detachEvent("onstop",f);
},0);
}}if(b.attachEvent){b.attachEvent("onunload",c);
b.attachEvent("onbeforeunload",i);
}else{if(b.addEventListener){b.addEventListener("unload",c,false);
}}d.unloads=[h];
}else{d.unloads.push(h);
}return h;
},removeUnload:function(d){var b=this.unloads,c=null;
tinymce.each(b,function(g,f){if(g&&g.func==d){b.splice(f,1);
c=d;
return false;
}});
return c;
},explode:function(b,c){return tinymce.map(b.split(c||","),tinymce.trim);
},_addVer:function(b,c){return b+(b.indexOf("?")==-1?"?":"&")+"v="+(tinymce.majorVersion+tinymce.minorVersion).replace(/[^0-9]/g,"")+"cx4";
}};
window.tinymce=tinymce;
tinymce._init();
tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,Dispatcher:function(b){this.scope=b||this;
this.listeners=[];
},add:function(b,c){this.listeners.push({cb:b,scope:c||this.scope});
return b;
},addToTop:function(b,c){this.listeners.unshift({cb:b,scope:c||this.scope});
return b;
},remove:function(b){var c=this.listeners,d=null;
tinymce.each(c,function(g,f){if(b==g.cb){d=b;
c.splice(f,1);
return false;
}});
return d;
},dispatch:function(){var g,d=arguments,f,b=this.listeners,h;
for(f=0;
f<b.length;
f++){h=b[f];
g=h.cb.apply(h.scope,d);
if(g===false){break;
}}return g;
}});
(function(){var b=tinymce.each;
tinymce.create("tinymce.util.URI",{URI:function(f,h){var g=this,i,d,c;
h=g.settings=h||{};
if(/^(mailto|news|javascript|about):/i.test(f)||/^\s*#/.test(f)){g.source=f;
return;
}if(f.indexOf("/")===0&&f.indexOf("//")!==0){f=(h.base_uri?h.base_uri.protocol||"http":"http")+"://mce_host"+f;
}if(f.indexOf("://")===-1&&f.indexOf("//")!==0){f=(h.base_uri.protocol||"http")+"://mce_host"+g.toAbsPath(h.base_uri.path,f);
}f=f.replace(/@@/g,"(mce_at)");
f=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(f);
b(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(j,l){var m=f[l];
if(m){m=m.replace(/\(mce_at\)/g,"@@");
}g[j]=m;
});
if(c=h.base_uri){if(!g.protocol){g.protocol=c.protocol;
}if(!g.userInfo){g.userInfo=c.userInfo;
}if(!g.port&&g.host=="mce_host"){g.port=c.port;
}if(!g.host||g.host=="mce_host"){g.host=c.host;
}g.source="";
}},setPath:function(d){var c=this;
d=/^(.*?)\/?(\w+)?$/.exec(d);
c.path=d[0];
c.directory=d[1];
c.file=d[2];
c.source="";
c.getURI();
},toRelative:function(c){var d=this,f;
c=new tinymce.util.URI(c,{base_uri:d});
if((c.host!="mce_host"&&d.host!=c.host&&c.host)||d.port!=c.port||d.protocol!=c.protocol){return c.getURI();
}f=d.toRelPath(d.path,c.path);
if(c.query){f+="?"+c.query;
}if(c.anchor){f+="#"+c.anchor;
}return f;
},toAbsolute:function(c,d){var c=new tinymce.util.URI(c,{base_uri:this});
return c.getURI(this.host==c.host?d:0);
},toRelPath:function(h,j){var c,g=0,d="",f;
h=h.substring(0,h.lastIndexOf("/"));
h=h.split("/");
c=j.split("/");
if(h.length>=c.length){for(f=0;
f<h.length;
f++){if(f>=c.length||h[f]!=c[f]){g=f+1;
break;
}}}if(h.length<c.length){for(f=0;
f<c.length;
f++){if(f>=h.length||h[f]!=c[f]){g=f+1;
break;
}}}if(g==1){return j;
}for(f=0;
f<h.length-(g-1);
f++){d+="../";
}for(f=g-1;
f<c.length;
f++){if(f!=g-1){d+="/"+c[f];
}else{d+=c[f];
}}return d;
},toAbsPath:function(f,g){var d,c=0,h=[];
f=f.split("/");
g=g.split("/");
b(f,function(i){if(i){h.push(i);
}});
f=h;
for(d=g.length-1,h=[];
d>=0;
d--){if(g[d].length==0||g[d]=="."){continue;
}if(g[d]==".."){c++;
continue;
}if(c>0){c--;
continue;
}h.push(g[d]);
}d=f.length-c;
if(d<=0){return"/"+h.reverse().join("/");
}return"/"+f.slice(0,d).join("/")+"/"+h.reverse().join("/");
},getURI:function(f){var d,c=this;
if(!c.source||f){d="";
if(!f){if(c.protocol){d+=c.protocol+"://";
}if(c.userInfo){d+=c.userInfo+"@";
}if(c.host){d+=c.host;
}if(c.port){d+=":"+c.port;
}}if(c.path){d+=c.path;
}if(c.query){d+="?"+c.query;
}if(c.anchor){d+="#"+c.anchor;
}c.source=d;
}return c.source;
}});
})();
(function(){var b=tinymce.each;
tinymce.create("static tinymce.util.Cookie",{getHash:function(f){var c=this.get(f),d;
if(c){b(c.split("&"),function(g){g=g.split("=");
d=d||{};
d[unescape(g[0])]=unescape(g[1]);
});
}return d;
},setHash:function(l,c,h,g,j,f){var i="";
b(c,function(m,d){i+=(!i?"":"&")+escape(d)+"="+escape(m);
});
this.set(l,i,h,g,j,f);
},get:function(i){var h=document.cookie,g,f=i+"=",d;
if(!h){return;
}d=h.indexOf("; "+f);
if(d==-1){d=h.indexOf(f);
if(d!=0){return null;
}}else{d+=2;
}g=h.indexOf(";",d);
if(g==-1){g=h.length;
}return unescape(h.substring(d+f.length,g));
},set:function(j,c,h,g,i,f){document.cookie=j+"="+escape(c)+((h)?"; expires="+h.toGMTString():"")+((g)?"; path="+escape(g):"")+((i)?"; domain="+i:"")+((f)?"; secure":"");
},remove:function(g,c){var f=new Date();
f.setTime(f.getTime()-1000);
this.set(g,"",f,c,f);
}});
})();
tinymce.create("static tinymce.util.JSON",{serialize:function(g){var d,b,f=tinymce.util.JSON.serialize,c;
if(g==null){return"null";
}c=typeof g;
if(c=="string"){b="\bb\tt\nn\ff\rr\"\"''\\\\";
return'"'+g.replace(/([\u0080-\uFFFF\x00-\x1f\"\'])/g,function(i,h){d=b.indexOf(h);
if(d+1){return"\\"+b.charAt(d+1);
}i=h.charCodeAt().toString(16);
return"\\u"+"0000".substring(i.length)+i;
})+'"';
}if(c=="object"){if(g instanceof Array){for(d=0,b="[";
d<g.length;
d++){b+=(d>0?",":"")+f(g[d]);
}return b+"]";
}b="{";
for(d in g){b+=typeof g[d]!="function"?(b.length>1?',"':'"')+d+'":'+f(g[d]):"";
}return b+"}";
}return""+g;
},parse:function(s){try{return eval("("+s+")");
}catch(ex){}}});
tinymce.create("static tinymce.util.XHR",{send:function(h){var b,g,d=window,i=0;
h.scope=h.scope||this;
h.success_scope=h.success_scope||h.scope;
h.error_scope=h.error_scope||h.scope;
h.async=h.async===false?false:true;
h.data=h.data||"";
function f(j){b=0;
try{b=new ActiveXObject(j);
}catch(c){}return b;
}b=d.XMLHttpRequest?new XMLHttpRequest():f("Microsoft.XMLHTTP")||f("Msxml2.XMLHTTP");
if(b){if(b.overrideMimeType){b.overrideMimeType(h.content_type);
}b.open(h.type||(h.data?"POST":"GET"),h.url,h.async);
if(h.content_type){b.setRequestHeader("Content-Type",h.content_type);
}b.send(h.data);
g=d.setInterval(function(){if(b.readyState==4||i++>10000){d.clearInterval(g);
if(h.success&&i<10000&&b.status==200){h.success.call(h.success_scope,""+b.responseText,b,h);
}else{if(h.error){h.error.call(h.error_scope,i>10000?"TIMED_OUT":"GENERAL",b,h);
}}b=null;
}},10);
}}});
(function(){var d=tinymce.extend,c=tinymce.util.JSON,b=tinymce.util.XHR;
tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(f){this.settings=d({},f);
this.count=0;
},send:function(h){var g=h.error,f=h.success;
h=d(this.settings,h);
h.success=function(j,i){j=c.parse(j);
if(typeof(j)=="undefined"){j={error:"JSON Parse error."};
}if(j.error){g.call(h.error_scope||h.scope,j.error,i);
}else{f.call(h.success_scope||h.scope,j.result);
}};
h.error=function(j,i){g.call(h.error_scope||h.scope,j,i);
};
h.data=c.serialize({id:h.id||"c"+(this.count++),method:h.method,params:h.params});
h.content_type="application/json";
b.send(h);
},"static":{sendRPC:function(f){return new tinymce.util.JSONRequest().send(f);
}}});
}());
(function(){var each=tinymce.each,is=tinymce.is;
var isWebKit=tinymce.isWebKit,isIE=tinymce.isIE;
tinymce.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,listeners:{},pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,cache:{},idPattern:/^#[\w]+$/,elmPattern:/^[\w_*]+$/,elmClassPattern:/^([\w_]*)\.([\w_]+)$/,DOMUtils:function(d,s){var t=this;
t.doc=d;
t.win=window;
t.files={};
t.cssFlicker=false;
t.counter=0;
t.boxModel=!tinymce.isIE||d.compatMode=="CSS1Compat";
t.stdMode=d.documentMode===8;
this.settings=s=tinymce.extend({keep_values:false,hex_colors:1,process_html:1},s);
if(tinymce.isIE6){try{d.execCommand("BackgroundImageCache",false,true);
}catch(e){t.cssFlicker=true;
}}tinymce.addUnload(t.destroy,t);
},getRoot:function(){var t=this,s=t.settings;
return(s&&t.get(s.root_element))||t.doc.body;
},getViewPort:function(w){var d,b;
w=!w?this.win:w;
d=w.document;
b=this.boxModel?d.documentElement:d.body;
return{x:w.pageXOffset||b.scrollLeft,y:w.pageYOffset||b.scrollTop,w:w.innerWidth||b.clientWidth,h:w.innerHeight||b.clientHeight};
},getRect:function(e){var p,t=this,w,h;
e=t.get(e);
p=t.getPos(e);
w=t.getStyle(e,"width");
h=t.getStyle(e,"height");
if(w.indexOf("px")===-1){w=0;
}if(h.indexOf("px")===-1){h=0;
}return{x:p.x,y:p.y,w:parseInt(w)||e.offsetWidth||e.clientWidth,h:parseInt(h)||e.offsetHeight||e.clientHeight};
},getParent:function(n,f,r){var na,se=this.settings;
n=this.get(n);
if(se.strict_root){r=r||this.getRoot();
}if(is(f,"string")){na=f.toUpperCase();
f=function(n){var s=false;
if(n.nodeType==1&&na==="*"){s=true;
return false;
}each(na.split(","),function(v){if(n.nodeType==1&&((se.strict&&n.nodeName.toUpperCase()==v)||n.nodeName==v)){s=true;
return false;
}});
return s;
};
}while(n){if(n==r){return null;
}if(f(n)){return n;
}n=n.parentNode;
}return null;
},get:function(e){var n;
if(this.doc&&typeof(e)=="string"){n=e;
e=this.doc.getElementById(e);
if(e&&e.id!==n){return this.doc.getElementsByName(n)[1];
}}return e;
},select:function(pa,s){var t=this,cs,c,pl,o=[],x,i,l,n;
s=t.get(s)||t.doc;
if(s.querySelectorAll){if(s!=t.doc){i=s.id;
s.id="_mc_tmp";
pa="#_mc_tmp "+pa;
}l=tinymce.grep(s.querySelectorAll(pa));
s.id=i;
return l;
}if(t.settings.strict){function get(s,n){return s.getElementsByTagName(n.toLowerCase());
}}else{function get(s,n){return s.getElementsByTagName(n);
}}if(t.elmPattern.test(pa)){x=get(s,pa);
for(i=0,l=x.length;
i<l;
i++){o.push(x[i]);
}return o;
}if(t.elmClassPattern.test(pa)){pl=t.elmClassPattern.exec(pa);
x=get(s,pl[1]||"*");
c=" "+pl[2]+" ";
for(i=0,l=x.length;
i<l;
i++){n=x[i];
if(n.className&&(" "+n.className+" ").indexOf(c)!==-1){o.push(n);
}}return o;
}function collect(n){if(!n.mce_save){n.mce_save=1;
o.push(n);
}}function collectIE(n){if(!n.getAttribute("mce_save")){n.setAttribute("mce_save","1");
o.push(n);
}}function find(n,f,r){var i,l,nl=get(r,n);
for(i=0,l=nl.length;
i<l;
i++){f(nl[i]);
}}each(pa.split(","),function(v,i){v=tinymce.trim(v);
if(t.elmPattern.test(v)){each(get(s,v),function(n){collect(n);
});
return;
}if(t.elmClassPattern.test(v)){x=t.elmClassPattern.exec(v);
each(get(s,x[1]),function(n){if(t.hasClass(n,x[2])){collect(n);
}});
return;
}if(!(cs=t.cache[pa])){cs="x=(function(cf, s) {";
pl=v.split(" ");
each(pl,function(v){var p=/^([\w\\*]+)?(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@([\w\\]+)([\^\$\*!]?=)([\w\\]+)\])?(?:\:([\w\\]+))?/i.exec(v);
p[1]=p[1]||"*";
cs+='find("'+p[1]+'", function(n) {';
if(p[2]){cs+='if (n.id !== "'+p[2]+'") return;';
}if(p[3]){cs+='var c = " " + n.className + " ";';
cs+="if (";
c="";
each(p[3].split("."),function(v){if(v){c+=(c?"||":"")+'c.indexOf(" '+v+' ") === -1';
}});
cs+=c+") return;";
}});
cs+="cf(n);";
for(i=pl.length-1;
i>=0;
i--){cs+="}, "+(i?"n":"s")+");";
}cs+="})";
t.cache[pa]=cs=eval(cs);
}cs(isIE?collectIE:collect,s);
});
each(o,function(n){if(isIE){n.removeAttribute("mce_save");
}else{delete n.mce_save;
}});
return o;
},add:function(p,n,a,h,c){var t=this;
return this.run(p,function(p){var e,k;
e=is(n,"string")?t.doc.createElement(n):n;
if(a){for(k in a){if(a.hasOwnProperty(k)&&!is(a[k],"object")){t.setAttrib(e,k,""+a[k]);
}}if(a.style&&!is(a.style,"string")){each(a.style,function(v,n){t.setStyle(e,n,v);
});
}}if(h){if(h.nodeType){e.appendChild(h);
}else{t.setHTML(e,h);
}}return !c?p.appendChild(e):e;
});
},create:function(n,a,h){return this.add(this.doc.createElement(n),n,a,h,1);
},createHTML:function(n,a,h){var o="",t=this,k;
o+="<"+n;
for(k in a){if(a.hasOwnProperty(k)){o+=" "+k+'="'+t.encode(a[k])+'"';
}}if(tinymce.is(h)){return o+">"+h+"</"+n+">";
}return o+" />";
},remove:function(n,k){return this.run(n,function(n){var p,g;
p=n.parentNode;
if(!p){return null;
}if(k){each(n.childNodes,function(c){p.insertBefore(c.cloneNode(true),n);
});
}return p.removeChild(n);
});
},setStyle:function(n,na,v){var t=this;
return t.run(n,function(e){var s,i;
s=e.style;
na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase();
});
if(t.pixelStyles.test(na)&&(tinymce.is(v,"number")||/^[\-0-9\.]+$/.test(v))){v+="px";
}switch(na){case"opacity":if(isIE){s.filter=v===""?"":"alpha(opacity="+(v*100)+")";
if(!n.currentStyle||!n.currentStyle.hasLayout){s.display="inline-block";
}}s[na]=s["-moz-opacity"]=s["-khtml-opacity"]=v||"";
break;
case"float":isIE?s.styleFloat=v:s.cssFloat=v;
break;
default:s[na]=v||"";
}if(t.settings.update_styles){t.setAttrib(e,"mce_style");
}});
},getStyle:function(n,na,c){n=this.get(n);
if(!n){return false;
}if(this.doc.defaultView&&c){na=na.replace(/[A-Z]/g,function(a){return"-"+a;
});
try{return this.doc.defaultView.getComputedStyle(n,null).getPropertyValue(na);
}catch(ex){return null;
}}na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase();
});
if(na=="float"){na=isIE?"styleFloat":"cssFloat";
}if(n.currentStyle&&c){return n.currentStyle[na];
}return n.style[na];
},setStyles:function(e,o){var t=this,s=t.settings,ol;
ol=s.update_styles;
s.update_styles=0;
each(o,function(v,n){t.setStyle(e,n,v);
});
s.update_styles=ol;
if(s.update_styles){t.setAttrib(e,s.cssText);
}},setAttrib:function(e,n,v){var t=this;
if(t.settings.strict){n=n.toLowerCase();
}return this.run(e,function(e){var s=t.settings;
switch(n){case"style":if(s.keep_values&&/^(| )(top|left|bottom|right|width|height)/i.test(v)){if(v){e.setAttribute("mce_style",v,2);
}else{e.removeAttribute("mce_style",2);
}}e.style.cssText=v;
break;
case"class":e.className=v||"";
break;
case"src":case"href":if(s.keep_values){if(s.url_converter){v=s.url_converter.call(s.url_converter_scope||t,v,n,e);
}t.setAttrib(e,"mce_"+n,v,2);
}break;
}if(is(v)&&v!==null&&v.length!==0){e.setAttribute(n,""+v,2);
}else{e.removeAttribute(n,2);
}});
},setAttribs:function(e,o){var t=this;
return this.run(e,function(e){each(o,function(v,n){t.setAttrib(e,n,v);
});
});
},getAttrib:function(e,n,dv){var v,t=this;
e=t.get(e);
if(!e||e.nodeType!==1){return false;
}if(!is(dv)){dv="";
}if(/^(src|href|style|coords)$/.test(n)){v=e.getAttribute("mce_"+n);
if(v){return v;
}}v=e.getAttribute(n,2);
if(!v){switch(n){case"class":v=e.className;
break;
default:if(isIE&&n==="name"&&e.nodeName==="A"){v=e.name;
break;
}v=e.attributes[n];
v=v&&is(v.nodeValue)?v.nodeValue:v;
}}switch(n){case"style":v=v||e.style.cssText;
if(v){v=t.serializeStyle(t.parseStyle(v));
if(t.settings.keep_values&&/^(| )(top|left|bottom|right|width|height)/i.test(v)){e.setAttribute("mce_style",v);
}}break;
}if(isWebKit&&n==="class"&&v){v=v.replace(/(apple|webkit)\-[a-z\-]+/gi,"");
}if(isIE){switch(n){case"rowspan":case"colspan":if(v===1){v="";
}break;
case"size":if(v==="+0"){v="";
}break;
case"hspace":if(v===-1){v="";
}break;
case"tabindex":if(v===32768){v="";
}break;
case"shape":v=v.toLowerCase();
break;
default:if(n.indexOf("on")===0&&v){v=(""+v).replace(/^function\s+anonymous\(\)\s+\{\s+(.*)\s+\}$/,"$1");
}}}return(v&&v!="")?""+v:dv;
},getPos:function(n){var t=this,x=0,y=0,e,d=t.doc,r;
n=t.get(n);
if(n&&isIE){n=n.getBoundingClientRect();
e=t.boxModel?d.documentElement:d.body;
x=t.getStyle(t.select("html")[0],"borderWidth");
x=(x=="medium"||t.boxModel&&!t.isIE6)&&2||x;
n.top+=t.win.self!=t.win.top?2:0;
return{x:n.left+e.scrollLeft-x,y:n.top+e.scrollTop-x};
}r=n;
while(r){x+=r.offsetLeft||0;
y+=r.offsetTop||0;
r=r.offsetParent;
}r=n;
while(r){if(!/^table-row|inline.*/i.test(t.getStyle(r,"display",1))){x-=r.scrollLeft||0;
y-=r.scrollTop||0;
}r=r.parentNode;
if(r==d.body){break;
}}return{x:x,y:y};
},parseStyle:function(st){var t=this,s=t.settings,o={};
if(!st){return o;
}function compress(p,s,ot){var t,r,b,l;
t=o[p+"-top"+s];
if(!t){return;
}r=o[p+"-right"+s];
if(t!=r){return;
}b=o[p+"-bottom"+s];
if(r!=b){return;
}l=o[p+"-left"+s];
if(b!=l){return;
}o[ot]=l;
delete o[p+"-top"+s];
delete o[p+"-right"+s];
delete o[p+"-bottom"+s];
delete o[p+"-left"+s];
}function compress2(ta,a,b,c){var t;
t=o[a];
if(!t){return;
}t=o[b];
if(!t){return;
}t=o[c];
if(!t){return;
}o[ta]=o[a]+" "+o[b]+" "+o[c];
delete o[a];
delete o[b];
delete o[c];
}each(st.split(";"),function(v){var sv,ur=[];
if(v){v=v.replace(/url\([^\)]+\)/g,function(v){ur.push(v);
return"url("+ur.length+")";
});
v=v.split(":");
sv=tinymce.trim(v[1]);
sv=sv.replace(/url\(([^\)]+)\)/g,function(a,b){return ur[parseInt(b)-1];
});
sv=sv.replace(/rgb\([^\)]+\)/g,function(v){return t.toHex(v);
});
if(s.url_converter){sv=sv.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(x,c){return"url("+t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),"style",null))+")";
});
}o[tinymce.trim(v[0]).toLowerCase()]=sv;
}});
compress("border","","border");
compress("border","-width","border-width");
compress("border","-color","border-color");
compress("border","-style","border-style");
compress("padding","","padding");
compress("margin","","margin");
compress2("border","border-width","border-style","border-color");
if(isIE){if(o.border=="medium none"){o.border="";
}}return o;
},serializeStyle:function(o){var s="";
each(o,function(v,k){if(k&&v){switch(k){case"color":case"background-color":v=v.toLowerCase();
break;
}s+=(s?" ":"")+k+": "+v+";";
}});
return s;
},loadCSS:function(u){var t=this,d=t.doc;
if(!u){u="";
}each(u.split(","),function(u){if(t.files[u]){return;
}t.files[u]=true;
t.add(t.select("head")[0],"link",{rel:"stylesheet",href:tinymce._addVer(u)});
});
},addClass:function(e,c){return this.run(e,function(e){var o;
if(!c){return 0;
}if(this.hasClass(e,c)){return e.className;
}o=this.removeClass(e,c);
return e.className=(o!=""?(o+" "):"")+c;
});
},removeClass:function(e,c){var t=this,re;
return t.run(e,function(e){var v;
if(t.hasClass(e,c)){if(!re){re=new RegExp("(^|\\s+)"+c+"(\\s+|$)","g");
}v=e.className.replace(re," ");
return e.className=tinymce.trim(v!=" "?v:"");
}return e.className;
});
},hasClass:function(n,c){n=this.get(n);
if(!n||!c){return false;
}return(" "+n.className+" ").indexOf(" "+c+" ")!==-1;
},show:function(e){return this.setStyle(e,"display","block");
},hide:function(e){return this.setStyle(e,"display","none");
},isHidden:function(e){e=this.get(e);
return e.style.display=="none"||this.getStyle(e,"display")=="none";
},uniqueId:function(p){return(!p?"mce_":p)+(this.counter++);
},setHTML:function(e,h){var t=this;
return this.run(e,function(e){var x,i,nl,n,p,x;
h=t.processHTML(h);
if(isIE){function set(){try{e.innerHTML="<br />"+h;
e.removeChild(e.firstChild);
}catch(ex){while(e.firstChild){e.firstChild.removeNode();
}x=t.create("div");
x.innerHTML="<br />"+h;
each(x.childNodes,function(n,i){if(i){e.appendChild(n);
}});
}}if(t.settings.fix_ie_paragraphs){h=h.replace(/<p><\/p>|<p([^>]+)><\/p>|<p[^\/+]\/>/gi,'<p$1 mce_keep="true">&nbsp;</p>');
}set();
if(t.settings.fix_ie_paragraphs){nl=e.getElementsByTagName("p");
for(i=nl.length-1,x=0;
i>=0;
i--){n=nl[i];
if(!n.hasChildNodes()){if(!n.mce_keep){x=1;
break;
}n.removeAttribute("mce_keep");
}}}if(x){h=h.replace(/<p([^>]+)>|<p>/g,'<div$1 mce_tmp="1">');
h=h.replace(/<\/p>/g,"</div>");
set();
if(t.settings.fix_ie_paragraphs){nl=e.getElementsByTagName("DIV");
for(i=nl.length-1;
i>=0;
i--){n=nl[i];
if(n.mce_tmp){p=t.doc.createElement("p");
n.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(a,b){var v;
if(b!=="mce_tmp"){v=n.getAttribute(b);
if(!v&&b==="class"){v=n.className;
}p.setAttribute(b,v);
}});
for(x=0;
x<n.childNodes.length;
x++){p.appendChild(n.childNodes[x].cloneNode(true));
}n.swapNode(p);
}}}}}else{e.innerHTML=h;
}return h;
});
},processHTML:function(h){var t=this,s=t.settings;
if(!s.process_html){return h;
}if(tinymce.isGecko){h=h.replace(/<(\/?)strong>|<strong( [^>]+)>/gi,"<$1b$2>");
h=h.replace(/<(\/?)em>|<em( [^>]+)>/gi,"<$1i$2>");
}else{if(isIE){h=h.replace(/&apos;/g,"&#39;");
}}h=h.replace(/<a( )([^>]+)\/>|<a\/>/gi,"<a$1$2></a>");
if(s.keep_values){if(h.indexOf("<script")!==-1){h=h.replace(/<script>/g,'<script type="text/javascript">');
h=h.replace(/<script(|[^>]+)>(\s*<!--|\/\/\s*<\[CDATA\[)?[\r\n]*/g,"<mce:script$1><!--\n");
h=h.replace(/\s*(\/\/\s*-->|\/\/\s*]]>)?<\/script>/g,"\n// --></mce:script>");
h=h.replace(/<mce:script(|[^>]+)><!--\n\/\/ --><\/mce:script>/g,"<mce:script$1></mce:script>");
}h=h.replace(/<([\w:]+) [^>]*(src|href|style|coords)[^>]*>/gi,function(a,n){function handle(m,b,c){var u=c;
if(a.indexOf("mce_"+b)!=-1){return m;
}if(b=="style"){if(/^(| )(top|left|bottom|right|width|height)/i.test(c)){return m;
}if(s.hex_colors){u=u.replace(/rgb\([^\)]+\)/g,function(v){return t.toHex(v);
});
}if(s.url_converter){u=u.replace(/url\([\'\"]?([^\)\'\"]+)\)/g,function(x,c){return"url("+t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),b,n))+")";
});
}}else{if(b!="coords"){if(s.url_converter){u=t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),b,n));
}}}return" "+b+'="'+c+'" mce_'+b+'="'+u+'"';
}a=a.replace(/ (src|href|style|coords)=[\"]([^\"]+)[\"]/gi,handle);
a=a.replace(/ (src|href|style|coords)=[\']([^\']+)[\']/gi,handle);
return a.replace(/ (src|href|style|coords)=([^\s\"\'>]+)/gi,handle);
});
}return h;
},getOuterHTML:function(e){var d;
e=this.get(e);
if(!e){return null;
}if(isIE){return e.outerHTML;
}d=(e.ownerDocument||this.doc).createElement("body");
d.appendChild(e.cloneNode(true));
return d.innerHTML;
},setOuterHTML:function(e,h,d){var t=this;
return this.run(e,function(e){var n,tp;
e=t.get(e);
d=d||e.ownerDocument||t.doc;
if(isIE&&e.nodeType==1){e.outerHTML=h;
}else{tp=d.createElement("body");
tp.innerHTML=h;
n=tp.lastChild;
while(n){t.insertAfter(n.cloneNode(true),e);
n=n.previousSibling;
}t.remove(e);
}});
},decode:function(s){var e;
if(/&[^;]+;/.test(s)){e=this.doc.createElement("div");
e.innerHTML=s;
return !e.firstChild?s:e.firstChild.nodeValue;
}return s;
},encode:function(s){return s?(""+s).replace(/[<>&\"]/g,function(c,b){switch(c){case"&":return"&amp;";
case'"':return"&quot;";
case"<":return"&lt;";
case">":return"&gt;";
}return c;
}):s;
},insertAfter:function(n,r){var t=this;
r=t.get(r);
return this.run(n,function(n){var p,ns;
p=r.parentNode;
ns=r.nextSibling;
if(ns){p.insertBefore(n,ns);
}else{p.appendChild(n);
}return n;
});
},isBlock:function(n){if(n.nodeType&&n.nodeType!==1){return false;
}n=n.nodeName||n;
return/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|FORM|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(n);
},replace:function(n,o,k){if(is(o,"array")){n=n.cloneNode(true);
}return this.run(o,function(o){if(k){each(o.childNodes,function(c){n.appendChild(c.cloneNode(true));
});
}return o.parentNode.replaceChild(n,o);
});
},toHex:function(s){var c=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(s);
function hex(s){s=parseInt(s).toString(16);
return s.length>1?s:"0"+s;
}if(c){s="#"+hex(c[1])+hex(c[2])+hex(c[3]);
return s;
}return s;
},getClasses:function(){var t=this,cl=[],i,lo={},f=t.settings.class_filter,ov;
if(t.classes){return t.classes;
}function addClasses(s){each(s.imports,function(r){addClasses(r);
});
each(s.cssRules||s.rules,function(r){switch(r.type||1){case 1:if(r.selectorText){each(r.selectorText.split(","),function(v){v=v.replace(/^\s*|\s*$|^\s\./g,"");
if(/\.mce/.test(v)||!/\.[\w\-]+$/.test(v)){return;
}ov=v;
v=v.replace(/.*\.([a-z0-9_\-]+).*/i,"$1");
if(f&&!(v=f(v,ov))){return;
}if(!lo[v]){cl.push({"class":v});
lo[v]=1;
}});
}break;
case 3:addClasses(r.styleSheet);
break;
}});
}try{each(t.doc.styleSheets,addClasses);
}catch(ex){}if(cl.length>0){t.classes=cl;
}return cl;
},run:function(e,f,s){var t=this,o;
if(t.doc&&typeof(e)==="string"){e=t.doc.getElementById(e);
}if(!e){return false;
}s=s||this;
if(!e.nodeType&&(e.length||e.length===0)){o=[];
each(e,function(e,i){if(e){if(typeof(e)=="string"){e=t.doc.getElementById(e);
}o.push(f.call(s,e,i));
}});
return o;
}return f.call(s,e);
},getAttribs:function(n){var o;
n=this.get(n);
if(!n){return[];
}if(isIE){o=[];
if(n.nodeName=="OBJECT"){return n.attributes;
}n.cloneNode(false).outerHTML.replace(/([a-z0-9\:\-_]+)=/gi,function(a,b){o.push({specified:1,nodeName:b});
});
return o;
}return n.attributes;
},destroy:function(s){var t=this;
t.win=t.doc=t.root=null;
if(!s){tinymce.removeUnload(t.destroy);
}}});
tinymce.DOM=new tinymce.dom.DOMUtils(document,{process_html:0});
})();
(function(){var g=tinymce.each,d=tinymce.DOM,c=tinymce.isIE,f=tinymce.isWebKit,b;
tinymce.create("static tinymce.dom.Event",{inits:[],events:[],add:function(q,u,p,l){var h,i=this,j=i.events,m;
if(q&&q instanceof Array){m=[];
g(q,function(n){n=d.get(n);
m.push(i.add(n,u,p,l));
});
return m;
}q=d.get(q);
if(!q){return;
}h=function(n){n=n||window.event;
if(n&&!n.target&&c){n.target=n.srcElement;
}if(!l){return p(n);
}return p.call(l,n);
};
if(u=="unload"){tinymce.unloads.unshift({func:h});
return h;
}if(u=="init"){if(i.domLoaded){h();
}else{i.inits.push(h);
}return h;
}j.push({obj:q,name:u,func:p,cfunc:h,scope:l});
i._add(q,u,h);
return p;
},remove:function(p,q,m){var i=this,h=i.events,j=false,l;
if(p&&p instanceof Array){l=[];
g(p,function(n){n=d.get(n);
l.push(i.remove(n,q,m));
});
return l;
}p=d.get(p);
g(h,function(o,n){if(o.obj==p&&o.name==q&&(!m||(o.func==m||o.cfunc==m))){h.splice(n,1);
i._remove(p,q,o.cfunc);
j=true;
return false;
}});
return j;
},clear:function(n){var l=this,h=l.events,j,m;
if(n){n=d.get(n);
for(j=h.length-1;
j>=0;
j--){m=h[j];
if(m.obj===n){l._remove(m.obj,m.name,m.cfunc);
m.obj=m.cfunc=null;
h.splice(j,1);
}}}},cancel:function(h){if(!h){return false;
}this.stop(h);
return this.prevent(h);
},stop:function(h){if(h.stopPropagation){h.stopPropagation();
}else{h.cancelBubble=true;
}return false;
},prevent:function(h){if(h.preventDefault){h.preventDefault();
}else{h.returnValue=false;
}return false;
},_unload:function(){var h=b;
g(h.events,function(l,j){h._remove(l.obj,l.name,l.cfunc);
l.obj=l.cfunc=null;
});
h.events=[];
h=null;
},_add:function(i,j,h){if(i.attachEvent){i.attachEvent("on"+j,h);
}else{if(i.addEventListener){i.addEventListener(j,h,false);
}else{i["on"+j]=h;
}}},_remove:function(j,l,i){if(j){try{if(j.detachEvent){j.detachEvent("on"+l,i);
}else{if(j.removeEventListener){j.removeEventListener(l,i,false);
}else{j["on"+l]=null;
}}}catch(h){}}},_pageInit:function(){var h=b;
h._remove(window,"DOMContentLoaded",h._pageInit);
h.domLoaded=true;
g(h.inits,function(i){i();
});
h.inits=[];
},_wait:function(){var h;
if(window.tinyMCE_GZ&&tinyMCE_GZ.loaded){return;
}if(c&&document.location.protocol!="https:"){document.write("<script id=__ie_onload defer src='javascript:\"\"';><\/script>");
d.get("__ie_onload").onreadystatechange=function(){if(this.readyState=="complete"){b._pageInit();
d.get("__ie_onload").onreadystatechange=null;
}};
}else{b._add(window,"DOMContentLoaded",b._pageInit,b);
if(c||f){h=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(h);
b._pageInit();
}},10);
}}}});
b=tinymce.dom.Event;
b._wait();
tinymce.addUnload(b._unload);
})();
(function(){var b=tinymce.each;
tinymce.create("tinymce.dom.Element",{Element:function(h,f){var c=this,g,d;
f=f||{};
c.id=h;
c.dom=g=f.dom||tinymce.DOM;
c.settings=f;
if(!tinymce.isIE){d=c.dom.get(c.id);
}b(["getPos","getRect","getParent","add","setStyle","getStyle","setStyles","setAttrib","setAttribs","getAttrib","addClass","removeClass","hasClass","getOuterHTML","setOuterHTML","remove","show","hide","isHidden","setHTML","get"],function(i){c[i]=function(){var j=arguments,l;
if(tinymce.isOpera){j=[h];
b(arguments,function(m){j.push(m);
});
}else{Array.prototype.unshift.call(j,d||h);
}l=g[i].apply(g,j);
c.update(i);
return l;
};
});
},on:function(g,d,c){return tinymce.dom.Event.add(this.id,g,d,c);
},getXY:function(){return{x:parseInt(this.getStyle("left")),y:parseInt(this.getStyle("top"))};
},getSize:function(){var c=this.dom.get(this.id);
return{w:parseInt(this.getStyle("width")||c.clientWidth),h:parseInt(this.getStyle("height")||c.clientHeight)};
},moveTo:function(c,d){this.setStyles({left:c,top:d});
},moveBy:function(c,f){var d=this.getXY();
this.moveTo(d.x+c,d.y+f);
},resizeTo:function(c,d){this.setStyles({width:c,height:d});
},resizeBy:function(c,f){var d=this.getSize();
this.resizeTo(d.w+c,d.h+f);
},update:function(d){var f=this,c,g=f.dom;
if(tinymce.isIE6&&f.settings.blocker){d=d||"";
if(d.indexOf("get")===0||d.indexOf("has")===0||d.indexOf("is")===0){return;
}if(d=="remove"){g.remove(f.blocker);
return;
}if(!f.blocker){f.blocker=g.uniqueId();
c=g.add(f.settings.container||g.getRoot(),"iframe",{id:f.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'});
g.setStyle(c,"opacity",0);
}else{c=g.get(f.blocker);
}g.setStyle(c,"left",f.getStyle("left",1));
g.setStyle(c,"top",f.getStyle("top",1));
g.setStyle(c,"width",f.getStyle("width",1));
g.setStyle(c,"height",f.getStyle("height",1));
g.setStyle(c,"display",f.getStyle("display",1));
g.setStyle(c,"zIndex",parseInt(f.getStyle("zIndex",1)||0)-1);
}}});
})();
(function(){var c=tinymce.is,b=tinymce.isIE,d=tinymce.each;
tinymce.create("tinymce.dom.Selection",{Selection:function(i,h,g){var f=this;
f.dom=i;
f.win=h;
f.serializer=g;
tinymce.addUnload(f.destroy,f);
},getContent:function(g){var f=this,h=f.getRng(),m=f.dom.create("body"),j=f.getSel(),i,l,o;
g=g||{};
i=l="";
g.get=true;
g.format=g.format||"html";
if(g.format=="text"){return f.isCollapsed()?"":(h.text||(j.toString?j.toString():""));
}if(h.cloneContents){o=h.cloneContents();
if(o){m.appendChild(o);
}}else{if(c(h.item)||c(h.htmlText)){m.innerHTML=h.item?h.item(0).outerHTML:h.htmlText;
}else{m.innerHTML=h.toString();
}}if(/^\s/.test(m.innerHTML)){i=" ";
}if(/\s+$/.test(m.innerHTML)){l=" ";
}g.getInner=true;
return f.isCollapsed()?"":i+f.serializer.serialize(m,g)+l;
},setContent:function(j,i){var g=this,l=g.getRng(),m;
i=i||{format:"html"};
i.set=true;
j=g.dom.processHTML(j);
if(l.insertNode){m=g.win.document;
if(tinymce.isGecko&&j.indexOf("<")==-1){l.deleteContents();
l.insertNode(g.getRng().createContextualFragment(j+'<span id="__caret">_</span>'));
g.select(g.dom.get("__caret"));
g.getRng().deleteContents();
return;
}try{if(m.queryCommandEnabled("InsertHTML")){return m.execCommand("InsertHTML",false,j);
}}catch(f){l.deleteContents();
l.insertNode(g.getRng().createContextualFragment(j));
}}else{if(l.item){l.item(0).outerHTML=j;
}else{l.pasteHTML(j);
}}},getStart:function(){var f=this,g=f.getRng(),h;
if(b){if(g.item){return g.item(0);
}g=g.duplicate();
g.collapse(1);
h=g.parentElement();
if(h.nodeName=="BODY"){return h.firstChild;
}return h;
}else{h=g.startContainer;
if(h.nodeName=="BODY"){return h.firstChild;
}return f.dom.getParent(h,function(i){return i.nodeType==1;
});
}},getEnd:function(){var f=this,g=f.getRng(),h;
if(b){if(g.item){return g.item(0);
}g=g.duplicate();
g.collapse(0);
h=g.parentElement();
if(h.nodeName=="BODY"){return h.lastChild;
}return h;
}else{h=g.endContainer;
if(h.nodeName=="BODY"){return h.lastChild;
}return f.dom.getParent(h,function(i){return i.nodeType==1;
});
}},getBookmark:function(y){var j=this,n=j.getRng(),f,o,m,v=j.dom.getViewPort(j.win),w,q,A,p,x=-16777215,l,h=j.dom.getRoot(),g=0,i=0,z;
o=v.x;
m=v.y;
if(y=="simple"){return{rng:n,scrollX:o,scrollY:m};
}if(b){if(n.item){w=n.item(0);
d(j.dom.select(w.nodeName),function(t,s){if(w==t){q=s;
return false;
}});
return{tag:w.nodeName,index:q,scrollX:o,scrollY:m};
}f=j.dom.doc.body.createTextRange();
f.moveToElementText(h);
f.collapse(true);
A=Math.abs(f.move("character",x));
f=n.duplicate();
f.collapse(true);
q=Math.abs(f.move("character",x));
f=n.duplicate();
f.collapse(false);
p=Math.abs(f.move("character",x))-q;
return{start:q-A,length:p,scrollX:o,scrollY:m};
}w=j.getNode();
l=j.getSel();
if(!l){return null;
}if(w&&w.nodeName=="IMG"){return{scrollX:o,scrollY:m};
}function u(B,E,t){var s=j.dom.doc.createTreeWalker(B,NodeFilter.SHOW_TEXT,null,false),F,C=0,D={};
while((F=s.nextNode())!=null){if(F==E){D.start=C;
}if(F==t){D.end=C;
return D;
}C+=tinymce.trim(F.nodeValue||"").length;
}return null;
}if(l.anchorNode==l.focusNode&&l.anchorOffset==l.focusOffset){w=u(h,l.anchorNode,l.focusNode);
if(!w){return{scrollX:o,scrollY:m};
}(l.anchorNode.nodeValue||"").replace(/^\s+/,function(s){g=s.length;
});
return{start:Math.max(w.start+l.anchorOffset-g,0),end:Math.max(w.end+l.focusOffset-g,0),scrollX:o,scrollY:m,beg:l.anchorOffset-g==0};
}else{w=u(h,n.startContainer,n.endContainer);
(n.startContainer.nodeValue||"").replace(/^\s+/,function(s){g=s.length;
});
(n.endContainer.nodeValue||"").replace(/^\s+/,function(s){i=s.length;
});
if(!w){return{scrollX:o,scrollY:m};
}return{start:Math.max(w.start+n.startOffset-g,0),end:Math.max(w.end+n.endOffset-i,0),scrollX:o,scrollY:m,beg:n.startOffset-g==0};
}},moveToBookmark:function(o){var p=this,g=p.getRng(),q=p.getSel(),j=p.dom.getRoot(),n,h,l;
function i(s,u,E){var C=p.dom.doc.createTreeWalker(s,NodeFilter.SHOW_TEXT,null,false),y,t=0,B={},x,D,A,z;
while((y=C.nextNode())!=null){A=z=0;
l=y.nodeValue||"";
l.replace(/^\s+[^\s]/,function(v){z=v.length-1;
});
l.replace(/[^\s]\s+$/,function(v){A=v.length-1;
});
h=tinymce.trim(l).length;
t+=h;
if(t>=u&&!B.startNode){x=u-(t-h);
if(o.beg&&x>=h){continue;
}B.startNode=y;
B.startOffset=x+z;
}if(t>=E){B.endNode=y;
B.endOffset=E-(t-h)+z;
return B;
}}return null;
}if(!o){return false;
}p.win.scrollTo(o.scrollX,o.scrollY);
if(b){if(g=o.rng){try{g.select();
}catch(m){}return true;
}p.win.focus();
if(o.tag){g=j.createControlRange();
d(p.dom.select(o.tag),function(t,s){if(s==o.index){g.addElement(t);
}});
}else{try{if(o.start<0){return true;
}g=q.createRange();
g.moveToElementText(j);
g.collapse(true);
g.moveStart("character",o.start);
g.moveEnd("character",o.length);
}catch(f){return true;
}}try{g.select();
}catch(m){}return true;
}if(!q){return false;
}if(o.rng){q.removeAllRanges();
q.addRange(o.rng);
}else{if(c(o.start)&&c(o.end)){try{n=i(j,o.start,o.end);
if(n){g=p.dom.doc.createRange();
g.setStart(n.startNode,n.startOffset);
g.setEnd(n.endNode,n.endOffset);
q.removeAllRanges();
q.addRange(g);
}if(!tinymce.isOpera){p.win.focus();
}}catch(m){}}}},select:function(g,m){var u=this,f=u.getRng(),v=u.getSel(),p,o,l,j=u.win.document;
function h(s){return s?j.createTreeWalker(s,NodeFilter.SHOW_TEXT,null,false).nextNode():null;
}function q(y){var x,t,s;
if(!y){return null;
}s=j.createTreeWalker(y,NodeFilter.SHOW_TEXT,null,false);
while(x=s.nextNode()){t=x;
}return t;
}if(b){try{p=j.body;
if(/^(IMG|TABLE)$/.test(g.nodeName)){f=p.createControlRange();
f.addElement(g);
}else{f=p.createTextRange();
f.moveToElementText(g);
}f.select();
}catch(i){}}else{if(m){o=h(g);
l=q(g);
if(o&&l){f=j.createRange();
f.setStart(o,0);
f.setEnd(l,l.nodeValue.length);
}else{f.selectNode(g);
}}else{f.selectNode(g);
}u.setRng(f);
}return g;
},isCollapsed:function(){var f=this,h=f.getRng(),g=f.getSel();
if(!h||h.item){return false;
}return !g||h.boundingWidth==0||g.isCollapsed;
},collapse:function(f){var g=this,h=g.getRng(),i;
if(h.item){i=h.item(0);
h=this.win.document.body.createTextRange();
h.moveToElementText(i);
}h.collapse(!!f);
g.setRng(h);
},getSel:function(){var g=this,f=this.win;
return f.getSelection?f.getSelection():f.document.selection;
},getRng:function(){var g=this,h=g.getSel(),i;
try{if(h){i=h.rangeCount>0?h.getRangeAt(0):(h.createRange?h.createRange():g.win.document.createRange());
}}catch(f){}if(!i){i=b?g.win.document.body.createTextRange():g.win.document.createRange();
}return i;
},setRng:function(h){var g;
if(!b){g=this.getSel();
if(g){g.removeAllRanges();
g.addRange(h);
}}else{try{h.select();
}catch(f){}}},setNode:function(g){var f=this;
f.setContent(f.dom.getOuterHTML(g));
return g;
},getNode:function(){var f=this,h=f.getRng(),g=f.getSel(),i;
if(!b){if(!h){return f.dom.getRoot();
}i=h.commonAncestorContainer;
if(!h.collapsed){if(h.startContainer==h.endContainer||(tinymce.isWebKit&&h.startContainer==h.endContainer.parentNode)){if(h.startOffset-h.endOffset<2||tinymce.isWebKit){if(h.startContainer.hasChildNodes()){i=h.startContainer.childNodes[h.startOffset];
}}}}return f.dom.getParent(i,function(j){return j.nodeType==1;
});
}return h.item?h.item(0):h.parentElement();
},destroy:function(g){var f=this;
f.win=null;
if(!g){tinymce.removeUnload(f.destroy);
}}});
})();
(function(){tinymce.create("tinymce.dom.XMLWriter",{node:null,XMLWriter:function(c){function b(){var f=document.implementation;
if(!f||!f.createDocument){try{return new ActiveXObject("MSXML2.DOMDocument");
}catch(d){}try{return new ActiveXObject("Microsoft.XmlDom");
}catch(d){}}else{return f.createDocument("","",null);
}}this.doc=b();
this.valid=tinymce.isOpera||tinymce.isWebKit;
this.reset();
},reset:function(){var b=this,c=b.doc;
if(c.firstChild){c.removeChild(c.firstChild);
}b.node=c.appendChild(c.createElement("html"));
},writeStartElement:function(c){var b=this;
b.node=b.node.appendChild(b.doc.createElement(c));
},writeAttribute:function(c,b){if(this.valid){b=b.replace(/>/g,"%MCGT%");
}this.node.setAttribute(c,b);
},writeEndElement:function(){this.node=this.node.parentNode;
},writeFullEndElement:function(){var b=this,c=b.node;
c.appendChild(b.doc.createTextNode(""));
b.node=c.parentNode;
},writeText:function(b){if(this.valid){b=b.replace(/>/g,"%MCGT%");
}this.node.appendChild(this.doc.createTextNode(b));
},writeCDATA:function(b){this.node.appendChild(this.doc.createCDATA(b));
},writeComment:function(b){this.node.appendChild(this.doc.createComment(b.replace(/\-\-/g," ")));
},getContent:function(){var b;
b=this.doc.xml||new XMLSerializer().serializeToString(this.doc);
b=b.replace(/<\?[^?]+\?>|<html>|<\/html>|<html\/>|<!DOCTYPE[^>]+>/g,"");
b=b.replace(/ ?\/>/g," />");
if(this.valid){b=b.replace(/\%MCGT%/g,"&gt;");
}return b;
}});
})();
(function(){tinymce.create("tinymce.dom.StringWriter",{str:null,tags:null,count:0,settings:null,indent:null,StringWriter:function(b){this.settings=tinymce.extend({indent_char:" ",indentation:1},b);
this.reset();
},reset:function(){this.indent="";
this.str="";
this.tags=[];
this.count=0;
},writeStartElement:function(b){this._writeAttributesEnd();
this.writeRaw("<"+b);
this.tags.push(b);
this.inAttr=true;
this.count++;
this.elementCount=this.count;
},writeAttribute:function(d,b){var c=this;
c.writeRaw(" "+c.encode(d)+'="'+c.encode(b)+'"');
},writeEndElement:function(){var b;
if(this.tags.length>0){b=this.tags.pop();
if(this._writeAttributesEnd(1)){this.writeRaw("</"+b+">");
}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(b){this._writeAttributesEnd();
this.writeRaw(this.encode(b));
this.count++;
},writeCDATA:function(b){this._writeAttributesEnd();
this.writeRaw("<![CDATA["+b+"]]>");
this.count++;
},writeComment:function(b){this._writeAttributesEnd();
this.writeRaw("<!-- "+b+"-->");
this.count++;
},writeRaw:function(b){this.str+=b;
},encode:function(b){return b.replace(/[<>&"]/g,function(c){switch(c){case"<":return"&lt;";
case">":return"&gt;";
case"&":return"&amp;";
case'"':return"&quot;";
}return c;
});
},getContent:function(){return this.str;
},_writeAttributesEnd:function(b){if(!this.inAttr){return;
}this.inAttr=false;
if(b&&this.elementCount==this.count){this.writeRaw(" />");
return false;
}this.writeRaw(">");
return true;
}});
})();
(function(){var i=tinymce.extend,g=tinymce.each,c=tinymce.util.Dispatcher,f=tinymce.isIE,b=tinymce.isGecko;
function h(l){var j=[];
if(l.nodeName=="OBJECT"||l.nodeName=="EMBED"){return l.attributes;
}l.cloneNode(false).outerHTML.replace(/([a-z0-9\:\-_]+)=/gi,function(n,m){j.push({specified:1,nodeName:m});
});
return j;
}function d(j){return j.replace(/([?+*])/g,".$1");
}tinymce.create("tinymce.dom.Serializer",{Serializer:function(m){var l=this;
l.key=0;
l.onPreProcess=new c(l);
l.onPostProcess=new c(l);
if(tinymce.relaxedDomain&&tinymce.isGecko){l.writer=new tinymce.dom.StringWriter();
}else{try{l.writer=new tinymce.dom.XMLWriter();
}catch(j){l.writer=new tinymce.dom.StringWriter();
}}l.settings=m=i({dom:tinymce.DOM,valid_nodes:0,node_filter:0,attr_filter:0,invalid_attrs:/^(mce_|_moz_)/,closed:/(br|hr|input|meta|img|link|param)/,entity_encoding:"named",entities:"160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro",valid_elements:"*[*]",extended_valid_elements:0,valid_child_elements:0,invalid_elements:0,fix_table_elements:0,fix_list_elements:true,fix_content_duplication:true,convert_fonts_to_spans:false,font_size_classes:0,font_size_style_values:0,apply_source_formatting:0,indent_mode:"simple",indent_char:"\t",indent_levels:1,remove_linebreaks:1},m);
l.dom=m.dom;
if(m.fix_list_elements){l.onPreProcess.add(function(z,v){var s,B,A=["ol","ul"],y,w,u,q=/^(OL|UL)$/,C;
function t(x,D){var o=D.split(","),p;
while((x=x.previousSibling)!=null){for(p=0;
p<o.length;
p++){if(x.nodeName==o[p]){return x;
}}}return null;
}for(B=0;
B<A.length;
B++){s=l.dom.select(A[B],v.node);
for(y=0;
y<s.length;
y++){w=s[y];
u=w.parentNode;
if(q.test(u.nodeName)){C=t(w,"LI");
if(!C){C=l.dom.create("li");
C.innerHTML="&nbsp;";
C.appendChild(w);
u.insertBefore(C,u.firstChild);
}else{C.appendChild(w);
}}}}});
}if(m.fix_table_elements){l.onPreProcess.add(function(n,p){g(l.dom.select("table",p.node),function(w){var v=l.dom.getParent(w,"H1,H2,H3,H4,H5,H6,P"),q,x,o,u=[],s,t;
if(v){q=v.cloneNode(false);
u.push(w);
for(x=w;
x=x.parentNode;
){u.push(x);
if(x==v){break;
}}o=q;
for(s=u.length-1;
s>=0;
s--){if(s==u.length-1){while(t=u[s-1].nextSibling){o.appendChild(t.parentNode.removeChild(t));
}}else{x=u[s].cloneNode(false);
if(s!=0){while(t=u[s-1].nextSibling){x.appendChild(t.parentNode.removeChild(t));
}}o=o.appendChild(x);
}}w=l.dom.insertAfter(w.parentNode.removeChild(w),v);
l.dom.insertAfter(w,v);
l.dom.insertAfter(q,w);
}});
});
}},setEntities:function(u){var p=this,m,o,j={},q="",n;
if(p.entityLookup){return;
}m=u.split(",");
for(o=0;
o<m.length;
o+=2){n=m[o];
if(n==34||n==38||n==60||n==62){continue;
}j[String.fromCharCode(m[o])]=m[o+1];
n=parseInt(m[o]).toString(16);
q+="\\u"+"0000".substring(n.length)+n;
}if(!q){p.settings.entity_encoding="raw";
return;
}p.entitiesRE=new RegExp("["+q+"]","g");
p.entityLookup=j;
},setValidChildRules:function(j){this.childRules=null;
this.addValidChildRules(j);
},addValidChildRules:function(n){var m=this,o,j,l;
if(!n){return;
}o="A|BR|SPAN|BDO|MAP|OBJECT|IMG|TT|I|B|BIG|SMALL|EM|STRONG|DFN|CODE|Q|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|SUB|SUP|#text|#comment";
j="A|BR|SPAN|BDO|OBJECT|APPLET|IMG|MAP|IFRAME|TT|I|B|U|S|STRIKE|BIG|SMALL|FONT|BASEFONT|EM|STRONG|DFN|CODE|Q|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|SUB|SUP|INPUT|SELECT|TEXTAREA|LABEL|BUTTON|#text|#comment";
l="H[1-6]|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|FORM|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP";
g(n.split(","),function(t){var u=t.split(/\[|\]/),q;
t="";
g(u[1].split("|"),function(p){if(t){t+="|";
}switch(p){case"%itrans":p=j;
break;
case"%itrans_na":p=j.substring(2);
break;
case"%istrict":p=o;
break;
case"%istrict_na":p=o.substring(2);
break;
case"%btrans":p=l;
break;
case"%bstrict":p=l;
break;
}t+=p;
});
q=new RegExp("^("+t.toLowerCase()+")$","i");
g(u[0].split("/"),function(p){m.childRules=m.childRules||{};
m.childRules[p]=q;
});
});
n="";
g(m.childRules,function(q,p){if(n){n+="|";
}n+=p;
});
m.parentElementsRE=new RegExp("^("+n.toLowerCase()+")$","i");
},setRules:function(l){var j=this;
j._setup();
j.rules={};
j.wildRules=[];
j.validElements={};
return j.addRules(l);
},addRules:function(l){var j=this,m;
if(!l){return;
}j._setup();
g(l.split(","),function(q){var v=q.split(/\[|\]/),o=v[0].split("/"),w,n,u,t=[];
if(m){n=tinymce.extend([],m.attribs);
}if(v.length>1){g(v[1].split("|"),function(y){var p={},x;
n=n||[];
y=y.replace(/::/g,"~");
y=/^([!\-])?([\w*.?~_\-]+|)([=:<])?(.+)?$/.exec(y);
y[2]=y[2].replace(/~/g,":");
if(y[1]=="!"){w=w||[];
w.push(y[2]);
}if(y[1]=="-"){for(x=0;
x<n.length;
x++){if(n[x].name==y[2]){n.splice(x,1);
return;
}}}switch(y[3]){case"=":p.defaultVal=y[4]||"";
break;
case":":p.forcedVal=y[4];
break;
case"<":p.validVals=y[4].split("?");
break;
}if(/[*.?]/.test(y[2])){u=u||[];
p.nameRE=new RegExp("^"+d(y[2])+"$");
u.push(p);
}else{p.name=y[2];
n.push(p);
}t.push(y[2]);
});
}g(o,function(A,z){var B=A.charAt(0),y=1,p={};
if(m){if(m.noEmpty){p.noEmpty=m.noEmpty;
}if(m.fullEnd){p.fullEnd=m.fullEnd;
}if(m.padd){p.padd=m.padd;
}}switch(B){case"-":p.noEmpty=true;
break;
case"+":p.fullEnd=true;
break;
case"#":p.padd=true;
break;
default:y=0;
}o[z]=A=A.substring(y);
j.validElements[A]=1;
if(/[*.?]/.test(o[0])){p.nameRE=new RegExp("^"+d(o[0])+"$");
j.wildRules=j.wildRules||{};
j.wildRules.push(p);
}else{p.name=o[0];
if(o[0]=="@"){m=p;
}j.rules[A]=p;
}p.attribs=n;
if(w){p.requiredAttribs=w;
}if(u){A="";
g(t,function(s){if(A){A+="|";
}A+="("+d(s)+")";
});
p.validAttribsRE=new RegExp("^"+A.toLowerCase()+"$");
p.wildAttribs=u;
}});
});
l="";
g(j.validElements,function(o,n){if(l){l+="|";
}if(n!="@"){l+=n;
}});
j.validElementsRE=new RegExp("^("+d(l.toLowerCase())+")$");
},findRule:function(p){var l=this,o=l.rules,j,m;
l._setup();
m=o[p];
if(m){return m;
}o=l.wildRules;
for(j=0;
j<o.length;
j++){if(o[j].nameRE.test(p)){return o[j];
}}return null;
},findAttribRule:function(j,o){var l,m=j.wildAttribs;
for(l=0;
l<m.length;
l++){if(m[l].nameRE.test(o)){return m[l];
}}return null;
},serialize:function(p,m){var l,j=this;
j._setup();
m=m||{};
m.format=m.format||"html";
j.processObj=m;
p=p.cloneNode(true);
j.key=""+(parseInt(j.key)+1);
if(!m.no_events){m.node=p;
j.onPreProcess.dispatch(j,m);
}j.writer.reset();
j._serializeNode(p,m.getInner);
m.content=j.writer.getContent();
if(!m.no_events){j.onPostProcess.dispatch(j,m);
}j._postProcess(m);
m.node=null;
return tinymce.trim(m.content);
},_postProcess:function(u){var j=this,m=j.settings,l=u.content,q=[],n;
if(u.format=="html"){n=j._protect({content:l,patterns:[{pattern:/(<script[^>]*>)(.*?)(<\/script>)/g},{pattern:/(<style[^>]*>)(.*?)(<\/style>)/g},{pattern:/(<pre[^>]*>)(.*?)(<\/pre>)/g,encode:1}]});
l=n.content;
if(m.entity_encoding!=="raw"){l=j._encode(l);
}if(!u.set){l=l.replace(/<p>\s+<\/p>|<p([^>]+)>\s+<\/p>/g,m.entity_encoding=="numeric"?"<p$1>&#160;</p>":"<p$1>&nbsp;</p>");
if(m.remove_linebreaks){l=l.replace(/\r?\n|\r/g," ");
l=l.replace(/(<[^>]+>)\s+/g,"$1 ");
l=l.replace(/\s+(<\/[^>]+>)/g," $1");
l=l.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>");
l=l.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>");
l=l.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(m.apply_source_formatting&&m.indent_mode=="simple"){l=l.replace(/<(\/?)(ul|hr|table|meta|link|tbody|tr|object|body|head|html|map)(|[^>]+)>\s*/g,"\n<$1$2$3>\n");
l=l.replace(/\s*<(p|h[1-6]|blockquote|div|title|style|pre|script|td|li|area)(|[^>]+)>/g,"\n<$1$2>");
l=l.replace(/<\/(p|h[1-6]|blockquote|div|title|style|pre|script|td|li)>\s*/g,"</$1>\n");
l=l.replace(/\n\n/g,"\n");
}}l=j._unprotect(l,n);
if(m.entity_encoding=="raw"){l=l.replace(/<p>&nbsp;<\/p>|<p([^>]+)>&nbsp;<\/p>/g,"<p$1>\u00a0</p>");
}}u.content=l;
},_serializeNode:function(F,p){var B=this,C=B.settings,z=B.writer,u,m,y,H,G,I,D,j,A,o,x,E,q;
if(!C.node_filter||C.node_filter(F)){switch(F.nodeType){case 1:if(F.hasAttribute?F.hasAttribute("mce_bogus"):F.getAttribute("mce_bogus")){return;
}q=false;
u=F.hasChildNodes();
o=F.getAttribute("mce_name")||F.nodeName.toLowerCase();
if(f){if(F.scopeName!=="HTML"&&F.scopeName!=="html"){o=F.scopeName+":"+o;
}}if(o.indexOf("mce:")===0){o=o.substring(4);
}if(!B.validElementsRE.test(o)||(B.invalidElementsRE&&B.invalidElementsRE.test(o))||p){q=true;
break;
}if(f){if(C.fix_content_duplication){if(F.mce_serialized==B.key){return;
}F.mce_serialized=B.key;
}if(o.charAt(0)=="/"){o=o.substring(1);
}}else{if(b){if(F.nodeName==="BR"&&F.getAttribute("type")=="_moz"){return;
}}}if(B.childRules){if(B.parentElementsRE.test(B.elementName)){if(!B.childRules[B.elementName].test(o)){q=true;
break;
}}B.elementName=o;
}x=B.findRule(o);
o=x.name||o;
if((!u&&x.noEmpty)||(f&&!o)){q=true;
break;
}if(x.requiredAttribs){I=x.requiredAttribs;
for(H=I.length-1;
H>=0;
H--){if(this.dom.getAttrib(F,I[H])!==""){break;
}}if(H==-1){q=true;
break;
}}z.writeStartElement(o);
if(x.attribs){for(H=0,D=x.attribs,G=D.length;
H<G;
H++){I=D[H];
A=B._getAttrib(F,I);
if(A!==null){z.writeAttribute(I.name,A);
}}}if(x.validAttribsRE){D=f?h(F):F.attributes;
for(H=D.length-1;
H>-1;
H--){j=D[H];
if(j.specified){I=j.nodeName.toLowerCase();
if(C.invalid_attrs.test(I)||!x.validAttribsRE.test(I)){continue;
}E=B.findAttribRule(x,I);
A=B._getAttrib(F,E,I);
if(A!==null){z.writeAttribute(I,A);
}}}}if(!u&&x.padd){z.writeText("\u00a0");
}break;
case 3:if(B.childRules&&B.parentElementsRE.test(B.elementName)){if(!B.childRules[B.elementName].test(F.nodeName)){return;
}}return z.writeText(F.nodeValue);
case 4:return z.writeCDATA(F.nodeValue);
case 8:return z.writeComment(F.nodeValue);
}}else{if(F.nodeType==1){u=F.hasChildNodes();
}}if(u){y=F.firstChild;
while(y){B._serializeNode(y);
B.elementName=o;
y=y.nextSibling;
}}if(!q){if(u||!C.closed.test(o)){z.writeFullEndElement();
}else{z.writeEndElement();
}}},_protect:function(m){var l=this;
m.items=m.items||[];
function j(o){return o.replace(/[\r\n\\]/g,function(p){if(p==="\n"){return"\\n";
}else{if(p==="\\"){return"\\\\";
}}return"\\r";
});
}function n(o){return o.replace(/\\[\\rn]/g,function(p){if(p==="\\n"){return"\n";
}else{if(p==="\\\\"){return"\\";
}}return"\r";
});
}g(m.patterns,function(o){m.content=n(j(m.content).replace(o.pattern,function(q,s,p,t){p=n(p);
if(o.encode){p=l._encode(p);
}m.items.push(p);
return s+"<!--mce:"+(m.items.length-1)+"-->"+t;
}));
});
return m;
},_unprotect:function(j,l){j=j.replace(/\<!--mce:([0-9]+)--\>/g,function(n,m){return l.items[parseInt(m)];
});
l.items=[];
return j;
},_encode:function(o){var m=this,n=m.settings,j;
if(n.entity_encoding!=="raw"){if(n.entity_encoding.indexOf("named")!=-1){m.setEntities(n.entities);
j=m.entityLookup;
o=o.replace(m.entitiesRE,function(l){var p;
if(p=j[l]){l="&"+p+";";
}return l;
});
}if(n.entity_encoding.indexOf("numeric")!=-1){o=o.replace(/[\u007E-\uFFFF]/g,function(l){return"&#"+l.charCodeAt(0)+";";
});
}}return o;
},_setup:function(){var j=this,l=this.settings;
if(j.done){return;
}j.done=1;
j.setRules(l.valid_elements);
j.addRules(l.extended_valid_elements);
j.addValidChildRules(l.valid_child_elements);
if(l.invalid_elements){j.invalidElementsRE=new RegExp("^("+d(l.invalid_elements.replace(",","|").toLowerCase())+")$");
}if(l.attrib_value_filter){j.attribValueFilter=l.attribValueFilter;
}},_getAttrib:function(p,l,j){var o,m;
j=j||l.name;
if(l.forcedVal&&(m=l.forcedVal)){if(m==="{$uid}"){return this.dom.uniqueId();
}return m;
}m=this.dom.getAttrib(p,j);
switch(j){case"rowspan":case"colspan":if(m=="1"){m="";
}break;
}if(this.attribValueFilter){m=this.attribValueFilter(j,m,p);
}if(l.validVals){for(o=l.validVals.length-1;
o>=0;
o--){if(m==l.validVals[o]){break;
}}if(o==-1){return null;
}}if(m===""&&typeof(l.defaultVal)!="undefined"){m=l.defaultVal;
if(m==="{$uid}"){return this.dom.uniqueId();
}return m;
}else{if(j=="class"&&this.processObj.get){m=m.replace(/\s?mceItem\w+\s?/g,"");
}}if(m===""){return null;
}return m;
}});
})();
(function(){var each=tinymce.each;
tinymce.create("tinymce.dom.ScriptLoader",{ScriptLoader:function(s){this.settings=s||{};
this.queue=[];
this.lookup={};
},isDone:function(u){return this.lookup[u]?this.lookup[u].state==2:0;
},markDone:function(u){this.lookup[u]={state:2,url:u};
},add:function(u,cb,s,pr){var t=this,lo=t.lookup,o;
if(o=lo[u]){if(cb&&o.state==2){cb.call(s||this);
}return o;
}o={state:0,url:u,func:cb,scope:s||this};
if(pr){t.queue.unshift(o);
}else{t.queue.push(o);
}lo[u]=o;
return o;
},load:function(u,cb,s){var t=this,o;
if(o=t.lookup[u]){if(cb&&o.state==2){cb.call(s||t);
}return o;
}function loadScript(u){if(tinymce.dom.Event.domLoaded||t.settings.strict_mode){tinymce.util.XHR.send({url:tinymce._addVer(u),error:t.settings.error,async:false,success:function(co){t.eval(co);
}});
}else{document.write('<script type="text/javascript" src="'+tinymce._addVer(u)+'"><\/script>');
}}if(!tinymce.is(u,"string")){each(u,function(u){loadScript(u);
});
if(cb){cb.call(s||t);
}}else{loadScript(u);
if(cb){cb.call(s||t);
}}},loadQueue:function(cb,s){var t=this;
if(!t.queueLoading){t.queueLoading=1;
t.queueCallbacks=[];
t.loadScripts(t.queue,function(){t.queueLoading=0;
if(cb){cb.call(s||t);
}each(t.queueCallbacks,function(o){o.func.call(o.scope);
});
});
}else{if(cb){t.queueCallbacks.push({func:cb,scope:s||t});
}}},eval:function(co){var w=window;
if(!w.execScript){try{eval.call(w,co);
}catch(ex){eval(co,w);
}}else{w.execScript(co);
}},loadScripts:function(sc,cb,s){var t=this,lo=t.lookup;
function done(o){o.state=2;
if(o.func){o.func.call(o.scope||t);
}}function allDone(){var l;
l=sc.length;
each(sc,function(o){o=lo[o.url];
if(o.state===2){done(o);
l--;
}else{load(o);
}});
if(l===0&&cb){cb.call(s||t);
cb=0;
}}function load(o){if(o.state>0){return;
}o.state=1;
tinymce.util.XHR.send({url:o.url,error:t.settings.error,success:function(co){t.eval(co);
done(o);
allDone();
}});
}each(sc,function(o){var u=o.url;
if(!lo[u]){lo[u]=o;
t.queue.push(o);
}else{o=lo[u];
}if(o.state>0){return;
}if(!tinymce.dom.Event.domLoaded&&!t.settings.strict_mode){var ix,ol="";
if(cb||o.func){o.state=1;
ix=tinymce.dom.ScriptLoader._addOnLoad(function(){done(o);
allDone();
});
if(tinymce.isIE){ol=' onreadystatechange="';
}else{ol=' onload="';
}ol+="tinymce.dom.ScriptLoader._onLoad(this,'"+u+"',"+ix+');"';
}document.write('<script type="text/javascript" src="'+tinymce._addVer(u)+'"'+ol+"><\/script>");
if(!o.func){done(o);
}}else{load(o);
}});
allDone();
},"static":{_addOnLoad:function(f){var t=this;
t._funcs=t._funcs||[];
t._funcs.push(f);
return t._funcs.length-1;
},_onLoad:function(e,u,ix){if(!tinymce.isIE||e.readyState=="complete"){this._funcs[ix].call(this);
}}}});
tinymce.ScriptLoader=new tinymce.dom.ScriptLoader();
})();
(function(){var c=tinymce.DOM,b=tinymce.is;
tinymce.create("tinymce.ui.Control",{Control:function(f,d){this.id=f;
this.settings=d=d||{};
this.rendered=false;
this.onRender=new tinymce.util.Dispatcher(this);
this.classPrefix="";
this.scope=d.scope||this;
this.disabled=0;
this.active=0;
},setDisabled:function(d){var f;
if(d!=this.disabled){f=c.get(this.id);
if(f&&this.settings.unavailable_prefix){if(d){this.prevTitle=f.title;
f.title=this.settings.unavailable_prefix+": "+f.title;
}else{f.title=this.prevTitle;
}}this.setState("Disabled",d);
this.setState("Enabled",!d);
this.disabled=d;
}},isDisabled:function(){return this.disabled;
},setActive:function(d){if(d!=this.active){this.setState("Active",d);
this.active=d;
}},isActive:function(){return this.active;
},setState:function(g,d){var f=c.get(this.id);
g=this.classPrefix+g;
if(d){c.addClass(f,g);
}else{c.removeClass(f,g);
}},isRendered:function(){return this.rendered;
},renderHTML:function(){},renderTo:function(d){c.setHTML(d,this.renderHTML());
},postRender:function(){var f=this,d;
if(b(f.disabled)){d=f.disabled;
f.disabled=-1;
f.setDisabled(d);
}if(b(f.active)){d=f.active;
f.active=-1;
f.setActive(d);
}},remove:function(){c.remove(this.id);
this.destroy();
},destroy:function(){tinymce.dom.Event.clear(this.id);
}});
})();
tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b){this.parent(c,b);
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,b){this.parent(c,b);
this.classPrefix="mceSeparator";
},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix});
}});
(function(){var d=tinymce.is,c=tinymce.DOM,f=tinymce.each,b=tinymce.walk;
tinymce.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(h,g){this.parent(h,g);
this.classPrefix="mceMenuItem";
},setSelected:function(g){this.setState("Selected",g);
this.selected=g;
},isSelected:function(){return this.selected;
},postRender:function(){var g=this;
g.parent();
if(d(g.selected)){g.setSelected(g.selected);
}}});
})();
(function(){var d=tinymce.is,c=tinymce.DOM,f=tinymce.each,b=tinymce.walk;
tinymce.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(i,h){var g=this;
g.parent(i,h);
g.items={};
g.collapsed=false;
g.menuCount=0;
g.onAddItem=new tinymce.util.Dispatcher(this);
},expand:function(h){var g=this;
if(h){b(g,function(i){if(i.expand){i.expand();
}},"items",g);
}g.collapsed=false;
},collapse:function(h){var g=this;
if(h){b(g,function(i){if(i.collapse){i.collapse();
}},"items",g);
}g.collapsed=true;
},isCollapsed:function(){return this.collapsed;
},add:function(g){if(!g.settings){g=new tinymce.ui.MenuItem(g.id||c.uniqueId(),g);
}this.onAddItem.dispatch(this,g);
return this.items[g.id]=g;
},addSeparator:function(){return this.add({separator:true});
},addMenu:function(g){if(!g.collapse){g=this.createMenu(g);
}this.menuCount++;
return this.add(g);
},hasMenus:function(){return this.menuCount!==0;
},remove:function(g){delete this.items[g.id];
},removeAll:function(){var g=this;
b(g,function(h){if(h.removeAll){h.removeAll();
}else{h.remove();
}h.destroy();
},"items",g);
g.items={};
},createMenu:function(h){var g=new tinymce.ui.Menu(h.id||c.uniqueId(),h);
g.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);
return g;
}});
})();
(function(){var f=tinymce.is,d=tinymce.DOM,g=tinymce.each,b=tinymce.dom.Event,c=tinymce.dom.Element;
tinymce.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(i,h){h=h||{};
h.container=h.container||d.doc.body;
h.offset_x=h.offset_x||0;
h.offset_y=h.offset_y||0;
h.vp_offset_x=h.vp_offset_x||0;
h.vp_offset_y=h.vp_offset_y||0;
if(f(h.icons)&&!h.icons){h["class"]+=" mceNoIcons";
}this.parent(i,h);
this.onShowMenu=new tinymce.util.Dispatcher(this);
this.onHideMenu=new tinymce.util.Dispatcher(this);
this.classPrefix="mceMenu";
this.fixIE=tinymce.isIE&&d.win.top!=d.win;
},createMenu:function(l){var i=this,j=i.settings,h;
l.container=l.container||j.container;
l.parent=i;
l.constrain=l.constrain||j.constrain;
l["class"]=l["class"]||j["class"];
l.vp_offset_x=l.vp_offset_x||j.vp_offset_x;
l.vp_offset_y=l.vp_offset_y||j.vp_offset_y;
h=new tinymce.ui.DropMenu(l.id||d.uniqueId(),l);
h.onAddItem.add(i.onAddItem.dispatch,i.onAddItem);
return h;
},update:function(){var j=this,l=j.settings,h=d.get("menu_"+j.id+"_tbl"),n=d.get("menu_"+j.id+"_co"),i,m;
i=l.max_width?Math.min(h.clientWidth,l.max_width):h.clientWidth;
m=l.max_height?Math.min(h.clientHeight,l.max_height):h.clientHeight;
if(!d.boxModel){j.element.setStyles({width:i+2,height:m+2});
}else{j.element.setStyles({width:i,height:m});
}if(l.max_width){d.setStyle(n,"width",i);
}if(l.max_height){d.setStyle(n,"height",m);
if(h.clientHeight<l.max_height){d.setStyle(n,"overflow","hidden");
}}},showMenu:function(u,p,z){var C=this,D=C.settings,q,i=d.getViewPort(),A,n,B,v,j=2,m,l,o=C.classPrefix;
C.collapse(1);
if(C.isMenuVisible){return;
}if(!C.rendered){q=d.add(C.settings.container,C.renderNode());
g(C.items,function(h){h.postRender();
});
C.element=new c("menu_"+C.id,{blocker:1,container:D.container});
}else{q=d.get("menu_"+C.id);
}if(!tinymce.isOpera){d.setStyles(q,{left:-65535,top:-65535});
}d.show(q);
C.update();
u+=D.offset_x||0;
p+=D.offset_y||0;
i.w-=4;
i.h-=4;
if(D.constrain){A=q.clientWidth-j;
n=q.clientHeight-j;
B=i.x+i.w;
v=i.y+i.h;
if((u+D.vp_offset_x+A)>B){u=z?z-A:Math.max(0,(B-D.vp_offset_x)-A);
}if((p+D.vp_offset_y+n)>v){p=Math.max(0,(v-D.vp_offset_y)-n);
}}d.setStyles(q,{left:u,top:p});
C.element.update();
C.isMenuVisible=1;
C.mouseClickFunc=b.add(q,C.fixIE?"mousedown":"click",function(s){var h;
s=s.target;
if(s&&(s=d.getParent(s,"TR"))&&!d.hasClass(s,o+"ItemSub")){h=C.items[s.id];
if(h.isDisabled()){return;
}m=C;
d.win.setTimeout(function(){while(m){if(m.hideMenu){m.hideMenu();
}m=m.settings.parent;
}},0);
if(h.settings.onclick){h.settings.onclick(s);
}return b.cancel(s);
}});
if(C.hasMenus()){C.mouseOverFunc=b.add(q,"mouseover",function(w){var h,t,s;
w=w.target;
if(w&&(w=d.getParent(w,"TR"))){h=C.items[w.id];
if(C.lastMenu){C.lastMenu.collapse(1);
}if(h.isDisabled()){return;
}if(w&&d.hasClass(w,o+"ItemSub")){t=d.getRect(w);
h.showMenu((t.x+t.w-j),t.y-j,t.x);
C.lastMenu=h;
d.addClass(d.get(h.id).firstChild,o+"ItemActive");
}}});
}C.onShowMenu.dispatch(C);
if(D.keyboard_focus){b.add(q,"keydown",C._keyHandler,C);
d.select("a","menu_"+C.id)[0].focus();
}},hideMenu:function(l){var h=this,j=d.get("menu_"+h.id),i;
if(!h.isMenuVisible){return;
}b.remove(j,"mouseover",h.mouseOverFunc);
b.remove(j,h.fixIE?"mousedown":"click",h.mouseClickFunc);
b.remove(j,"keydown",h._keyHandler);
d.hide(j);
h.isMenuVisible=0;
if(!l){h.collapse(1);
}if(h.element){h.element.hide();
}if(i=d.get(h.id)){d.removeClass(i.firstChild,h.classPrefix+"ItemActive");
}h.onHideMenu.dispatch(h);
},add:function(j){var h=this,i;
j=h.parent(j);
if(h.isRendered&&(i=d.get("menu_"+h.id))){h._add(d.select("tbody",i)[0],j);
}return j;
},collapse:function(h){this.parent(h);
this.hideMenu(1);
},remove:function(h){d.remove(h.id);
this.destroy();
return this.parent(h);
},destroy:function(){var h=this,i=d.get("menu_"+h.id);
b.remove(i,"mouseover",h.mouseOverFunc);
b.remove(i,"click",h.mouseClickFunc);
if(h.element){h.element.remove();
}d.remove(i);
},renderNode:function(){var j=this,l=j.settings,o,i,m,h;
h=d.create("div",{id:"menu_"+j.id,"class":l["class"],style:"position:absolute;left:0;top:0;z-index:200000"});
m=d.add(h,"div",{id:"menu_"+j.id+"_co","class":j.classPrefix+(l["class"]?" "+l["class"]:"")});
j.element=new c("menu_"+j.id,{blocker:1,container:l.container});
if(l.menu_line){d.add(m,"span",{"class":j.classPrefix+"Line"});
}o=d.add(m,"table",{id:"menu_"+j.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});
i=d.add(o,"tbody");
g(j.items,function(n){j._add(i,n);
});
j.rendered=true;
return h;
},_keyHandler:function(h){if(h.keyCode==27){this.hideMenu();
}},_add:function(i,q){var t,l=q.settings,h,m,j,p=this.classPrefix;
if(l.separator){m=d.add(i,"tr",{id:q.id,"class":p+"ItemSeparator"});
d.add(m,"td",{"class":p+"ItemSeparator"});
if(t=m.previousSibling){d.addClass(t,"mceLast");
}return;
}t=m=d.add(i,"tr",{id:q.id,"class":p+"Item "+p+"ItemEnabled"});
t=j=d.add(t,"td");
t=h=d.add(t,"a",{href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});
d.addClass(j,l["class"]);
d.add(t,"span",{"class":"mceIcon"+(l.icon?" mce_"+l.icon:"")});
t=d.add(t,l.element||"span",{"class":"mceText",title:q.settings.title},q.settings.title);
if(q.settings.style){d.setAttrib(t,"style",q.settings.style);
}if(i.childNodes.length==1){d.addClass(m,"mceFirst");
}if((t=m.previousSibling)&&d.hasClass(t,p+"ItemSeparator")){d.addClass(m,"mceFirst");
}if(q.collapse){d.addClass(m,p+"ItemSub");
}if(t=m.previousSibling){d.removeClass(t,"mceLast");
}d.addClass(m,"mceLast");
}});
})();
(function(){var b=tinymce.DOM;
tinymce.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(d,c){this.parent(d,c);
this.classPrefix="mceButton";
},renderHTML:function(){var g=this.classPrefix,f=this.settings,d,c;
c=b.encode(f.label||"");
d='<a id="'+this.id+'" href="javascript:;" class="'+g+" "+g+"Enabled "+f["class"]+(c?" "+g+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" title="'+b.encode(f.title)+'">';
if(f.image){d+='<img class="mceIcon" src="'+f.image+'" />'+c+"</a>";
}else{d+='<span class="mceIcon '+f["class"]+'"></span>'+(c?'<span class="'+g+'Label">'+c+"</span>":"")+"</a>";
}return d;
},postRender:function(){var c=this,d=c.settings;
tinymce.dom.Event.add(c.id,"click",function(f){if(!c.isDisabled()){return d.onclick.call(d.scope,f);
}});
}});
})();
(function(){var d=tinymce.DOM,c=tinymce.dom.Event,f=tinymce.each,b=tinymce.util.Dispatcher;
tinymce.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(i,h){var g=this;
g.parent(i,h);
g.items=[];
g.onChange=new b(g);
g.onPostRender=new b(g);
g.onAdd=new b(g);
g.onRenderMenu=new tinymce.util.Dispatcher(this);
g.classPrefix="mceListBox";
},select:function(g){var h=this,j,i;
if(g!=h.selectedValue){j=d.get(h.id+"_text");
h.selectedValue=g;
f(h.items,function(l){if(l.value==g){d.setHTML(j,d.encode(l.title));
i=1;
return false;
}});
if(!i){d.setHTML(j,d.encode(h.settings.title));
d.addClass(j,"mceTitle");
j=0;
return;
}else{d.removeClass(j,"mceTitle");
}}j=0;
},add:function(j,g,i){var h=this;
i=i||{};
i=tinymce.extend(i,{title:j,value:g});
h.items.push(i);
h.onAdd.dispatch(h,i);
},getLength:function(){return this.items.length;
},renderHTML:function(){var j="",g=this,i=g.settings,l=g.classPrefix;
j='<table id="'+g.id+'" cellpadding="0" cellspacing="0" class="'+l+" "+l+"Enabled"+(i["class"]?(" "+i["class"]):"")+'"><tbody><tr>';
j+="<td>"+d.createHTML("a",{id:g.id+"_text",href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},d.encode(g.settings.title))+"</td>";
j+="<td>"+d.createHTML("a",{id:g.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},"<span></span>")+"</td>";
j+="</tr></tbody></table>";
return j;
},showMenu:function(){var h=this,l,j,i=d.get(this.id),g;
if(h.isDisabled()||h.items.length==0){return;
}if(h.menu&&h.menu.isMenuVisible){return h.hideMenu();
}if(!h.isMenuRendered){h.renderMenu();
h.isMenuRendered=true;
}l=d.getPos(this.settings.menu_container);
j=d.getPos(i);
g=h.menu;
g.settings.offset_x=j.x;
g.settings.offset_y=j.y;
g.settings.keyboard_focus=h._focused;
if(h.oldID){g.items[h.oldID].setSelected(0);
}f(h.items,function(m){if(m.value===h.selectedValue){g.items[m.id].setSelected(1);
h.oldID=m.id;
}});
g.showMenu(0,i.clientHeight);
c.add(d.doc,"mousedown",h.hideMenu,h);
d.addClass(h.id,h.classPrefix+"Selected");
},hideMenu:function(h){var g=this;
if(h&&h.type=="mousedown"&&(h.target.id==g.id+"_text"||h.target.id==g.id+"_open")){return;
}if(!h||!d.getParent(h.target,function(i){return d.hasClass(i,"mceMenu");
})){d.removeClass(g.id,g.classPrefix+"Selected");
c.remove(d.doc,"mousedown",g.hideMenu,g);
if(g.menu){g.menu.hideMenu();
}}},renderMenu:function(){var h=this,g;
g=h.settings.control_manager.createDropMenu(h.id+"_menu",{menu_line:1,"class":h.classPrefix+"Menu mceNoIcons",max_width:150,max_height:150});
g.onHideMenu.add(h.hideMenu,h);
g.add({title:h.settings.title,"class":"mceMenuItemTitle"}).setDisabled(1);
f(h.items,function(i){i.id=d.uniqueId();
i.onclick=function(){if(h.settings.onselect(i.value)!==false){h.select(i.value);
}};
g.add(i);
});
h.onRenderMenu.dispatch(h,g);
h.menu=g;
},postRender:function(){var g=this,h=g.classPrefix;
c.add(g.id,"click",g.showMenu,g);
c.add(g.id+"_text","focus",function(){g._focused=1;
});
c.add(g.id+"_text","blur",function(){g._focused=0;
});
if(tinymce.isIE6||!d.boxModel){c.add(g.id,"mouseover",function(){if(!d.hasClass(g.id,h+"Disabled")){d.addClass(g.id,h+"Hover");
}});
c.add(g.id,"mouseout",function(){if(!d.hasClass(g.id,h+"Disabled")){d.removeClass(g.id,h+"Hover");
}});
}g.onPostRender.dispatch(g,d.get(g.id));
},destroy:function(){this.parent();
c.clear(this.id+"_text");
}});
})();
(function(){var d=tinymce.DOM,c=tinymce.dom.Event,f=tinymce.each,b=tinymce.util.Dispatcher;
tinymce.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(h,g){this.parent(h,g);
this.classPrefix="mceNativeListBox";
},setDisabled:function(g){d.get(this.id).disabled=g;
},isDisabled:function(){return d.get(this.id).disabled;
},select:function(g){var i=d.get(this.id),h=i.options;
g=""+(g||"");
i.selectedIndex=0;
f(h,function(l,j){if(l.value==g){i.selectedIndex=j;
return false;
}});
},add:function(l,h,g){var j,i=this;
g=g||{};
g.value=h;
if(i.isRendered()){d.add(d.get(this.id),"option",g,l);
}j={title:l,value:h,attribs:g};
i.items.push(j);
i.onAdd.dispatch(i,j);
},getLength:function(){return d.get(this.id).options.length-1;
},renderHTML:function(){var i,g=this;
i=d.createHTML("option",{value:""},"-- "+g.settings.title+" --");
f(g.items,function(h){i+=d.createHTML("option",{value:h.value},h.title);
});
i=d.createHTML("select",{id:g.id,"class":"mceNativeListBox"},i);
return i;
},postRender:function(){var h=this,i;
h.rendered=true;
function g(l){var j=l.target.options[l.target.selectedIndex].value;
h.onChange.dispatch(h,j);
if(h.settings.onselect){h.settings.onselect(j);
}}c.add(h.id,"change",g);
c.add(h.id,"keydown",function(l){var j;
c.remove(h.id,"change",i);
j=c.add(h.id,"blur",function(){c.add(h.id,"change",g);
c.remove(h.id,"blur",j);
});
if(l.keyCode==13||l.keyCode==32){g(l);
return c.cancel(l);
}});
h.onPostRender.dispatch(h,d.get(h.id));
}});
})();
(function(){var c=tinymce.DOM,b=tinymce.dom.Event,d=tinymce.each;
tinymce.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f){this.parent(g,f);
this.onRenderMenu=new tinymce.util.Dispatcher(this);
f.menu_container=f.menu_container||c.doc.body;
},showMenu:function(){var g=this,j,i,h=c.get(g.id),f;
if(g.isDisabled()){return;
}if(!g.isMenuRendered){g.renderMenu();
g.isMenuRendered=true;
}if(g.isMenuVisible){return g.hideMenu();
}j=c.getPos(g.settings.menu_container);
i=c.getPos(h);
f=g.menu;
f.settings.offset_x=i.x;
f.settings.offset_y=i.y;
f.settings.vp_offset_x=i.x;
f.settings.vp_offset_y=i.y;
f.settings.keyboard_focus=g._focused;
f.showMenu(0,h.clientHeight);
b.add(c.doc,"mousedown",g.hideMenu,g);
g.setState("Selected",1);
g.isMenuVisible=1;
},renderMenu:function(){var g=this,f;
f=g.settings.control_manager.createDropMenu(g.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:g.settings.icons});
f.onHideMenu.add(g.hideMenu,g);
g.onRenderMenu.dispatch(g,f);
g.menu=f;
},hideMenu:function(g){var f=this;
if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open";
})){return;
}if(!g||!c.getParent(g.target,function(h){return c.hasClass(h,"mceMenu");
})){f.setState("Selected",0);
b.remove(c.doc,"mousedown",f.hideMenu,f);
if(f.menu){f.menu.hideMenu();
}}f.isMenuVisible=0;
},postRender:function(){var f=this,g=f.settings;
b.add(f.id,"click",function(){if(!f.isDisabled()){if(g.onclick){g.onclick(f.value);
}f.showMenu();
}});
}});
})();
(function(){var c=tinymce.DOM,b=tinymce.dom.Event,d=tinymce.each;
tinymce.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f){this.parent(g,f);
this.classPrefix="mceSplitButton";
},renderHTML:function(){var j,g=this,i=g.settings,f;
j="<tbody><tr>";
if(i.image){f=c.createHTML("img ",{src:i.image,"class":"mceAction "+i["class"]});
}else{f=c.createHTML("span",{"class":"mceAction "+i["class"]},"");
}j+="<td>"+c.createHTML("a",{id:g.id+"_action",href:"javascript:;","class":"mceAction "+i["class"],onclick:"return false;",onmousedown:"return false;",title:i.title},f)+"</td>";
f=c.createHTML("span",{"class":"mceOpen "+i["class"]});
j+="<td>"+c.createHTML("a",{id:g.id+"_open",href:"javascript:;","class":"mceOpen "+i["class"],onclick:"return false;",onmousedown:"return false;",title:i.title},f)+"</td>";
j+="</tr></tbody>";
return c.createHTML("table",{id:g.id,"class":"mceSplitButton mceSplitButtonEnabled "+i["class"],cellpadding:"0",cellspacing:"0",onmousedown:"return false;",title:i.title},j);
},postRender:function(){var f=this,g=f.settings;
if(g.onclick){b.add(f.id+"_action","click",function(){if(!f.isDisabled()){g.onclick(f.value);
}});
}b.add(f.id+"_open","click",f.showMenu,f);
b.add(f.id+"_open","focus",function(){f._focused=1;
});
b.add(f.id+"_open","blur",function(){f._focused=0;
});
if(tinymce.isIE6||!c.boxModel){b.add(f.id,"mouseover",function(){if(!c.hasClass(f.id,"mceSplitButtonDisabled")){c.addClass(f.id,"mceSplitButtonHover");
}});
b.add(f.id,"mouseout",function(){if(!c.hasClass(f.id,"mceSplitButtonDisabled")){c.removeClass(f.id,"mceSplitButtonHover");
}});
}},destroy:function(){this.parent();
b.clear(this.id+"_action");
b.clear(this.id+"_open");
}});
})();
(function(){var d=tinymce.DOM,b=tinymce.dom.Event,c=tinymce.is,f=tinymce.each;
tinymce.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h){var g=this;
g.parent(i,h);
g.settings=h=tinymce.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);
g.value=h.default_color;
},showMenu:function(){var g=this,h,l,j,i;
if(g.isDisabled()){return;
}if(!g.isMenuRendered){g.renderMenu();
g.isMenuRendered=true;
}if(g.isMenuVisible){return g.hideMenu();
}j=d.get(g.id);
d.show(g.id+"_menu");
d.addClass(j,"mceSplitButtonSelected");
i=d.getPos(j);
d.setStyles(g.id+"_menu",{left:i.x,top:i.y+j.clientHeight,zIndex:200000});
j=0;
b.add(d.doc,"mousedown",g.hideMenu,g);
if(g._focused){g._keyHandler=b.add(g.id+"_menu","keydown",function(m){if(m.keyCode==27){g.hideMenu();
}});
d.select("a",g.id+"_menu")[0].focus();
}g.isMenuVisible=1;
},hideMenu:function(h){var g=this;
if(h&&h.type=="mousedown"&&d.getParent(h.target,function(i){return i.id===g.id+"_open";
})){return;
}if(!h||!d.getParent(h.target,function(i){return d.hasClass(i,"mceSplitButtonMenu");
})){d.removeClass(g.id,"mceSplitButtonSelected");
b.remove(d.doc,"mousedown",g.hideMenu,g);
b.remove(g.id+"_menu","keydown",g._keyHandler);
d.hide(g.id+"_menu");
}g.isMenuVisible=0;
},renderMenu:function(){var o=this,g,l=0,p=o.settings,u,j,q,h;
h=d.add(p.menu_container,"div",{id:o.id+"_menu","class":p.menu_class+" "+p["class"],style:"position:absolute;left:0;top:-1000px;"});
g=d.add(h,"div",{"class":p["class"]+" mceSplitButtonMenu"});
d.add(g,"span",{"class":"mceMenuLine"});
u=d.add(g,"table",{"class":"mceColorSplitMenu"});
j=d.add(u,"tbody");
l=0;
f(c(p.colors,"array")?p.colors:p.colors.split(","),function(i){i=i.replace(/^#/,"");
if(!l--){q=d.add(j,"tr");
l=p.grid_width-1;
}u=d.add(q,"td");
u=d.add(u,"a",{href:"javascript:;",style:{backgroundColor:"#"+i},mce_color:"#"+i});
});
if(p.more_colors_func){u=d.add(j,"tr");
u=d.add(u,"td",{colspan:p.grid_width,"class":"mceMoreColors"});
u=d.add(u,"a",{id:o.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},p.more_colors_title);
b.add(u,"click",function(i){p.more_colors_func.call(p.more_colors_scope||this);
return b.cancel(i);
});
}d.addClass(g,"mceColorSplitMenu");
b.add(o.id+"_menu","click",function(i){var m;
i=i.target;
if(i.nodeName=="A"&&(m=i.getAttribute("mce_color"))){o.setColor(m);
}});
return h;
},setColor:function(h){var g=this;
d.setStyle(g.id+"_preview","backgroundColor",h);
g.value=h;
g.hideMenu();
g.settings.onselect(h);
},postRender:function(){var g=this,h=g.id;
g.parent();
d.add(h+"_action","div",{id:h+"_preview","class":"mceColorPreview"});
},destroy:function(){this.parent();
b.clear(this.id+"_menu");
b.clear(this.id+"_more");
d.remove(this.id+"_menu");
}});
})();
tinymce.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var o=this,g="",l,m,d=tinymce.DOM,p=o.settings,f,b,j,n;
n=o.controls;
for(f=0;
f<n.length;
f++){m=n[f];
b=n[f-1];
j=n[f+1];
if(f===0){l="mceToolbarStart";
if(m.Button){l+=" mceToolbarStartButton";
}else{if(m.SplitButton){l+=" mceToolbarStartSplitButton";
}else{if(m.ListBox){l+=" mceToolbarStartListBox";
}}}g+=d.createHTML("td",{"class":l},d.createHTML("span",null,"<!-- IE -->"));
}if(b&&m.ListBox){if(b.Button||b.SplitButton){g+=d.createHTML("td",{"class":"mceToolbarEnd"},d.createHTML("span",null,"<!-- IE -->"));
}}if(d.stdMode){g+='<td style="position: relative">'+m.renderHTML()+"</td>";
}else{g+="<td>"+m.renderHTML()+"</td>";
}if(j&&m.ListBox){if(j.Button||j.SplitButton){g+=d.createHTML("td",{"class":"mceToolbarStart"},d.createHTML("span",null,"<!-- IE -->"));
}}}l="mceToolbarEnd";
if(m.Button){l+=" mceToolbarEndButton";
}else{if(m.SplitButton){l+=" mceToolbarEndSplitButton";
}else{if(m.ListBox){l+=" mceToolbarEndListBox";
}}}g+=d.createHTML("td",{"class":l},d.createHTML("span",null,"<!-- IE -->"));
return d.createHTML("table",{id:o.id,"class":"mceToolbar"+(p["class"]?" "+p["class"]:""),cellpadding:"0",cellspacing:"0",align:o.settings.align||""},"<tbody><tr>"+g+"</tr></tbody>");
}});
(function(){var b=tinymce.util.Dispatcher,c=tinymce.each;
tinymce.create("tinymce.AddOnManager",{items:[],urls:{},lookup:{},onAdd:new b(this),get:function(d){return this.lookup[d];
},requireLangPack:function(g){var d,f;
if(tinymce.EditorManager.settings){d=this.urls[g]+"/langs/"+tinymce.EditorManager.settings.language+".js";
f=tinymce.EditorManager.settings;
if(f){if(!tinymce.dom.Event.domLoaded&&!f.strict_mode){tinymce.ScriptLoader.load(d);
}else{tinymce.ScriptLoader.add(d);
}}}},add:function(f,d){this.items.push(d);
this.lookup[f]=d;
this.onAdd.dispatch(this,f,d);
return d;
},load:function(i,f,d,h){var g=this;
if(g.urls[i]){return;
}if(f.indexOf("/")!=0&&f.indexOf("://")==-1){f=tinymce.baseURL+"/"+f;
}g.urls[i]=f.substring(0,f.lastIndexOf("/"));
tinymce.ScriptLoader.add(f,d,h);
}});
tinymce.PluginManager=new tinymce.AddOnManager();
tinymce.ThemeManager=new tinymce.AddOnManager();
}());
(function(){var h=tinymce.each,i=tinymce.extend,g=tinymce.DOM,b=tinymce.dom.Event,d=tinymce.ThemeManager,c=tinymce.PluginManager,f=tinymce.explode;
tinymce.create("static tinymce.EditorManager",{editors:{},i18n:{},activeEditor:null,preInit:function(){var j=this,l=window.location;
tinymce.documentBaseURL=l.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");
if(!/[\/\\]$/.test(tinymce.documentBaseURL)){tinymce.documentBaseURL+="/";
}tinymce.baseURL=new tinymce.util.URI(tinymce.documentBaseURL).toAbsolute(tinymce.baseURL);
tinymce.EditorManager.baseURI=new tinymce.util.URI(tinymce.baseURL);
if(tinymce.EditorManager.baseURI.host!=l.hostname&&l.hostname){document.domain=tinymce.relaxedDomain=l.hostname.replace(/.*\.(.+\..+)$/,"$1");
}j.onBeforeUnload=new tinymce.util.Dispatcher(j);
b.add(window,"beforeunload",function(m){j.onBeforeUnload.dispatch(j,m);
});
},init:function(n){var l=this,m,j=tinymce.ScriptLoader,q,p;
function o(v,w,t){var u=v[w];
if(!u){return;
}if(tinymce.is(u,"string")){t=u.replace(/\.\w+$/,"");
t=t?tinymce.resolve(t):0;
u=tinymce.resolve(u);
}return u.apply(t||this,Array.prototype.slice.call(arguments,2));
}n=i({theme:"simple",language:"en",strict_loading_mode:document.contentType=="application/xhtml+xml"},n);
l.settings=n;
if(!b.domLoaded&&!n.strict_loading_mode){if(n.language){j.add(tinymce.baseURL+"/langs/"+n.language+".js");
}if(n.theme&&n.theme.charAt(0)!="-"&&!d.urls[n.theme]){d.load(n.theme,"themes/"+n.theme+"/editor_template"+tinymce.suffix+".js");
}if(n.plugins){m=f(n.plugins);
if(tinymce.inArray(m,"compat2x")!=-1){c.load("compat2x","plugins/compat2x/editor_plugin"+tinymce.suffix+".js");
}h(m,function(s){if(s&&s.charAt(0)!="-"&&!c.urls[s]){if(!tinymce.isWebKit&&s=="safari"){return;
}c.load(s,"plugins/"+s+"/editor_plugin"+tinymce.suffix+".js");
}});
}j.loadQueue();
}b.add(document,"init",function(){var s,u;
o(n,"onpageload");
if(n.browsers){s=false;
h(f(n.browsers),function(w){switch(w){case"ie":case"msie":if(tinymce.isIE){s=true;
}break;
case"gecko":if(tinymce.isGecko){s=true;
}break;
case"safari":case"webkit":if(tinymce.isWebKit){s=true;
}break;
case"opera":if(tinymce.isOpera){s=true;
}break;
}});
if(!s){return;
}}switch(n.mode){case"exact":s=n.elements||"";
if(s.length>0){h(f(s),function(w){if(g.get(w)){new tinymce.Editor(w,n).render(1);
}else{q=0;
h(document.forms,function(v){h(v.elements,function(x){if(x.name===w){w="mce_editor_"+q;
g.setAttrib(x,"id",w);
new tinymce.Editor(w,n).render(1);
}});
});
}});
}break;
case"textareas":case"specific_textareas":function t(w,v){return new RegExp("\\b"+v+"\\b","g").test(w.className);
}h(g.select("textarea"),function(w){if(n.editor_deselector&&t(w,n.editor_deselector)){return;
}if(!n.editor_selector||t(w,n.editor_selector)){p=g.get(w.name);
if(!w.id&&!p){w.id=w.name;
}if(!w.id||l.get(w.id)){w.id=g.uniqueId();
}new tinymce.Editor(w.id,n).render(1);
}});
break;
}if(n.oninit){s=u=0;
h(l.editors,function(v){u++;
if(!v.initialized){v.onInit.add(function(){s++;
if(s==u){o(n,"oninit");
}});
}else{s++;
}if(s==u){o(n,"oninit");
}});
}});
},get:function(j){return this.editors[j];
},getInstanceById:function(j){return this.get(j);
},add:function(j){this.editors[j.id]=j;
this._setActive(j);
return j;
},remove:function(l){var j=this;
if(!j.editors[l.id]){return null;
}delete j.editors[l.id];
if(j.activeEditor==l){h(j.editors,function(m){j._setActive(m);
return false;
});
}l.destroy();
return l;
},execCommand:function(q,o,n){var p=this,m=p.get(n),j;
switch(q){case"mceFocus":m.focus();
return true;
case"mceAddEditor":case"mceAddControl":if(!p.get(n)){new tinymce.Editor(n,p.settings).render();
}return true;
case"mceAddFrameControl":j=n.window;
j.tinyMCE=tinyMCE;
j.tinymce=tinymce;
tinymce.DOM.doc=j.document;
tinymce.DOM.win=j;
m=new tinymce.Editor(n.element_id,n);
m.render();
if(tinymce.isIE){function l(){m.destroy();
j.detachEvent("onunload",l);
j=j.tinyMCE=j.tinymce=null;
}j.attachEvent("onunload",l);
}n.page_window=null;
return true;
case"mceRemoveEditor":case"mceRemoveControl":m.remove();
return true;
case"mceToggleEditor":if(!m){p.execCommand("mceAddControl",0,n);
return true;
}if(m.isHidden()){m.show();
}else{m.hide();
}return true;
}if(p.activeEditor){return p.activeEditor.execCommand(q,o,n);
}return false;
},execInstanceCommand:function(o,n,m,l){var j=this.get(o);
if(j){return j.execCommand(n,m,l);
}return false;
},triggerSave:function(){h(this.editors,function(j){j.save();
});
},addI18n:function(m,n){var j,l=this.i18n;
if(!tinymce.is(m,"string")){h(m,function(q,p){h(q,function(t,s){h(t,function(v,u){if(s==="common"){l[p+"."+u]=v;
}else{l[p+"."+s+"."+u]=v;
}});
});
});
}else{h(n,function(q,p){l[m+"."+p]=q;
});
}},_setActive:function(j){this.selectedInstance=this.activeEditor=j;
}});
tinymce.EditorManager.preInit();
})();
var tinyMCE=window.tinyMCE=tinymce.EditorManager;
(function(){var q=tinymce.DOM,n=tinymce.dom.Event,h=tinymce.extend,o=tinymce.util.Dispatcher;
var m=tinymce.each,b=tinymce.isGecko,c=tinymce.isIE,g=tinymce.isWebKit;
var f=tinymce.is,j=tinymce.ThemeManager,d=tinymce.PluginManager,l=tinymce.EditorManager;
var s=tinymce.inArray,p=tinymce.grep,i=tinymce.explode;
tinymce.create("tinymce.Editor",{Editor:function(w,v){var u=this;
u.id=u.editorId=w;
u.execCommands={};
u.queryStateCommands={};
u.queryValueCommands={};
u.plugins={};
m(["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(t){u[t]=new o(u);
});
u.settings=v=h({id:w,language:"en",docs_language:"en",theme:"simple",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:tinymce.documentBaseURL,add_form_submit_trigger:1,submit_patch:1,add_unload_trigger:1,convert_urls:1,relative_urls:1,remove_script_host:1,table_inline_editing:0,object_resizing:1,cleanup:1,accessibility_focus:1,custom_shortcuts:1,custom_undo_redo_keyboard_shortcuts:1,custom_undo_redo_restore_selection:1,custom_undo_redo:1,doctype:'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">',visual_table_class:"mceItemTable",visual:1,inline_styles:true,convert_fonts_to_spans:true,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",valid_elements:"@[id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur],strong/b,em/i,strike,u,#p[align],-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,-blockquote,-table[border=0|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],object[classid|width|height|codebase|*],param[name|value|_value],embed[type|width|height|src|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value],kbd,label[for],legend,noscript,optgroup[label|disabled],option[disabled|label|selected|value],q[cite],samp,select[disabled|multiple|name|size],small,textarea[cols|rows|disabled|name|readonly],tt,var,big",hidden_input:1,padd_empty_editor:1,render_ui:1,init_theme:1,force_p_newlines:1,indentation:"30px"},v);
u.documentBaseURI=new tinymce.util.URI(v.document_base_url||tinymce.documentBaseURL,{base_uri:tinyMCE.baseURI});
u.baseURI=l.baseURI;
u.execCallback("setup",u);
},render:function(w){var x=this,y=x.settings,z=x.id,u=tinymce.ScriptLoader;
if(!n.domLoaded){n.add(document,"init",function(){x.render();
});
return;
}if(!w){y.strict_loading_mode=1;
tinyMCE.settings=y;
}if(!x.getElement()){return;
}if(y.strict_loading_mode){u.settings.strict_mode=y.strict_loading_mode;
tinymce.DOM.settings.strict=1;
}if(!/TEXTAREA|INPUT/i.test(x.getElement().nodeName)&&y.hidden_input&&q.getParent(z,"form")){q.insertAfter(q.create("input",{type:"hidden",name:z}),z);
}x.windowManager=new tinymce.WindowManager(x);
if(y.encoding=="xml"){x.onGetContent.add(function(t,A){if(A.get){A.content=q.encode(A.content);
}});
}if(y.add_form_submit_trigger){x.onSubmit.addToTop(function(){if(x.initialized){x.save();
x.isNotDirty=1;
}});
}if(y.add_unload_trigger){x._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(x.initialized&&!x.destroyed&&!x.isHidden()){x.save({format:"raw",no_events:true});
}});
}tinymce.addUnload(x.destroy,x);
if(y.submit_patch){x.onBeforeRenderUI.add(function(){var t=x.getElement().form;
if(!t){return;
}if(t._mceOldSubmit){return;
}if(!t.submit.nodeType&&!t.submit.length){x.formElement=t;
t._mceOldSubmit=t.submit;
t.submit=function(){l.triggerSave();
x.isNotDirty=1;
return this._mceOldSubmit(this);
};
}t=null;
});
}function v(){if(y.language){u.add(tinymce.baseURL+"/langs/"+y.language+".js");
}if(y.theme.charAt(0)!="-"&&!j.urls[y.theme]){j.load(y.theme,"themes/"+y.theme+"/editor_template"+tinymce.suffix+".js");
}m(i(y.plugins),function(t){if(t&&t.charAt(0)!="-"&&!d.urls[t]){if(!g&&t=="safari"){return;
}d.load(t,"plugins/"+t+"/editor_plugin"+tinymce.suffix+".js");
}});
u.loadQueue(function(){if(y.ask){function t(){x.windowManager.confirm(x.getLang("edit_confirm"),function(A){if(A){x.init();
}else{n.remove(x.id,"focus",t);
}});
}n.add(x.id,"focus",t);
return;
}if(!x.removed){x.init();
}});
}if(y.plugins.indexOf("compat2x")!=-1){d.load("compat2x","plugins/compat2x/editor_plugin"+tinymce.suffix+".js");
u.loadQueue(v);
}else{v();
}},init:function(){var y,H=this,I=H.settings,E,B,D=H.getElement(),x,v,F,A,C,G;
l.add(H);
I.theme=I.theme.replace(/-/,"");
x=j.get(I.theme);
H.theme=new x();
if(H.theme.init&&I.init_theme){H.theme.init(H,j.urls[I.theme]||tinymce.documentBaseURL.replace(/\/$/,""));
}m(i(I.plugins.replace(/\-/g,"")),function(J){var K=d.get(J),w=d.urls[J]||tinymce.documentBaseURL.replace(/\/$/,""),t;
if(K){t=new K(H,w);
H.plugins[J]=t;
if(t.init){t.init(H,w);
}}});
if(I.popup_css){I.popup_css=H.documentBaseURI.toAbsolute(I.popup_css);
}else{I.popup_css=H.baseURI.toAbsolute("themes/"+I.theme+"/skins/"+I.skin+"/dialog.css");
}if(I.popup_css_add){I.popup_css+=","+H.documentBaseURI.toAbsolute(I.popup_css_add);
}H.controlManager=new tinymce.ControlManager(H);
H.undoManager=new tinymce.UndoManager(H);
H.undoManager.onAdd.add(function(u,t){return H.onChange.dispatch(H,t,u);
});
H.undoManager.onUndo.add(function(u,t){return H.onUndo.dispatch(H,t,u);
});
H.undoManager.onRedo.add(function(u,t){return H.onRedo.dispatch(H,t,u);
});
if(I.custom_undo_redo){H.onExecCommand.add(function(u,J,w,K,t){if(J!="Undo"&&J!="Redo"&&J!="mceRepaint"&&(!t||!t.skip_undo)){H.undoManager.add();
}});
}H.onExecCommand.add(function(t,u){if(!/^(FontName|FontSize)$/.test(u)){H.nodeChanged();
}});
if(b){function z(t,u){if(!u||!u.initial){H.execCommand("mceRepaint");
}}H.onUndo.add(z);
H.onRedo.add(z);
H.onSetContent.add(z);
}H.onBeforeRenderUI.dispatch(H,H.controlManager);
if(I.render_ui){E=I.width||D.style.width||D.clientWidth;
B=I.height||D.style.height||D.clientHeight;
H.orgDisplay=D.style.display;
G=/^[0-9\.]+(|px)$/i;
if(G.test(""+E)){E=Math.max(parseInt(E)+(x.deltaWidth||0),100);
}if(G.test(""+B)){B=Math.max(parseInt(B)+(x.deltaHeight||0),100);
}x=H.theme.renderUI({targetNode:D,width:E,height:B,deltaWidth:I.delta_width,deltaHeight:I.delta_height});
H.editorContainer=x.editorContainer;
}q.setStyles(x.sizeContainer||x.editorContainer,{width:E,height:B});
B=(x.iframeHeight||B)+((B+"").indexOf("%")==-1?(x.deltaHeight||0):"");
if(B<100){B=100;
}H.iframeHTML=I.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml"><base href="'+H.documentBaseURI.getURI()+'"></base>';
H.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
if(tinymce.relaxedDomain){H.iframeHTML+='<script type="text/javascript">document.domain = "'+tinymce.relaxedDomain+'";<\/script>';
}A=I.body_id||"tinymce";
if(A.indexOf("=")!=-1){A=H.getParam("body_id","","hash");
A=A[H.id]||A;
}C=I.body_class||"";
if(C.indexOf("=")!=-1){C=H.getParam("body_class","","hash");
C=C[H.id]||"";
}H.iframeHTML+='</head><body id="'+A+'" class="mceContentBody '+C+'"></body></html>';
if(tinymce.relaxedDomain){if(c){F='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+H.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()';
}else{if(tinymce.isOpera){F='javascript:(function(){document.open();document.domain="'+document.domain+'";document.close();ed.setupIframe();})()';
}}}y=q.add(x.iframeContainer,"iframe",{id:H.id+"_ifr",src:F||'javascript:""',frameBorder:"0",style:{width:"100%",height:B}});
H.contentAreaContainer=x.iframeContainer;
q.get(x.editorContainer).style.display=H.orgDisplay;
q.get(H.id).style.display="none";
if(tinymce.isOldWebKit){n.add(y,"load",H.setupIframe,H);
y.src=tinymce.baseURL+"/plugins/safari/blank.htm";
}else{if(!c||!tinymce.relaxedDomain){H.setupIframe();
}D=y=x=null;
}},setupIframe:function(){var x=this,z=x.settings,A=q.get(x.id),B=x.getDoc(),y,v;
if(!c||!tinymce.relaxedDomain){B.open();
B.write(x.iframeHTML);
B.close();
}if(!c){try{B.designMode="On";
}catch(w){}}if(c){v=x.getBody();
q.hide(v);
v.contentEditable=true;
q.show(v);
}x.dom=new tinymce.DOM.DOMUtils(x.getDoc(),{keep_values:true,url_converter:x.convertURL,url_converter_scope:x,hex_colors:z.force_hex_style_colors,class_filter:z.class_filter,update_styles:1,fix_ie_paragraphs:1});
x.serializer=new tinymce.dom.Serializer({entity_encoding:z.entity_encoding,entities:z.entities,valid_elements:z.verify_html===false?"*[*]":z.valid_elements,extended_valid_elements:z.extended_valid_elements,valid_child_elements:z.valid_child_elements,invalid_elements:z.invalid_elements,fix_table_elements:z.fix_table_elements,fix_list_elements:z.fix_list_elements,fix_content_duplication:z.fix_content_duplication,convert_fonts_to_spans:z.convert_fonts_to_spans,font_size_classes:z.font_size_classes,font_size_style_values:z.font_size_style_values,apply_source_formatting:z.apply_source_formatting,remove_linebreaks:z.remove_linebreaks,dom:x.dom});
x.selection=new tinymce.dom.Selection(x.dom,x.getWin(),x.serializer);
x.forceBlocks=new tinymce.ForceBlocks(x,{forced_root_block:z.forced_root_block});
x.editorCommands=new tinymce.EditorCommands(x);
x.serializer.onPreProcess.add(function(t,C){return x.onPreProcess.dispatch(x,C,t);
});
x.serializer.onPostProcess.add(function(t,C){return x.onPostProcess.dispatch(x,C,t);
});
x.onPreInit.dispatch(x);
if(!z.gecko_spellcheck){x.getBody().spellcheck=0;
}x._addEvents();
x.controlManager.onPostRender.dispatch(x,x.controlManager);
x.onPostRender.dispatch(x);
if(z.directionality){x.getBody().dir=z.directionality;
}if(z.nowrap){x.getBody().style.whiteSpace="nowrap";
}if(z.auto_resize){x.onNodeChange.add(x.resizeToContent,x);
}if(z.custom_elements){function u(t,C){m(i(z.custom_elements),function(D){var E;
if(D.indexOf("~")===0){D=D.substring(1);
E="span";
}else{E="div";
}C.content=C.content.replace(new RegExp("<("+D+")([^>]*)>","g"),"<"+E+' mce_name="$1"$2>');
C.content=C.content.replace(new RegExp("</("+D+")>","g"),"</"+E+">");
});
}x.onBeforeSetContent.add(u);
x.onPostProcess.add(function(t,C){if(C.set){u(t,C);
}});
}if(z.handle_node_change_callback){x.onNodeChange.add(function(C,t,D){x.execCallback("handle_node_change_callback",x.id,D,-1,-1,true,x.selection.isCollapsed());
});
}if(z.save_callback){x.onSaveContent.add(function(t,D){var C=x.execCallback("save_callback",x.id,D.content,x.getBody());
if(C){D.content=C;
}});
}if(z.onchange_callback){x.onChange.add(function(C,t){x.execCallback("onchange_callback",x,t);
});
}if(z.convert_newlines_to_brs){x.onBeforeSetContent.add(function(t,C){if(C.initial){C.content=C.content.replace(/\r?\n/g,"<br />");
}});
}if(z.fix_nesting&&c){x.onBeforeSetContent.add(function(t,C){C.content=x._fixNesting(C.content);
});
}if(z.preformatted){x.onPostProcess.add(function(t,C){C.content=C.content.replace(/^\s*<pre.*?>/,"");
C.content=C.content.replace(/<\/pre>\s*$/,"");
if(C.set){C.content='<pre class="mceItemHidden">'+C.content+"</pre>";
}});
}if(z.verify_css_classes){x.serializer.attribValueFilter=function(E,C){var D,t;
if(E=="class"){if(!x.classesRE){t=x.dom.getClasses();
if(t.length>0){D="";
m(t,function(F){D+=(D?"|":"")+F["class"];
});
x.classesRE=new RegExp("("+D+")","gi");
}}return !x.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(C)||x.classesRE.test(C)?C:"";
}return C;
};
}if(z.convert_fonts_to_spans){x._convertFonts();
}if(z.inline_styles){x._convertInlineElements();
}if(z.cleanup_callback){x.onBeforeSetContent.add(function(t,C){C.content=x.execCallback("cleanup_callback","insert_to_editor",C.content,C);
});
x.onPreProcess.add(function(t,C){if(C.set){x.execCallback("cleanup_callback","insert_to_editor_dom",C.node,C);
}if(C.get){x.execCallback("cleanup_callback","get_from_editor_dom",C.node,C);
}});
x.onPostProcess.add(function(t,C){if(C.set){C.content=x.execCallback("cleanup_callback","insert_to_editor",C.content,C);
}if(C.get){C.content=x.execCallback("cleanup_callback","get_from_editor",C.content,C);
}});
}if(z.save_callback){x.onGetContent.add(function(t,C){if(C.save){C.content=x.execCallback("save_callback",x.id,C.content,x.getBody());
}});
}if(z.handle_event_callback){x.onEvent.add(function(t,C,D){if(x.execCallback("handle_event_callback",C,t,D)===false){n.cancel(C);
}});
}x.onSetContent.add(function(){x.addVisual(x.getBody());
});
if(z.padd_empty_editor){x.onPostProcess.add(function(t,C){C.content=C.content.replace(/^<p>(&nbsp;|#160;|\s|\u00a0)<\/p>$/,"");
});
}if(b){try{B.designMode="Off";
B.designMode="On";
}catch(w){}}setTimeout(function(){if(x.removed){return;
}x.load({initial:true,format:(z.cleanup_on_startup?"html":"raw")});
x.startContent=x.getContent({format:"raw"});
x.undoManager.add({initial:true});
x.initialized=true;
x.onInit.dispatch(x);
x.execCallback("setupcontent_callback",x.id,x.getBody(),x.getDoc());
x.execCallback("init_instance_callback",x);
x.focus(true);
x.nodeChanged({initial:1});
if(z.content_css){tinymce.each(i(z.content_css),function(t){x.dom.loadCSS(x.documentBaseURI.toAbsolute(t));
});
}if(z.auto_focus){setTimeout(function(){var t=l.get(z.auto_focus);
t.selection.select(t.getBody(),1);
t.selection.collapse(1);
t.getWin().focus();
},100);
}},1);
A=null;
},focus:function(v){var w,u=this;
if(!v){u.getWin().focus();
}if(l.activeEditor!=u){if((w=l.activeEditor)!=null){w.onDeactivate.dispatch(w,u);
}u.onActivate.dispatch(u,w);
}l._setActive(u);
},execCallback:function(x){var u=this,w=u.settings[x],v;
if(!w){return;
}if(u.callbackLookup&&(v=u.callbackLookup[x])){w=v.func;
v=v.scope;
}if(f(w,"string")){v=w.replace(/\.\w+$/,"");
v=v?tinymce.resolve(v):0;
w=tinymce.resolve(w);
u.callbackLookup=u.callbackLookup||{};
u.callbackLookup[x]={func:w,scope:v};
}return w.apply(v||u,Array.prototype.slice.call(arguments,1));
},translate:function(t){var v=this.settings.language,u=l.i18n;
if(!t){return"";
}return u[v+"."+t]||t.replace(/{\#([^}]+)\}/g,function(x,w){return u[v+"."+w]||"{#"+w+"}";
});
},getLang:function(u,t){return l.i18n[this.settings.language+"."+u]||(f(t)?t:"{#"+u+"}");
},getParam:function(z,w,t){var x=tinymce.trim,u=f(this.settings[z])?this.settings[z]:w,y;
if(t==="hash"){y={};
if(f(u,"string")){m(u.indexOf("=")>0?u.split(/[;,](?![^=;,]*(?:[;,]|$))/):u.split(","),function(A){A=A.split("=");
if(A.length>1){y[x(A[0])]=x(A[1]);
}else{y[x(A[0])]=x(A);
}});
}else{y=u;
}return y;
}return u;
},nodeChanged:function(w){var u=this,v=u.selection,x=v.getNode()||u.getBody();
if(u.initialized){u.onNodeChange.dispatch(u,w?w.controlManager||u.controlManager:u.controlManager,c&&x.ownerDocument!=u.getDoc()?u.getBody():x,v.isCollapsed(),w);
}},addButton:function(w,v){var u=this;
u.buttons=u.buttons||{};
u.buttons[w]=v;
},addCommand:function(v,u,t){this.execCommands[v]={func:u,scope:t||this};
},addQueryStateHandler:function(v,u,t){this.queryStateCommands[v]={func:u,scope:t||this};
},addQueryValueHandler:function(v,u,t){this.queryValueCommands[v]={func:u,scope:t||this};
},addShortcut:function(w,y,u,x){var v=this,z;
if(!v.settings.custom_shortcuts){return false;
}v.shortcuts=v.shortcuts||{};
if(f(u,"string")){z=u;
u=function(){v.execCommand(z,false,null);
};
}if(f(u,"object")){z=u;
u=function(){v.execCommand(z[0],z[1],z[2]);
};
}m(i(w),function(t){var A={func:u,scope:x||this,desc:y,alt:false,ctrl:false,shift:false};
m(i(t,"+"),function(B){switch(B){case"alt":case"ctrl":case"shift":A[B]=true;
break;
default:A.charCode=B.charCodeAt(0);
A.keyCode=B.toUpperCase().charCodeAt(0);
}});
v.shortcuts[(A.ctrl?"ctrl":"")+","+(A.alt?"alt":"")+","+(A.shift?"shift":"")+","+A.keyCode]=A;
});
return true;
},execCommand:function(z,y,B,u){var w=this,x=0,A,v;
if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(z)&&(!u||!u.skip_focus)){w.focus();
}A={};
w.onBeforeExecCommand.dispatch(w,z,y,B,A);
if(A.terminate){return false;
}if(w.execCallback("execcommand_callback",w.id,w.selection.getNode(),z,y,B)){w.onExecCommand.dispatch(w,z,y,B,u);
return true;
}if(A=w.execCommands[z]){v=A.func.call(A.scope,y,B);
if(v!==true){w.onExecCommand.dispatch(w,z,y,B,u);
return v;
}}m(w.plugins,function(t){if(t.execCommand&&t.execCommand(z,y,B)){w.onExecCommand.dispatch(w,z,y,B,u);
x=1;
return false;
}});
if(x){return true;
}if(w.theme.execCommand&&w.theme.execCommand(z,y,B)){w.onExecCommand.dispatch(w,z,y,B,u);
return true;
}if(w.editorCommands.execCommand(z,y,B)){w.onExecCommand.dispatch(w,z,y,B,u);
return true;
}w.getDoc().execCommand(z,y,B);
w.onExecCommand.dispatch(w,z,y,B,u);
},queryCommandState:function(y){var v=this,x,w;
if(v._isHidden()){return;
}if(x=v.queryStateCommands[y]){w=x.func.call(x.scope);
if(w!==true){return w;
}}x=v.editorCommands.queryCommandState(y);
if(x!==-1){return x;
}try{return this.getDoc().queryCommandState(y);
}catch(u){}},queryCommandValue:function(y){var v=this,x,w;
if(v._isHidden()){return;
}if(x=v.queryValueCommands[y]){w=x.func.call(x.scope);
if(w!==true){return w;
}}x=v.editorCommands.queryCommandValue(y);
if(f(x)){return x;
}try{return this.getDoc().queryCommandValue(y);
}catch(u){}},show:function(){var u=this;
q.show(u.getContainer());
q.hide(u.id);
u.load();
},hide:function(){var u=this,v=u.getDoc();
if(c&&v){v.execCommand("SelectAll");
}u.save();
q.hide(u.getContainer());
q.setStyle(u.id,"display",u.orgDisplay);
},isHidden:function(){return !q.isHidden(this.id);
},setProgressState:function(t,u,v){this.onSetProgressState.dispatch(this,t,u,v);
return t;
},resizeToContent:function(){var u=this;
q.setStyle(u.id+"_ifr","height",u.getBody().scrollHeight);
},load:function(x){var u=this,w=u.getElement(),v;
x=x||{};
x.load=true;
v=u.setContent(f(w.value)?w.value:w.innerHTML,x);
x.element=w;
if(!x.no_events){u.onLoadContent.dispatch(u,x);
}x.element=w=null;
return v;
},save:function(y){var u=this,x=u.getElement(),v,w;
if(!u.initialized){return;
}y=y||{};
y.save=true;
y.element=x;
v=y.content=u.getContent(y);
if(!y.no_events){u.onSaveContent.dispatch(u,y);
}v=y.content;
if(!/TEXTAREA|INPUT/i.test(x.nodeName)){x.innerHTML=v;
if(w=q.getParent(u.id,"form")){m(w.elements,function(t){if(t.name==u.id){t.value=v;
return false;
}});
}}else{x.value=v;
}y.element=x=null;
return v;
},setContent:function(v,w){var u=this;
w=w||{};
w.format=w.format||"html";
w.set=true;
w.content=v;
if(!w.no_events){u.onBeforeSetContent.dispatch(u,w);
}if(!tinymce.isIE&&(v.length===0||/^\s+$/.test(v))){w.content=u.dom.setHTML(u.getBody(),'<br mce_bogus="1" />',1);
w.format="raw";
}w.content=u.dom.setHTML(u.getBody(),tinymce.trim(w.content));
if(w.format!="raw"&&u.settings.cleanup){w.getInner=true;
w.content=u.dom.setHTML(u.getBody(),u.serializer.serialize(u.getBody(),w));
}if(!w.no_events){u.onSetContent.dispatch(u,w);
}return w.content;
},getContent:function(w){var u=this,v;
w=w||{};
w.format=w.format||"html";
w.get=true;
if(!w.no_events){u.onBeforeGetContent.dispatch(u,w);
}if(w.format!="raw"&&u.settings.cleanup){w.getInner=true;
v=u.serializer.serialize(u.getBody(),w);
}else{v=u.getBody().innerHTML;
}v=v.replace(/^\s*|\s*$/g,"");
w={content:v,format:w.format,no_events:w.no_events,save:w.save};
u.onGetContent.dispatch(u,w);
return w.content;
},isDirty:function(){var u=this;
return tinymce.trim(u.startContent)!=tinymce.trim(u.getContent({format:"raw",no_events:1}))&&!u.isNotDirty;
},getContainer:function(){var u=this;
if(!u.container){u.container=q.get(u.editorContainer||u.id+"_parent");
}return u.container;
},getContentAreaContainer:function(){return this.contentAreaContainer;
},getElement:function(){return q.get(this.settings.content_element||this.id);
},getWin:function(){var u=this,v;
if(!u.contentWindow){v=q.get(u.id+"_ifr");
if(v){u.contentWindow=v.contentWindow;
}}return u.contentWindow;
},getDoc:function(){var v=this,u;
if(!v.contentDocument){u=v.getWin();
if(u){v.contentDocument=u.document;
}}return v.contentDocument;
},getBody:function(){return this.bodyElement||this.getDoc().body;
},convertURL:function(v,z,y){var w=this,x=w.settings;
if(x.urlconverter_callback){return w.execCallback("urlconverter_callback",v,y,true,z);
}if(!x.convert_urls||(y&&y.nodeName=="LINK")||v.indexOf("file:")===0){return v;
}if(x.relative_urls){return w.documentBaseURI.toRelative(v);
}v=w.documentBaseURI.toAbsolute(v,x.remove_script_host);
return v;
},addVisual:function(w){var u=this,v=u.settings;
w=w||u.getBody();
if(!f(u.hasVisual)){u.hasVisual=v.visual;
}m(u.dom.select("table,a",w),function(x){var t;
switch(x.nodeName){case"TABLE":t=u.dom.getAttrib(x,"border");
if(!t||t=="0"){if(u.hasVisual){u.dom.addClass(x,v.visual_table_class);
}else{u.dom.removeClass(x,v.visual_table_class);
}}return;
case"A":t=u.dom.getAttrib(x,"name");
if(t){if(u.hasVisual){u.dom.addClass(x,"mceItemAnchor");
}else{u.dom.removeClass(x,"mceItemAnchor");
}}return;
}});
u.onVisualAid.dispatch(u,w,u.hasVisual);
},remove:function(){var u=this,v=u.getContainer();
u.removed=1;
u.hide();
u.execCallback("remove_instance_callback",u);
u.onRemove.dispatch(u);
u.onExecCommand.listeners=[];
l.remove(u);
q.remove(v);
},destroy:function(v){var u=this;
if(u.destroyed){return;
}if(!v){tinymce.removeUnload(u.destroy);
tinyMCE.onBeforeUnload.remove(u._beforeUnload);
if(u.theme.destroy){u.theme.destroy();
}u.controlManager.destroy();
u.selection.destroy();
u.dom.destroy();
if(!u.settings.content_editable){n.clear(u.getWin());
n.clear(u.getDoc());
}n.clear(u.getBody());
n.clear(u.formElement);
}if(u.formElement){u.formElement.submit=u.formElement._mceOldSubmit;
u.formElement._mceOldSubmit=null;
}u.contentAreaContainer=u.formElement=u.container=u.settings.content_element=u.bodyElement=u.contentDocument=u.contentWindow=null;
if(u.selection){u.selection=u.selection.win=u.selection.dom=u.selection.dom.doc=null;
}u.destroyed=1;
},_addEvents:function(){var B=this,v,C=B.settings,y={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};
function u(E,F){var t=E.type;
if(B.removed){return;
}if(B.onEvent.dispatch(B,E,F)!==false){B[y[E.fakeType||E.type]].dispatch(B,E,F);
}}m(y,function(E,t){switch(t){case"contextmenu":if(tinymce.isOpera){n.add(B.getDoc(),"mousedown",function(F){if(F.ctrlKey){F.fakeType="contextmenu";
u(F);
}});
}else{n.add(B.getDoc(),t,u);
}break;
case"paste":n.add(B.getBody(),t,function(J){var F,H,G,I;
if(J.clipboardData){F=J.clipboardData.getData("text/plain");
}else{if(tinymce.isIE){F=B.getWin().clipboardData.getData("Text");
}}u(J,{text:F,html:H});
});
break;
case"submit":case"reset":n.add(B.getElement().form||q.getParent(B.id,"form"),t,u);
break;
default:n.add(C.content_editable?B.getBody():B.getDoc(),t,u);
}});
n.add(C.content_editable?B.getBody():(b?B.getDoc():B.getWin()),"focus",function(t){B.focus(true);
});
if(tinymce.isGecko){n.add(B.getDoc(),"DOMNodeInserted",function(E){var t;
E=E.target;
if(E.nodeType===1&&E.nodeName==="IMG"&&(t=E.getAttribute("mce_src"))){E.src=B.documentBaseURI.toAbsolute(t);
}});
}if(b){function w(){var F=this,H=F.getDoc(),G=F.settings;
if(b){if(F._isHidden()){try{if(!G.content_editable){H.designMode="On";
}}catch(E){}}try{H.execCommand("styleWithCSS",0,false);
}catch(E){if(!F._isHidden()){H.execCommand("useCSS",0,true);
}}if(!G.table_inline_editing){try{H.execCommand("enableInlineTableEditing",false,false);
}catch(E){}}if(!G.object_resizing){try{H.execCommand("enableObjectResizing",false,false);
}catch(E){}}}}B.onBeforeExecCommand.add(w);
B.onMouseDown.add(w);
}B.onMouseUp.add(B.nodeChanged);
B.onClick.add(B.nodeChanged);
B.onKeyUp.add(function(t,E){if((E.keyCode>=33&&E.keyCode<=36)||(E.keyCode>=37&&E.keyCode<=40)||E.keyCode==13||E.keyCode==45||E.keyCode==46||E.keyCode==8||E.ctrlKey){B.nodeChanged();
}});
B.onReset.add(function(){B.setContent(B.startContent,{format:"raw"});
});
if(B.getParam("tab_focus")){function D(t,E){if(E.keyCode===9){return n.cancel(E);
}}function z(F,J){var t,G,I,H,E;
function K(L){I=q.getParent(F.id,"form");
H=I.elements;
if(I){m(H,function(N,M){if(N.id==F.id){t=M;
return false;
}});
if(L>0){for(G=t+1;
G<H.length;
G++){if(H[G].type!="hidden"){return H[G];
}}}else{for(G=t-1;
G>=0;
G--){if(H[G].type!="hidden"){return H[G];
}}}}return null;
}if(J.keyCode===9){E=i(F.getParam("tab_focus"));
if(E.length==1){E[1]=E[0];
E[0]=":prev";
}if(J.shiftKey){if(E[0]==":prev"){H=K(-1);
}else{H=q.get(E[0]);
}}else{if(E[1]==":next"){H=K(1);
}else{H=q.get(E[1]);
}}if(H){if(F=l.get(H.id||H.name)){F.focus();
}else{window.setTimeout(function(){window.focus();
H.focus();
},10);
}return n.cancel(J);
}}}B.onKeyUp.add(D);
if(b){B.onKeyPress.add(z);
B.onKeyDown.add(D);
}else{B.onKeyDown.add(z);
}}if(C.custom_shortcuts){if(C.custom_undo_redo_keyboard_shortcuts){B.addShortcut("ctrl+z",B.getLang("undo_desc"),"Undo");
B.addShortcut("ctrl+y",B.getLang("redo_desc"),"Redo");
}if(b){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(v=1;
v<=6;
v++){B.addShortcut("ctrl+"+v,"",["FormatBlock",false,"<h"+v+">"]);
}B.addShortcut("ctrl+7","",["FormatBlock",false,"<p>"]);
B.addShortcut("ctrl+8","",["FormatBlock",false,"<div>"]);
B.addShortcut("ctrl+9","",["FormatBlock",false,"<address>"]);
function x(E){var t=null;
if(!E.altKey&&!E.ctrlKey&&!E.metaKey){return t;
}m(B.shortcuts,function(F){if(F.ctrl!=E.ctrlKey&&(!tinymce.isMac||F.ctrl==E.metaKey)){return;
}if(F.alt!=E.altKey){return;
}if(F.shift!=E.shiftKey){return;
}if(E.keyCode==F.keyCode||(E.charCode&&E.charCode==F.charCode)){t=F;
return false;
}});
return t;
}B.onKeyUp.add(function(t,E){var F=x(E);
if(F){return n.cancel(E);
}});
B.onKeyPress.add(function(t,E){var F=x(E);
if(F){return n.cancel(E);
}});
B.onKeyDown.add(function(t,E){var F=x(E);
if(F){F.func.call(F.scope);
return n.cancel(E);
}});
}if(tinymce.isIE){n.add(B.getDoc(),"controlselect",function(F){var E=B.resizeInfo,t;
F=F.target;
if(F.nodeName!=="IMG"){return;
}if(E){n.remove(E.node,E.ev,E.cb);
}if(!B.dom.hasClass(F,"mceItemNoResize")){ev="resizeend";
t=n.add(F,ev,function(H){var G;
H=H.target;
if(G=B.dom.getStyle(H,"width")){B.dom.setAttrib(H,"width",G.replace(/[^0-9%]+/g,""));
B.dom.setStyle(H,"width","");
}if(G=B.dom.getStyle(H,"height")){B.dom.setAttrib(H,"height",G.replace(/[^0-9%]+/g,""));
B.dom.setStyle(H,"height","");
}});
}else{ev="resizestart";
t=n.add(F,"resizestart",n.cancel,n);
}E=B.resizeInfo={node:F,ev:ev,cb:t};
});
B.onKeyDown.add(function(t,E){switch(E.keyCode){case 8:if(B.selection.getRng().item){B.selection.getRng().item(0).removeNode();
return n.cancel(E);
}}});
}if(tinymce.isOpera){B.onClick.add(function(t,E){n.prevent(E);
});
}if(C.custom_undo_redo){function A(){B.undoManager.typing=0;
B.undoManager.add();
}if(tinymce.isIE){n.add(B.getWin(),"blur",function(t){var E;
if(B.selection){E=B.selection.getNode();
if(!B.removed&&E.ownerDocument&&E.ownerDocument!=B.getDoc()){A();
}}});
}else{n.add(B.getDoc(),"blur",function(){if(B.selection&&!B.removed){A();
}});
}B.onMouseDown.add(A);
B.onKeyUp.add(function(t,E){if((E.keyCode>=33&&E.keyCode<=36)||(E.keyCode>=37&&E.keyCode<=40)||E.keyCode==13||E.keyCode==45||E.ctrlKey){B.undoManager.typing=0;
B.undoManager.add();
}});
B.onKeyDown.add(function(t,E){if((E.keyCode>=33&&E.keyCode<=36)||(E.keyCode>=37&&E.keyCode<=40)||E.keyCode==13||E.keyCode==45){if(B.undoManager.typing){B.undoManager.add();
B.undoManager.typing=0;
}return;
}if(!B.undoManager.typing){B.undoManager.add();
B.undoManager.typing=1;
}});
}},_convertInlineElements:function(){var B=this,D=B.settings,w=B.dom,A,y,x,C,u;
function z(t,v){if(!D.inline_styles){return;
}if(v.get){m(B.dom.select("table,u,strike",v.node),function(E){switch(E.nodeName){case"TABLE":if(A=w.getAttrib(E,"height")){w.setStyle(E,"height",A);
w.setAttrib(E,"height","");
}break;
case"U":case"STRIKE":E.style.textDecoration=E.nodeName=="U"?"underline":"line-through";
w.setAttrib(E,"mce_style","");
w.setAttrib(E,"mce_name","span");
break;
}});
}else{if(v.set){m(B.dom.select("table,span",v.node).reverse(),function(E){if(E.nodeName=="TABLE"){if(A=w.getStyle(E,"height")){w.setAttrib(E,"height",A.replace(/[^0-9%]+/g,""));
}}else{if(E.style.textDecoration=="underline"){x="u";
}else{if(E.style.textDecoration=="line-through"){x="strike";
}else{x="";
}}if(x){E.style.textDecoration="";
w.setAttrib(E,"mce_style","");
y=w.create(x,{style:w.getAttrib(E,"style")});
w.replace(y,E,1);
}}});
}}}B.onPreProcess.add(z);
if(!D.cleanup_on_startup){B.onSetContent.add(function(t,v){if(v.initial){z(B,{node:B.getBody(),set:1});
}});
}},_convertFonts:function(){var z=this,A=z.settings,B=z.dom,y,v,u,x;
if(!A.inline_styles){return;
}y=[8,10,12,14,18,24,36];
v=["xx-small","x-small","small","medium","large","x-large","xx-large"];
if(u=A.font_size_style_values){u=i(u);
}if(x=A.font_size_classes){x=i(x);
}function w(H){var I,G,C,t,F,D,E;
if(tinymce.isWebKit||!A.inline_styles){return;
}C=z.dom.select("span",H);
for(t=C.length-1;
t>=0;
t--){I=C[t];
G=B.create("font",{color:B.toHex(B.getStyle(I,"color")),face:B.getStyle(I,"fontFamily"),style:B.getAttrib(I,"style"),"class":B.getAttrib(I,"class")});
E=G.style;
if(E.color||E.fontFamily){E.color=E.fontFamily="";
B.setAttrib(G,"mce_style","");
}if(u){F=s(u,B.getStyle(I,"fontSize"));
if(F!=-1){B.setAttrib(G,"size",""+(F+1||1));
G.style.fontSize="";
}}else{if(x){F=s(x,B.getAttrib(I,"class"));
D=B.getStyle(I,"fontSize");
if(F==-1&&D.indexOf("pt")>0){F=s(y,parseInt(D));
}if(F==-1){F=s(v,D);
}if(F!=-1){B.setAttrib(G,"size",""+(F+1||1));
G.style.fontSize="";
}}}if(G.color||G.face||G.size){G.style.fontFamily="";
B.setAttrib(G,"mce_style","");
B.replace(G,I,1);
}G=I=null;
}}z.onSetContent.add(function(t,C){w(t.getBody());
});
z.onPreProcess.add(function(D,F){var G,E,C,t;
if(!A.inline_styles){return;
}if(F.get){C=z.dom.select("font",F.node);
for(t=C.length-1;
t>=0;
t--){G=C[t];
E=B.create("span",{style:B.getAttrib(G,"style"),"class":B.getAttrib(G,"class")});
B.setStyles(E,{fontFamily:B.getAttrib(G,"face"),color:B.getAttrib(G,"color"),backgroundColor:G.style.backgroundColor});
if(G.size){if(u){B.setStyle(E,"fontSize",u[parseInt(G.size)-1]);
}else{B.setAttrib(E,"class",x[parseInt(G.size)-1]);
}}B.setAttrib(E,"mce_style","");
B.replace(E,G,1);
}}});
},_isHidden:function(){var t;
if(!b){return 0;
}t=this.selection.getSel();
return(!t||!t.rangeCount||t.rangeCount==0);
},_fixNesting:function(u){var v=[],t;
u=u.replace(/<(\/)?([^\s>]+)[^>]*?>/g,function(x,w,z){var y;
if(w==="/"){if(!v.length){return"";
}if(z!==v[v.length-1].tag){for(t=v.length-1;
t>=0;
t--){if(v[t].tag===z){v[t].close=1;
break;
}}return"";
}else{v.pop();
if(v.length&&v[v.length-1].close){x=x+"</"+v[v.length-1].tag+">";
v.pop();
}}}else{if(/^(br|hr|input|meta|img|link|param)$/i.test(z)){return x;
}if(/\/>$/.test(x)){return x;
}v.push({tag:z});
}return x;
});
for(t=v.length-1;
t>=0;
t--){u+="</"+v[t].tag+">";
}return u;
}});
})();
(function(){var g=tinymce.each,d=tinymce.isIE,b=tinymce.isGecko,c=tinymce.isOpera,f=tinymce.isWebKit;
tinymce.create("tinymce.EditorCommands",{EditorCommands:function(h){this.editor=h;
},execCommand:function(n,m,o){var j=this,h=j.editor,l;
switch(n){case"Cut":case"Copy":case"Paste":try{h.getDoc().execCommand(n,m,o);
}catch(i){if(b){h.windowManager.confirm(h.getLang("clipboard_msg"),function(p){if(p){window.open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","mceExternal");
}});
}else{h.windowManager.alert(h.getLang("clipboard_no_support"));
}}return true;
case"mceResetDesignMode":case"mceBeginUndoLevel":return true;
case"unlink":j.UnLink();
return true;
case"JustifyLeft":case"JustifyCenter":case"JustifyRight":case"JustifyFull":j.mceJustify(n,n.substring(7).toLowerCase());
return true;
case"mceEndUndoLevel":case"mceAddUndoLevel":h.undoManager.add();
return true;
default:l=this[n];
if(l){l.call(this,m,o);
return true;
}}return false;
},Indent:function(){var h=this.editor,n=h.dom,l=h.selection,m,i,j;
i=h.settings.indentation;
j=/[a-z%]+$/i.exec(i);
i=parseInt(i);
if(h.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){g(this._getSelectedBlocks(),function(o){n.setStyle(o,"paddingLeft",(parseInt(o.style.paddingLeft||0)+i)+j);
});
return;
}h.getDoc().execCommand("Indent",false,null);
if(d){n.getParent(l.getNode(),function(o){if(o.nodeName=="BLOCKQUOTE"){o.dir=o.style.cssText="";
}});
}},Outdent:function(){var i=this.editor,o=i.dom,m=i.selection,n,h,j,l;
j=i.settings.indentation;
l=/[a-z%]+$/i.exec(j);
j=parseInt(j);
if(i.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){g(this._getSelectedBlocks(),function(p){h=Math.max(0,parseInt(p.style.paddingLeft||0)-j);
o.setStyle(p,"paddingLeft",h?h+l:"");
});
return;
}i.getDoc().execCommand("Outdent",false,null);
},mceSetAttribute:function(j,i){var h=this.editor,m=h.dom,l;
if(l=m.getParent(h.selection.getNode(),m.isBlock)){m.setAttrib(l,i.name,i.value);
}},mceSetContent:function(i,h){this.editor.setContent(h);
},mceToggleVisualAid:function(){var h=this.editor;
h.hasVisual=!h.hasVisual;
h.addVisual();
},mceReplaceContent:function(i,h){var j=this.editor.selection;
j.setContent(h.replace(/\{\$selection\}/g,j.getContent({format:"text"})));
},mceInsertLink:function(j,i){var h=this.editor,l=h.selection,m=h.dom.getParent(l.getNode(),"A");
if(tinymce.is(i,"string")){i={href:i};
}function n(o){g(i,function(q,p){h.dom.setAttrib(o,p,q);
});
}if(!m){h.execCommand("CreateLink",false,"javascript:mctmp(0);");
g(h.dom.select("a"),function(o){if(o.href=="javascript:mctmp(0);"){n(o);
}});
}else{if(i.href){n(m);
}else{h.dom.remove(m,1);
}}},UnLink:function(){var h=this.editor,i=h.selection;
if(i.isCollapsed()){i.select(i.getNode());
}h.getDoc().execCommand("unlink",false,null);
i.collapse(0);
},FontName:function(j,i){var l=this,h=l.editor,m=h.selection,n;
if(!i){if(m.isCollapsed()){m.select(m.getNode());
}l.RemoveFormat();
}else{h.getDoc().execCommand("FontName",false,i);
}},queryCommandValue:function(i){var h=this["queryValue"+i];
if(h){return h.call(this,i);
}return false;
},queryCommandState:function(i){var h;
switch(i){case"JustifyLeft":case"JustifyCenter":case"JustifyRight":case"JustifyFull":return this.queryStateJustify(i,i.substring(7).toLowerCase());
default:if(h=this["queryState"+i]){return h.call(this,i);
}}return -1;
},_queryState:function(i){try{return this.editor.getDoc().queryCommandState(i);
}catch(h){}},_queryVal:function(i){try{return this.editor.getDoc().queryCommandValue(i);
}catch(h){}},queryValueFontSize:function(){var i=this.editor,h=0,j;
if(c||f){if(j=i.dom.getParent(i.selection.getNode(),"FONT")){h=j.size;
}return h;
}return this._queryVal("FontSize");
},queryValueFontName:function(){var i=this.editor,h=0,j;
if(j=i.dom.getParent(i.selection.getNode(),"FONT")){h=j.face;
}if(!h){h=this._queryVal("FontName");
}return h;
},mceJustify:function(q,s){var m=this.editor,p=m.selection,h=p.getNode(),t=h.nodeName,i,l,j=m.dom,o;
if(m.settings.inline_styles&&this.queryStateJustify(q,s)){o=1;
}i=j.getParent(h,m.dom.isBlock);
if(t=="IMG"){if(s=="full"){return;
}if(o){if(s=="center"){j.setStyle(h.parentNode,"textAlign","");
}j.setStyle(h,"float","");
this.mceRepaint();
return;
}if(s=="center"){if(/^(TD|TH)$/.test(i.nodeName)){i=0;
}if(!i||i.childNodes.length>1){l=j.create("p");
l.appendChild(h.cloneNode(false));
if(i){j.insertAfter(l,i);
}else{j.insertAfter(l,h);
}j.remove(h);
h=l.firstChild;
i=l;
}j.setStyle(i,"textAlign",s);
j.setStyle(h,"float","");
}else{j.setStyle(h,"float",s);
j.setStyle(h.parentNode,"textAlign","");
}this.mceRepaint();
return;
}if(m.settings.inline_styles&&m.settings.forced_root_block){if(o){s="";
}g(this._getSelectedBlocks(j.getParent(p.getStart(),j.isBlock),j.getParent(p.getEnd(),j.isBlock)),function(n){j.setAttrib(n,"align","");
j.setStyle(n,"textAlign",s=="full"?"justify":s);
});
return;
}else{if(!o){m.getDoc().execCommand(q,false,null);
}}if(m.settings.inline_styles){if(o){j.getParent(m.selection.getNode(),function(u){if(u.style&&u.style.textAlign){j.setStyle(u,"textAlign","");
}});
return;
}g(j.select("*"),function(w){var u=w.align;
if(u){if(u=="full"){u="justify";
}j.setStyle(w,"textAlign",u);
j.setAttrib(w,"align","");
}});
}},mceSetCSSClass:function(i,h){this.mceSetStyleInfo(0,{command:"setattrib",name:"class",value:h});
},getSelectedElement:function(){var y=this,q=y.editor,p=q.dom,v=q.selection,i=v.getRng(),n,m,w,s,l,h,u,j,z,x;
if(v.isCollapsed()||i.item){return v.getNode();
}x=q.settings.merge_styles_invalid_parents;
if(tinymce.is(x,"string")){x=new RegExp(x,"i");
}if(d){n=i.duplicate();
n.collapse(true);
w=n.parentElement();
m=i.duplicate();
m.collapse(false);
s=m.parentElement();
if(w!=s){n.move("character",1);
w=n.parentElement();
}if(w==s){n=i.duplicate();
n.moveToElementText(w);
if(n.compareEndPoints("StartToStart",i)==0&&n.compareEndPoints("EndToEnd",i)==0){return x&&x.test(w.nodeName)?null:w;
}}}else{function o(t){return p.getParent(t,function(A){return A.nodeType==1;
});
}w=i.startContainer;
s=i.endContainer;
l=i.startOffset;
h=i.endOffset;
if(!i.collapsed){if(w==s){if(l-h<2){if(w.hasChildNodes()){j=w.childNodes[l];
return x&&x.test(j.nodeName)?null:j;
}}}}if(w.nodeType!=3||s.nodeType!=3){return null;
}if(l==0){j=o(w);
if(j&&j.firstChild!=w){j=null;
}}if(l==w.nodeValue.length){u=w.nextSibling;
if(u&&u.nodeType==1){j=w.nextSibling;
}}if(h==0){u=s.previousSibling;
if(u&&u.nodeType==1){z=u;
}}if(h==s.nodeValue.length){z=o(s);
if(z&&z.lastChild!=s){z=null;
}}if(j==z){return x&&j&&x.test(j.nodeName)?null:j;
}}return null;
},InsertHorizontalRule:function(){if(b||d){this.editor.selection.setContent("<hr />");
}else{this.editor.getDoc().execCommand("InsertHorizontalRule",false,"");
}},RemoveFormat:function(){var j=this,i=j.editor,l=i.selection,h;
if(f){l.setContent(l.getContent({format:"raw"}).replace(/(<(span|b|i|strong|em|strike) [^>]+>|<(span|b|i|strong|em|strike)>|<\/(span|b|i|strong|em|strike)>|)/g,""),{format:"raw"});
}else{i.getDoc().execCommand("RemoveFormat",false,null);
}j.mceSetStyleInfo(0,{command:"removeformat"});
i.addVisual();
},mceSetStyleInfo:function(p,o){var x=this,i=x.editor,l=i.getDoc(),h=i.dom,j,m,y=i.selection,w=o.wrapper||"span",m=y.getBookmark(),q;
function n(t,s){if(t.nodeType==1){switch(o.command){case"setattrib":return h.setAttrib(t,o.name,o.value);
case"setstyle":return h.setStyle(t,o.name,o.value);
case"removeformat":return h.setAttrib(t,"class","");
}}}q=i.settings.merge_styles_invalid_parents;
if(tinymce.is(q,"string")){q=new RegExp(q,"i");
}if(j=x.getSelectedElement()){n(j,1);
}else{l.execCommand("FontName",false,"__");
g(f?h.select("span"):h.select("font"),function(u){var s,t;
if(h.getAttrib(u,"face")=="__"||u.style.fontFamily==="__"){s=h.create(w,{mce_new:"1"});
n(s);
g(u.childNodes,function(v){s.appendChild(v.cloneNode(true));
});
h.replace(s,u);
}});
}g(h.select(w).reverse(),function(t){var s=t.parentNode;
if(!h.getAttrib(t,"mce_new")){s=h.getParent(t,function(u){return u.nodeType==1&&h.getAttrib(u,"mce_new");
});
if(s){h.remove(t,1);
}}});
g(h.select(w).reverse(),function(t){var s=t.parentNode;
if(!s||!h.getAttrib(t,"mce_new")){return;
}if(s.nodeName==w.toUpperCase()&&s.childNodes.length==1){return h.remove(s,1);
}if(t.nodeType==1&&(!q||!q.test(s.nodeName))&&s.childNodes.length==1){n(s);
h.setAttrib(t,"class","");
}});
g(h.select(w).reverse(),function(s){if(h.getAttrib(s,"mce_new")||(h.getAttribs(s).length<=1&&s.className==="")){if(!h.getAttrib(s,"class")&&!h.getAttrib(s,"style")){return h.remove(s,1);
}h.setAttrib(s,"mce_new","");
}});
y.moveToBookmark(m);
},queryStateJustify:function(m,i){var h=this.editor,l=h.selection.getNode(),j=h.dom;
if(l&&l.nodeName=="IMG"){if(j.getStyle(l,"float")==i){return 1;
}return l.parentNode.style.textAlign==i;
}l=j.getParent(h.selection.getStart(),function(o){return o.nodeType==1&&o.style.textAlign;
});
if(i=="full"){i="justify";
}if(h.settings.inline_styles){return(l&&l.style.textAlign==i);
}return this._queryState(m);
},HiliteColor:function(j,m){var i=this,h=i.editor,l=h.getDoc();
function n(p){if(!b){return;
}try{l.execCommand("styleWithCSS",0,p);
}catch(o){l.execCommand("useCSS",0,!p);
}}if(b||c){n(true);
l.execCommand("hilitecolor",false,m);
n(false);
}else{l.execCommand("BackColor",false,m);
}},Undo:function(){var h=this.editor;
if(h.settings.custom_undo_redo){h.undoManager.undo();
h.nodeChanged();
}else{h.getDoc().execCommand("Undo",false,null);
}},Redo:function(){var h=this.editor;
if(h.settings.custom_undo_redo){h.undoManager.redo();
h.nodeChanged();
}else{h.getDoc().execCommand("Redo",false,null);
}},FormatBlock:function(j,l){var i=this,h=i.editor;
l=h.settings.forced_root_block?(l||"<p>"):l;
if(/^(P|DIV|H[1-6]|ADDRESS|BLOCKQUOTE|PRE)$/.test(h.selection.getNode().nodeName)){i.mceRemoveNode();
}if(l.indexOf("<")==-1){l="<"+l+">";
}if(tinymce.isGecko){l=l.replace(/<(div|blockquote|code|dt|dd|dl|samp)>/gi,"$1");
}h.getDoc().execCommand("FormatBlock",false,l);
},mceCleanup:function(){var i=this.editor,j=i.selection,h=j.getBookmark();
i.setContent(i.getContent());
j.moveToBookmark(h);
},mceRemoveNode:function(l,m){var i=this.editor,j=i.selection,h,o=m||j.getNode();
if(o==i.getBody()){return;
}h=j.getBookmark();
i.dom.remove(o,1);
j.moveToBookmark(h);
i.nodeChanged();
},mceSelectNodeDepth:function(j,l){var h=this.editor,i=h.selection,m=0;
h.dom.getParent(i.getNode(),function(o){if(o.nodeType==1&&m++==l){i.select(o);
h.nodeChanged();
return false;
}},h.getBody());
},mceSelectNode:function(i,h){this.editor.selection.select(h);
},mceInsertContent:function(h,i){this.editor.selection.setContent(i);
},mceInsertRawHTML:function(i,j){var h=this.editor;
h.selection.setContent("tiny_mce_marker");
h.setContent(h.getContent().replace(/tiny_mce_marker/g,j));
},mceRepaint:function(){var j,h,l=this.editor;
if(tinymce.isGecko){try{j=l.selection;
h=j.getBookmark(true);
if(j.getSel()){j.getSel().selectAllChildren(l.getBody());
}j.collapse(true);
j.moveToBookmark(h);
}catch(i){}}},queryStateUnderline:function(){var h=this.editor,i=h.selection.getNode();
if(i&&i.nodeName=="A"){return false;
}return this._queryState("Underline");
},queryStateOutdent:function(){var h=this.editor,i;
if(h.settings.inline_styles){if((i=h.dom.getParent(h.selection.getStart(),h.dom.isBlock))&&parseInt(i.style.paddingLeft)>0){return true;
}if((i=h.dom.getParent(h.selection.getEnd(),h.dom.isBlock))&&parseInt(i.style.paddingLeft)>0){return true;
}}else{return !!h.dom.getParent(h.selection.getNode(),"BLOCKQUOTE");
}return this.queryStateInsertUnorderedList()||this.queryStateInsertOrderedList();
},queryStateInsertUnorderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),"UL");
},queryStateInsertOrderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),"OL");
},queryStatemceBlockQuote:function(){return !!this.editor.dom.getParent(this.editor.selection.getStart(),function(h){return h.nodeName==="BLOCKQUOTE";
});
},mceBlockQuote:function(){var y=this,u=y.editor,A=u.selection,o=u.dom,w,v,m,l,z,j,x,q,h;
function p(i){return o.getParent(i,function(s){return s.nodeName==="BLOCKQUOTE";
});
}w=o.getParent(A.getStart(),o.isBlock);
v=o.getParent(A.getEnd(),o.isBlock);
if(z=p(w)){if(w!=v||w.childNodes.length>1||(w.childNodes.length==1&&w.firstChild.nodeName!="BR")){l=A.getBookmark();
}if(p(v)){x=z.cloneNode(false);
while(m=v.nextSibling){x.appendChild(m.parentNode.removeChild(m));
}}if(x){o.insertAfter(x,z);
}h=y._getSelectedBlocks(w,v);
for(q=h.length-1;
q>=0;
q--){o.insertAfter(h[q],z);
}if(/^\s*$/.test(z.innerHTML)){o.remove(z,1);
}if(x&&/^\s*$/.test(x.innerHTML)){o.remove(x,1);
}if(!l){if(!d){j=u.getDoc().createRange();
j.setStart(w,0);
j.setEnd(w,0);
A.setRng(j);
}else{A.select(w);
A.collapse(0);
if(o.getParent(A.getStart(),o.isBlock)!=w){j=A.getRng();
j.move("character",-1);
j.select();
}}}else{y.editor.selection.moveToBookmark(l);
}return;
}if(d&&!w&&!v){y.editor.getDoc().execCommand("Indent");
m=p(A.getNode());
m.style.margin=m.dir="";
return;
}if(!w||!v){return;
}if(w!=v||w.childNodes.length>1||(w.childNodes.length==1&&w.firstChild.nodeName!="BR")){l=A.getBookmark();
}g(y._getSelectedBlocks(p(A.getStart()),p(A.getEnd())),function(i){if(i.nodeName=="BLOCKQUOTE"&&!z){z=i;
return;
}if(!z){z=o.create("blockquote");
i.parentNode.insertBefore(z,i);
}if(i.nodeName=="BLOCKQUOTE"&&z){m=i.firstChild;
while(m){z.appendChild(m.cloneNode(true));
m=m.nextSibling;
}o.remove(i);
return;
}z.appendChild(o.remove(i));
});
if(!l){if(!d){j=u.getDoc().createRange();
j.setStart(w,0);
j.setEnd(w,0);
A.setRng(j);
}else{A.select(w);
A.collapse(1);
}}else{A.moveToBookmark(l);
}},_getSelectedBlocks:function(q,h){var m=this.editor,l=m.dom,t=m.selection,p,o,j,i=[];
p=l.getParent(q||t.getStart(),l.isBlock);
o=l.getParent(h||t.getEnd(),l.isBlock);
if(p){i.push(p);
}if(p&&o&&p!=o){j=p;
while((j=j.nextSibling)&&j!=o){if(l.isBlock(j)){i.push(j);
}}}if(o&&p!=o){i.push(o);
}return i;
}});
})();
tinymce.create("tinymce.UndoManager",{index:0,data:null,typing:0,UndoManager:function(c){var d=this,b=tinymce.util.Dispatcher;
d.editor=c;
d.data=[];
d.onAdd=new b(this);
d.onUndo=new b(this);
d.onRedo=new b(this);
},add:function(d){var h=this,g,f=h.editor,c,j=f.settings,m;
d=d||{};
d.content=d.content||f.getContent({format:"raw",no_events:1});
d.content=d.content.replace(/^\s*|\s*$/g,"");
m=h.data[h.index>0?h.index-1:0];
if(!d.initial&&m&&d.content==m.content){return null;
}if(j.custom_undo_redo_levels){if(h.data.length>j.custom_undo_redo_levels){for(g=0;
g<h.data.length-1;
g++){h.data[g]=h.data[g+1];
}h.data.length--;
h.index=h.data.length;
}}if(j.custom_undo_redo_restore_selection&&!d.initial){d.bookmark=c=d.bookmark||f.selection.getBookmark();
}if(h.index<h.data.length&&h.data[h.index].initial){h.index++;
}if(h.data.length===0&&!d.initial){return null;
}h.data.length=h.index+1;
h.data[h.index++]=d;
if(d.initial){h.index=0;
}if(h.data.length==2&&h.data[0].initial){h.data[0].bookmark=c;
}h.onAdd.dispatch(h,d);
f.isNotDirty=0;
return d;
},undo:function(){var f=this,c=f.editor,b=b,d;
if(f.typing){f.add();
f.typing=0;
}if(f.index>0){if(f.index==f.data.length&&f.index>1){d=f.index;
f.typing=0;
if(!f.add()){f.index=d;
}--f.index;
}b=f.data[--f.index];
c.setContent(b.content,{format:"raw"});
c.selection.moveToBookmark(b.bookmark);
f.onUndo.dispatch(f,b);
}return b;
},redo:function(){var d=this,c=d.editor,b=null;
if(d.index<d.data.length-1){b=d.data[++d.index];
c.setContent(b.content,{format:"raw"});
c.selection.moveToBookmark(b.bookmark);
d.onRedo.dispatch(d,b);
}return b;
},clear:function(){var b=this;
b.data=[];
b.index=0;
b.typing=0;
b.add({initial:true});
},hasUndo:function(){return this.index!=0||this.typing;
},hasRedo:function(){return this.index<this.data.length-1;
}});
(function(){var c,f,b,d,g,h;
c=tinymce.dom.Event;
f=tinymce.isIE;
b=tinymce.isGecko;
d=tinymce.isOpera;
g=tinymce.each;
h=tinymce.extend;
tinymce.create("tinymce.ForceBlocks",{ForceBlocks:function(j){var l=this,m=j.settings,n;
l.editor=j;
l.dom=j.dom;
n=(m.forced_root_block||"p").toLowerCase();
m.element=n.toUpperCase();
j.onPreInit.add(l.setup,l);
l.reOpera=new RegExp("(\\u00a0|&#160;|&nbsp;)</"+n+">","gi");
l.rePadd=new RegExp("<p( )([^>]+)><\\/p>|<p( )([^>]+)\\/>|<p( )([^>]+)>\\s+<\\/p>|<p><\\/p>|<p\\/>|<p>\\s+<\\/p>".replace(/p/g,n),"gi");
l.reNbsp2BR1=new RegExp("<p( )([^>]+)>[\\s\\u00a0]+<\\/p>|<p>[\\s\\u00a0]+<\\/p>".replace(/p/g,n),"gi");
l.reNbsp2BR2=new RegExp("<p( )([^>]+)>(&nbsp;|&#160;)<\\/p>|<p>(&nbsp;|&#160;)<\\/p>".replace(/p/g,n),"gi");
l.reBR2Nbsp=new RegExp("<p( )([^>]+)>\\s*<br \\/>\\s*<\\/p>|<p>\\s*<br \\/>\\s*<\\/p>".replace(/p/g,n),"gi");
l.reTrailBr=new RegExp("\\s*<br \\/>\\s*<\\/p>".replace(/p/g,n),"gi");
function i(p,q){if(d){q.content=q.content.replace(l.reOpera,"</"+n+">");
}q.content=q.content.replace(l.rePadd,"<"+n+"$1$2$3$4$5$6>\u00a0</"+n+">");
if(!f&&!d&&q.set){q.content=q.content.replace(l.reNbsp2BR1,"<"+n+"$1$2><br /></"+n+">");
q.content=q.content.replace(l.reNbsp2BR2,"<"+n+"$1$2><br /></"+n+">");
}else{q.content=q.content.replace(l.reBR2Nbsp,"<"+n+"$1$2>\u00a0</"+n+">");
q.content=q.content.replace(l.reTrailBr,"</"+n+">");
}}j.onBeforeSetContent.add(i);
j.onPostProcess.add(i);
if(m.forced_root_block){j.onInit.add(l.forceRoots,l);
j.onSetContent.add(l.forceRoots,l);
j.onBeforeGetContent.add(l.forceRoots,l);
}},setup:function(){var j=this,i=j.editor,l=i.settings;
if(l.forced_root_block){i.onKeyUp.add(j.forceRoots,j);
i.onPreProcess.add(j.forceRoots,j);
}if(l.force_br_newlines){if(f){i.onKeyPress.add(function(o,q){var t,p=o.selection;
if(q.keyCode==13&&p.getNode().nodeName!="LI"){p.setContent('<br id="__" /> ',{format:"raw"});
t=o.dom.get("__");
t.removeAttribute("id");
p.select(t);
p.collapse();
return c.cancel(q);
}});
}return;
}if(!f&&l.force_p_newlines){i.onKeyPress.add(function(n,o){if(o.keyCode==13&&!o.shiftKey){if(!j.insertPara(o)){c.cancel(o);
}}});
if(b){i.onKeyDown.add(function(n,o){if((o.keyCode==8||o.keyCode==46)&&!o.shiftKey){j.backspaceDelete(o,o.keyCode==8);
}});
}}function m(o,n){var p=i.dom.create(n);
g(o.attributes,function(q){if(q.specified&&q.nodeValue){p.setAttribute(q.nodeName.toLowerCase(),q.nodeValue);
}});
g(o.childNodes,function(q){p.appendChild(q.cloneNode(true));
});
o.parentNode.replaceChild(p,o);
return p;
}if(f&&l.element!="P"){i.onKeyPress.add(function(n,o){j.lastElm=n.selection.getNode().nodeName;
});
i.onKeyUp.add(function(p,s){var u,q=p.selection,t=q.getNode(),o=p.getBody();
if(o.childNodes.length===1&&t.nodeName=="P"){t=m(t,l.element);
q.select(t);
q.collapse();
p.nodeChanged();
}else{if(s.keyCode==13&&!s.shiftKey&&j.lastElm!="P"){u=p.dom.getParent(t,"P");
if(u){m(u,l.element);
p.nodeChanged();
}}}});
}},find:function(p,l,m){var j=this.editor,i=j.getDoc().createTreeWalker(p,4,null,false),o=-1;
while(p=i.nextNode()){o++;
if(l==0&&p==m){return o;
}if(l==1&&o==m){return p;
}}return -1;
},forceRoots:function(p,B){var q=this,p=q.editor,F=p.getBody(),C=p.getDoc(),I=p.selection,u=I.getSel(),v=I.getRng(),G=-2,o,z,j,l,D=-16777215;
var E,m,H,y,w,n=F.childNodes,x;
if(B&&B.keyCode==13){return true;
}for(x=n.length-1;
x>=0;
x--){E=n[x];
if(E.parentNode!=F){do{E=E.parentNode;
}while(E&&E.parentNode!=F);
if(!E){continue;
}}if(E.nodeType==3||(!q.dom.isBlock(E)&&E.nodeType!=8)){if(!m){if(E.nodeType!=3||/[^\s]/g.test(E.nodeValue)){if(G==-2&&v){if(!f){z=v.startOffset;
j=v.endOffset;
G=q.find(F,0,v.startContainer);
o=q.find(F,0,v.endContainer);
}else{l=C.body.createTextRange();
l.moveToElementText(F);
l.collapse(1);
H=l.move("character",D)*-1;
l=v.duplicate();
l.collapse(1);
y=l.move("character",D)*-1;
l=v.duplicate();
l.collapse(0);
w=(l.move("character",D)*-1)-y;
G=y-H;
o=w;
}}m=p.dom.create(p.settings.forced_root_block);
m.appendChild(E.cloneNode(1));
E.parentNode.replaceChild(m,E);
}}else{if(m.hasChildNodes()){m.insertBefore(E,m.firstChild);
}else{m.appendChild(E);
}}}else{m=null;
}}if(G!=-2){if(!f){m=C.getElementsByTagName(p.settings.element)[0];
v=C.createRange();
if(G!=-1){v.setStart(q.find(F,1,G),z);
}else{v.setStart(m,0);
}if(o!=-1){v.setEnd(q.find(F,1,o),j);
}else{v.setEnd(m,0);
}if(u){u.removeAllRanges();
u.addRange(v);
}}else{try{v=u.createRange();
v.moveToElementText(F);
v.collapse(1);
v.moveStart("character",G);
v.moveEnd("character",o);
v.select();
}catch(A){}}}},getParentBlock:function(j){var i=this.dom;
return i.getParent(j,i.isBlock);
},insertPara:function(M){var z=this,p=z.editor,I=p.dom,N=p.getDoc(),Q=p.settings,B=p.selection.getSel(),C=B.getRangeAt(0),P=N.body;
var F,G,D,K,J,m,j,o,u,i,w,O,l,q,E,H=I.getViewPort(p.getWin()),v,x;
function A(s){s=s.innerHTML;
s=s.replace(/<(img|hr|table)/gi,"-");
s=s.replace(/<[^>]+>/g,"");
return s.replace(/[ \t\r\n]+/g,"")=="";
}F=N.createRange();
F.setStart(B.anchorNode,B.anchorOffset);
F.collapse(true);
G=N.createRange();
G.setStart(B.focusNode,B.focusOffset);
G.collapse(true);
D=F.compareBoundaryPoints(F.START_TO_END,G)<0;
K=D?B.anchorNode:B.focusNode;
J=D?B.anchorOffset:B.focusOffset;
m=D?B.focusNode:B.anchorNode;
j=D?B.focusOffset:B.anchorOffset;
if(K===m&&/^(TD|TH)$/.test(K.nodeName)){I.remove(K.firstChild);
p.dom.add(K,Q.element,null,"<br />");
O=p.dom.add(K,Q.element,null,"<br />");
C=N.createRange();
C.selectNodeContents(O);
C.collapse(1);
p.selection.setRng(C);
return false;
}if(K==P&&m==P&&P.firstChild&&p.dom.isBlock(P.firstChild)){K=m=K.firstChild;
J=j=0;
F=N.createRange();
F.setStart(K,0);
G=N.createRange();
G.setStart(m,0);
}K=K.nodeName=="HTML"?N.body:K;
K=K.nodeName=="BODY"?K.firstChild:K;
m=m.nodeName=="HTML"?N.body:m;
m=m.nodeName=="BODY"?m.firstChild:m;
o=z.getParentBlock(K);
u=z.getParentBlock(m);
i=o?o.nodeName:Q.element;
if(z.dom.getParent(o,function(s){return/OL|UL|PRE/.test(s.nodeName);
})){return true;
}if(o&&(o.nodeName=="CAPTION"||/absolute|relative|static/gi.test(o.style.position))){i=Q.element;
o=null;
}if(u&&(u.nodeName=="CAPTION"||/absolute|relative|static/gi.test(u.style.position))){i=Q.element;
u=null;
}if(/(TD|TABLE|TH|CAPTION)/.test(i)||(o&&i=="DIV"&&/left|right/gi.test(o.style.cssFloat))){i=Q.element;
o=u=null;
}w=(o&&o.nodeName==i)?o.cloneNode(0):p.dom.create(i);
O=(u&&u.nodeName==i)?u.cloneNode(0):p.dom.create(i);
O.removeAttribute("id");
if(/^(H[1-6])$/.test(i)&&K.nodeValue&&J==K.nodeValue.length){O=p.dom.create(Q.element);
}E=l=K;
do{if(E==P||E.nodeType==9||z.dom.isBlock(E)||/(TD|TABLE|TH|CAPTION)/.test(E.nodeName)){break;
}l=E;
}while((E=E.previousSibling?E.previousSibling:E.parentNode));
E=q=m;
do{if(E==P||E.nodeType==9||z.dom.isBlock(E)||/(TD|TABLE|TH|CAPTION)/.test(E.nodeName)){break;
}q=E;
}while((E=E.nextSibling?E.nextSibling:E.parentNode));
if(l.nodeName==i){F.setStart(l,0);
}else{F.setStartBefore(l);
}F.setEnd(K,J);
w.appendChild(F.cloneContents()||N.createTextNode(""));
try{G.setEndAfter(q);
}catch(L){}G.setStart(m,j);
O.appendChild(G.cloneContents()||N.createTextNode(""));
C=N.createRange();
if(!l.previousSibling&&l.parentNode.nodeName==i){C.setStartBefore(l.parentNode);
}else{if(F.startContainer.nodeName==i&&F.startOffset==0){C.setStartBefore(F.startContainer);
}else{C.setStart(F.startContainer,F.startOffset);
}}if(!q.nextSibling&&q.parentNode.nodeName==i){C.setEndAfter(q.parentNode);
}else{C.setEnd(G.endContainer,G.endOffset);
}C.deleteContents();
if(d){p.getWin().scrollTo(0,H.y);
}if(w.firstChild&&w.firstChild.nodeName==i){w.innerHTML=w.firstChild.innerHTML;
}if(O.firstChild&&O.firstChild.nodeName==i){O.innerHTML=O.firstChild.innerHTML;
}if(A(w)){w.innerHTML="<br />";
}if(A(O)){O.innerHTML=d?"&nbsp;":"<br />";
}if(d){C.insertNode(w);
C.insertNode(O);
}else{C.insertNode(O);
C.insertNode(w);
}O.normalize();
w.normalize();
C=N.createRange();
C.selectNodeContents(O);
C.collapse(1);
B.removeAllRanges();
B.addRange(C);
v=p.dom.getPos(O).y;
x=O.clientHeight;
if(v<H.y||v+x>H.y+H.h){p.getWin().scrollTo(0,v<H.y?v:v-H.h+x);
}return false;
},backspaceDelete:function(m,v){var y=this,l=y.editor,q=l.getBody(),j,o=l.selection,i=o.getRng(),p=i.startContainer,j,s,u;
if(p&&l.dom.isBlock(p)&&!/^(TD|TH)$/.test(p.nodeName)&&v){if(p.childNodes.length==0||(p.childNodes.length==1&&p.firstChild.nodeName=="BR")){j=p;
while((j=j.previousSibling)&&!l.dom.isBlock(j)){}if(j){if(p!=q.firstChild){s=l.dom.doc.createTreeWalker(j,NodeFilter.SHOW_TEXT,null,false);
while(u=s.nextNode()){j=u;
}i=l.getDoc().createRange();
i.setStart(j,j.nodeValue?j.nodeValue.length:0);
i.setEnd(j,j.nodeValue?j.nodeValue.length:0);
o.setRng(i);
l.dom.remove(p);
}return c.cancel(m);
}}}function x(n){n=n.target;
if(n&&n.parentNode&&n.nodeName=="BR"&&(j=y.getParentBlock(n))){c.remove(q,"DOMNodeInserted",x);
if(n.previousSibling||n.nextSibling){l.dom.remove(n);
}}}c._add(q,"DOMNodeInserted",x);
window.setTimeout(function(){c._remove(q,"DOMNodeInserted",x);
},1);
}});
})();
(function(){var c=tinymce.DOM,b=tinymce.dom.Event,d=tinymce.each,f=tinymce.extend;
tinymce.create("tinymce.ControlManager",{ControlManager:function(g,l){var j=this,h;
l=l||{};
j.editor=g;
j.controls={};
j.onAdd=new tinymce.util.Dispatcher(j);
j.onPostRender=new tinymce.util.Dispatcher(j);
j.prefix=l.prefix||g.id+"_";
j._cls={};
j.onPostRender.add(function(){d(j.controls,function(i){i.postRender();
});
});
},get:function(g){return this.controls[this.prefix+g]||this.controls[g];
},setActive:function(i,g){var h=null;
if(h=this.get(i)){h.setActive(g);
}return h;
},setDisabled:function(i,g){var h=null;
if(h=this.get(i)){h.setDisabled(g);
}return h;
},add:function(h){var g=this;
if(h){g.controls[h.id]=h;
g.onAdd.dispatch(h,g);
}return h;
},createControl:function(j){var i,h=this,g=h.editor;
d(g.plugins,function(l){if(l.createControl){i=l.createControl(j,h);
if(i){return false;
}}});
switch(j){case"|":case"separator":return h.createSeparator();
}if(!i&&g.buttons&&(i=g.buttons[j])){return h.createButton(j,i);
}return h.add(i);
},createDropMenu:function(g,p,i){var o=this,j=o.editor,l,h,m,n;
p=f({"class":"mceDropDown",constrain:j.settings.constrain_menus},p);
p["class"]=p["class"]+" "+j.getParam("skin")+"Skin";
if(m=j.getParam("skin_variant")){p["class"]+=" "+j.getParam("skin")+"Skin"+m.substring(0,1).toUpperCase()+m.substring(1);
}g=o.prefix+g;
n=i||o._cls.dropmenu||tinymce.ui.DropMenu;
l=o.controls[g]=new n(g,p);
l.onAddItem.add(function(u,t){var q=t.settings;
q.title=j.getLang(q.title,q.title);
if(!q.onclick){q.onclick=function(s){j.execCommand(q.cmd,q.ui||false,q.value);
};
}});
j.onRemove.add(function(){l.destroy();
});
if(tinymce.isIE){l.onShowMenu.add(function(){var q=j.selection,t=q.getNode();
if(t.nodeName=="IMG"){h=q.getBookmark();
}else{h=0;
}});
l.onHideMenu.add(function(){if(h){j.selection.moveToBookmark(h);
}});
}return o.add(l);
},createListBox:function(o,j,n){var i=this,h=i.editor,l,m,g;
if(i.get(o)){return null;
}j.title=h.translate(j.title);
j.scope=j.scope||h;
if(!j.onselect){j.onselect=function(p){h.execCommand(j.cmd,j.ui||false,p||j.value);
};
}j=f({title:j.title,"class":"mce_"+o,scope:j.scope,control_manager:i},j);
o=i.prefix+o;
if(h.settings.use_native_selects){m=new tinymce.ui.NativeListBox(o,j);
}else{g=n||i._cls.listbox||tinymce.ui.ListBox;
m=new g(o,j);
}i.controls[o]=m;
if(tinymce.isWebKit){m.onPostRender.add(function(q,p){b.add(p,"mousedown",function(){h.bookmark=h.selection.getBookmark("simple");
});
b.add(p,"focus",function(){h.selection.moveToBookmark(h.bookmark);
h.bookmark=null;
});
});
}if(m.hideMenu){h.onMouseDown.add(m.hideMenu,m);
}return i.add(m);
},createButton:function(p,j,n){var i=this,h=i.editor,l,m,g;
if(i.get(p)){return null;
}j.title=h.translate(j.title);
j.label=h.translate(j.label);
j.scope=j.scope||h;
if(!j.onclick&&!j.menu_button){j.onclick=function(){h.execCommand(j.cmd,j.ui||false,j.value);
};
}j=f({title:j.title,"class":"mce_"+p,unavailable_prefix:h.getLang("unavailable",""),scope:j.scope,control_manager:i},j);
p=i.prefix+p;
if(j.menu_button){g=n||i._cls.menubutton||tinymce.ui.MenuButton;
m=new g(p,j);
h.onMouseDown.add(m.hideMenu,m);
}else{g=i._cls.button||tinymce.ui.Button;
m=new g(p,j);
}return i.add(m);
},createMenuButton:function(h,g){g=g||{};
g.menu_button=1;
return this.createButton(h,g);
},createSplitButton:function(o,j,n){var i=this,h=i.editor,l,m,g;
if(i.get(o)){return null;
}j.title=h.translate(j.title);
j.scope=j.scope||h;
if(!j.onclick){j.onclick=function(p){h.execCommand(j.cmd,j.ui||false,p||j.value);
};
}if(!j.onselect){j.onselect=function(p){h.execCommand(j.cmd,j.ui||false,p||j.value);
};
}j=f({title:j.title,"class":"mce_"+o,scope:j.scope,control_manager:i},j);
o=i.prefix+o;
g=n||i._cls.splitbutton||tinymce.ui.SplitButton;
m=i.add(new g(o,j));
h.onMouseDown.add(m.hideMenu,m);
return m;
},createColorSplitButton:function(o,j,n){var i=this,h=i.editor,l,m,g;
if(i.get(o)){return null;
}j.title=h.translate(j.title);
j.scope=j.scope||h;
if(!j.onclick){j.onclick=function(p){h.execCommand(j.cmd,j.ui||false,p||j.value);
};
}if(!j.onselect){j.onselect=function(p){h.execCommand(j.cmd,j.ui||false,p||j.value);
};
}j=f({title:j.title,"class":"mce_"+o,menu_class:h.getParam("skin")+"Skin",scope:j.scope,more_colors_title:h.getLang("more_colors")},j);
o=i.prefix+o;
g=n||i._cls.colorsplitbutton||tinymce.ui.ColorSplitButton;
m=new g(o,j);
h.onMouseDown.add(m.hideMenu,m);
h.onRemove.add(function(){m.destroy();
});
return i.add(m);
},createToolbar:function(m,i,l){var j,h=this,g;
m=h.prefix+m;
g=l||h._cls.toolbar||tinymce.ui.Toolbar;
j=new g(m,i);
if(h.get(m)){return null;
}return h.add(j);
},createSeparator:function(h){var g=h||this._cls.separator||tinymce.ui.Separator;
return new g();
},setControlType:function(h,g){return this._cls[h.toLowerCase()]=g;
},destroy:function(){d(this.controls,function(g){g.destroy();
});
this.controls=null;
}});
})();
(function(){var b=tinymce.util.Dispatcher,f=tinymce.each,d=tinymce.isIE,c=tinymce.isOpera;
tinymce.create("tinymce.WindowManager",{WindowManager:function(g){var h=this;
h.editor=g;
h.onOpen=new b(h);
h.onClose=new b(h);
h.params={};
h.features={};
},open:function(B,h){var A=this,l="",o,n,i=A.editor.settings.dialog_type=="modal",v,q,j,g=tinymce.DOM.getViewPort(),z;
B=B||{};
h=h||{};
q=c?g.w:screen.width;
j=c?g.h:screen.height;
B.name=B.name||"mc_"+new Date().getTime();
B.width=parseInt(B.width||320);
B.height=parseInt(B.height||240);
B.resizable=true;
B.left=B.left||parseInt(q/2)-(B.width/2);
B.top=B.top||parseInt(j/2)-(B.height/2);
h.inline=false;
h.mce_width=B.width;
h.mce_height=B.height;
h.mce_auto_focus=B.auto_focus;
if(i){if(d){B.center=true;
B.help=false;
B.dialogWidth=B.width+"px";
B.dialogHeight=B.height+"px";
B.scroll=B.scrollbars||false;
}else{B.modal=B.alwaysRaised=B.dialog=B.centerscreen=B.dependent=true;
}}f(B,function(s,p){if(tinymce.is(s,"boolean")){s=s?"yes":"no";
}if(!/^(name|url)$/.test(p)){if(d&&i){l+=(l?";":"")+p+":"+s;
}else{l+=(l?",":"")+p+"="+s;
}}});
A.features=B;
A.params=h;
A.onOpen.dispatch(A,B,h);
z=B.url||B.file;
if(tinymce.relaxedDomain){z+=(z.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain;
}z=tinymce._addVer(z);
try{if(d&&i){v=1;
window.showModalDialog(z,window,l);
}else{v=window.open(z,B.name,l);
}}catch(m){}if(!v){alert(A.editor.getLang("popup_blocked"));
}},close:function(g){g.close();
this.onClose.dispatch(this);
},createInstance:function(i,h,g,n,m,l){var j=tinymce.resolve(i);
return new j(h,g,n,m,l);
},confirm:function(h,g,i){g.call(i||this,confirm(this._decode(this.editor.getLang(h,h))));
},alert:function(h,g,j){var i=this;
alert(i._decode(i.editor.getLang(h,h)));
if(g){g.call(j||i);
}},_decode:function(g){return tinymce.DOM.decode(g).replace(/\\n/g,"\n");
}});
}());
tinyMCE.addI18n({en:{common:{edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?",apply:"Apply",insert:"Insert",update:"Update",save:"Save",cancel:"Cancel",close:"Close",browse:"Link from File Cabinet",file_cabinet:"Link from File Cabinet",class_name:"Style",not_set:"-- Not set --",clipboard_msg:"Standard Copy/Cut/Paste in Mozilla Firefox are only available as keyboard shortcuts (Ctrl+C / Ctrl+X / Ctrl+V).\n\nDo you want more information about this issue?",clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",invalid_data:"Error: Invalid values entered, these are marked in red.",more_colors:"More colors"},contextmenu:{align:"Alignment",left:"Left",center:"Center",right:"Right",full:"Full"},insertdatetime:{date_fmt:"%Y-%m-%d",time_fmt:"%H:%M:%S",insertdate_desc:"Insert date",inserttime_desc:"Insert time",months_long:"January,February,March,April,May,June,July,August,September,October,November,December",months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun"},print:{print_desc:"Print"},preview:{preview_desc:"Preview"},directionality:{ltr_desc:"Direction left to right",rtl_desc:"Direction right to left"},layer:{insertlayer_desc:"Insert new layer",forward_desc:"Move forward",backward_desc:"Move backward",absolute_desc:"Toggle absolute positioning",content:"New layer..."},save:{save_desc:"Save",cancel_desc:"Cancel all changes"},nonbreaking:{nonbreaking_desc:"Insert non-breaking space character"},iespell:{iespell_desc:"Run spell checking",download:"ieSpell not detected. Do you want to install it now?"},advhr:{advhr_desc:"Horizontale rule"},emotions:{emotions_desc:"Insert Emoticon"},searchreplace:{search_desc:"Find",replace_desc:"Find/Replace"},advimage:{image_desc:"Insert/edit image"},advlink:{link_desc:"Insert/edit link"},xhtmlxtras:{cite_desc:"Citation",abbr_desc:"Abbreviation",acronym_desc:"Acronym",del_desc:"Deletion",ins_desc:"Insertion",attribs_desc:"Insert/Edit Attributes"},style:{desc:"Edit CSS Style"},paste:{paste_text_desc:"Paste as Plain Text",paste_word_desc:"Paste from Word",selectall_desc:"Select All"},paste_dlg:{text_title:"Use CTRL+V on your keyboard to paste the text into the window.",text_linebreaks:"Keep linebreaks",word_title:"Use CTRL+V on your keyboard to paste the text into the window."},table:{desc:"Inserts a new table",row_before_desc:"Insert row before",row_after_desc:"Insert row after",delete_row_desc:"Delete row",col_before_desc:"Insert column before",col_after_desc:"Insert column after",delete_col_desc:"Remove column",split_cells_desc:"Split merged table cells",merge_cells_desc:"Merge table cells",row_desc:"Table row properties",cell_desc:"Table cell properties",props_desc:"Table properties",paste_row_before_desc:"Paste table row before",paste_row_after_desc:"Paste table row after",cut_row_desc:"Cut table row",copy_row_desc:"Copy table row",del:"Delete table",row:"Row",col:"Column",cell:"Cell"},autosave:{unload_msg:"The changes you made will be lost if you navigate away from this page."},fullscreen:{desc:"Toggle fullscreen mode"},media:{desc:"Insert / edit embedded media",edit:"Edit embedded media"},fullpage:{desc:"Document properties"},template:{desc:"Insert predefined template content"},visualchars:{desc:"Visual control characters on/off."},spellchecker:{desc:"Toggle spellchecker",menu:"Spellchecker settings",ignore_word:"Ignore word",ignore_words:"Ignore all",langs:"Languages",wait:"Please wait...",sug:"Suggestions",no_sug:"No suggestions",no_mpell:"No misspellings found."},pagebreak:{desc:"Insert page break."}}});
(function(){var f=tinymce.DOM,c=tinymce.dom.Event,i=tinymce.extend,g=tinymce.each,b=tinymce.util.Cookie,h,d=tinymce.explode;
tinymce.ThemeManager.requireLangPack("cx_advanced");
tinymce.create("tinymce.themes.AdvancedTheme",{controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","forecolorpicker"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","backcolorpicker"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],preformattedCodeTags:["kbd","samp","xmp"],init:function(l,m){var n=this,o,j;
n.editor=l;
n.url=m;
n.onResolveName=new tinymce.util.Dispatcher(this);
n.settings=o=i({theme_advanced_path:true,theme_advanced_toolbar_location:"top",theme_advanced_buttons1:"bold,italic,underline,numlist,bullist,link,unlink,image,fontselect,fontsizeselect,emotions,simplebrowser",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6,samp",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_more_colors:1,theme_advanced_row_height:23,plugins:"contextmenu,paste,emotions,simplebrowser,inlinepopups,safari",relative_urls:false,remove_script_host:false},l.settings);
if((j=o.theme_advanced_path_location)&&j!="none"){o.theme_advanced_statusbar_location=o.theme_advanced_path_location;
}if(o.theme_advanced_statusbar_location=="none"){o.theme_advanced_statusbar_location=0;
}l.onPreInit.add(function(){l.onNodeChange.add(n._nodeChanged,n);
if(l.settings.content_css!==false){l.dom.loadCSS(l.baseURI.toAbsolute("themes/cx_advanced/skins/"+l.settings.skin+"/content.css"));
}if(l.plugins.contextmenu){l.plugins.contextmenu.onContextMenu.add(n._contextMenu,n);
}if(tinymce.isWebKit){n.webKitFormatBlock=l.execCommands.FormatBlock;
delete l.execCommands.FormatBlock;
}if(tinymce.isWebKit){l.onKeyUp.addToTop(n._enterCancelWebKit,n);
l.onKeyDown.addToTop(n._enterCancelWebKit,n);
}l.onKeyPress.addToTop(n._enterHandler,n);
l.onBeforeSetContent.addToTop(n._onBeforeSetContent,n);
l.onGetContent.add(n._onGetContent,n);
});
l.onInit.add(function(){if(Prototype.Browser.IE7_UP){return;
}if(tinymce.isIE){l.onKeyUp.add(n._enterFormatting,n);
l.onKeyDown.add(n._backspaceListItem,n);
}else{l.onKeyPress.add(n._enterFormatting,n);
}});
l.onSetProgressState.add(function(s,p,t){var u,v=s.id,q;
if(p){n.progressTimer=setTimeout(function(){u=s.getContainer();
q=f.get(s.id+"_tbl");
f.add(u,"div",{id:v+"_blocker","class":"mceBlocker",style:{width:q.clientWidth,height:q.clientHeight}});
f.add(u,"div",{id:v+"_progress","class":"mceProgress",style:{left:q.clientWidth/2,top:q.clientHeight/2}});
},t||0);
}else{f.remove(v+"_blocker");
f.remove(v+"_progress");
clearTimeout(n.progressTimer);
}});
f.loadCSS(l.baseURI.toAbsolute(o.editor_css||"themes/cx_advanced/skins/"+l.settings.skin+"/ui.css"));
if(o.skin_variant){f.loadCSS(l.baseURI.toAbsolute(o.editor_css||"themes/cx_advanced/skins/"+l.settings.skin+"/ui_"+o.skin_variant+".css"));
}},createControl:function(o,j){var l,m;
if(m=j.createControl(o)){return m;
}switch(o){case"styleselect":return this._createStyleSelect();
case"formatselect":return this._createBlockFormats();
case"fontselect":return this._createFontSelect();
case"fontsizeselect":return this._createFontSizeSelect();
case"forecolor":return this._createForeColorMenu();
case"backcolor":return this._createBackColorMenu();
}if((l=this.controls[o])){return j.createButton(o,{title:"advanced."+l[0],cmd:l[1],ui:l[2],value:l[3]});
}},execCommand:function(m,l,n){var j=this["_"+m];
return j?j.call(this,l,n):false;
},_importClasses:function(){var j=this.editor,l=j.controlManager.get("styleselect");
if(l.getLength()==0){g(j.dom.getClasses(),function(m){l.add(m["class"],m["class"]);
});
}},_createStyleSelect:function(p){var l=this,j=l.editor,m=j.controlManager,o=m.createListBox("styleselect",{title:"advanced.style_select",onselect:function(n){if(o.selectedValue===n){j.execCommand("mceSetStyleInfo",0,{command:"removeformat"});
}else{j.execCommand("mceSetCSSClass",0,n);
}}});
if(o){g(j.getParam("theme_advanced_styles","","hash"),function(q,n){if(q){o.add(l.editor.translate(n),q);
}});
o.onPostRender.add(function(q,s){c.add(s,"focus",l._importClasses,l);
c.add(s,"mousedown",l._importClasses,l);
});
}return o;
},_createFontSelect:function(){var m,l=this,j=l.editor;
m=j.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",cmd:"FontName"});
if(m){g(j.getParam("theme_advanced_fonts",l.settings.theme_advanced_fonts,"hash"),function(o,n){m.add(j.translate(n),o,{style:o.indexOf("dings")==-1?"font-family:"+o:""});
});
}return m;
},_createFontSizeSelect:function(){var n,l=this,m=["1 (8 pt)","2 (10 pt)","3 (12 pt)","4 (14 pt)","5 (18 pt)","6 (24 pt)","7 (36 pt)","8 (48 pt)"],j=[8,10,12,14,18,24,36,48];
n=l.editor.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",cmd:"FontSize"});
if(n){g(d(l.settings.theme_advanced_font_sizes),function(o){n.add(m[parseInt(o)-1],o,{style:"font-size:"+j[o-1]+"pt; line-height: "+Math.floor(j[o-1]*1.1)+"pt;","class":"mceFontSize"+o});
});
}return n;
},_createBlockFormats:function(){var m,j={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",kbd:"advanced.kbd",samp:"advanced.samp"},l=this;
m=l.editor.controlManager.createListBox("formatselect",{title:"advanced.block",cmd:"FormatBlock"});
if(m){g(l.editor.getParam("theme_advanced_blockformats",l.settings.theme_advanced_blockformats,"hash"),function(o,n){if(tinymce.inArray(l.preformattedCodeTags,o)>=0){a={element:"pre","class":"mce_formatPreview code"};
}else{a={"class":"mce_formatPreview mce_"+o};
}m.add(l.editor.translate(n!=o?n:j[o]),o,a);
});
}return m;
},_createForeColorMenu:function(){var p,l=this,m=l.settings,n={},j;
if(m.theme_advanced_more_colors){n.more_colors_func=function(){l._mceColorPicker(0,{color:l.fgColor,func:function(o){l.fgColor=o;
p.setColor(o);
}});
};
}if(j=m.theme_advanced_text_colors){n.colors=j;
}n.title="advanced.forecolor_desc";
n.cmd="ForeColor";
n.scope=this;
p=l.editor.controlManager.createColorSplitButton("forecolor",n);
return p;
},_createBackColorMenu:function(){var p,l=this,m=l.settings,n={},j;
if(m.theme_advanced_more_colors){n.more_colors_func=function(){l._mceColorPicker(0,{color:l.bgColor,func:function(o){l.bgColor=o;
p.setColor(o);
}});
};
}if(j=m.theme_advanced_background_colors){n.colors=j;
}n.title="advanced.backcolor_desc";
n.cmd="HiliteColor";
n.scope=this;
p=l.editor.controlManager.createColorSplitButton("backcolor",n);
return p;
},_ufirst:function(j){return j.substring(0,1).toUpperCase()+j.substring(1);
},renderUI:function(m){var u,q,v,y=this,w=y.editor,z=y.settings,x,l,j;
u=l=f.create("span",{id:w.id+"_parent","class":"mceEditor "+w.settings.skin+"Skin"+(z.skin_variant?" "+w.settings.skin+"Skin"+y._ufirst(z.skin_variant):"")});
if(!f.boxModel){u=f.add(u,"div",{"class":"mceOldBoxModel"});
}u=x=f.add(u,"table",{id:w.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});
u=v=f.add(u,"tbody");
switch((z.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":q=y._rowLayout(z,v,m);
break;
case"customlayout":q=w.execCallback("theme_advanced_custom_layout",z,v,m,l);
break;
default:q=y._simpleLayout(z,v,m,l);
}u=m.targetNode;
j=x.rows;
j=f.stdMode?x.getElementsByTagName("tr"):x.rows;
f.addClass(j[0],"mceFirst");
f.addClass(j[j.length-1],"mceLast");
g(f.select("tr",v),function(o){f.addClass(o.firstChild,"mceFirst");
f.addClass(o.childNodes[o.childNodes.length-1],"mceLast");
});
f.insertAfter(l,u);
c.add(w.id+"_path_row","click",function(n){n=n.target;
if(n.nodeName=="A"){y._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));
return c.cancel(n);
}});
y.deltaHeight=m.deltaHeight;
m.targetNode=null;
return{iframeContainer:q,editorContainer:w.id+"_parent",sizeContainer:x,deltaHeight:m.deltaHeight};
},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:tinymce.majorVersion+"."+tinymce.minorVersion};
},resizeBy:function(j,l){var m=f.get(this.editor.id+"_tbl");
this.resizeTo(m.clientWidth+j,m.clientHeight+l);
},resizeTo:function(j,n){var l=this.editor,m=l.settings,p=f.get(l.id+"_tbl"),q=f.get(l.id+"_ifr"),o;
j=Math.max(m.theme_advanced_resizing_min_width||100,j);
n=Math.max(m.theme_advanced_resizing_min_height||100,n);
j=Math.min(m.theme_advanced_resizing_max_width||65535,j);
n=Math.min(m.theme_advanced_resizing_max_height||65535,n);
o=p.clientHeight-q.clientHeight;
f.setStyle(q,"height",n-o);
f.setStyles(p,{width:j,height:n});
},destroy:function(){var j=this.editor.id;
c.clear(j+"_resize");
c.clear(j+"_path_row");
c.clear(j+"_external_close");
},_simpleLayout:function(B,w,m,j){var A=this,x=A.editor,y=B.theme_advanced_toolbar_location,u=B.theme_advanced_path_location||B.theme_advanced_status_location,q,l,v,z;
if(y=="top"){A._addToolbars(w,m);
}if(y=="external"){q=z=f.create("div",{id:x.id+"_external","class":"mceExternalToolbar"});
f.add(q,"a",{id:x.id+"_external_close",href:"javascript:;","class":"mceExternalClose"});
q=f.add(q,"table",{id:x.id+"_tblext",cellSpacing:0,cellPadding:0});
v=f.add(q,"tbody");
if(j.firstChild.className=="mceOldBoxModel"){j.firstChild.appendChild(z);
}else{j.insertBefore(z,j.firstChild);
}A._addToolbars(v,m);
x.onMouseUp.add(function(){var o=f.get(x.id+"_external");
f.show(o);
f.hide(h);
var n=c.add(x.id+"_external_close","click",function(){f.hide(x.id+"_external");
c.remove(x.id+"_external_close","click",n);
});
f.show(o);
f.setStyle(o,"top",0-f.getRect(x.id+"_tblext").h-1);
f.hide(o);
f.show(o);
o.style.filter="";
h=x.id+"_external";
o=null;
});
}if(u=="top"&&B.theme_advanced_path){A._addStatusBar(w,m);
}q=f.add(w,"tr");
q=l=f.add(q,"td",{"class":"mceIframeContainer"});
if(y=="bottom"){A._addToolbars(w,m);
}if(u=="bottom"&&B.theme_advanced_path){A._addStatusBar(w,m);
}return l;
},_rowLayout:function(z,q,m){var y=this,u=y.editor,x,A,j=u.controlManager,p,l,w,v;
x=z.theme_advanced_containers_default_class||"";
A=z.theme_advanced_containers_default_align||"center";
g(d(z.theme_advanced_containers||""),function(s,o){var n=z["theme_advanced_container_"+s]||"";
switch(n){case"mceeditor":p=f.add(q,"tr");
p=l=f.add(p,"td",{"class":"mceIframeContainer"});
break;
case"mceelementpath":y._addStatusBar(q,m);
break;
default:v=z["theme_advanced_container_"+s+"_align"].toLowerCase();
v="mce"+y._ufirst(v);
p=f.add(f.add(q,"tr"),"td",{"class":"mceToolbar "+(z["theme_advanced_container_"+s+"_class"]||x)+" "+v||A});
w=j.createToolbar("toolbar"+o);
y._addControls(n,w);
f.setHTML(p,w.renderHTML());
m.deltaHeight-=z.theme_advanced_row_height;
}});
return l;
},_addControls:function(l,j){var m=this,n=m.settings,o,p=m.editor.controlManager;
if(n.theme_advanced_disable&&!m._disabled){o={};
g(d(n.theme_advanced_disable),function(q){o[q]=1;
});
m._disabled=o;
}else{o=m._disabled;
}g(d(l),function(s){var q;
if(o&&o[s]){return;
}if(s=="tablecontrols"){g(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(t){t=m.createControl(t,p);
if(t){j.add(t);
}});
return;
}q=m.createControl(s,p);
if(q){j.add(q);
}});
},_addToolbars:function(y,l){var B=this,q,p,w=B.editor,C=B.settings,A,j=w.controlManager,x,m,u=[],z;
z=C.theme_advanced_toolbar_align.toLowerCase();
z="mce"+B._ufirst(z);
m=f.add(f.add(y,"tr"),"td",{"class":"mceToolbar "+z});
if(!w.getParam("accessibility_focus")){u.push(f.createHTML("a",{href:"#",onfocus:"tinyMCE.get('"+w.id+"').focus();"},"<!-- IE -->"));
}u.push(f.createHTML("a",{href:"#",accesskey:"q",title:w.getLang("toolbar_focus")},"<!-- IE -->"));
for(q=1;
(A=C["theme_advanced_buttons"+q]);
q++){p=j.createToolbar("toolbar"+q,{"class":"mceToolbarRow"+q});
if(C["theme_advanced_buttons"+q+"_add"]){A+=","+C["theme_advanced_buttons"+q+"_add"];
}if(C["theme_advanced_buttons"+q+"_add_before"]){A=C["theme_advanced_buttons"+q+"_add_before"]+","+A;
}B._addControls(A,p);
u.push(p.renderHTML());
l.deltaHeight-=C.theme_advanced_row_height;
}u.push(f.createHTML("a",{href:"#",accesskey:"z",title:w.getLang("toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+w.id+"').focus();"},"<!-- IE -->"));
f.setHTML(m,u.join(""));
},_addStatusBar:function(q,l){var m,x=this,u=x.editor,y=x.settings,j,v,w,p;
m=f.add(q,"tr");
m=p=f.add(m,"td",{"class":"mceStatusbar"});
m=f.add(m,"div",{id:u.id+"_path_row"},u.translate("advanced.path")+": ");
if(y.theme_advanced_resizing&&!tinymce.isOldWebKit){f.add(p,"a",{id:u.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize"});
if(y.theme_advanced_resizing_use_cookie){u.onPostRender.add(function(){var n=b.getHash("TinyMCE_"+u.id+"_size"),s=f.get(u.id+"_tbl");
if(!n){return;
}if(y.theme_advanced_resize_horizontal){s.style.width=Math.max(10,n.cw)+"px";
}s.style.height=Math.max(10,n.ch)+"px";
f.get(u.id+"_ifr").style.height=Math.max(10,parseInt(n.ch)+x.deltaHeight)+"px";
});
}u.onPostRender.add(function(){f.hide(u.id+"_path_row");
f.show(u.id+"_path_row");
c.add(u.id+"_resize","mousedown",function(A){var C,z,o,t,B,s;
C=f.get(u.id+"_tbl");
o=C.clientWidth;
t=C.clientHeight;
miw=y.theme_advanced_resizing_min_width||100;
mih=y.theme_advanced_resizing_min_height||100;
maw=y.theme_advanced_resizing_max_width||65535;
mah=y.theme_advanced_resizing_max_height||65535;
z=f.add(f.get(u.id+"_parent"),"div",{"class":"mcePlaceHolder"});
f.setStyles(z,{width:o,height:t});
f.hide(C);
f.show(z);
j={x:A.screenX,y:A.screenY,w:o,h:t,dx:null,dy:null};
v=c.add(f.doc,"mousemove",function(E){var n,D;
j.dx=E.screenX-j.x;
j.dy=E.screenY-j.y;
n=Math.max(miw,j.w+j.dx);
D=Math.max(mih,j.h+j.dy);
n=Math.min(maw,n);
D=Math.min(mah,D);
if(y.theme_advanced_resize_horizontal){z.style.width=n+"px";
}z.style.height=D+"px";
return c.cancel(E);
});
w=c.add(f.doc,"mouseup",function(n){var D;
c.remove(f.doc,"mousemove",v);
c.remove(f.doc,"mouseup",w);
C.style.display="";
f.remove(z);
if(j.dx===null){return;
}D=f.get(u.id+"_ifr");
if(y.theme_advanced_resize_horizontal){C.style.width=Math.max(10,j.w+j.dx)+"px";
}C.style.height=Math.max(10,j.h+j.dy)+"px";
D.style.height=Math.max(10,D.clientHeight+j.dy)+"px";
if(y.theme_advanced_resizing_use_cookie){b.setHash("TinyMCE_"+u.id+"_size",{cw:j.w+j.dx,ch:j.h+j.dy});
}});
return c.cancel(A);
});
});
}l.deltaHeight-=21;
m=q=null;
},_onBeforeSetContent:function(l,p){var n=l.getDoc(),m=$(document.createElement("div")),j=p.content;
j=this._wrapSpecialTagsRegex(l,j);
m.innerHTML=this._protectPreformatted(l,j);
this._wrapSpecialTagsDom(l,m);
p.content=m.innerHTML;
},_onGetContent:function(l,m){if(m.format=="raw"&&m.no_events&&!m.save){return;
}var j=this._unprotectPreformatted(l,m.content,tinymce.isWebKit);
j=this._unwrapSpecialTags(l,j,["script","object","embed","iframe"]);
m.content=j;
},_escapeForRegexes:function(j){return j.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\r/g,"\\r");
},_unescapeForRegexes:function(j){return j.replace(/\\\\/g,"\\").replace(/\\n/g,"\n").replace(/\\r/g,"\r");
},_protectPreformatted:function(j,l){l=this._escapeForRegexes(l);
return this._unescapeForRegexes(l.replace(/<(xmp|samp|kbd)(.*?)>(.*?)<\/\1>/gi,function(p,o,n,m){if(o=="xmp"){m=j.dom.encode(m);
}return'<pre mce_name="'+o+'"'+n+' class="code">'+m+"</pre>";
}));
},_unprotectPreformatted:function(j,l,m){l=this._escapeForRegexes(l);
l=l.replace(/<pre(.*?)mce_name="(xmp|samp|kbd)"(.*?)>(.*?)<\/pre>/gi,"<$2$1$3>$4</$2>");
return this._unescapeForRegexes(l.replace(/<(xmp|samp|kbd)(.*?)>(.*?)<\/\1>/gi,function(q,p,o,n){o=o.replace(/class="([^"]*\s)?(code|mceItemNoResize)(\s[^"]*)?"/gi,'class="$1$3"');
o=o.gsub('class="s*"',"").replace(/^\s*/g," ");
if(o==" "){o="";
}if(!m){n=n.replace(/<br[^>]*>/gi,"\n");
}if(p=="xmp"){n=j.dom.decode(n);
}return"<"+p+o+">"+n+"</"+p+">";
}));
},_wrapSpecialTagsDom:function(l,j){var m=this,n=l.getDoc();
tinymce.each(Selector.findChildElements(j,["script","iframe"]),function(s){if(l.dom.getParent(s.parentNode,"script",j)){return;
}var v=n.createElement("div");
var q=n.createElement("span");
var t=n.createElement("div");
var p=s.nodeName.toLowerCase();
var u=s.nodeName.charAt(0)+p.substring(1);
switch(s.nodeName){case"SCRIPT":case"IFRAME":var o=s.getAttribute("src");
if(o){o=o.strip();
if(o.length==0&&o.substring(0,11)=="javascript:"){o=null;
}}if(s.nodeName=="SCRIPT"){q.innerHTML=o?"JavaScript - "+o:"Inline JavaScript";
v.className=(o?"mceItemScriptLink":"mceItemScript");
}else{q.innerHTML="Inner Frame - "+o;
v.className="mceItemInnerFrame";
}break;
}m._finishWrappingTag(l,u,l.dom.getOuterHTML(s),v,q,t);
l.dom.replace(v,s);
});
},_finishWrappingTag:function(l,j,m,p,n,o){l.dom.addClass(n,"mceItemHidden");
p.appendChild(n);
l.dom.addClass(o,"mceItemHidden");
l.dom.addClass(o,"cxWrapped");
o.innerHTML=l.dom.encode(m);
p.appendChild(o);
l.dom.addClass(p,"mceNonEditable");
l.dom.addClass(p,"cxWrapper"+j);
if(tinymce.isIE){l.dom.addClass(p,"mceItemNoResize");
p.setAttribute("onbeforeeditfocus","this.firstChild.scrollIntoView (); return false;");
l.dom.setAttribs([p,n,o],{unselectable:"on",contenteditable:"false"});
}},_parseObjectEmbedTag:function(q,j,u,w,x,p){var t=q.getDoc();
var o="<"+p+"/>",v={width:null,height:null};
if(x.match(/src="(http[s]?:\/\/[^"]*)"/i)){o=RegExp.$1;
}else{if(x.match(/data="(http[s]?:\/\/[^"]*)"/i)){o=RegExp.$1;
}else{if(x.match(/"(http[s]?:\/\/[^"]*)"/i)){o=RegExp.$1;
}}}var m=t.createElement("span");
m.className="widgetIcon mceItemHidden";
if(tinymce.isIE){q.dom.setAttribs(m,{unselectable:"on",contenteditable:"false"});
m.style.filter="alpha(opacity=40)";
}for(p in v){var n=new RegExp("\\W"+p+'="([^"]*)"',"i");
var l=new RegExp('<param.*\\Wname="'+p+'".*\\Wvalue="([^"]*)"',"i");
if(x.match(n)||x.match(l)){v[p]=RegExp.$1;
}}if(v.height&&v.height.indexOf("%")<0){q.dom.setStyles(j,{height:v.height+"px",minHeight:v.height+"px",position:"relative"});
q.dom.setStyles(u,{marginTop:Math.floor(v.height/3)+"px"});
q.dom.setStyles(m,{position:"absolute",top:Math.floor(v.height/2-32)+"px"});
}if(v.width&&v.width.indexOf("%")<0){j.style.width=v.width+"px";
if(m.style.position=="absolute"){q.dom.setStyles(m,{left:Math.floor(v.width/2-32)+"px"});
}}j.appendChild(m);
u.innerHTML="Widget - "+o+"<br/>";
j.className="mceItemObjectEmbed";
},_wrapSpecialTagsRegex:function(j,m){var l=this,n=j.getDoc();
m=l._escapeForRegexes(m);
return l._unescapeForRegexes(m.replace(/<(object|embed)(.*?)>((.*?)<\/\1>)?/gi,function(z,u,w,t,v){var o=n.createElement("div");
var x=n.createElement("span");
var y=n.createElement("div");
var q=u.toLowerCase();
var p=u.charAt(0).toUpperCase()+q.substring(1);
l._parseObjectEmbedTag(j,o,x,y,z,q);
l._finishWrappingTag(j,p,z,o,x,y);
return j.dom.getOuterHTML(o);
}));
},_unwrapSpecialTags:function(j,n,l){var m=this;
n=m._escapeForRegexes(n);
return m._unescapeForRegexes(n.replace(/<div(.*?)class="([^"]*)cxWrapper([^"]*)"(.*?)>(.*?)<div([^>]*)class="([^"]*)cxWrapped([^"]*)"(.*?)>(.*?)<\/div>(.*?)<\/div>/gi,function(o){var p=arguments[10].replace(/&gt;|&lt;|&amp;|&quot;/gi,function(q){switch(q){case"&gt;":return">";
case"&lt;":return"<";
case"&amp;":return"&";
case"&quot;":return'"';
}});
if(tinymce.isIE){p=p.replace(/<script(.*?)_counted="[^"]*"(.*?)>(.*?)<\/script>/gi,"<script$1$2>$3<\/script>");
}return p;
}));
},_enterCancelWebKit:function(l,o){if(o.keyCode!=13||o.shiftKey){return;
}var m=l.selection,j;
var p=m.getStart();
while(p&&p.nodeName!="BODY"&&!(j=this._getPreformattedCodeTag(l,p))){if(l.dom.getStyle(p,"display",true)=="block"){break;
}p=p.parentNode;
}if(j){return c.cancel(o);
}},_enterHandler:function(t,u){if(u.keyCode!=13){return;
}var B=t.selection,p;
if(!u.shiftKey){var o=B.getStart();
while(o&&o.nodeName!="BODY"&&!(p=this._getPreformattedCodeTag(t,o))){if(t.dom.getStyle(o,"display",true)=="block"){break;
}o=o.parentNode;
}}if(p||(tinymce.isWebKit&&u.shiftKey||(t.settings.force_br_newlines&&B.getNode().nodeName!="LI"))){if(B.getStart()!=B.getEnd()){return;
}if(!tinymce.isWebKit){B.setContent('<br id="__" /> ',{format:"raw"});
o=t.dom.get("__");
o.removeAttribute("id");
B.select(o);
B.collapse();
}else{if(t.plugins.safari){t.plugins.safari._insertBR(t);
}else{t.execCommand("mceInsertContent",false,"<br/>");
}}return c.cancel(u);
}else{if(!u.shiftKey&&!Prototype.Browser.IE7_UP){var j=B.getRng();
if(B.isCollapsed()){var w=t.getDoc();
var z,x=t.getBody(),m=[];
for(z=B.getEnd();
(z&&z!=x&&!t.dom.isBlock(z));
z=z.parentNode){if(z.nodeType==3){continue;
}m.push(z);
}if(tinymce.isIE){var l=x.createTextRange();
l.moveToElementText(z);
l.setEndPoint("StartToEnd",j);
}else{var l=w.createRange();
l.selectNodeContents(z);
l.setStart(j.startContainer,j.startOffset);
}var A=l.text||(l.toString?l.toString():"");
if(A&&A.replace(/&nbsp;|<br[^>]*>|\s|\n/gi).length>0){return;
}for(var q=0;
q<m.length;
q++){m[q]=m[q].cloneNode(false);
}if(z&&z!=x){var y=z.getAttribute("style");
if(y&&typeof(y)!="string"){y=z.style.cssText;
}m.push(y);
}this.formattingPath=m;
return;
}}}this.formattingPath=null;
},_enterFormatting:function(t,w){if(w.keyCode!=13||w.shiftKey){return;
}if(!this.formattingPath||!this.formattingPath.length){if(!tinymce.isIE){var j=t.selection.getRng(),m=j.endContainer;
if(!m||m.nodeType==3){return;
}m=m.childNodes[j.endOffset];
if(!m||m.nodeType==3){return;
}while(m.firstChild&&m.firstChild.nodeType!=3){m=m.firstChild;
}if(m.nodeType==1){if(!m.firstChild){m.innerHTML="&nbsp;";
}t.selection.caret(m.firstChild,true);
}}return;
}var H=t.selection,o,q=H.getContent(),m=H.getEnd(),E=t.getBody(),D=this.formattingPath;
this.formattingPath=null;
if(q&&q.replace(/&nbsp;|<br[^>]*>|\s|\n/gi,"").length>0){return;
}var l=t.dom.getParent(m,t.dom.isBlock,E);
if(!l){return;
}var F=t.dom.getParent(m,function(n){return(n.nodeName=="LI"||(t.dom.isBlock(n)&&n.childNodes.length>1));
},E);
if(F&&F.nodeName=="LI"){if(tinymce.isWebKit){var l=F.parentNode,C,B;
if((l.nodeName!="OL"&&l.nodeName!="UL")||F.innerHTML.replace(/&nbsp;|<br[^>]*>|\s|\n/gi,"").length>0){return;
}for(C=F.nextSibling;
C&&C.nodeName!="LI";
C=C.nextSibling){}for(B=F.previousSibling;
B&&B.nodeName!="LI";
B=B.previousSibling){}if(C&&B){var o=t.dom.uniqueId("mce_split_"),G;
t.dom.setHTML(F,"");
F.setAttribute("id",o);
G=l.innerHTML.split(o);
t.dom.setHTML(l,G[0].replace(/<li[^>]*id="$/i,""));
t.dom.setHTML(t.dom.insertAfter(t.dom.create(l.nodeName),l),G[1].replace(/^[^<]*<\/li[^>]*>/i,""));
l=t.dom.insertAfter(t.dom.create("P"),l);
t.dom.setHTML(l,"<br/>");
}else{l.removeChild(F);
if(!l.hasChildNodes()){l=t.dom.replace(l,t.dom.create("P"));
}else{if(C){B=l;
B.parentNode.insertBefore(l=t.dom.create("P"),B);
t.dom.setHTML(l,"<br/>");
}else{l=t.dom.insertAfter(t.dom.create("P"),l);
t.dom.setHTML(l,"<br/>");
}}}H.caret(l,0);
c.cancel(w);
}return;
}m=l;
q=m.innerHTML;
var u=D.pop();
if(u){if(!u.nodeType){l.setAttribute("style",u);
}else{D.push(u);
}}m.innerHTML="";
while(u=D.pop()){m.appendChild(u);
m=u;
}m.innerHTML=q;
var A=0;
if(Prototype.Browser.IE6){if(l.nodeName=="P"){var F=l.previousSibling;
if(F&&(F.nodeName=="OL"||F.nodeName=="UL")&&(!l.innerText||l.innerText.length==0)){A=false;
}}}else{if(tinymce.isGecko){A=true;
}}H.caret(m.firstChild||m,A);
},_backspaceListItem:function(v,w){if(w.keyCode!=8&&w.keyCode!=45){return;
}var B=v.selection,q,u=B.getContent(),o=B.getEnd(),z=v.getBody(),y=false;
if(u&&u.replace(/&nbsp;|<br[^>]*>|\s|\n/gi).length>0){return;
}var l=v.dom.getParent(o,v.dom.isBlock,z);
if(!l){return;
}var A=v.dom.getParent(o,function(n){return(n.nodeName=="LI"||(v.dom.isBlock(n)&&n.childNodes.length>1));
},z);
if(!A||A.nodeName!="LI"){return;
}u=null;
if(A.innerText&&A.innerText.length>0){var j=B.getRng(),m=j.duplicate();
m.moveToElementText(A);
if(j.compareEndPoints("StartToStart",m)>0){return;
}if(j.compareEndPoints("StartToEnd",m)<0){u=A.innerHTML;
}}for(o=A.previousSibling;
o&&o.nodeName!="LI";
o=o.previousSibling){}if(!o){for(o=A.nextSibling;
o&&o.nodeName!="LI";
o=o.nextSibling){}y=true;
}v.dom.remove(A);
if(o){if(o.lastChild&&o.lastChild.nodeName=="BR"){o.remove(o.lastChild);
}var t=o.innerText?(o.innerText.replace(/\r/g,"").length):0;
if(!y&&u){o.insertAdjacentHTML("beforeEnd",u);
}B.caret(o,t);
}return c.cancel(w);
},_contextMenu:function(m,j,l){j.addSeparator();
j.add({title:"advanced.selectall_desc",icon:"selectall",cmd:"SelectAll"});
j.addSeparator();
j.add({title:"advanced.undo_desc",icon:"undo",cmd:"Undo"}).setDisabled(!m.editor.undoManager.hasUndo());
j.add({title:"advanced.redo_desc",icon:"redo",cmd:"Redo"}).setDisabled(!m.editor.undoManager.hasUndo());
},_nodeChanged:function(q,z,m,x,l){var B=this,j,y=0,A,u,C=B.settings;
if(tinymce.isIE&&l&&l.initial){var w=Element.extend(q.getBody());
w=Selector.findElement([w],"*:not(object|embed)",0)||w.down();
if(w){q.selection.select(w,true);
q.selection.collapse(true);
}}tinymce.each(B.stateControls,function(n){z.setActive(n,q.queryCommandState(B.controls[n][1]));
});
z.setActive("visualaid",q.hasVisual);
z.setDisabled("undo",!q.undoManager.hasUndo()&&!q.typing);
z.setDisabled("redo",!q.undoManager.hasRedo());
z.setDisabled("outdent",!q.queryCommandState("Outdent"));
j=f.getParent(m,"A");
if(u=z.get("link")){if(!j||!j.name){u.setDisabled(!j&&x);
u.setActive(!!j);
}}if(u=z.get("unlink")){u.setDisabled(!j&&x);
u.setActive(!!j&&!j.name);
}if(u=z.get("anchor")){u.setActive(!!j&&j.name);
if(tinymce.isWebKit){j=f.getParent(m,"IMG");
u.setActive(!!j&&f.getAttrib(j,"mce_name")=="a");
}}j=f.getParent(m,"IMG");
if(u=z.get("image")){u.setActive(!!j&&m.className.indexOf("mceItem")==-1);
}if(u=z.get("styleselect")){if(m.className){B._importClasses();
u.select(m.className);
}else{u.select();
}}if(u=z.get("formatselect")){j=f.getParent(m,f.isBlock);
if(j){na=j.nodeName.toLowerCase();
if(A=f.getAttrib(m,"mce_name")){na=A;
}u.select(na);
}}if(u=z.get("fontselect")){u.select(q.queryCommandValue("FontName"));
}if(u=z.get("fontsizeselect")){u.select(q.queryCommandValue("FontSize"));
}if(C.theme_advanced_path_location){j=f.get(q.id+"_path")||f.add(q.id+"_path_row","span",{id:q.id+"_path"});
f.setHTML(j,"");
q.dom.getParent(m,function(v){var o=v.nodeName.toLowerCase(),p,t,s="";
if(v.nodeType!=1||(f.hasClass(v,"mceItemHidden")||f.hasClass(v,"mceItemRemoved"))){return;
}if(A=f.getAttrib(v,"mce_name")){o=A;
}if(tinymce.isIE&&v.scopeName!=="HTML"){o=v.scopeName+":"+o;
}o=o.replace(/mce\:/g,"");
switch(o){case"b":o="strong";
break;
case"i":o="em";
break;
case"img":if(A=f.getAttrib(v,"src")){s+="src: "+A+" ";
}break;
case"a":if(A=f.getAttrib(v,"name")){s+="name: "+A+" ";
o+="#"+A;
}if(A=f.getAttrib(v,"href")){s+="href: "+A+" ";
}break;
case"font":if(C.convert_fonts_to_spans){o="span";
}if(A=f.getAttrib(v,"face")){s+="font: "+A+" ";
}if(A=f.getAttrib(v,"size")){s+="size: "+A+" ";
}if(A=f.getAttrib(v,"color")){s+="color: "+A+" ";
}break;
case"span":if(A=f.getAttrib(v,"style")){s+="style: "+A+" ";
}break;
}if(A=f.getAttrib(v,"id")){s+="id: "+A+" ";
}if(A=v.className){A=A.replace(/(webkit-[\w\-]+|Apple-[\w\-]+|mceItem\w+|mceVisualAid)/g,"");
if(A&&A.indexOf("mceItem")==-1){if(tinymce.inArray(B._preformattedCodeTags,o)>=0){A=(" "+A+" ").replace(/\s*code\s*/," ");
}else{if((k=A.replace(/^.*cxWrapper(\w*).*$/,"$1"))){o=k.toLowerCase();
A=null;
}else{A=A.strip();
}}if(A&&A.length>0){s+="class: "+A+" ";
if(f.isBlock(v)||o=="img"||o=="span"){o+="."+A;
}}}}o=o.replace(/(html:)/g,"");
o={name:o,node:v,title:s};
B.onResolveName.dispatch(B,o);
s=o.title;
o=o.name;
t=f.create("a",{href:"javascript:;",onmousedown:"return false;",title:s,"class":"mcePath_"+(y++)},o);
if(j.hasChildNodes()){j.insertBefore(f.doc.createTextNode(" \u00bb "),j.firstChild);
j.insertBefore(t,j.firstChild);
}else{j.appendChild(t);
}},q.getBody());
}},_sel:function(j){return this.editor.execCommand("mceSelectNodeDepth",false,j);
},_FormatBlock:function(v,p){var t=this.editor,o;
var m=t.selection;
var o=m.getNode(),w=m.getBookmark();
var l=m.getStart(),q=m.getEnd();
var u=(l==q&&(w.start===w.end||w.length===0));
if(p.charAt(0)=="<"){p=p.substring(1,p.length-2);
}p=p.toLowerCase();
if(tinymce.inArray(this.preformattedCodeTags,p)>=0){t.execCommand("mceBeginUndoLevel",false);
if(u){m.collapse(1);
m.select(l);
}var x={mce_name:p,"class":"code"};
var s=t.dom.createHTML("pre",x,this._getCombinedAsPreformatted(t,l,q));
t.execCommand("mceInsertContent",false,s);
t.execCommand("mceEndUndoLevel",false);
return true;
}var j=this._getPreformattedCodeTag(t,o);
if(l==q&&j){t.execCommand("mceBeginUndoLevel",false);
var y=m.getContent();
if(!y||y.strip().length==0){y="&nbsp;";
}else{if(p!="pre"){y=y.strip().gsub("\n","<br/>");
}}this._splitPreformatted(t,p,y);
o=t.dom.get("__");
o.removeAttribute("id");
m.select(o,true);
t.execCommand("mceEndUndoLevel",false);
return true;
}},_getPreformattedCodeTag:function(l,m){if(!m){return null;
}var j=m.nodeName.toLowerCase();
if(tinymce.inArray(this.preformattedCodeTags,j)>=0||(j=="pre"&&l.dom.hasClass(m,"code"))){return j;
}j=l.dom.getAttrib(m,"mce_name").toLowerCase();
if(tinymce.inArray(this.preformattedCodeTags,j)>=0){return j;
}return null;
},_splitPreformatted:function(q,l,u){var t=q.selection.getNode(),j;
var p=q.dom.uniqueId("mce_split_");
q.selection.setContent(p);
var s=q.dom.create(l,{id:"__"},u);
var o=t.innerHTML.split(p);
o[0]=o[0].replace(/<span[^>]*>$/i,"");
o[1]=o[1].replace(/^<\/span[^>]*>/i,"");
if(o[1].strip().length==0){q.dom.insertAfter(s,t);
}else{j=q.dom.create(t.nodeName,{"class":t.className,mce_name:t.getAttribute("mce_name")},o[1]);
q.dom.insertAfter(j,t);
t.parentNode.insertBefore(s,j);
}if(o[0].strip().length==0){q.dom.remove(t);
}else{t.innerHTML=o[0];
}},_getCombinedAsPreformatted:function(l,q,j){var o=(l.dom.getStyle(q,"display",true).indexOf("inline")==-1)?"\n":"";
var p=[],m;
do{if(l.dom.hasClass(q,"mceNonEditable")){continue;
}m=q.innerHTML;
if(m){if(l.dom.getStyle(q,"whiteSpace",true).indexOf("pre")==-1){m=m.strip().replace(/\n/g,"").replace(/<br[^>]*>/g,"\n");
if(q.nodeName.toLowerCase()=="p"){m+="\n";
}}p.push(m);
}}while(q!=j&&(q=q.nextSibling));
return p.join(o);
},_mceInsertAnchor:function(m,l){var j=this.editor;
j.windowManager.open({url:tinymce.baseURL+"/themes/cx_advanced/anchor.htm",width:320+parseInt(j.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(j.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url});
return true;
},_mceCharMap:function(){var j=this.editor;
j.windowManager.open({url:tinymce.baseURL+"/themes/cx_advanced/charmap.htm",width:550+parseInt(j.getLang("advanced.charmap_delta_width",0)),height:250+parseInt(j.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url});
return true;
},_mceHelp:function(){var j=this.editor;
j.windowManager.open({url:tinymce.baseURL+"/themes/cx_advanced/about.htm",width:480,height:380,inline:true},{theme_url:this.url});
return true;
},_mceColorPicker:function(m,l){var j=this.editor;
l=l||{};
j.windowManager.open({url:tinymce.baseURL+"/themes/cx_advanced/color_picker.htm",width:375+parseInt(j.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(j.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:l.color,func:l.func,theme_url:this.url});
return true;
},_mceImage:function(l,m){var j=this.editor;
if(j.dom.getAttrib(j.selection.getNode(),"class").indexOf("mceItem")!=-1){return;
}j.windowManager.open({url:tinymce.baseURL+"/themes/cx_advanced/image.htm",width:440+parseInt(j.getLang("advanced.image_delta_width",0)),height:300+parseInt(j.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url});
return true;
},_mceLink:function(l,m){var j=this.editor;
j.windowManager.open({url:tinymce.baseURL+"/themes/cx_advanced/link.htm",width:440+parseInt(j.getLang("advanced.link_delta_width",0)),height:240+parseInt(j.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url});
return true;
},_mceNewDocument:function(){var j=this.editor;
j.windowManager.confirm("advanced.newdocument",function(l){if(l){j.execCommand("mceSetContent",false,"");
}});
return true;
}});
tinymce.ThemeManager.add("cx_advanced",tinymce.themes.AdvancedTheme);
}());
tinyMCE.addI18n("en.advanced",{style_select:"Styles",font_size:"Font Size",fontdefault:"Font Family",block:"Format",paragraph:"Paragraph",div:"Div",address:"Address",pre:"Preformatted",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",blockquote:"Blockquote",code:"Code Phrase",samp:"Code Block",kbd:"Example Command",dt:"Definition Term",dd:"Definition Description",bold_desc:"Bold (Ctrl+B)",italic_desc:"Italic (Ctrl+I)",underline_desc:"Underline (Ctrl+U)",striketrough_desc:"Strikethrough",justifyleft_desc:"Align Left",justifycenter_desc:"Center",justifyright_desc:"Align Right",justifyfull_desc:"Justify",bullist_desc:"Bulleted List",numlist_desc:"Numbered List",outdent_desc:"Decrease Indent",indent_desc:"Increase Indent",undo_desc:"Undo (Ctrl+Z)",redo_desc:"Redo (Ctrl+Y)",link_desc:"Create / Edit Hyperlink",unlink_desc:"Remove Hyperlink",image_desc:"Create / Edit Image",cleanup_desc:"Cleanup messy code",code_desc:"Edit HTML Source",sub_desc:"Subscript",sup_desc:"Superscript",hr_desc:"Insert horizontal ruler",removeformat_desc:"Remove formatting",custom1_desc:"Your custom description here",forecolor_desc:"Select text color",backcolor_desc:"Select background color",charmap_desc:"Insert custom character",visualaid_desc:"Toggle guidelines/invisible elements",anchor_desc:"Create / Edit anchor",cut_desc:"Cut (Ctrl+X)",copy_desc:"Copy (Ctrl+C)",paste_desc:"Paste (Ctrl+V)",image_props_desc:"Image properties",newdocument_desc:"New document",help_desc:"Help",blockquote_desc:"Blockquote",clipboard_msg:"Standard Copy/Cut/Paste in Mozilla Firefox are only available as keyboard shortcuts (Ctrl+C / Ctrl+X / Ctrl+V).\n\nDo you want more information about this issue?",path:"Path",newdocument:"Are you sure you want clear all contents?",toolbar_focus:"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",more_colors:"More colors",selectall_desc:"Select All"});
(function(){var b=tinymce.dom.Event,f=tinymce.grep,g=tinymce.each,d=tinymce.inArray,c=tinymce.isOldWebKit;
tinymce.create("tinymce.plugins.Safari",{init:function(h){var i=this,j;
if(!tinymce.isWebKit){return;
}i.editor=h;
i.webKitFontSizes=["x-small","small","medium","large","x-large","xx-large","-webkit-xxx-large"];
i.namedFontSizes=["xx-small","x-small","small","medium","large","x-large","xx-large"];
h.onPaste.add(function(l,n){function m(o){o=o.target;
if(o.nodeType==1){o.style.cssText="";
g(l.dom.select("*",o),function(p){p.style.cssText="";
});
}}b.add(l.getDoc(),"DOMNodeInserted",m);
window.setTimeout(function(){b.remove(l.getDoc(),"DOMNodeInserted",m);
},0);
});
h.onKeyUp.add(function(m,o){var n,l;
if(o.keyCode==46||o.keyCode==8){l=m.getBody();
n=l.innerHTML;
if(l.childNodes.length==1&&!/<(img|hr)/.test(n)&&tinymce.trim(n.replace(/<[^>]+>/g,"")).length==0){m.setContent("",{format:"raw"});
}}});
h.addCommand("InsertUnorderedList",function(l){i._insertList(h,"UL");
});
h.addCommand("InsertOrderedList",function(l){i._insertList(h,"OL");
});
h.addCommand("FormatBlock",function(m,l){var o=h.dom,n=o.getParent(h.selection.getNode(),o.isBlock);
if(n){o.replace(o.create(l),n,1);
}else{h.getDoc().execCommand("FormatBlock",false,l);
}});
h.addCommand("mceInsertContent",function(m,l){h.getDoc().execCommand("InsertText",false,"mce_marker");
h.getBody().innerHTML=h.getBody().innerHTML.replace(/mce_marker/g,l+'<span id="_mce_tmp">XX</span>');
h.selection.select(h.dom.get("_mce_tmp"));
h.getDoc().execCommand("Delete",false," ");
});
h.addQueryValueHandler("FontSize",function(m,l){var n,l;
if((n=h.dom.getParent(h.selection.getStart(),"span"))&&(l=n.style.fontSize)){return tinymce.inArray(i.namedFontSizes,l)+1;
}if((n=h.dom.getParent(h.selection.getEnd(),"span"))&&(l=n.style.fontSize)){return tinymce.inArray(i.namedFontSizes,l)+1;
}return h.getDoc().queryCommandValue("FontSize");
});
h.addQueryValueHandler("FontName",function(m,l){var n,l;
if((n=h.dom.getParent(h.selection.getStart(),"span"))&&(l=n.style.fontFamily)){return l.replace(/, /g,",");
}if((n=h.dom.getParent(h.selection.getEnd(),"span"))&&(l=n.style.fontFamily)){return l.replace(/, /g,",");
}return h.getDoc().queryCommandValue("FontName");
});
h.onClick.add(function(l,m){m=m.target;
if(m.nodeName=="IMG"){i.selElm=m;
l.selection.select(m);
}else{i.selElm=null;
}});
h.onInit.add(function(){i._fixWebKitSpans();
if(c){i._patchSafari2x(h);
}});
h.onSetContent.add(function(){j=h.dom;
g(["strong","b","em","u","strike","sub","sup","a"],function(l){g(f(j.select(l)).reverse(),function(p){var o=p.nodeName.toLowerCase(),m;
if(o=="a"){if(p.name){j.replace(j.create("img",{mce_name:"a",name:p.name,"class":"mceItemAnchor"}),p);
}return;
}switch(o){case"b":case"strong":if(o=="b"){o="strong";
}m="font-weight: bold;";
break;
case"em":m="font-style: italic;";
break;
case"u":m="text-decoration: underline;";
break;
case"sub":m="vertical-align: sub;";
break;
case"sup":m="vertical-align: super;";
break;
case"strike":m="text-decoration: line-through;";
break;
}j.replace(j.create("span",{mce_name:o,style:m,"class":"Apple-style-span"}),p,1);
});
});
});
h.onPreProcess.add(function(l,m){j=l.dom;
g(f(m.node.getElementsByTagName("span")).reverse(),function(q){var o,p;
if(m.get){if(j.hasClass(q,"Apple-style-span")){p=q.style.backgroundColor;
switch(j.getAttrib(q,"mce_name")){case"font":if(!l.settings.convert_fonts_to_spans){j.setAttrib(q,"style","");
}break;
case"strong":case"em":case"sub":case"sup":j.setAttrib(q,"style","");
break;
case"strike":case"u":if(!l.settings.inline_styles){j.setAttrib(q,"style","");
}else{j.setAttrib(q,"mce_name","");
}break;
default:if(!l.settings.inline_styles){j.setAttrib(q,"style","");
}}if(p){q.style.backgroundColor=p;
}}}if(j.hasClass(q,"mceItemRemoved")){j.remove(q,1);
}});
});
h.onPostProcess.add(function(l,m){m.content=m.content.replace(/<br \/><\/(h[1-6]|div|p|address|pre)>/g,"</$1>");
m.content=m.content.replace(/ id=\"undefined\"/g,"");
});
},getInfo:function(){return{longname:"Safari compatibility",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/safari",version:tinymce.majorVersion+"."+tinymce.minorVersion};
},_fixWebKitSpans:function(){var i=this,h=i.editor;
if(!c){b.add(h.getDoc(),"DOMNodeInserted",function(j){j=j.target;
if(j&&j.nodeType==1){i._fixAppleSpan(j);
}});
}else{h.onExecCommand.add(function(){g(h.dom.select("span"),function(j){i._fixAppleSpan(j);
});
h.nodeChanged();
});
}},_fixAppleSpan:function(o){var i=this.editor,q=i.dom,l=this.webKitFontSizes,h=this.namedFontSizes,m=i.settings,j,n;
if(q.getAttrib(o,"mce_fixed")){return;
}if(o.nodeName=="SPAN"&&o.className=="Apple-style-span"){j=o.style;
if(!m.convert_fonts_to_spans){if(j.fontSize){q.setAttrib(o,"mce_name","font");
q.setAttrib(o,"size",d(l,j.fontSize)+1);
}if(j.fontFamily){q.setAttrib(o,"mce_name","font");
q.setAttrib(o,"face",j.fontFamily);
}if(j.color){q.setAttrib(o,"mce_name","font");
q.setAttrib(o,"color",q.toHex(j.color));
}if(j.backgroundColor){q.setAttrib(o,"mce_name","font");
q.setStyle(o,"background-color",j.backgroundColor);
}}else{if(j.fontSize){q.setStyle(o,"fontSize",h[d(l,j.fontSize)]);
}}if(j.fontWeight=="bold"){q.setAttrib(o,"mce_name","strong");
}if(j.fontStyle=="italic"){q.setAttrib(o,"mce_name","em");
}if(j.textDecoration=="underline"){q.setAttrib(o,"mce_name","u");
}if(j.textDecoration=="line-through"){q.setAttrib(o,"mce_name","strike");
}if(j.verticalAlign=="super"){q.setAttrib(o,"mce_name","sup");
}if(j.verticalAlign=="sub"){q.setAttrib(o,"mce_name","sub");
}q.setAttrib(o,"mce_fixed","1");
}},_patchSafari2x:function(i){var j=this,l,n,m=i.dom,h;
if(i.windowManager.onBeforeOpen){i.windowManager.onBeforeOpen.add(function(){r=i.selection.getRng();
});
}i.selection.select=function(o){this.getSel().setBaseAndExtent(o,0,o,1);
};
n=i.selection.getNode;
i.selection.getNode=function(){return j.selElm||n.call(this);
};
i.selection.getRng=function(){var p=this,q=p.getSel(),y=i.getDoc(),v,w,x,u;
if(q.anchorNode){v=y.createRange();
try{w=y.createRange();
w.setStart(q.anchorNode,q.anchorOffset);
w.collapse(1);
x=y.createRange();
x.setStart(q.focusNode,q.focusOffset);
x.collapse(1);
u=w.compareBoundaryPoints(w.START_TO_END,x)<0;
v.setStart(u?q.anchorNode:q.focusNode,u?q.anchorOffset:q.focusOffset);
v.setEnd(u?q.focusNode:q.anchorNode,u?q.focusOffset:q.anchorOffset);
h=v;
}catch(o){}}return v||h;
};
l=i.selection.setContent;
i.selection.setContent=function(t,q){var u=this.getRng(),o;
try{l.call(this,t,q);
}catch(p){o=m.create("body");
o.innerHTML=t;
g(o.childNodes,function(s){u.insertNode(s.cloneNode(true));
});
}};
},_insertBR:function(h){var m=h.dom,j=h.selection,l=j.getRng(),i;
l.insertNode(i=m.create("br"));
l.setStartAfter(i);
l.setEndAfter(i);
j.setRng(l);
if(j.getSel().focusNode==i.previousSibling){j.select(m.insertAfter(m.doc.createTextNode("\u00a0"),i));
j.collapse(1);
}h.getWin().scrollTo(0,m.getPos(j.getRng().startContainer).y);
},_insertList:function(m,h){var p=m.dom,o=p.getParent(m.selection.getNode(),function(i){return(i.nodeName=="P"||i.nodeName==h);
});
if(o&&o.nodeName=="P"){var j=p.create(h),n=p.create("LI");
p.replace(j,o,1);
p.setHTML(j,"");
j.appendChild(n);
m.selection.select(n);
}else{m.execCommand("InsertUnorderedList",false);
}}});
tinymce.PluginManager.add("safari",tinymce.plugins.Safari);
})();
(function(){var b=tinymce.dom.Event,d=tinymce.each,c=tinymce.DOM;
tinymce.create("tinymce.plugins.ContextMenu",{init:function(f){var h=this;
h.editor=f;
h.onContextMenu=new tinymce.util.Dispatcher(this);
f.onContextMenu.add(function(i,j){if(!j.ctrlKey){h._getMenu(i).showMenu(j.clientX,j.clientY);
b.add(document,"click",g);
b.cancel(j);
}});
function g(){if(h._menu){h._menu.removeAll();
h._menu.destroy();
b.remove(document,"click",g);
}}f.onMouseDown.add(g);
f.onKeyDown.add(g);
},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion};
},_getMenu:function(j){var p=this,h=p._menu,l=j.selection,g=l.isCollapsed(),f=l.getNode()||j.getBody(),i,o,n;
if(h){h.removeAll();
h.destroy();
}o=c.getPos(j.getContentAreaContainer());
n=c.getPos(j.getContainer());
h=j.controlManager.createDropMenu("contextmenu",{offset_x:o.x,offset_y:o.y,constrain:1});
p._menu=h;
h.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(g);
h.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(g);
h.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});
if((f.nodeName=="A"&&!j.dom.getAttrib(f,"name"))||!g){h.addSeparator();
h.add({title:"advanced.link_desc",icon:"link",cmd:j.plugins.advlink?"mceAdvLink":"mceLink",ui:true});
h.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});
}h.addSeparator();
h.add({title:"advanced.image_desc",icon:"image",cmd:j.plugins.advimage?"mceAdvImage":"mceImage",ui:true});
h.addSeparator();
i=h.addMenu({title:"contextmenu.align"});
i.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});
i.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});
i.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});
i.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});
p.onContextMenu.dispatch(p,h,f,g);
return h;
}});
tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu);
})();
(function(){var Event=tinymce.dom.Event;
tinymce.create("tinymce.plugins.PastePlugin",{init:function(ed,url){var t=this;
t.editor=ed;
ed.addCommand("mcePasteText",function(ui,v){if(ui){if((ed.getParam("paste_use_dialog",true))||(!tinymce.isIE)){ed.windowManager.open({file:url+"/pastetext.htm",width:450,height:400,inline:1},{plugin_url:url});
}else{t._insertText(clipboardData.getData("Text"),true);
}}else{t._insertText(v.html,v.linebreaks);
}});
ed.addCommand("mcePasteWord",function(ui,v){if(ui){if((ed.getParam("paste_use_dialog",true))||(!tinymce.isIE)){ed.windowManager.open({file:url+"/pasteword.htm",width:450,height:400,inline:1},{plugin_url:url});
}else{t._insertText(t._clipboardHTML());
}}else{t._insertWordContent(v);
}});
ed.addCommand("mceSelectAll",function(){ed.execCommand("selectall");
});
ed.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText",ui:true});
ed.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord",ui:true});
ed.addButton("selectall",{title:"paste.selectall_desc",cmd:"mceSelectAll"});
if(ed.getParam("paste_auto_cleanup_on_paste",false)){ed.onPaste.add(function(ed,e){return t._handlePasteEvent(e);
});
}if(!tinymce.isIE&&ed.getParam("paste_auto_cleanup_on_paste",false)){ed.onKeyDown.add(function(ed,e){if(e.ctrlKey&&e.keyCode==86){window.setTimeout(function(){ed.execCommand("mcePasteText",true);
},1);
Event.cancel(e);
}});
}},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion};
},_handlePasteEvent:function(e){var html=this._clipboardHTML(),ed=this.editor,sel=ed.selection,r;
if(ed&&(r=sel.getRng())&&r.text.length>0){ed.execCommand("delete");
}if(html&&html.length>0){ed.execCommand("mcePasteWord",false,html);
}return Event.cancel(e);
},_insertText:function(content,bLinebreaks){if(content&&content.length>0){if(bLinebreaks){if(this.editor.getParam("paste_create_paragraphs",true)){var rl=this.editor.getParam("paste_replace_list","\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,\",\u2019,',\u2013|\u2014|\u2015|\u2212,-").split(",");
for(var i=0;
i<rl.length;
i+=2){content=content.replace(new RegExp(rl[i],"gi"),rl[i+1]);
}content=content.replace(/\r\n\r\n/g,"</p><p>");
content=content.replace(/\r\r/g,"</p><p>");
content=content.replace(/\n\n/g,"</p><p>");
if((pos=content.indexOf("</p><p>"))!=-1){this.editor.execCommand("Delete");
var node=this.editor.selection.getNode();
var breakElms=[];
do{if(node.nodeType==1){if(node.nodeName=="TD"||node.nodeName=="BODY"){break;
}breakElms[breakElms.length]=node;
}}while(node=node.parentNode);
var before="",after="</p>";
before+=content.substring(0,pos);
for(var i=0;
i<breakElms.length;
i++){before+="</"+breakElms[i].nodeName+">";
after+="<"+breakElms[(breakElms.length-1)-i].nodeName+">";
}before+="<p>";
content=before+content.substring(pos+7)+after;
}}if(this.editor.getParam("paste_create_linebreaks",true)){content=content.replace(/\r\n/g,"<br />");
content=content.replace(/\r/g,"<br />");
content=content.replace(/\n/g,"<br />");
}}this.editor.execCommand("mceInsertRawHTML",false,content);
}},_insertWordContent:function(content){var t=this,ed=t.editor;
if(content&&content.length>0){var bull=String.fromCharCode(8226);
var middot=String.fromCharCode(183);
if(ed.getParam("paste_insert_word_content_callback")){content=ed.execCallback("paste_insert_word_content_callback","before",content);
}var rl=ed.getParam("paste_replace_list","\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,\",\u2019,',\u2013|\u2014|\u2015|\u2212,-").split(",");
for(var i=0;
i<rl.length;
i+=2){content=content.replace(new RegExp(rl[i],"gi"),rl[i+1]);
}if(this.editor.getParam("paste_convert_headers_to_strong",false)){content=content.replace(new RegExp("<p class=MsoHeading.*?>(.*?)</p>","gi"),"<p><b>$1</b></p>");
}content=content.replace(new RegExp('tab-stops: list [0-9]+.0pt">',"gi"),'">--list--');
content=content.replace(new RegExp(bull+"(.*?)<BR>","gi"),"<p>"+middot+"$1</p>");
content=content.replace(new RegExp('<SPAN style="mso-list: Ignore">',"gi"),"<span>"+bull);
content=content.replace(/<o:p><\/o:p>/gi,"");
content=content.replace(new RegExp('<br style="page-break-before: always;.*>',"gi"),"-- page break --");
content=content.replace(new RegExp("<(!--)([^>]*)(--)>","g"),"");
if(this.editor.getParam("paste_remove_spans",true)){content=content.replace(/<\/?span[^>]*>/gi,"");
}if(this.editor.getParam("paste_remove_styles",true)){content=content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)',"gi"),"<$1$3");
}content=content.replace(/<\/?font[^>]*>/gi,"");
switch(this.editor.getParam("paste_strip_class_attributes","all")){case"all":content=content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");
break;
case"mso":content=content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)',"gi"),"<$1$3");
break;
}content=content.replace(new RegExp('href="?'+this._reEscape(""+document.location)+"","gi"),'href="'+this.editor.documentBaseURI.getURI());
content=content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");
content=content.replace(/<\\?\?xml[^>]*>/gi,"");
content=content.replace(/<\/?\w+:[^>]*>/gi,"");
content=content.replace(/-- page break --\s*<p>&nbsp;<\/p>/gi,"");
content=content.replace(/-- page break --/gi,"");
if(!this.editor.getParam("force_p_newlines")){content=content.replace("","","gi");
content=content.replace("</p>","<br /><br />","gi");
}if(!tinymce.isIE&&!this.editor.getParam("force_p_newlines")){content=content.replace(/<\/?p[^>]*>/gi,"");
}content=content.replace(/<\/?div[^>]*>/gi,"");
if(this.editor.getParam("paste_convert_middot_lists",true)){var div=ed.dom.create("div",null,content);
var className=this.editor.getParam("paste_unindented_list_class","unIndentedList");
while(this._convertMiddots(div,"--list--")){}while(this._convertMiddots(div,middot,className)){}while(this._convertMiddots(div,bull)){}content=div.innerHTML;
}if(this.editor.getParam("paste_convert_headers_to_strong",false)){content=content.replace(/<h[1-6]>&nbsp;<\/h[1-6]>/gi,"<p>&nbsp;&nbsp;</p>");
content=content.replace(/<h[1-6]>/gi,"<p><b>");
content=content.replace(/<\/h[1-6]>/gi,"</b></p>");
content=content.replace(/<b>&nbsp;<\/b>/gi,"<b>&nbsp;&nbsp;</b>");
content=content.replace(/^(&nbsp;)*/gi,"");
}content=content.replace(/--list--/gi,"");
if(ed.getParam("paste_insert_word_content_callback")){content=ed.execCallback("paste_insert_word_content_callback","after",content);
}this.editor.execCommand("mceInsertContent",false,content);
if(this.editor.getParam("paste_force_cleanup_wordpaste",true)){var ed=this.editor;
window.setTimeout(function(){ed.execCommand("mceCleanup");
},1);
}}},_reEscape:function(s){var l="?.\\*[](){}+^$:";
var o="";
for(var i=0;
i<s.length;
i++){var c=s.charAt(i);
if(l.indexOf(c)!=-1){o+="\\"+c;
}else{o+=c;
}}return o;
},_convertMiddots:function(div,search,class_name){var ed=this.editor,mdot=String.fromCharCode(183),bull=String.fromCharCode(8226);
var nodes,prevul,i,p,ul,li,np,cp,li;
nodes=div.getElementsByTagName("p");
for(i=0;
i<nodes.length;
i++){p=nodes[i];
if(p.innerHTML.indexOf(search)==0){ul=ed.dom.create("ul");
if(class_name){ul.className=class_name;
}li=ed.dom.create("li");
li.innerHTML=p.innerHTML.replace(new RegExp(""+mdot+"|"+bull+"|--list--|&nbsp;","gi"),"");
ul.appendChild(li);
np=p.nextSibling;
while(np){if(np.nodeType==3&&new RegExp("^\\s$","m").test(np.nodeValue)){np=np.nextSibling;
continue;
}if(search==mdot){if(np.nodeType==1&&new RegExp("^o(\\s+|&nbsp;)").test(np.innerHTML)){if(!prevul){prevul=ul;
ul=ed.dom.create("ul");
prevul.appendChild(ul);
}np.innerHTML=np.innerHTML.replace(/^o/,"");
}else{if(prevul){ul=prevul;
prevul=null;
}if(np.nodeType!=1||np.innerHTML.indexOf(search)!=0){break;
}}}else{if(np.nodeType!=1||np.innerHTML.indexOf(search)!=0){break;
}}cp=np.nextSibling;
li=ed.dom.create("li");
li.innerHTML=np.innerHTML.replace(new RegExp(""+mdot+"|"+bull+"|--list--|&nbsp;","gi"),"");
np.parentNode.removeChild(np);
ul.appendChild(li);
np=cp;
}p.parentNode.replaceChild(ul,p);
return true;
}}return false;
},_clipboardHTML:function(){var div=document.getElementById("_TinyMCE_clipboardHTML");
if(!div){var div=document.createElement("DIV");
div.id="_TinyMCE_clipboardHTML";
with(div.style){visibility="hidden";
overflow="hidden";
position="absolute";
width=1;
height=1;
}document.body.appendChild(div);
}div.innerHTML="";
var rng=document.body.createTextRange();
rng.moveToElementText(div);
rng.execCommand("Paste");
var html=div.innerHTML;
div.innerHTML="";
return html;
}});
tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin);
})();
(function(){tinymce.create("tinymce.plugins.EmotionsPlugin",{init:function(b,c){b.addCommand("mceEmotion",function(){b.windowManager.open({file:c+"/emotions.htm",width:250+parseInt(b.getLang("emotions.delta_width",0)),height:160+parseInt(b.getLang("emotions.delta_height",0)),inline:1},{plugin_url:c});
});
b.addButton("emotions",{title:"emotions.emotions_desc",cmd:"mceEmotion"});
},getInfo:function(){return{longname:"Emotions",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions",version:tinymce.majorVersion+"."+tinymce.minorVersion};
}});
tinymce.PluginManager.add("emotions",tinymce.plugins.EmotionsPlugin);
})();
tinymce.PluginManager.requireLangPack("simplebrowser");
(function(){tinymce.create("tinymce.plugins.TinyMCE_SimpleBrowserPlugin",{options:{},getInfo:function(){return{longname:"Simple Browser plugin 3.4",author:"Andrew Tetlaw, Conor Sibley, Joe Khoobyar",authorurl:"www.collectivex.com",infourl:"http://tetlaw.id.au/view/blog/fckeditor-file-browser-plugin-for-tinymce-editor/",version:"3.4"};
},init:function(c,d){tinyMCE.settings.file_browser_callback="TinyMCE_SimpleBrowser.browse";
var b=c.getParam("plugin_simplebrowser_browselinkurl",false);
b=CX.url_root()+b.replace(/([&?]Connector=)/,"$1"+CX.url_root());
c.addCommand("mceSimpleBrowser",function(){c.windowManager.open({file:b,width:600,height:400,resizable:"yes",inline:"no",close_previous:"no"},{input:"file_browser",plugin_url:d});
});
c.addButton("simplebrowser",{title:"Attach a File",cmd:"mceSimpleBrowser",image:CX.url_root()+"/images/attach.gif"});
}});
tinymce.PluginManager.add("simplebrowser",tinymce.plugins.TinyMCE_SimpleBrowserPlugin);
})();
var TinyMCE_SimpleBrowser={init:function(){},browse:function(d,b,c,f){switch(c.toLowerCase()){case"image":if(tinyMCE.activeEditor.getParam("plugin_simplebrowser_browseimageurl",false)){this.openServerBrowser(d,b,c,f,tinyMCE.activeEditor.getParam("plugin_simplebrowser_browseimageurl",false));
}else{alert("Image browser URL not set.");
}break;
case"flash":if(tinyMCE.activeEditor.getParam("plugin_simplebrowser_browseflashurl",false)){this.openServerBrowser(d,b,c,f,tinyMCE.activeEditor.getParam("plugin_simplebrowser_browseflashurl",false));
}else{alert("Flash browser URL not set.");
}break;
default:if(tinyMCE.activeEditor.getParam("plugin_simplebrowser_browselinkurl",false)){this.openServerBrowser(d,b,c,f,tinyMCE.activeEditor.getParam("plugin_simplebrowser_browselinkurl",false));
}else{alert("Link browser URL not set.");
}}},openServerBrowser:function(f,c,d,g,b){var b=tinyMCE.activeEditor.getParam("plugin_simplebrowser_browselinkurl",false);
b=CX.url_root()+b.replace(/([&?]Connector=)/,"$1"+CX.url_root());
tinyMCE.activeEditor.windowManager.open({file:b,width:600,height:400,resizable:"yes",inline:"no",close_previous:"no"},{window:g,input:f,editor_id:tinyMCE.selectedInstance.editorId,plugin_url:c});
return false;
}};
function TinyMCE_SimpleBrowser_browse(d,b,c,f){TinyMCE_SimpleBrowser.browse(d,b,c,f);
}tinyMCE.addI18n("en.simplebrowser",{desc:"This is a file manager button"});
(function(){var f=tinymce.DOM,c=tinymce.dom.Element,b=tinymce.dom.Event,g=tinymce.each,d=tinymce.is;
tinymce.create("tinymce.plugins.InlinePopups",{init:function(h,i){h.onBeforeRenderUI.add(function(){h.windowManager=new tinymce.InlineWindowManager(h);
f.loadCSS(i+"/skins/"+(h.settings.inlinepopups_skin||"clearlooks2")+"/window.css");
});
},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion};
}});
tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(h){var i=this;
i.parent(h);
i.zIndex=300000;
i.count=0;
},open:function(x,l){var B=this,j,m="",v=B.editor,h=0,y=0,i,o,q,s,n,z,A;
x=x||{};
l=l||{};
if(!x.inline){return B.parent(x,l);
}if(!x.type){B.bookmark=v.selection.getBookmark("simple");
}j=f.uniqueId();
i=f.getViewPort();
x.width=parseInt(x.width||320);
x.height=parseInt(x.height||240)+(tinymce.isIE?8:0);
x.min_width=parseInt(x.min_width||150);
x.min_height=parseInt(x.min_height||100);
x.max_width=parseInt(x.max_width||2000);
x.max_height=parseInt(x.max_height||2000);
x.left=x.left||Math.round(Math.max(i.x,i.x+(i.w/2)-(x.width/2)));
x.top=x.top||Math.round(Math.max(i.y,i.y+(i.h/2)-(x.height/2)));
x.movable=x.resizable=true;
l.mce_width=x.width;
l.mce_height=x.height;
l.mce_inline=true;
l.mce_window_id=j;
l.mce_auto_focus=x.auto_focus;
B.features=x;
B.params=l;
B.onOpen.dispatch(B,x,l);
if(x.type){m+=" mceModal";
if(x.type){m+=" mce"+x.type.substring(0,1).toUpperCase()+x.type.substring(1);
}x.resizable=false;
}if(x.statusbar){m+=" mceStatusbar";
}if(x.resizable){m+=" mceResizable";
}if(x.minimizable){m+=" mceMinimizable";
}if(x.maximizable){m+=" mceMaximizable";
}if(x.movable){m+=" mceMovable";
}B._addAll(f.doc.body,["div",{id:j,"class":v.settings.inlinepopups_skin||"clearlooks2",style:"width:100px;height:100px"},["div",{id:j+"_wrapper","class":"mceWrapper"+m,blocker:1},["div",{id:j+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:j+"_title"},x.title||""]],["div",{id:j+"_middle","class":"mceMiddle"},["div",{id:j+"_left","class":"mceLeft"}],["span",{id:j+"_content"}],["div",{id:j+"_right","class":"mceRight"}]],["div",{id:j+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:j+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:j+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:j+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:j+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:j+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:j+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:j+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:j+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:j+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);
f.setStyles(j,{top:-10000,left:-10000});
if(tinymce.isGecko){f.setStyle(j,"overflow","auto");
}if(!x.type){h+=f.get(j+"_left").clientWidth;
h+=f.get(j+"_right").clientWidth;
y+=f.get(j+"_top").clientHeight;
y+=f.get(j+"_bottom").clientHeight;
}f.setStyles(j,{top:x.top,left:x.left,width:x.width+h,height:x.height+y});
A=x.url||x.file;
if(A){if(tinymce.relaxedDomain){A+=(A.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain;
}A=tinymce._addVer(A);
}if(!x.type){f.add(j+"_content","iframe",{id:j+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});
f.setStyles(j+"_ifr",{width:x.width,height:x.height});
f.setAttrib(j+"_ifr","src",A);
}else{f.add(j+"_wrapper","a",{id:j+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");
if(x.type=="confirm"){f.add(j+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel");
}f.add(j+"_middle","div",{"class":"mceIcon"});
f.setHTML(j+"_content",x.content.replace("\n","<br />"));
}q=b.add(j,"mousedown",function(u){var C=u.target,p,t;
p=B.windows[j];
B.focus(j);
if(C.nodeName=="A"||C.nodeName=="a"){if(C.className=="mceMax"){p.oldPos=p.element.getXY();
p.oldSize=p.element.getSize();
t=f.getViewPort();
t.w-=2;
t.h-=2;
p.element.moveTo(t.x,t.y);
p.element.resizeTo(t.w,t.h);
f.setStyles(j+"_ifr",{width:t.w-p.deltaWidth,height:t.h-p.deltaHeight});
f.addClass(j+"_wrapper","mceMaximized");
}else{if(C.className=="mceMed"){p.element.moveTo(p.oldPos.x,p.oldPos.y);
p.element.resizeTo(p.oldSize.w,p.oldSize.h);
p.iframeElement.resizeTo(p.oldSize.w-p.deltaWidth,p.oldSize.h-p.deltaHeight);
f.removeClass(j+"_wrapper","mceMaximized");
}else{if(C.className=="mceMove"){return B._startDrag(j,u,C.className);
}else{if(f.hasClass(C,"mceResize")){return B._startDrag(j,u,C.className.substring(13));
}}}}}});
s=b.add(j,"click",function(p){var t=p.target;
B.focus(j);
if(t.nodeName=="A"||t.nodeName=="a"){switch(t.className){case"mceClose":B.close(null,j);
return b.cancel(p);
case"mceButton mceOk":case"mceButton mceCancel":x.button_func(t.className=="mceButton mceOk");
return b.cancel(p);
}}});
B.windows=B.windows||{};
z=B.windows[j]={id:j,mousedown_func:q,click_func:s,element:new c(j,{blocker:1}),iframeElement:new c(j+"_ifr"),features:x,deltaWidth:h,deltaHeight:y};
z.iframeElement.on("focus",function(){B.focus(j);
});
if(B.count==0&&B.editor.getParam("dialog_type")=="modal"){f.add(f.doc.body,"div",{id:"mceModalBlocker","class":(B.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{left:i.x,top:i.y,zIndex:B.zIndex-1}});
f.show("mceModalBlocker");
}else{f.setStyle("mceModalBlocker","z-index",B.zIndex-1);
}B.focus(j);
B._fixIELayout(j,1);
if(f.get(j+"_ok")){f.get(j+"_ok").focus();
}B.count++;
return z;
},focus:function(j){var i=this,h=i.windows[j];
h.zIndex=this.zIndex++;
h.element.setStyle("zIndex",h.zIndex);
h.element.update();
j=j+"_wrapper";
f.removeClass(i.lastId,"mceFocus");
f.addClass(j,"mceFocus");
i.lastId=j;
},_addAll:function(o,l){var j,p,h=this,m=tinymce.DOM;
if(d(l,"string")){o.appendChild(m.doc.createTextNode(l));
}else{if(l.length){o=o.appendChild(m.create(l[0],l[1]));
for(j=2;
j<l.length;
j++){h._addAll(o,l[j]);
}}}},_startDrag:function(A,K,I){var u=this,z,D,G=f.doc,h,o=u.windows[A],j=o.element,C=j.getXY(),B,v,J,i,E,y,x,m,l,q,n,s,F;
i={x:0,y:0};
E=f.getViewPort();
E.w-=2;
E.h-=2;
m=K.screenX;
l=K.screenY;
q=n=s=F=0;
z=b.add(G,"mouseup",function(p){b.remove(G,"mouseup",z);
b.remove(G,"mousemove",D);
if(h){h.remove();
}j.moveBy(q,n);
j.resizeBy(s,F);
v=j.getSize();
f.setStyles(A+"_ifr",{width:v.w-o.deltaWidth,height:v.h-o.deltaHeight});
u._fixIELayout(A,1);
return b.cancel(p);
});
if(I!="Move"){H();
}function H(){if(h){return;
}u._fixIELayout(A,0);
f.add(G.body,"div",{id:"mceEventBlocker","class":"mceEventBlocker "+(u.editor.settings.inlinepopups_skin||"clearlooks2"),style:{left:E.x,top:E.y,zIndex:u.zIndex+1}});
h=new c("mceEventBlocker");
h.update();
B=j.getXY();
v=j.getSize();
y=i.x+B.x-E.x;
x=i.y+B.y-E.y;
f.add(h.get(),"div",{id:"mcePlaceHolder","class":"mcePlaceHolder",style:{left:y,top:x,width:v.w,height:v.h}});
J=new c("mcePlaceHolder");
}D=b.add(G,"mousemove",function(w){var p,L,t;
H();
p=w.screenX-m;
L=w.screenY-l;
switch(I){case"ResizeW":q=p;
s=0-p;
break;
case"ResizeE":s=p;
break;
case"ResizeN":case"ResizeNW":case"ResizeNE":if(I=="ResizeNW"){q=p;
s=0-p;
}else{if(I=="ResizeNE"){s=p;
}}n=L;
F=0-L;
break;
case"ResizeS":case"ResizeSW":case"ResizeSE":if(I=="ResizeSW"){q=p;
s=0-p;
}else{if(I=="ResizeSE"){s=p;
}}F=L;
break;
case"mceMove":q=p;
n=L;
break;
}if(s<(t=o.features.min_width-v.w)){if(q!==0){q+=s-t;
}s=t;
}if(F<(t=o.features.min_height-v.h)){if(n!==0){n+=F-t;
}F=t;
}s=Math.min(s,o.features.max_width-v.w);
F=Math.min(F,o.features.max_height-v.h);
q=Math.max(q,E.x-(y+E.x));
n=Math.max(n,E.y-(x+E.y));
q=Math.min(q,(E.w+E.x)-(y+v.w+E.x));
n=Math.min(n,(E.h+E.y)-(x+v.h+E.y));
if(q+n!==0){if(y+q<0){q=0;
}if(x+n<0){n=0;
}J.moveTo(y+q,x+n);
}if(s+F!==0){J.resizeTo(v.w+s,v.h+F);
}return b.cancel(w);
});
return b.cancel(K);
},resizeBy:function(i,j,l){var h=this.windows[l];
if(h){h.element.resizeBy(i,j);
h.iframeElement.resizeBy(i,j);
}},close:function(m,o){var j=this,i,n=f.doc,h=0,l;
j.count--;
if(j.count==0){f.remove("mceModalBlocker");
}if(!o&&m){j.parent(m);
return;
}if(i=j.windows[o]){j.onClose.dispatch(j);
b.remove(n,"mousedown",i.mousedownFunc);
b.remove(n,"click",i.clickFunc);
b.clear(o);
b.clear(o+"_ifr");
f.setAttrib(o+"_ifr","src",'javascript:""');
i.element.remove();
delete j.windows[o];
g(j.windows,function(p){if(p.zIndex>h){l=p;
h=p.zIndex;
}});
if(l){j.focus(l.id);
}}},setTitle:function(h,j){var i;
if(i=f.get(j+"_title")){i.innerHTML=f.encode(h);
}},alert:function(i,h,m){var l=this,j;
j=l.open({title:l,type:"alert",button_func:function(n){if(h){h.call(n||l,n);
}l.close(null,j.id);
},content:f.encode(l.editor.getLang(i,i)),inline:1,width:400,height:130});
},confirm:function(i,h,m){var l=this,j;
j=l.open({title:l,type:"confirm",button_func:function(n){if(h){h.call(n||l,n);
}l.close(null,j.id);
},content:f.encode(l.editor.getLang(i,i)),inline:1,width:400,height:130});
},_fixIELayout:function(l,j){var h,i;
if(!tinymce.isIE6){return;
}g(["n","s","w","e","nw","ne","sw","se"],function(m){var n=f.get(l+"_resize_"+m);
f.setStyles(n,{width:j?n.clientWidth:"",height:j?n.clientHeight:"",cursor:f.getStyle(n,"cursor",1)});
f.setStyle(l+"_bottom","bottom","-1px");
n=0;
});
if(h=this.windows[l]){h.element.hide();
h.element.show();
g(f.select("div,a",l),function(n,m){if(n.currentStyle.backgroundImage!="none"){i=new Image();
i.src=n.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1");
}});
f.get(l).style.filter="";
}}});
tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups);
})();
(function(){tinymce.create("tinymce.plugins.IESpell",{init:function(b,c){var d=this,f;
if(!tinymce.isIE){return;
}d.editor=b;
b.addCommand("mceIESpell",function(){try{f=new ActiveXObject("ieSpell.ieSpellExtension");
f.CheckDocumentNode(b.getDoc().documentElement);
}catch(g){if(g.number==-2146827859){b.windowManager.confirm(b.getLang("iespell.download"),function(h){if(h){window.open("http://www.iespell.com/download.php","ieSpellDownload","");
}});
}else{b.windowManager.alert("Error Loading ieSpell: Exception "+g.number);
}}});
b.addButton("iespell",{title:"iespell.iespell_desc",cmd:"mceIESpell"});
},getInfo:function(){return{longname:"IESpell (IE Only)",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell",version:tinymce.majorVersion+"."+tinymce.minorVersion};
}});
tinymce.PluginManager.add("iespell",tinymce.plugins.IESpell);
})();
(function(){var b=tinymce.dom.Event;
tinymce.create("tinymce.plugins.InsertWidgetPlugin",{init:function(c,d){var f=this;
f.editor=c;
c.addCommand("mceInsertWidgetCode",function(h,g){if(h){c.windowManager.open({file:d+"/insertcode.htm",width:450,height:400,inline:1},{plugin_url:d});
}else{f._insertText(g.html,g.linebreaks);
}});
c.addButton("insertwidget",{title:"Insert Video or Embedded Widget","class":"mce_media",cmd:"mceInsertWidgetCode",ui:true});
},getInfo:function(){return{longname:"Insert Widget Code",author:"CollectiveX Inc.",authorurl:"http://www.collectivex.com",infourl:"http://www.collectivex.com",version:"0.1"};
},_insertText:function(d,c){if(d&&d.length>0){this.editor.execCommand("mceInsertRawHTML",false,d);
}}});
tinymce.PluginManager.add("insertwidget",tinymce.plugins.InsertWidgetPlugin);
})();
(function(){var b=tinymce.dom.Event;
tinymce.create("tinymce.plugins.NonEditable2Plugin",{init:function(c,d){var f=this;
f.editor=c;
f.editClass=c.getParam("noneditable_editable_class","mceEditable");
f.nonEditClass=c.getParam("noneditable_noneditable_class","mceNonEditable");
c.onNodeChange.addToTop(function(p,v,j,t,h){var i=p.selection,u=i.getStart(),q=i.getEnd();
var m=f._nonEditableContainer(u),l;
var g=(m||(u==q))?m:(l=f._nonEditableContainer(q));
f._setDisabled(g);
if(!g){return;
}if(!t||u!=q){if(!tinymce.is(l)){l=f._nonEditableContainer(q);
}if(m==l){i.select(m,1);
}}try{if(h.initial){return;
}}catch(s){return false;
}return false;
});
},getInfo:function(){return{longname:"Non editable elements (v2)",author:"Moxiecode Systems AB (modifications: Joe Khoobyar, CollectiveX)",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable",version:tinymce.majorVersion+"."+tinymce.minorVersion};
},_nonEditableContainer:function(h){var g=null,d=this.editor,f=this.nonEditClass,c=d.getBody();
while(h&&h!=c){if(d.dom.hasClass(h,f)){g=h;
}h=h.parentNode;
}return g;
},_block:function(c,d){return b.cancel(d);
},_blockKeys:function(c,f){var d=this,g=d.element;
switch(f.keyCode){case 9:if(c.getParam("tab_focus")&&f.keyCode==9){return;
}break;
}return b.cancel(f);
},_nonEditableKeys:function(f,i){var g=this,l=g.element;
switch(i.keyCode){case 37:case 38:var c=f.getBody();
l=f.dom.getParent(l,function(d){return d.previousSibling;
},c);
if(l){f.selection.caret(l.previousSibling,false);
}f.nodeChanged();
break;
case 39:case 40:case 13:var c=f.getBody();
l=f.dom.getParent(l,function(d){return d.nextSibling;
},c);
if(l){f.selection.caret(l.nextSibling,true);
}if(i.keyCode==13){if(l){l=l.nextSibling;
if(l.parentNode==c){while(l.nodeType==3&&(l=l.nextSibling)){}}if(l){f.selection.caret(l,true);
return;
}}var j=f.getDoc(),h=f.dom.getParent(this.element,f.dom.isBlock,c);
if(!h||h==this.element){h=j.createElement("p");
f.dom.insertAfter(h,this.element);
}l=j.createElement("br");
h.appendChild(l);
h.normalize();
f.selection.select(l);
f.selection.collapse(1);
l.scrollIntoView(0);
}f.nodeChanged();
break;
case 8:case 46:f.selection.caret(l,true);
f.dom.remove(l);
f.nodeChanged();
break;
default:return g._blockKeys(f,i);
}return b.cancel(i);
},_setDisabled:function(h){var f=this,c=f.editor;
var g=(h?1:0);
tinymce.each(c.controlManager.controls,function(j){j.setDisabled(g);
});
if(g!==f.disabled){var i=c.getDoc();
if(g){f.element=h;
c.onKeyDown.addToTop(f._nonEditableKeys,f);
c.onKeyPress.addToTop(f._blockKeys,f);
c.onKeyUp.addToTop(f._blockKeys,f);
c.onPaste.addToTop(f._block,f);
if(tinymce.isGecko){try{i.execCommand("enableInlineTableEditing",false,false);
}catch(d){}try{i.execCommand("enableObjectResizing",false,false);
}catch(d){}}}else{c.onKeyDown.remove(f._nonEditableKeys,f);
c.onKeyPress.remove(f._blockKeys,f);
c.onKeyUp.remove(f._blockKeys,f);
c.onPaste.remove(f._block,f);
if(tinymce.isGecko){if(g.table_inline_editing){try{i.execCommand("enableInlineTableEditing",false,true);
}catch(d){}}if(g.object_resizing){try{i.execCommand("enableObjectResizing",false,true);
}catch(d){}}}f.element=h;
}f.disabled=g;
}else{f.element=h;
}}});
tinymce.PluginManager.add("noneditable2",tinymce.plugins.NonEditable2Plugin);
})();
tinymce.extend(tinymce.dom.Selection.prototype,{caret:function(f,h){var c=this,g=c.win.document;
if(tinymce.isIE){r=g.body.createTextRange();
try{r.moveToElementText(f);
if(typeof(h)=="number"){r.collapse(h>=0);
r.move("character",h);
}else{r.collapse(!!h);
}}catch(b){}}else{r=g.createRange();
if(typeof(h)=="number"){r.setStart(f,h);
r.setEnd(f,h);
}else{r.selectNode(f);
r.collapse(!!h);
}}c.setRng(r);
}});
ASSET_MANIFEST=["/javascripts/tinymce-3.0.7/tiny_mce_src.js","/javascripts/tinymce-3.0.7/langs/en.js","/javascripts/tinymce-3.0.7/themes/cx_advanced/editor_template_src.js","/javascripts/tinymce-3.0.7/themes/cx_advanced/langs/en.js","/javascripts/tinymce-3.0.7/plugins/safari/editor_plugin_src.js","/javascripts/tinymce-3.0.7/plugins/contextmenu/editor_plugin_src.js","/javascripts/tinymce-3.0.7/plugins/paste/editor_plugin_src.js","/javascripts/tinymce-3.0.7/plugins/emotions/editor_plugin_src.js","/javascripts/tinymce-3.0.7/plugins/simplebrowser/editor_plugin_src.js","/javascripts/tinymce-3.0.7/plugins/simplebrowser/langs/en.js","/javascripts/tinymce-3.0.7/plugins/inlinepopups/editor_plugin_src.js","/javascripts/tinymce-3.0.7/plugins/iespell/editor_plugin_src.js","/javascripts/tinymce-3.0.7/plugins/insertwidget/editor_plugin_src.js","/javascripts/tinymce-3.0.7/plugins/noneditable2/editor_plugin_src.js","/javascripts/tinymce_addons.js"];
try{GLOBAL_ASSET_MANIFEST=GLOBAL_ASSET_MANIFEST.concat(ASSET_MANIFEST);
}catch(e){GLOBAL_ASSET_MANIFEST=ASSET_MANIFEST;
}
