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