function tastenboxFilebrowser(a,b,c,d){fileBrowserURL="/documents/simple_browser?editor=tinymce&filter="+c,tinyMCE.activeEditor.windowManager.open({title:"tastenBOX document manager",url:fileBrowserURL,width:450,height:650,inline:0,maximizable:1,close_previous:0},{window:d,input:a})}function EAL(){var a=this;a.version="0.8.2",date=new Date,a.start_time=date.getTime(),a.win="loading",a.error=!1,a.baseURL="",a.template="",a.lang={},a.load_syntax={},a.syntax={},a.loadedFiles=[],a.waiting_loading={},a.scripts_to_load=[],a.sub_scripts_to_load=[],a.syntax_display_name={basic:"Basic",brainfuck:"Brainfuck",c:"C",coldfusion:"Coldfusion",cpp:"CPP",css:"CSS",html:"HTML",java:"Java",js:"Javascript",pas:"Pascal",perl:"Perl",php:"Php",python:"Python",robotstxt:"Robots txt",ruby:"Ruby",sql:"SQL",tsql:"T-SQL",vb:"Visual Basic",xml:"XML"},a.resize=[],a.hidden={},a.default_settings={debug:!1,smooth_selection:!0,font_size:"10",font_family:"monospace",start_highlight:!1,toolbar:"search,go_to_line,fullscreen,|,undo,redo,|,select_font,|,change_smooth_selection,highlight,reset_highlight,word_wrap,|,help",begin_toolbar:"",end_toolbar:"",is_multi_files:!1,allow_resize:"both",show_line_colors:!1,min_width:400,min_height:125,replace_tab_by_spaces:!1,allow_toggle:!0,language:"en",syntax:"",syntax_selection_allow:"basic,brainfuck,c,coldfusion,cpp,css,html,java,js,pas,perl,php,python,ruby,robotstxt,sql,tsql,vb,xml",display:"onload",max_undo:30,browsers:"known",plugins:"",gecko_spellcheck:!1,fullscreen:!1,is_editable:!0,cursor_position:"begin",word_wrap:!1,autocompletion:!1,load_callback:"",save_callback:"",change_callback:"",submit_callback:"",EA_init_callback:"",EA_delete_callback:"",EA_load_callback:"",EA_unload_callback:"",EA_toggle_on_callback:"",EA_toggle_off_callback:"",EA_file_switch_on_callback:"",EA_file_switch_off_callback:"",EA_file_close_callback:""},a.advanced_buttons=[["new_document","newdocument.gif","new_document",!1],["search","search.gif","show_search",!1],["go_to_line","go_to_line.gif","go_to_line",!1],["undo","undo.gif","undo",!0],["redo","redo.gif","redo",!0],["change_smooth_selection","smooth_selection.gif","change_smooth_selection_mode",!0],["reset_highlight","reset_highlight.gif","resync_highlight",!0],["highlight","highlight.gif","change_highlight",!0],["help","help.gif","show_help",!1],["save","save.gif","save",!1],["load","load.gif","load",!1],["fullscreen","fullscreen.gif","toggle_full_screen",!1],["word_wrap","word_wrap.gif","toggle_word_wrap",!0],["autocompletion","autocompletion.gif","toggle_autocompletion",!0]],a.set_browser_infos(a),a.isIE>=6||a.isGecko||a.isWebKit&&!a.isSafari<3||a.isOpera>=9||a.isCamino?a.isValidBrowser=!0:a.isValidBrowser=!1,a.set_base_url();for(var b=0;b<a.scripts_to_load.length;b++)setTimeout("eAL.load_script('"+a.baseURL+a.scripts_to_load[b]+".js');",1),a.waiting_loading[a.scripts_to_load[b]+".js"]=!1;a.add_event(window,"load",EAL.prototype.window_loaded)}function getAttribute(a,b){var c,d,e;try{c=a.getAttribute(b)}catch(f){}if(!c)for(e=0;e<a.attributes.length;e++){d=a.attributes[e].name.toLowerCase();if(d==b)return c=a.attributes[e].value,c}return c}function setAttribute(a,b,c){b=="class"?(a.setAttribute("className",c),a.setAttribute("class",c)):a.setAttribute(b,c)}function getChildren(a,b,c,d,e,f){if(!e)var e="single";if(!f)var f=-1;if(a){var g=a.childNodes,h=null,i=[];for(var j=0;j<g.length;j++){strTagName=new String(g[j].tagName),children_class="?";if(strTagName!="undefined"){child_attribute=getAttribute(g[j],c);if((strTagName.toLowerCase()==b.toLowerCase()||b=="")&&(c==""||child_attribute==d))if(e=="all")i.push(g[j]);else return g[j];if(f!=0){h=getChildren(g[j],b,c,d,e,f-1);if(e=="all")h.length>0&&(i=i.concat(h));else if(h!=null)return h}}}if(e=="all")return i}return null}function isChildOf(a,b){if(a){if(a==b)return!0;while(a.parentNode!="undefined")return isChildOf(a.parentNode,b)}return!1}function getMouseX(a){return a!=null&&typeof a.pageX!="undefined"?a.pageX:(a!=null?a.x:event.x)+document.documentElement.scrollLeft}function getMouseY(a){return a!=null&&typeof a.pageY!="undefined"?a.pageY:(a!=null?a.y:event.y)+document.documentElement.scrollTop}function calculeOffsetLeft(a){return calculeOffset(a,"offsetLeft")}function calculeOffsetTop(a){return calculeOffset(a,"offsetTop")}function calculeOffset(a,b){var c=0;while(a)c+=a[b],a=a.offsetParent;return c}function get_css_property(a,b){if(document.defaultView)return document.defaultView.getComputedStyle(a,null).getPropertyValue(b);if(a.currentStyle){var b=b.replace(/-\D/gi,function(a){return a.charAt(a.length-1).toUpperCase()});return a.currentStyle[b]}return null}function start_move_element(a,b,c){var d=(a.target||a.srcElement).id;return b&&(d=b),c||(c=window),c.event&&(a=c.event),_mCE=c.document.getElementById(d),_mCE.frame=c,c.document.onmousemove=move_element,c.document.onmouseup=end_move_element,mouse_x=getMouseX(a),mouse_y=getMouseY(a),_mCE.start_pos_x=mouse_x-(_mCE.style.left.replace("px","")||calculeOffsetLeft(_mCE)),_mCE.start_pos_y=mouse_y-(_mCE.style.top.replace("px","")||calculeOffsetTop(_mCE)),!1}function end_move_element(a){_mCE.frame.document.onmousemove="",_mCE.frame.document.onmouseup="",_mCE=null}function move_element(a){var b,c,d;return _mCE.frame&&_mCE.frame.event&&(a=_mCE.frame.event),b=getMouseY(a)-_mCE.start_pos_y,c=getMouseX(a)-_mCE.start_pos_x,d=_mCE.frame.document.body.offsetWidth-_mCE.offsetWidth,max_top=_mCE.frame.document.body.offsetHeight-_mCE.offsetHeight,b=Math.min(Math.max(0,b),max_top),c=Math.min(Math.max(0,c),d),_mCE.style.top=b+"px",_mCE.style.left=c+"px",!1}function getSelectionRange(a){return{start:a.selectionStart,end:a.selectionEnd}}function setSelectionRange(a,b,c){a.focus(),b=Math.max(0,Math.min(a.value.length,b)),c=Math.max(b,Math.min(a.value.length,c)),nav.isOpera&&nav.isOpera<9.6&&(a.selectionEnd=1,a.selectionStart=0,a.selectionEnd=1,a.selectionStart=0),a.selectionStart=b,a.selectionEnd=c,nav.isIE&&set_IE_selection(a)}function get_IE_selection(a){var b=document,c,d,e,f,g,h,i,j,k,l,m;if(a&&a.focused){a.ea_line_height||(c=b.createElement("div"),c.style.fontFamily=get_css_property(a,"font-family"),c.style.fontSize=get_css_property(a,"font-size"),c.style.visibility="hidden",c.innerHTML="0",b.body.appendChild(c),a.ea_line_height=c.offsetHeight,b.body.removeChild(c)),d=b.selection.createRange();try{e=d.duplicate(),e.moveToElementText(a),e.setEndPoint("EndToEnd",d);if(e.parentElement()==a){f=a,g=0;while(f.parentNode)g+=f.scrollTop,f=f.parentNode;h=d.offsetTop-calculeOffsetTop(a)+g,i=Math.round(h/a.ea_line_height+1),j=Math.round(d.boundingHeight/a.ea_line_height),k=e.text.length-d.text.length,m=a.value.substr(0,k).split("\n"),k+=(i-m.length)*2,a.selectionStart=k,l=a.selectionStart+d.text.length,m=a.value.substr(0,k+d.text.length).split("\n"),l+=(i+j-1-m.length)*2,a.selectionEnd=l}}catch(n){}}a&&a.id&&setTimeout("get_IE_selection(document.getElementById('"+a.id+"'));",50)}function IE_textarea_focus(){event.srcElement.focused=!0}function IE_textarea_blur(){event.srcElement.focused=!1}function set_IE_selection(a){var b,b,c,d;if(!window.closed){b=a.value.substr(0,a.selectionStart).split("\n").length-1,c=a.value.substr(0,a.selectionEnd).split("\n").length-1;try{d=document.selection.createRange(),d.moveToElementText(a),d.setEndPoint("EndToStart",d),d.moveStart("character",a.selectionStart-b),d.moveEnd("character",a.selectionEnd-c-(a.selectionStart-b)),d.select()}catch(e){}}}window.tinyMCEPreInit=window.tinyMCEPreInit||{base:"/assets/tinymce",query:"3.4.7",suffix:""},function(a){var b=/^\s*|\s*$/g,c,d="B".replace(/A(.)|B/,"$1")==="$1",e={majorVersion:"3",minorVersion:"4.7",releaseDate:"2011-11-03",_init:function(){function l(a){return a.src&&/tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(a.src)?(/_(src|dev)\.js/g.test(a.src)&&(b.suffix="_src"),(j=a.src.indexOf("?"))!=-1&&(b.query=a.src.substring(j+1)),b.baseURL=a.src.substring(0,a.src.lastIndexOf("/")),i&&b.baseURL.indexOf("://")==-1&&b.baseURL.indexOf("/")!==0&&(b.baseURL=i+b.baseURL),b.baseURL):null}var b=this,c=document,d=navigator,e=d.userAgent,f,g,h,i,j,k;b.isOpera=a.opera&&opera.buildNumber,b.isWebKit=/WebKit/.test(e),b.isIE=!b.isWebKit&&!b.isOpera&&/MSIE/gi.test(e)&&/Explorer/gi.test(d.appName),b.isIE6=b.isIE&&/MSIE [56]/.test(e),b.isIE7=b.isIE&&/MSIE [7]/.test(e),b.isIE8=b.isIE&&/MSIE [8]/.test(e),b.isIE9=b.isIE&&/MSIE [9]/.test(e),b.isGecko=!b.isWebKit&&/Gecko/.test(e),b.isMac=e.indexOf("Mac")!=-1,b.isAir=/adobeair/i.test(e),b.isIDevice=/(iPad|iPhone)/.test(e),b.isIOS5=b.isIDevice&&e.match(/AppleWebKit\/(\d*)/)[1]>=534;if(a.tinyMCEPreInit){b.suffix=tinyMCEPreInit.suffix,b.baseURL=tinyMCEPreInit.base,b.query=tinyMCEPreInit.query;return}b.suffix="",g=c.getElementsByTagName("base");for(f=0;f<g.length;f++)if(k=g[f].href)/^https?:\/\/[^\/]+$/.test(k)&&(k+="/"),i=k?k.match(/.*\//)[0]:"";g=c.getElementsByTagName("script");for(f=0;f<g.length;f++)if(l(g[f]))return;h=c.getElementsByTagName("head")[0];if(h){g=h.getElementsByTagName("script");for(f=0;f<g.length;f++)if(l(g[f]))return}return},is:function(a,b){return b?b=="array"&&a.hasOwnProperty&&a instanceof Array?!0:typeof a==b:a!==c},makeMap:function(a,b,c){var d;a=a||[],b=b||",",typeof a=="string"&&(a=a.split(b)),c=c||{},d=a.length;while(d--)c[a[d]]={};return c},each:function(a,b,d){var e,f;if(!a)return 0;d=d||a;if(a.length!==c){for(e=0,f=a.length;e<f;e++)if(b.call(d,a[e],e,a)===!1)return 0}else for(e in a)if(a.hasOwnProperty(e)&&b.call(d,a[e],e,a)===!1)return 0;return 1},trim:function(a){return(a?""+a:"").replace(b,"")},create:function(a,b,c){var d=this,e,f,g,h,i,j=0;a=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(a),g=a[3].match(/(^|\.)(\w+)$/i)[2],f=d.createNS(a[3].replace(/\.\w+$/,""),c);if(f[g])return;if(a[2]=="static"){f[g]=b,this.onCreate&&this.onCreate(a[2],a[3],f[g]);return}b[g]||(b[g]=function(){},j=1),f[g]=b[g],d.extend(f[g].prototype,b),a[5]&&(e=d.resolve(a[5]).prototype,h=a[5].match(/\.(\w+)$/i)[1],i=f[g],j?f[g]=function(){return e[h].apply(this,arguments)}:f[g]=function(){return this.parent=e[h],i.apply(this,arguments)},f[g].prototype[g]=f[g],d.each(e,function(a,b){f[g].prototype[b]=e[b]}),d.each(b,function(a,b){e[b]?f[g].prototype[b]=function(){return this.parent=e[b],a.apply(this,arguments)}:b!=g&&(f[g].prototype[b]=a)})),d.each(b["static"],function(a,b){f[g][b]=a}),this.onCreate&&this.onCreate(a[2],a[3],f[g].prototype)},walk:function(a,b,c,d){d=d||this,a&&(c&&(a=a[c]),e.each(a,function(a,g){if(b.call(d,a,g,c)===!1)return!1;e.walk(a,b,c,d)}))},createNS:function(b,c){var d,e;c=c||a,b=b.split(".");for(d=0;d<b.length;d++)e=b[d],c[e]||(c[e]={}),c=c[e];return c},resolve:function(b,c){var d,e;c=c||a,b=b.split(".");for(d=0,e=b.length;d<e;d++){c=c[b[d]];if(!c)break}return c},addUnload:function(b,c){var d=this;b={func:b,scope:c||this};if(!d.unloads){function e(){var b=d.unloads,c,g;if(b){for(g in b)c=b[g],c&&c.func&&c.func.call(c.scope,1);a.detachEvent?(a.detachEvent("onbeforeunload",f),a.detachEvent("onunload",e)):a.removeEventListener&&a.removeEventListener("unload",e,!1),d.unloads=c=b=w=e=0,a.CollectGarbage&&CollectGarbage()}}function f(){var b=document;if(b.readyState=="interactive"){function c(){b.detachEvent("onstop",c),e&&e(),b=0}b&&b.attachEvent("onstop",c),a.setTimeout(function(){b&&b.detachEvent("onstop",c)},0)}}a.attachEvent?(a.attachEvent("onunload",e),a.attachEvent("onbeforeunload",f)):a.addEventListener&&a.addEventListener("unload",e,!1),d.unloads=[b]}else d.unloads.push(b);return b},removeUnload:function(a){var b=this.unloads,c=null;return e.each(b,function(d,e){if(d&&d.func==a)return b.splice(e,1),c=a,!1}),c},explode:function(a,b){return a?e.map(a.split(b||","),e.trim):a},_addVer:function(a){var b;return this.query?(b=(a.indexOf("?")==-1?"?":"&")+this.query,a.indexOf("#")==-1?a+b:a.replace("#",b+"#")):a},_replace:function(a,b,e){return d?e.replace(a,function(){var a=b,d=arguments,e;for(e=0;e<d.length-2;e++)d[e]===c?a=a.replace(new RegExp("\\$"+e,"g"),""):a=a.replace(new RegExp("\\$"+e,"g"),d[e]);return a}):e.replace(a,b)}};e._init(),a.tinymce=a.tinyMCE=e}(window),function(a,b){var c=b.is,d=/^(href|src|style)$/i,e;if(!a&&window.console)return console.log("Load jQuery first!");b.$=a,b.adapter={patchEditor:function(b){function f(a,b){var d=this;return b&&d.removeAttr("data-mce-style"),c.css.apply(d,arguments)}function g(a,f){var g=this;return d.test(a)?f!==e?(g.each(function(c,d){b.dom.setAttrib(d,a,f)}),g):g.attr("data-mce-"+a):c.attr.apply(g,arguments)}function h(a){return function(c){return c&&(c=b.dom.processHTML(c)),a.call(this,c)}}function i(a){return a.css!==f&&(a.css=f,a.attr=g,a.html=h(c.html),a.append=h(c.append),a.prepend=h(c.prepend),a.after=h(c.after),a.before=h(c.before),a.replaceWith=h(c.replaceWith),a.tinymce=b,a.pushStack=function(){return i(c.pushStack.apply(this,arguments))}),a}var c=a.fn;b.$=function(c,d){var e=b.getDoc();return i(a(c||e,e||d))}}},b.extend=a.extend,b.extend(b,{map:a.map,grep:function(b,c){return a.grep(b,c||function(){return 1})},inArray:function(b,c){return a.inArray(c,b||[])}});var f={"tinymce.dom.DOMUtils":{select:function(b,c){var d=this;return a.find(b,d.get(c)||d.get(d.settings.root_element)||d.doc,[])},is:function(b,c){return a(this.get(b)).is(c)}}};b.onCreate=function(a,c,d){b.extend(d,f[c])}}(window.jQuery,tinymce),tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,Dispatcher:function(a){this.scope=a||this,this.listeners=[]},add:function(a,b){return this.listeners.push({cb:a,scope:b||this.scope}),a},addToTop:function(a,b){return this.listeners.unshift({cb:a,scope:b||this.scope}),a},remove:function(a){var b=this.listeners,c=null;return tinymce.each(b,function(d,e){if(a==d.cb)return c=a,b.splice(e,1),!1}),c},dispatch:function(){var a,b=arguments,c,d=this.listeners,e;for(c=0;c<d.length;c++){e=d[c],a=e.cb.apply(e.scope,b);if(a===!1)break}return a}}),function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(b,c){var d=this,e,f,g,h;b=tinymce.trim(b),c=d.settings=c||{};if(/^([\w\-]+):([^\/]{2})/i.test(b)||/^\s*#/.test(b)){d.source=b;return}b.indexOf("/")===0&&b.indexOf("//")!==0&&(b=(c.base_uri?c.base_uri.protocol||"http":"http")+"://mce_host"+b),/^[\w-]*:?\/\//.test(b)||(h=c.base_uri?c.base_uri.path:(new tinymce.util.URI(location.href)).directory,b=(c.base_uri&&c.base_uri.protocol||"http")+"://mce_host"+d.toAbsPath(h,b)),b=b.replace(/@@/g,"(mce_at)"),b=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(b),a(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(a,c){var e=b[c];e&&(e=e.replace(/\(mce_at\)/g,"@@")),d[a]=e});if(g=c.base_uri){d.protocol||(d.protocol=g.protocol),d.userInfo||(d.userInfo=g.userInfo),!d.port&&d.host=="mce_host"&&(d.port=g.port);if(!d.host||d.host=="mce_host")d.host=g.host;d.source=""}},setPath:function(a){var b=this;a=/^(.*?)\/?(\w+)?$/.exec(a),b.path=a[0],b.directory=a[1],b.file=a[2],b.source="",b.getURI()},toRelative:function(a){var b=this,c;return a==="./"?a:(a=new tinymce.util.URI(a,{base_uri:b}),a.host!="mce_host"&&b.host!=a.host&&a.host||b.port!=a.port||b.protocol!=a.protocol?a.getURI():(c=b.toRelPath(b.path,a.path),a.query&&(c+="?"+a.query),a.anchor&&(c+="#"+a.anchor),c))},toAbsolute:function(a,b){var a=new tinymce.util.URI(a,{base_uri:this});return a.getURI(this.host==a.host&&this.protocol==a.protocol?b:0)},toRelPath:function(a,b){var c,d=0,e="",f,g;a=a.substring(0,a.lastIndexOf("/")),a=a.split("/"),c=b.split("/");if(a.length>=c.length)for(f=0,g=a.length;f<g;f++)if(f>=c.length||a[f]!=c[f]){d=f+1;break}if(a.length<c.length)for(f=0,g=c.length;f<g;f++)if(f>=a.length||a[f]!=c[f]){d=f+1;break}if(d==1)return b;for(f=0,g=a.length-(d-1);f<g;f++)e+="../";for(f=d-1,g=c.length;f<g;f++)f!=d-1?e+="/"+c[f]:e+=c[f];return e},toAbsPath:function(b,c){var d,e=0,f=[],g,h;g=/\/$/.test(c)?"/":"",b=b.split("/"),c=c.split("/"),a(b,function(a){a&&f.push(a)}),b=f;for(d=c.length-1,f=[];d>=0;d--){if(c[d].length==0||c[d]==".")continue;if(c[d]==".."){e++;continue}if(e>0){e--;continue}f.push(c[d])}return d=b.length-e,d<=0?h=f.reverse().join("/"):h=b.slice(0,d).join("/")+"/"+f.reverse().join("/"),h.indexOf("/")!==0&&(h="/"+h),g&&h.lastIndexOf("/")!==h.length-1&&(h+=g),h},getURI:function(a){var b,c=this;if(!c.source||a)b="",a||(c.protocol&&(b+=c.protocol+"://"),c.userInfo&&(b+=c.userInfo+"@"),c.host&&(b+=c.host),c.port&&(b+=":"+c.port)),c.path&&(b+=c.path),c.query&&(b+="?"+c.query),c.anchor&&(b+="#"+c.anchor),c.source=b;return c.source}})}(),function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(b){var c=this.get(b),d;return c&&a(c.split("&"),function(a){a=a.split("="),d=d||{},d[unescape(a[0])]=unescape(a[1])}),d},setHash:function(b,c,d,e,f,g){var h="";a(c,function(a,b){h+=(h?"&":"")+escape(b)+"="+escape(a)}),this.set(b,h,d,e,f,g)},get:function(a){var b=document.cookie,c,d=a+"=",e;if(!b)return;e=b.indexOf("; "+d);if(e==-1){e=b.indexOf(d);if(e!=0)return null}else e+=2;return c=b.indexOf(";",e),c==-1&&(c=b.length),unescape(b.substring(e+d.length,c))},set:function(a,b,c,d,e,f){document.cookie=a+"="+escape(b)+(c?"; expires="+c.toGMTString():"")+(d?"; path="+escape(d):"")+(e?"; domain="+e:"")+(f?"; secure":"")},remove:function(a,b){var c=new Date;c.setTime(c.getTime()-1e3),this.set(a,"",c,b,c)}})}(),function(){function serialize(a,b){var c,d,e;b=b||'"';if(a==null)return"null";e=typeof a;if(e=="string")return d="\bb\tt\nn\ff\rr\"\"''\\\\",b+a.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,e){return b==='"'&&a==="'"?a:(c=d.indexOf(e),c+1?"\\"+d.charAt(c+1):(a=e.charCodeAt().toString(16),"\\u"+"0000".substring(a.length)+a))})+b;if(e=="object"){if(a.hasOwnProperty&&a instanceof Array){for(c=0,d="[";c<a.length;c++)d+=(c>0?",":"")+serialize(a[c],b);return d+"]"}d="{";for(c in a)a.hasOwnProperty(c)&&(d+=typeof a[c]!="function"?(d.length>1?","+b:b)+c+b+":"+serialize(a[c],b):"");return d+"}"}return""+a}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}}(),tinymce.create("static tinymce.util.XHR",{send:function(a){function f(a){b=0;try{b=new ActiveXObject(a)}catch(c){}return b}var b,c,d=window,e=0;a.scope=a.scope||this,a.success_scope=a.success_scope||a.scope,a.error_scope=a.error_scope||a.scope,a.async=a.async===!1?!1:!0,a.data=a.data||"",b=d.XMLHttpRequest?new XMLHttpRequest:f("Microsoft.XMLHTTP")||f("Msxml2.XMLHTTP");if(b){b.overrideMimeType&&b.overrideMimeType(a.content_type),b.open(a.type||(a.data?"POST":"GET"),a.url,a.async),a.content_type&&b.setRequestHeader("Content-Type",a.content_type),b.setRequestHeader("X-Requested-With","XMLHttpRequest"),b.send(a.data);function g(){!a.async||b.readyState==4||e++>1e4?(a.success&&e<1e4&&b.status==200?a.success.call(a.success_scope,""+b.responseText,b,a):a.error&&a.error.call(a.error_scope,e>1e4?"TIMED_OUT":"GENERAL",b,a),b=null):d.setTimeout(g,10)}if(!a.async)return g();c=d.setTimeout(g,10)}}}),function(){var a=tinymce.extend,b=tinymce.util.JSON,c=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(b){this.settings=a({},b),this.count=0},send:function(d){var e=d.error,f=d.success;d=a(this.settings,d),d.success=function(a,c){a=b.parse(a),typeof a=="undefined"&&(a={error:"JSON Parse error."}),a.error?e.call(d.error_scope||d.scope,a.error,c):f.call(d.success_scope||d.scope,a.result)},d.error=function(a,b){e&&e.call(d.error_scope||d.scope,a,b)},d.data=b.serialize({id:d.id||"c"+this.count++,method:d.method,params:d.params}),d.content_type="application/json",c.send(d)},"static":{sendRPC:function(a){return(new tinymce.util.JSONRequest).send(a)}}})}(),function(a){a.VK={DELETE:46,BACKSPACE:8,ENTER:13,TAB:9,SPACEBAR:32,UP:38,DOWN:40}}(tinymce),function(a){function e(b){var e=b.dom,f=b.selection;b.onKeyDown.add(function(b,g){var h,i,j,k,l;l=g.keyCode==d;if(l||g.keyCode==c){g.preventDefault(),h=f.getRng(),i=e.getParent(h.startContainer,e.isBlock),l&&(i=e.getNext(i,e.isBlock));if(i){j=i.firstChild;while(j&&j.nodeType==3&&j.nodeValue.length==0)j=j.nextSibling;j&&j.nodeName==="SPAN"&&(k=j.cloneNode(!1))}b.getDoc().execCommand(l?"ForwardDelete":"Delete",!1,null),i=e.getParent(h.startContainer,e.isBlock),a.each(e.select("span.Apple-style-span,font.Apple-style-span",i),function(a){var b=f.getBookmark();k?e.replace(k.cloneNode(!1),a,!0):e.remove(a,!0),f.moveToBookmark(b)})}})}function f(a){a.onKeyUp.add(function(a,b){var e=b.keyCode;if(e==d||e==c)if(a.dom.isEmpty(a.getBody())){a.setContent("",{format:"raw"}),a.nodeChanged();return}})}function g(a){a.dom.bind(a.getDoc(),"focusin",function(){a.selection.setRng(a.selection.getRng())})}function h(b){b.onKeyDown.add(function(b,d){if(d.keyCode===c&&b.selection.isCollapsed()&&b.selection.getRng(!0).startOffset===0){var e=b.selection.getNode(),f=e.previousSibling;f&&f.nodeName&&f.nodeName.toLowerCase()==="hr"&&(b.dom.remove(f),a.dom.Event.cancel(d))}})}function i(a){Range.prototype.getClientRects||a.onMouseDown.add(function(a,b){if(b.target.nodeName==="HTML"){var c=a.getBody();c.blur(),setTimeout(function(){c.focus()},0)}})}function j(a){a.onClick.add(function(a,b){b=b.target,/^(IMG|HR)$/.test(b.nodeName)&&a.selection.getSel().setBaseAndExtent(b,0,b,1),b.nodeName=="A"&&a.dom.hasClass(b,"mceItemAnchor")&&a.selection.select(b),a.nodeChanged()})}function k(b){var c,d;b.dom.bind(b.getDoc(),"selectionchange",function(){d&&(clearTimeout(d),d=0),d=window.setTimeout(function(){var d=b.selection.getRng();if(!c||!a.dom.RangeUtils.compareRanges(d,c))b.nodeChanged(),c=d},50)})}function l(a){document.body.setAttribute("role","application")}var b=a.VK,c=b.BACKSPACE,d=b.DELETE;a.create("tinymce.util.Quirks",{Quirks:function(b){a.isWebKit&&(e(b),f(b),g(b),j(b),a.isIDevice&&k(b)),a.isIE&&(h(b),f(b),l(b)),a.isGecko&&(h(b),i(b))}})}(tinymce),function(a){function j(a){var b;return b=document.createElement("div"),b.innerHTML=a,b.textContent||b.innerText||a}function k(a,b){var d,e,f,g={};if(a){a=a.split(","),b=b||10;for(d=0;d<a.length;d+=2)e=String.fromCharCode(parseInt(a[d],b)),c[e]||(f="&"+a[d+1]+";",g[e]=f,g[f]=e);return g}}var b,c,d,e=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=/[<>&\"\']/g,h=/&(#x|#)?([\w]+);/g,i={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};c={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;"},d={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},b=k("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),a.html=a.html||{},a.html.Entities={encodeRaw:function(a,b){return a.replace(b?e:f,function(a){return c[a]||a})},encodeAllRaw:function(a){return(""+a).replace(g,function(a){return c[a]||a})},encodeNumeric:function(a,b){return a.replace(b?e:f,function(a){return a.length>1?"&#"+((a.charCodeAt(0)-55296)*1024+(a.charCodeAt(1)-56320)+65536)+";":c[a]||"&#"+a.charCodeAt(0)+";"})},encodeNamed:function(a,d,g){return g=g||b,a.replace(d?e:f,function(a){return c[a]||g[a]||a})},getEncodeFunc:function(d,g){function i(a,b){return a.replace(b?e:f,function(a){return c[a]||g[a]||"&#"+a.charCodeAt(0)+";"||a})}function j(a,b){return h.encodeNamed(a,b,g)}var h=a.html.Entities;return g=k(g)||b,d=a.makeMap(d.replace(/\+/g,",")),d.named&&d.numeric?i:d.named?g?j:h.encodeNamed:d.numeric?h.encodeNumeric:h.encodeRaw},decode:function(a){return a.replace(h,function(a,c,e){return c?(e=parseInt(e,c.length===2?16:10),e>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(e&1023))):i[e]||String.fromCharCode(e)):d[a]||b[a]||j(a)})}}}(tinymce),tinymce.html.Styles=function(a,b){function l(a,b,c,d){function e(a){return a=parseInt(a).toString(16),a.length>1?a:"0"+a}return"#"+e(b)+e(c)+e(d)}var c=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,d=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,e=/\s*([^:]+):\s*([^;]+);?/g,f=/\s+$/,g=/rgb/,h,i,j={},k;a=a||{},k="\\\" \\' \\; \\: ; : ﻿".split(" ");for(i=0;i<k.length;i++)j[k[i]]="﻿"+i,j["﻿"+i]=k[i];return{toHex:function(a){return a.replace(c,l)},parse:function(b){function p(a,b){var c,d,e,f;c=g[a+"-top"+b];if(!c)return;d=g[a+"-right"+b];if(c!=d)return;e=g[a+"-bottom"+b];if(d!=e)return;f=g[a+"-left"+b];if(e!=f)return;g[a+b]=f,delete g[a+"-top"+b],delete g[a+"-right"+b],delete g[a+"-bottom"+b],delete g[a+"-left"+b]}function q(a){var b=g[a],c;if(!b||b.indexOf(" ")<0)return;b=b.split(" "),c=b.length;while(c--)if(b[c]!==b[0])return!1;return g[a]=b[0],!0}function r(a,b,c,d){if(!q(b))return;if(!q(c))return;if(!q(d))return;g[a]=g[b]+" "+g[c]+" "+g[d],delete g[b],delete g[c],delete g[d]}function s(a){return m=!0,j[a]}function t(a,b){return m&&(a=a.replace(/\uFEFF[0-9]/g,function(a){return j[a]})),b||(a=a.replace(/\\([\'\";:])/g,"$1")),a}var g={},h,i,k,m,n=a.url_converter,o=a.url_converter_scope||this;if(b){b=b.replace(/\\[\"\';:\uFEFF]/g,s).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(a){return a.replace(/[;:]/g,s)});while(h=e.exec(b)){i=h[1].replace(f,"").toLowerCase(),k=h[2].replace(f,"");if(i&&k.length>0){if(i==="font-weight"&&k==="700")k="bold";else if(i==="color"||i==="background-color")k=k.toLowerCase();k=k.replace(c,l),k=k.replace(d,function(a,b,c,d,e,f){return e=e||f,e?(e=t(e),"'"+e.replace(/\'/g,"\\'")+"'"):(b=t(b||c||d),n&&(b=n.call(o,b,"style")),"url('"+b.replace(/\'/g,"\\'")+"')")}),g[i]=m?t(k,!0):k}e.lastIndex=h.index+h[0].length}p("border",""),p("border","-width"),p("border","-color"),p("border","-style"),p("padding",""),p("margin",""),r("border","border-width","border-style","border-color"),g.border==="medium none"&&delete g.border}return g},serialize:function(a,c){function g(c){var e,f,g,i;e=b.styles[c];if(e)for(f=0,g=e.length;f<g;f++)c=e[f],i=a[c],i!==h&&i.length>0&&(d+=(d.length>0?" ":"")+c+": "+i+";")}var d="",e,f;if(c&&b&&b.styles)g("*"),g(c);else for(e in a)f=a[e],f!==h&&f.length>0&&(d+=(d.length>0?" ":"")+e+": "+f+";");return d}}},function(a){function l(a,b){return a.split(b||",")}function m(a,b){function e(b){return b.replace(/[A-Z]+/g,function(b){return e(a[b])})}var c,d={};for(c in a)a.hasOwnProperty(c)&&(a[c]=e(a[c]));return e(b).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(a,b,c,e){c=l(c,"|"),d[b]={attributes:j(c),attributesOrder:c,children:j(e,"|",{"#comment":{}})}}),d}var b={},c,d,e,f,g={},h,i,j=a.makeMap,k=a.each;d="h1,h2,h3,h4,h5,h6,hr,p,div,address,pre,form,table,tbody,thead,tfoot,th,tr,td,li,ol,ul,caption,blockquote,center,dl,dt,dd,dir,fieldset,noscript,menu,isindex,samp,header,footer,article,section,hgroup",d=j(d,",",j(d.toUpperCase())),b=m({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]"),c=j("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,autoplay,loop,controls"),e=j("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,source"),f=a.extend(j("td,th,iframe,video,audio,object"),e),h=j("pre,script,style,textarea"),i=j("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),
a.html.Schema=function(m){function t(a){return new RegExp("^"+a.replace(/([?+*])/g,".$1")+"$")}function u(b){var c,d,e,f,g,h,i,k,m,n,p,r,s,u,v,w,x,y,z,A,B,C,D=/^([#+-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,E=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,F=/[*?+]/;if(b){b=l(b),o["@"]&&(x=o["@"].attributes,y=o["@"].attributesOrder);for(c=0,d=b.length;c<d;c++){h=D.exec(b[c]);if(h){v=h[1],n=h[2],w=h[3],m=h[4],s={},u=[],i={attributes:s,attributesOrder:u},v==="#"&&(i.paddEmpty=!0),v==="-"&&(i.removeEmpty=!0);if(x){for(A in x)s[A]=x[A];u.push.apply(u,y)}if(m){m=l(m,"|");for(e=0,f=m.length;e<f;e++){h=E.exec(m[e]);if(h){k={},r=h[1],p=h[2].replace(/::/g,":"),v=h[3],C=h[4],r==="!"&&(i.attributesRequired=i.attributesRequired||[],i.attributesRequired.push(p),k.required=!0);if(r==="-"){delete s[p],u.splice(a.inArray(u,p),1);continue}v&&(v==="="&&(i.attributesDefault=i.attributesDefault||[],i.attributesDefault.push({name:p,value:C}),k.defaultValue=C),v===":"&&(i.attributesForced=i.attributesForced||[],i.attributesForced.push({name:p,value:C}),k.forcedValue=C),v==="<"&&(k.validValues=j(C,"?"))),F.test(p)?(i.attributePatterns=i.attributePatterns||[],k.pattern=t(p),i.attributePatterns.push(k)):(s[p]||u.push(p),s[p]=k)}}}!x&&n=="@"&&(x=s,y=u),w&&(i.outputName=n,o[w]=i),F.test(n)?(i.pattern=t(n),q.push(i)):o[n]=i}}}}function v(a){o={},q=[],u(a),k(b,function(a,b){p[b]=a.children})}function w(a){var b=/^(~)?(.+)$/;a&&k(l(a),function(a){var c=b.exec(a),e=c[1]==="~",f=e?"span":"div",h=c[2];p[h]=p[f],g[h]=f,e||(d[h]={}),k(p,function(a,b){a[f]&&(a[h]=a[f])})})}function x(a){var b=/^([+\-]?)(\w+)\[([^\]]+)\]$/;a&&k(l(a),function(a){var c=b.exec(a),d,e;c&&(e=c[1],e?d=p[c[2]]:d=p[c[2]]={"#comment":{}},d=p[c[2]],k(l(c[3],"|"),function(a){e==="-"?delete d[a]:d[a]={}}))})}function y(a){var b=o[a],c;if(b)return b;c=q.length;while(c--){b=q[c];if(b.pattern.test(a))return b}}var n=this,o={},p={},q=[],r,s;m=m||{},m.verify_html===!1&&(m.valid_elements="*[*]"),m.valid_styles&&(r={},k(m.valid_styles,function(b,c){r[c]=a.explode(b)})),s=m.whitespace_elements?j(m.whitespace_elements):h,m.valid_elements?v(m.valid_elements):(k(b,function(a,b){o[b]={attributes:a.attributes,attributesOrder:a.attributesOrder},p[b]=a.children}),k(l("strong/b,em/i"),function(a){a=l(a,"/"),o[a[1]].outputName=a[0]}),o.img.attributesDefault=[{name:"alt",value:""}],k(l("ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr"),function(a){o[a].removeEmpty=!0}),k(l("p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption"),function(a){o[a].paddEmpty=!0})),w(m.custom_elements),x(m.valid_children),u(m.extended_valid_elements),x("+ol[ul|ol],+ul[ul|ol]"),y("span")||u("span[!data-mce-type|*]"),m.invalid_elements&&a.each(a.explode(m.invalid_elements),function(a){o[a]&&delete o[a]}),n.children=p,n.styles=r,n.getBoolAttrs=function(){return c},n.getBlockElements=function(){return d},n.getShortEndedElements=function(){return e},n.getSelfClosingElements=function(){return i},n.getNonEmptyElements=function(){return f},n.getWhiteSpaceElements=function(){return s},n.isValidChild=function(a,b){var c=p[a];return!!c&&!!c[b]},n.getElementRule=y,n.getCustomElements=function(){return g},n.addValidElements=u,n.setValidElements=v,n.addCustomElements=w,n.addValidChildren=x},a.html.Schema.boolAttrMap=c,a.html.Schema.blockElementsMap=d}(tinymce),function(a){a.html.SaxParser=function(b,c){var d=this,e=function(){};b=b||{},d.schema=c=c||new a.html.Schema,b.fix_self_closing!==!1&&(b.fix_self_closing=!0),a.each("comment cdata text start end pi doctype".split(" "),function(a){a&&(d[a]=b[a]||e)}),d.parse=function(d){function N(a){var b,c;b=j.length;while(b--)if(j[b].name===a)break;if(b>=0){for(c=j.length-1;c>=b;c--)a=j[c],a.valid&&e.end(a.name);j.length=b}}var e=this,f,g=0,h,i,j=[],k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J=0,K=a.html.Entities.decode,L,M;F=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([^\\s\\/<>]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/)>))","g"),G=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g,H={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi},q=c.getShortEndedElements(),E=c.getSelfClosingElements(),r=c.getBoolAttrs(),t=b.validate,p=b.remove_internals,L=b.fix_self_closing,M=a.isIE,y=/^:/;while(f=F.exec(d)){g<f.index&&e.text(K(d.substr(g,f.index-g)));if(h=f[6])h=h.toLowerCase(),M&&y.test(h)&&(h=h.substr(1)),N(h);else if(h=f[7]){h=h.toLowerCase(),M&&y.test(h)&&(h=h.substr(1)),s=h in q,L&&E[h]&&j.length>0&&j[j.length-1].name===h&&N(h);if(!t||(u=c.getElementRule(h))){v=!0,t&&(z=u.attributes,A=u.attributePatterns),(x=f[8])?(o=x.indexOf("data-mce-type")!==-1,o&&p&&(v=!1),k=[],k.map={},x.replace(G,function(a,b,c,d,e){var f,g;b=b.toLowerCase(),c=b in r?b:K(c||d||e||"");if(t&&!o&&b.indexOf("data-")!==0){f=z[b];if(!f&&A){g=A.length;while(g--){f=A[g];if(f.pattern.test(b))break}g===-1&&(f=null)}if(!f)return;if(f.validValues&&!(c in f.validValues))return}k.map[b]=c,k.push({name:b,value:c})})):(k=[],k.map={});if(t&&!o){B=u.attributesRequired,C=u.attributesDefault,D=u.attributesForced;if(D){l=D.length;while(l--)w=D[l],n=w.name,I=w.value,I==="{$uid}"&&(I="mce_"+J++),k.map[n]=I,k.push({name:n,value:I})}if(C){l=C.length;while(l--)w=C[l],n=w.name,n in k.map||(I=w.value,I==="{$uid}"&&(I="mce_"+J++),k.map[n]=I,k.push({name:n,value:I}))}if(B){l=B.length;while(l--)if(B[l]in k.map)break;l===-1&&(v=!1)}k.map["data-mce-bogus"]&&(v=!1)}v&&e.start(h,k,s)}else v=!1;if(i=H[h]){i.lastIndex=g=f.index+f[0].length,(f=i.exec(d))?(v&&(m=d.substr(g,f.index-g)),g=f.index+f[0].length):(m=d.substr(g),g=d.length),v&&m.length>0&&e.text(m,!0),v&&e.end(h),F.lastIndex=g;continue}s||(!x||x.indexOf("/")!=x.length-1?j.push({name:h,valid:v}):v&&e.end(h))}else(h=f[1])?e.comment(h):(h=f[2])?e.cdata(h):(h=f[3])?e.doctype(h):(h=f[4])&&e.pi(h,f[5]);g=f.index+f[0].length}g<d.length&&e.text(K(d.substr(g)));for(l=j.length-1;l>=0;l--)h=j[l],h.valid&&e.end(h.name)}}}(tinymce),function(a){function d(a,b,c){var d,e,f=c?"lastChild":"firstChild",g=c?"prev":"next";if(a[f])return a[f];if(a!==b){d=a[g];if(d)return d;for(e=a.parent;e&&e!==b;e=e.parent){d=e[g];if(d)return d}}}function e(a,b){this.name=a,this.type=b,b===1&&(this.attributes=[],this.attributes.map={})}var b=/^[ \t\r\n]*$/,c={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};a.extend(e.prototype,{replace:function(a){var b=this;return a.parent&&a.remove(),b.insert(a,b),b.remove(),b},attr:function(a,b){var c=this,d,e,f;if(typeof a!="string"){for(e in a)c.attr(e,a[e]);return c}if(d=c.attributes){if(b!==f){if(b===null){if(a in d.map){delete d.map[a],e=d.length;while(e--)if(d[e].name===a)return d=d.splice(e,1),c}return c}if(a in d.map){e=d.length;while(e--)if(d[e].name===a){d[e].value=b;break}}else d.push({name:a,value:b});return d.map[a]=b,c}return d.map[a]}},clone:function(){var a=this,b=new e(a.name,a.type),c,d,f,g,h;if(f=a.attributes){h=[],h.map={};for(c=0,d=f.length;c<d;c++)g=f[c],g.name!=="id"&&(h[h.length]={name:g.name,value:g.value},h.map[g.name]=g.value);b.attributes=h}return b.value=a.value,b.shortEnded=a.shortEnded,b},wrap:function(a){var b=this;return b.parent.insert(a,b),a.append(b),b},unwrap:function(){var a=this,b,c;for(b=a.firstChild;b;)c=b.next,a.insert(b,a,!0),b=c;a.remove()},remove:function(){var a=this,b=a.parent,c=a.next,d=a.prev;return b&&(b.firstChild===a?(b.firstChild=c,c&&(c.prev=null)):d.next=c,b.lastChild===a?(b.lastChild=d,d&&(d.next=null)):c.prev=d,a.parent=a.next=a.prev=null),a},append:function(a){var b=this,c;return a.parent&&a.remove(),c=b.lastChild,c?(c.next=a,a.prev=c,b.lastChild=a):b.lastChild=b.firstChild=a,a.parent=b,a},insert:function(a,b,c){var d;return a.parent&&a.remove(),d=b.parent||this,c?(b===d.firstChild?d.firstChild=a:b.prev.next=a,a.prev=b.prev,a.next=b,b.prev=a):(b===d.lastChild?d.lastChild=a:b.next.prev=a,a.next=b.next,a.prev=b,b.next=a),a.parent=d,a},getAll:function(a){var b=this,c,e=[];for(c=b.firstChild;c;c=d(c,b))c.name===a&&e.push(c);return e},empty:function(){var a=this,b,c,e;if(a.firstChild){b=[];for(e=a.firstChild;e;e=d(e,a))b.push(e);c=b.length;while(c--)e=b[c],e.parent=e.firstChild=e.lastChild=e.next=e.prev=null}return a.firstChild=a.lastChild=null,a},isEmpty:function(a){var c=this,e=c.firstChild,f,g;if(e)do{if(e.type===1){if(e.attributes.map["data-mce-bogus"])continue;if(a[e.name])return!1;f=e.attributes.length;while(f--){g=e.attributes[f].name;if(g==="name"||g.indexOf("data-")===0)return!1}}if(e.type===3&&!b.test(e.value))return!1}while(e=d(e,c));return!0},walk:function(a){return d(this,null,a)}}),a.extend(e,{create:function(a,b){var d,f;d=new e(a,c[a]||1);if(b)for(f in b)d.attr(f,b[f]);return d}}),a.html.Node=e}(tinymce),function(a){var b=a.html.Node;a.html.DomParser=function(c,d){function j(c){var f,g,h,i,j,k,l,m,n,o,p,q,r,s;q=a.makeMap("tr,td,th,tbody,thead,tfoot,table"),p=d.getNonEmptyElements();for(f=0;f<c.length;f++){g=c[f];if(!g.parent)continue;i=[g];for(h=g.parent;h&&!d.isValidChild(h.name,g.name)&&!q[h.name];h=h.parent)i.push(h);if(h&&i.length>1){i.reverse(),j=k=e.filterNode(i[0].clone());for(n=0;n<i.length-1;n++){d.isValidChild(k.name,i[n].name)?(l=e.filterNode(i[n].clone()),k.append(l)):l=k;for(m=i[n].firstChild;m&&m!=i[n+1];)s=m.next,l.append(m),m=s;k=l}j.isEmpty(p)?h.insert(g,i[0],!0):(h.insert(j,i[0],!0),h.insert(g,j)),h=i[0],(h.isEmpty(p)||h.firstChild===h.lastChild&&h.firstChild.name==="br")&&h.empty().remove()}else if(g.parent){if(g.name==="li"){r=g.prev;if(!r||r.name!=="ul"&&r.name!=="ul"){r=g.next;if(!r||r.name!=="ul"&&r.name!=="ul"){g.wrap(e.filterNode(new b("ul",1)));continue}r.insert(g,r.firstChild,!0);continue}r.append(g);continue}d.isValidChild(g.parent.name,"div")&&d.isValidChild("div",g.name)?g.wrap(e.filterNode(new b("div",1))):g.name==="style"||g.name==="script"?g.empty().remove():g.unwrap()}}}var e=this,f={},g=[],h={},i={};c=c||{},c.validate="validate"in c?c.validate:!0,c.root_name=c.root_name||"body",e.schema=d=d||new a.html.Schema,e.filterNode=function(a){var b,c,d;c in f&&(d=h[c],d?d.push(a):h[c]=[a]),b=g.length;while(b--)c=g[b].name,c in a.attributes.map&&(d=i[c],d?d.push(a):i[c]=[a]);return a},e.addNodeFilter=function(b,c){a.each(a.explode(b),function(a){var b=f[a];b||(f[a]=b=[]),b.push(c)})},e.addAttributeFilter=function(b,c){a.each(a.explode(b),function(a){var b;for(b=0;b<g.length;b++)if(g[b].name===a){g[b].callbacks.push(c);return}g.push({name:a,callbacks:[c]})})},e.parse=function(e,k){function F(){var a=m.firstChild,b,c;while(a)b=a.next,a.type==3||a.type==1&&a.name!=="p"&&!w[a.name]&&!a.attr("data-mce-type")?c?c.append(a):(c=G(E,1),m.insert(c,a),c.append(a)):c=null,a=b}function G(a,c){var d=new b(a,c),e;return a in f&&(e=h[a],e?e.push(d):h[a]=[d]),d}function H(a){var b,c,d;for(b=a.prev;b&&b.type===3;)c=b.value.replace(z,""),c.length>0?(b.value=c,b=b.prev):(d=b.prev,b.remove(),b=d)}var l,m,n,o,p,q,r,s,t,u,v,w,x,y=[],z,A,B,C,D,E;k=k||{},h={},i={},w=a.extend(a.makeMap("script,style,head,html,body,title,meta,param"),d.getBlockElements()),D=d.getNonEmptyElements(),C=d.children,v=c.validate,E="forced_root_block"in k?k.forced_root_block:c.forced_root_block,B=d.getWhiteSpaceElements(),x=/^[ \t\r\n]+/,z=/[ \t\r\n]+$/,A=/[ \t\r\n]+/g,l=new a.html.SaxParser({validate:v,fix_self_closing:!v,cdata:function(a){n.append(G("#cdata",4)).value=a},text:function(a,b){var c;B[n.name]||(a=a.replace(A," "),n.lastChild&&w[n.lastChild.name]&&(a=a.replace(x,""))),a.length!==0&&(c=G("#text",3),c.raw=!!b,n.append(c).value=a)},comment:function(a){n.append(G("#comment",8)).value=a},pi:function(a,b){n.append(G(a,7)).value=b,H(n)},doctype:function(a){var b;b=n.append(G("#doctype",10)),b.value=a,H(n)},start:function(a,b,c){var e,f,h,j,k,l,m,o;h=v?d.getElementRule(a):{};if(h){e=G(h.outputName||a,1),e.attributes=b,e.shortEnded=c,n.append(e),o=C[n.name],o&&C[e.name]&&!o[e.name]&&y.push(e),f=g.length;while(f--)k=g[f].name,k in b.map&&(t=i[k],t?t.push(e):i[k]=[e]);w[a]&&H(e),c||(n=e)}},end:function(a){var c,e,f,g,h;e=v?d.getElementRule(a):{};if(e){if(w[a]){if(!B[n.name]){for(c=n.firstChild;c&&c.type===3;)f=c.value.replace(x,""),f.length>0?(c.value=f,c=c.next):(g=c.next,c.remove(),c=g);for(c=n.lastChild;c&&c.type===3;)f=c.value.replace(z,""),f.length>0?(c.value=f,c=c.prev):(g=c.prev,c.remove(),c=g)}c=n.prev,c&&c.type===3&&(f=c.value.replace(x,""),f.length>0?c.value=f:c.remove())}if(e.removeEmpty||e.paddEmpty)if(n.isEmpty(D))if(e.paddEmpty)n.empty().append(new b("#text","3")).value=" ";else if(!n.attributes.map.name){h=n.parent,n.empty().remove(),n=h;return}n=n.parent}}},d),m=n=new b(k.context||c.root_name,11),l.parse(e),v&&y.length&&(k.context?k.invalid=!0:j(y)),E&&m.name=="body"&&F();if(!k.invalid){for(u in h){t=f[u],o=h[u],r=o.length;while(r--)o[r].parent||o.splice(r,1);for(p=0,q=t.length;p<q;p++)t[p](o,u,k)}for(p=0,q=g.length;p<q;p++){t=g[p];if(t.name in i){o=i[t.name],r=o.length;while(r--)o[r].parent||o.splice(r,1);for(r=0,s=t.callbacks.length;r<s;r++)t.callbacks[r](o,t.name,k)}}}return m},c.remove_trailing_brs&&e.addNodeFilter("br",function(b,c){var e,f=b.length,g,h=d.getBlockElements(),i=d.getNonEmptyElements(),j,k,l;h.body=1;for(e=0;e<f;e++){g=b[e],j=g.parent;if(h[g.parent.name]&&g===j.lastChild){k=g.prev;while(k){l=k.name;if(l!=="span"||k.attr("data-mce-type")!=="bookmark"){if(l!=="br")break;if(l==="br"){g=null;break}}k=k.prev}g&&(g.remove(),j.isEmpty(i)&&(elementRule=d.getElementRule(j.name),elementRule&&(elementRule.removeEmpty?j.remove():elementRule.paddEmpty&&(j.empty().append(new a.html.Node("#text",3)).value=" "))))}}})}}(tinymce),tinymce.html.Writer=function(a){var b=[],c,d,e,f,g;return a=a||{},c=a.indent,d=tinymce.makeMap(a.indent_before||""),e=tinymce.makeMap(a.indent_after||""),f=tinymce.html.Entities.getEncodeFunc(a.entity_encoding||"raw",a.entities),g=a.element_format=="html",{start:function(a,h,i){var j,k,l,m;c&&d[a]&&b.length>0&&(m=b[b.length-1],m.length>0&&m!=="\n"&&b.push("\n")),b.push("<",a);if(h)for(j=0,k=h.length;j<k;j++)l=h[j],b.push(" ",l.name,'="',f(l.value,!0),'"');!i||g?b[b.length]=">":b[b.length]=" />",i&&c&&e[a]&&b.length>0&&(m=b[b.length-1],m.length>0&&m!=="\n"&&b.push("\n"))},end:function(a){var d;b.push("</",a,">"),c&&e[a]&&b.length>0&&(d=b[b.length-1],d.length>0&&d!=="\n"&&b.push("\n"))},text:function(a,c){a.length>0&&(b[b.length]=c?a:f(a))},cdata:function(a){b.push("<![CDATA[",a,"]]>")},comment:function(a){b.push("<!--",a,"-->")},pi:function(a,d){d?b.push("<?",a," ",d,"?>"):b.push("<?",a,"?>"),c&&b.push("\n")},doctype:function(a){b.push("<!DOCTYPE",a,">",c?"\n":"")},reset:function(){b.length=0},getContent:function(){return b.join("").replace(/\n$/,"")}}},function(a){a.html.Serializer=function(b,c){var d=this,e=new a.html.Writer(b);b=b||{},b.validate="validate"in b?b.validate:!0,d.schema=c=c||new a.html.Schema,d.writer=e,d.serialize=function(a){function g(a){var b=d[a.type],h,i,j,k,l,m,n,o,p;if(!b){h=a.name,i=a.shortEnded,j=a.attributes;if(f&&j&&j.length>1){m=[],m.map={},p=c.getElementRule(a.name);for(n=0,o=p.attributesOrder.length;n<o;n++)k=p.attributesOrder[n],k in j.map&&(l=j.map[k],m.map[k]=l,m.push({name:k,value:l}));for(n=0,o=j.length;n<o;n++)k=j[n].name,k in m.map||(l=j.map[k],m.map[k]=l,m.push({name:k,value:l}));j=m}e.start(a.name,j,i);if(!i){if(a=a.firstChild)do g(a);while(a=a.next);e.end(h)}}else b(a)}var d,f;return f=b.validate,d={3:function(a,b){e.text(a.value,a.raw)},8:function(a){e.comment(a.value)},7:function(a){e.pi(a.name,a.value)},10:function(a){e.doctype(a.value)},4:function(a){e.cdata(a.value)},11:function(a){if(a=a.firstChild)do g(a);while(a=a.next)}},e.reset(),a.type==1&&!b.inner?g(a):d[11](a),e.getContent()}}}(tinymce),function(a){var b=a.each,c=a.is,d=a.isWebKit,e=a.isIE,f=a.html.Entities,g=/^([a-z0-9],?)+$/i,h=a.html.Schema.blockElementsMap,i=/^[ \t\r\n]*$/;a.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(b,c){var d=this,f,g;d.doc=b,d.win=window,d.files={},d.cssFlicker=!1,d.counter=0,d.stdMode=!a.isIE||b.documentMode>=8,d.boxModel=!a.isIE||b.compatMode=="CSS1Compat"||d.stdMode,d.hasOuterHTML="outerHTML"in b.createElement("a"),d.settings=c=a.extend({keep_values:!1,hex_colors:1},c),d.schema=c.schema,d.styles=new a.html.Styles({url_converter:c.url_converter,url_converter_scope:c.url_converter_scope},c.schema);if(a.isIE6)try{b.execCommand("BackgroundImageCache",!1,!0)}catch(h){d.cssFlicker=!0}if(e&&c.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(a){b.createElement(a)});for(g in c.schema.getCustomElements())b.createElement(g)}a.addUnload(d.destroy,d)},getRoot:function(){var a=this,b=a.settings;return b&&a.get(b.root_element)||a.doc.body},getViewPort:function(a){var b,c;return a=a?a:this.win,b=a.document,c=this.boxModel?b.documentElement:b.body,{x:a.pageXOffset||c.scrollLeft,y:a.pageYOffset||c.scrollTop,w:a.innerWidth||c.clientWidth,h:a.innerHeight||c.clientHeight}},getRect:function(a){var b,c=this,d;return a=c.get(a),b=c.getPos(a),d=c.getSize(a),{x:b.x,y:b.y,w:d.w,h:d.h}},getSize:function(a){var b=this,c,d;return a=b.get(a),c=b.getStyle(a,"width"),d=b.getStyle(a,"height"),c.indexOf("px")===-1&&(c=0),d.indexOf("px")===-1&&(d=0),{w:parseInt(c)||a.offsetWidth||a.clientWidth,h:parseInt(d)||a.offsetHeight||a.clientHeight}},getParent:function(a,b,c){return this.getParents(a,b,c,!1)},getParents:function(a,b,d,e){var f=this,g,h=f.settings,i=[];a=f.get(a),e=e===undefined,h.strict_root&&(d=d||f.getRoot()),c(b,"string")&&(g=b,b==="*"?b=function(a){return a.nodeType==1}:b=function(a){return f.is(a,g)});while(a){if(a==d||!a.nodeType||a.nodeType===9)break;if(!b||b(a))if(e)i.push(a);else return a;a=a.parentNode}return e?i:null},get:function(a){var b;if(a&&this.doc&&typeof a=="string"){b=a,a=this.doc.getElementById(a);if(a&&a.id!==b)return this.doc.getElementsByName(b)[1]}return a},getNext:function(a,b){return this._findSib(a,b,"nextSibling")},getPrev:function(a,b){return this._findSib(a,b,"previousSibling")},add:function(a,b,d,e,f){var g=this;return this.run(a,function(a){var h,i;return h=c(b,"string")?g.doc.createElement(b):b,g.setAttribs(h,d),e&&(e.nodeType?h.appendChild(e):g.setHTML(h,e)),f?h:a.appendChild(h)})},create:function(a,b,c){return this.add(this.doc.createElement(a),a,b,c,1)},createHTML:function(a,b,c){var d="",e=this,f;d+="<"+a;for(f in b)b.hasOwnProperty(f)&&(d+=" "+f+'="'+e.encode(b[f])+'"');return typeof c!="undefined"?d+">"+c+"</"+a+">":d+" />"},remove:function(b,c){return this.run(b,function(b){var d,e=b.parentNode;if(!e)return null;if(c)while(d=b.firstChild)!a.isIE||d.nodeType!==3||d.nodeValue?e.insertBefore(d,b):b.removeChild(d);return e.removeChild(b)})},setStyle:function(b,c,d){var f=this;return f.run(b,function(g){var h,i;h=g.style,c=c.replace(/-(\D)/g,function(a,b){return b.toUpperCase()}),f.pixelStyles.test(c)&&(a.is(d,"number")||/^[\-0-9\.]+$/.test(d))&&(d+="px");switch(c){case"opacity":if(e){h.filter=d===""?"":"alpha(opacity="+d*100+")";if(!b.currentStyle||!b.currentStyle.hasLayout)h.display="inline-block"}h[c]=h["-moz-opacity"]=h["-khtml-opacity"]=d||"";break;case"float":e?h.styleFloat=d:h.cssFloat=d;break;default:h[c]=d||""}f.settings.update_styles&&f.setAttrib(g,"data-mce-style")})},getStyle:function(a,b,c){a=this.get(a);if(!a)return;if(this.doc.defaultView&&c){b=b.replace(/[A-Z]/g,function(a){return"-"+a});try{return this.doc.defaultView.getComputedStyle(a,null).getPropertyValue(b)}catch(d){return null}}return b=b.replace(/-(\D)/g,function(a,b){return b.toUpperCase()}),b=="float"&&(b=e?"styleFloat":"cssFloat"),a.currentStyle&&c?a.currentStyle[b]:a.style?a.style[b]:undefined},setStyles:function(a,c){var d=this,e=d.settings,f;f=e.update_styles,e.update_styles=0,b(c,function(b,c){d.setStyle(a,c,b)}),e.update_styles=f,e.update_styles&&d.setAttrib(a,e.cssText)},removeAllAttribs:function(a){return this.run(a,function(a){var b,c=a.attributes;for(b=c.length-1;b>=0;b--)a.removeAttributeNode(c.item(b))})},setAttrib:function(a,d,e){var f=this;if(!a||!d)return;return f.settings.strict&&(d=d.toLowerCase()),this.run(a,function(a){var g=f.settings;if(e!==null)switch(d){case"style":if(!c(e,"string")){b(e,function(b,c){f.setStyle(a,c,b)});return}g.keep_values&&(e&&!f._isRes(e)?a.setAttribute("data-mce-style",e,2):a.removeAttribute("data-mce-style",2)),a.style.cssText=e;break;case"class":a.className=e||"";break;case"src":case"href":g.keep_values&&(g.url_converter&&(e=g.url_converter.call(g.url_converter_scope||f,e,d,a)),f.setAttrib(a,"data-mce-"+d,e,2));break;case"shape":a.setAttribute("data-mce-style",e)}c(e)&&e!==null&&e.length!==0?a.setAttribute(d,""+e,2):a.removeAttribute(d,2)})},setAttribs:function(a,c){var d=this;return this.run(a,function(a){b(c,function(b,c){d.setAttrib(a,c,b)})})},getAttrib:function(b,f,g){var h,i=this,j;b=i.get(b);if(!b||b.nodeType!==1)return g===j?!1:g;c(g)||(g="");if(/^(src|href|style|coords|shape)$/.test(f)){h=b.getAttribute("data-mce-"+f);if(h)return h}e&&i.props[f]&&(h=b[i.props[f]],h=h&&h.nodeValue?h.nodeValue:h),h||(h=b.getAttribute(f,2));if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(f))return b[i.props[f]]===!0&&h===""?f:h?f:"";if(b.nodeName==="FORM"&&b.getAttributeNode(f))return b.getAttributeNode(f).nodeValue;f==="style"&&(h=h||b.style.cssText,h&&(h=i.serializeStyle(i.parseStyle(h),b.nodeName),i.settings.keep_values&&!i._isRes(h)&&b.setAttribute("data-mce-style",h))),d&&f==="class"&&h&&(h=h.replace(/(apple|webkit)\-[a-z\-]+/gi,""));if(e)switch(f){case"rowspan":case"colspan":h===1&&(h="");break;case"size":if(h==="+0"||h===20||h===0)h="";break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":h===0&&(h="");break;case"hspace":h===-1&&(h="");break;case"maxlength":case"tabindex":if(h===32768||h===2147483647||h==="32768")h="";break;case"multiple":case"compact":case"noshade":case"nowrap":if(h===65535)return f;return g;case"shape":h=h.toLowerCase();break;default:f.indexOf("on")===0&&h&&(h=a._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+h))}return h!==j&&h!==null&&h!==""?""+h:g},getPos:function(a,b){var c=this,d=0,e=0,f,g=c.doc,h;a=c.get(a),b=b||g.body;if(a){if(a.getBoundingClientRect)return a=a.getBoundingClientRect(),f=c.boxModel?g.documentElement:g.body,d=a.left+(g.documentElement.scrollLeft||g.body.scrollLeft)-f.clientTop,e=a.top+(g.documentElement.scrollTop||g.body.scrollTop)-f.clientLeft,{x:d,y:e};h=a;while(h&&h!=b&&h.nodeType)d+=h.offsetLeft||0,e+=h.offsetTop||0,h=h.offsetParent;h=a.parentNode;while(h&&h!=b&&h.nodeType)d-=h.scrollLeft||0,e-=h.scrollTop||0,h=h.parentNode}return{x:d,y:e}},parseStyle:function(a){return this.styles.parse(a)},serializeStyle:function(a,b){return this.styles.serialize(a,b)},loadCSS:function(c){var d=this,f=d.doc,g;c||(c=""),g=d.select("head")[0],b(c.split(","),function(b){var c;if(d.files[b])return;d.files[b]=!0,c=d.create("link",{rel:"stylesheet",href:a._addVer(b)}),e&&f.documentMode&&f.recalc&&(c.onload=function(){f.recalc&&f.recalc(),c.onload=null}),g.appendChild(c)})},addClass:function(a,b){return this.run(a,function(a){var c;return b?this.hasClass(a,b)?a.className:(c=this.removeClass(a,b),a.className=(c!=""?c+" ":"")+b):0})},removeClass:function(b,c){var d=this,e;return d.run(b,function(b){var f;return d.hasClass(b,c)?(e||(e=new RegExp("(^|\\s+)"+c+"(\\s+|$)","g")),f=b.className.replace(e," "),f=a.trim(f!=" "?f:""),b.className=f,f||(b.removeAttribute("class"),b.removeAttribute("className")),f):b.className})},hasClass:function(a,b){return a=this.get(a),!a||!b?!1:(" "+a.className+" ").indexOf(" "+b+" ")!==-1},show:function(a){return this.setStyle(a,"display","block")},hide:function(a){return this.setStyle(a,"display","none")},isHidden:function(a){return a=this.get(a),!a||a.style.display=="none"||this.getStyle(a,"display")=="none"},uniqueId:function(a){return(a?a:"mce_")+this.counter++},setHTML:function(a,c){var d=this;return d.run(a,function(a){if(e){while(a.firstChild)a.removeChild(a.firstChild);try{a.innerHTML="<br />"+c,a.removeChild(a.firstChild)}catch(f){a=d.create("div"),a.innerHTML="<br />"+c,b(a.childNodes,function(b,c){c&&a.appendChild(b)})}}else a.innerHTML=c;return c})},getOuterHTML:function(a){var b,c=this;return a=c.get(a),a?a.nodeType===1&&c.hasOuterHTML?a.outerHTML:(b=(a.ownerDocument||c.doc).createElement("body"),b.appendChild(a.cloneNode(!0)),b.innerHTML):null},setOuterHTML:function(a,b,c){function f(a,b,c){var e,f;f=c.createElement("body"),f.innerHTML=b,e=f.lastChild;while(e)d.insertAfter(e.cloneNode(!0),a),e=e.previousSibling;d.remove(a)}var d=this;return this.run(a,function(a){a=d.get(a);if(a.nodeType==1){c=c||a.ownerDocument||d.doc;if(e)try{e&&a.nodeType==1?a.outerHTML=b:f(a,b,c)}catch(g){f(a,b,c)}else f(a,b,c)}})},decode:f.decode,encode:f.encodeAllRaw,insertAfter:function(a,b){return b=this.get(b),this.run(a,function(a){var c,d;return c=b.parentNode,d=b.nextSibling,d?c.insertBefore(a,d):c.appendChild(a),a})},isBlock:function(a){var b=a.nodeType;return b?b===1&&!!h[a.nodeName]:!!h[a]},replace:function(d,e,f){var g=this;return c(e,"array")&&(d=d.cloneNode(!0)),g.run(e,function(c){return f&&b(a.grep(c.childNodes),function(a){d.appendChild(a)}),c.parentNode.replaceChild(d,c)})},rename:function(a,c){var d=this,e;return a.nodeName!=c.toUpperCase()&&(e=d.create(c),b(d.getAttribs(a),function(b){d.setAttrib(e,b.nodeName,d.getAttrib(a,b.nodeName))}),d.replace(e,a,1)),e||a},findCommonAncestor:function(a,b){var c=a,d;while(c){d=b;while(d&&c!=d)d=d.parentNode;if(c==d)break;c=c.parentNode}return!c&&a.ownerDocument?a.ownerDocument.documentElement:c},toHex:function(a){function c(a){return a=parseInt(a).toString(16),a.length>1?a:"0"+a}var b=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(a);return b?(a="#"+c(b[1])+c(b[2])+c(b[3]),a):a},getClasses:function(){function i(c){b(c.imports,function(a){i(a)}),b(c.cssRules||c.rules,function(c){switch(c.type||1){case 1:c.selectorText&&b(c.selectorText.split(","),function(b){b=b.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(b)||!/\.[\w\-]+$/.test(b))return;h=b,b=a._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",b);if(g&&!(b=g(b,h)))return;f[b]||(d.push({"class":b}),f[b]=1)});break;case 3:i(c.styleSheet)}})}var c=this,d=[],e,f={},g=c.settings.class_filter,h;if(c.classes)return c.classes;try{b(c.doc.styleSheets,i)}catch(j){}return d.length>0&&(c.classes=d),d},run:function(a,c,d){var e=this,f;return e.doc&&typeof a=="string"&&(a=e.get(a)),a?(d=d||this,!a.nodeType&&(a.length||a.length===0)?(f=[],b(a,function(a,b){a&&(typeof a=="string"&&(a=e.doc.getElementById(a)),f.push(c.call(d,a,b)))}),f):c.call(d,a)):!1},getAttribs:function(a){var b;return a=this.get(a),a?e?(b=[],a.nodeName=="OBJECT"?a.attributes:(a.nodeName==="OPTION"&&this.getAttrib(a,"selected")&&b.push({specified:1,nodeName:"selected"}),a.cloneNode(!1).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(a){b.push({specified:1,nodeName:a})}),b)):a.attributes:[]},isEmpty:function(b,c){var d=this,e,f,g,h,j,k;b=b.firstChild;if(b){h=new a.dom.TreeWalker(b),c=c||d.schema?d.schema.getNonEmptyElements():null;do{g=b.nodeType;if(g===1){if(b.getAttribute("data-mce-bogus"))continue;j=b.nodeName.toLowerCase();if(c&&c[j]){k=b.parentNode;if(j==="br"&&d.isBlock(k)&&k.firstChild===b&&k.lastChild===b)continue;return!1}f=d.getAttribs(b),e=b.attributes.length;while(e--){j=b.attributes[e].nodeName;if(j==="name"||j==="data-mce-bookmark")return!1}}if(g===3&&!i.test(b.nodeValue))return!1}while(b=h.next())}return!0},destroy:function(b){var c=this;c.events&&c.events.destroy(),c.win=c.doc=c.root=c.events=null,b||a.removeUnload(c.destroy)},createRng:function(){var b=this.doc;return b.createRange?b.createRange():new a.dom.Range(this)},nodeIndex:function(a,b){var c=0,d,e,f;if(a)for(d=a.nodeType,a=a.previousSibling,e=a;a;a=a.previousSibling){f=a.nodeType;if(b&&f==3)if(f==d||!a.nodeValue.length)continue;c++,d=f}return c},split:function(b,c,d){function j(b){var c,d=b.childNodes,f=b.nodeType;if(f==1&&b.getAttribute("data-mce-type")=="bookmark")return;for(c=d.length-1;c>=0;c--)j(d[c]);if(f!=9){if(f==3&&b.nodeValue.length>0){if(!e.isBlock(b.parentNode)||a.trim(b.nodeValue).length>0)return}else if(f==1){d=b.childNodes,d.length==1&&d[0]&&d[0].nodeType==1&&d[0].getAttribute("data-mce-type")=="bookmark"&&b.parentNode.insertBefore(d[0],b);if(d.length||/^(br|hr|input|img)$/i.test(b.nodeName))return}e.remove(b)}return b}var e=this,f=e.createRng(),g,h,i;if(b&&c)return f.setStart(b.parentNode,e.nodeIndex(b)),f.setEnd(c.parentNode,e.nodeIndex(c)),g=f.extractContents(),f=e.createRng(),f.setStart(c.parentNode,e.nodeIndex(c)+1),f.setEnd(b.parentNode,e.nodeIndex(b)+1),h=f.extractContents(),i=b.parentNode,i.insertBefore(j(g),b),d?i.replaceChild(d,c):i.insertBefore(c,b),i.insertBefore(j(h),b),e.remove(b),d||c},bind:function(b,c,d,e){var f=this;return f.events||(f.events=new a.dom.EventUtils),f.events.add(b,c,d,e||this)},unbind:function(b,c,d){var e=this;return e.events||(e.events=new a.dom.EventUtils),e.events.remove(b,c,d)},_findSib:function(a,b,d){var e=this,f=b;if(a){c(f,"string")&&(f=function(a){return e.is(a,b)});for(a=a[d];a;a=a[d])if(f(a))return a}return null},_isRes:function(a){return/^(top|left|bottom|right|width|height)/i.test(a)||/;\s*(top|left|bottom|right|width|height)/i.test(a)}}),a.DOM=new a.dom.DOMUtils(document,{process_html:0})}(tinymce),function(a){function b(a){function p(a,b){I(h,a,b)}function q(a,b){I(i,a,b)}function r(a){p(a.parentNode,o(a))}function s(a){p(a.parentNode,o(a)+1)}function t(a){q(a.parentNode,o(a))}function u(a){q(a.parentNode,o(a)+1)}function v(a){a?(c[l]=c[k],c[m]=c[j]):(c[k]=c[l],c[j]=c[m]),c.collapsed=h}function w(a){r(a),u(a)}function x(a){p(a,0),q(a,a.nodeType===1?a.childNodes.length:a.nodeValue.length)}function y(a,b){var d=c[k],e=c[j],f=c[l],g=c[m],h=b.startContainer,i=b.startOffset,n=b.endContainer,o=b.endOffset;if(a===0)return H(d,e,h,i);if(a===1)return H(f,g,h,i);if(a===2)return H(f,g,n,o);if(a===3)return H(d,e,n,o)}function z(){J(g)}function A(){return J(e)}function B(){return J(f)}function C(b){var c=this[k],d=this[j],e,f;c.nodeType!==3&&c.nodeType!==4||!c.nodeValue?(c.childNodes.length>0&&(f=c.childNodes[d]),f?c.insertBefore(b,f):c.appendChild(b)):d?d>=c.nodeValue.length?a.insertAfter(b,c):(e=c.splitText(d),c.parentNode.insertBefore(b,e)):c.parentNode.insertBefore(b,c)}function D(a){var b=c.extractContents();c.insertNode(a),a.appendChild(b),c.selectNode(a)}function E(){return n(new b(a),{startContainer:c[k],startOffset:c[j],endContainer:c[l],endOffset:c[m],collapsed:c.collapsed,commonAncestorContainer:c.commonAncestorContainer})}function F(a,b){var c;if(a.nodeType==3)return a;if(b<0)return a;c=a.firstChild;while(c&&b>0)--b,c=c.nextSibling;return c?c:a}function G(){return c[k]==c[l]&&c[j]==c[m]}function H(b,c,d,e){var f,g,h,i,j,k;if(b==d)return c==e?0:c<e?-1:1;f=d;while(f&&f.parentNode!=b)f=f.parentNode;if(f){g=0,h=b.firstChild;while(h!=f&&g<c)g++,h=h.nextSibling;return c<=g?-1:1}f=b;while(f&&f.parentNode!=d)f=f.parentNode;if(f){g=0,h=d.firstChild;while(h!=f&&g<e)g++,h=h.nextSibling;return g<e?-1:1}i=a.findCommonAncestor(b,d),j=b;while(j&&j.parentNode!=i)j=j.parentNode;j||(j=i),k=d;while(k&&k.parentNode!=i)k=k.parentNode;k||(k=i);if(j==k)return 0;h=i.firstChild;while(h){if(h==j)return-1;if(h==k)return 1;h=h.nextSibling}}function I(b,d,e){var f,g;b?(c[k]=d,c[j]=e):(c[l]=d,c[m]=e),f=c[l];while(f.parentNode)f=f.parentNode;g=c[k];while(g.parentNode)g=g.parentNode;g==f?H(c[k],c[j],c[l],c[m])>0&&c.collapse(b):c.collapse(b),c.collapsed=G(),c.commonAncestorContainer=a.findCommonAncestor(c[k],c[l])}function J(a){var b,d=0,e=0,f,g,h,i,j,m;if(c[k]==c[l])return K(a);for(b=c[l],f=b.parentNode;f;b=f,f=f.parentNode){if(f==c[k])return L(b,a);++d}for(b=c[k],f=b.parentNode;f;b=f,f=f.parentNode){if(f==c[l])return M(b,a);++e}g=e-d,h=c[k];while(g>0)h=h.parentNode,g--;i=c[l];while(g<0)i=i.parentNode,g++;for(j=h.parentNode,m=i.parentNode;j!=m;j=j.parentNode,m=m.parentNode)h=j,i=m;return N(h,i,a)}function K(a){var b,e,i,l,n,o,p;a!=g&&(b=d.createDocumentFragment());if(c[j]==c[m])return b;if(c[k].nodeType==3){e=c[k].nodeValue,i=e.substring(c[j],c[m]),a!=f&&(c[k].deleteData(c[j],c[m]-c[j]),c.collapse(h));if(a==g)return;return b.appendChild(d.createTextNode(i)),b}l=F(c[k],c[j]),n=c[m]-c[j];while(n>0)o=l.nextSibling,p=R(l,a),b&&b.appendChild(p),--n,l=o;return a!=f&&c.collapse(h),b}function L(a,b){var e,h,k,l,m,n;b!=g&&(e=
d.createDocumentFragment()),h=O(a,b),e&&e.appendChild(h),k=o(a),l=k-c[j];if(l<=0)return b!=f&&(c.setEndBefore(a),c.collapse(i)),e;h=a.previousSibling;while(l>0)m=h.previousSibling,n=R(h,b),e&&e.insertBefore(n,e.firstChild),--l,h=m;return b!=f&&(c.setEndBefore(a),c.collapse(i)),e}function M(a,b){var e,i,j,k,l,n;b!=g&&(e=d.createDocumentFragment()),j=P(a,b),e&&e.appendChild(j),i=o(a),++i,k=c[m]-i,j=a.nextSibling;while(k>0)l=j.nextSibling,n=R(j,b),e&&e.appendChild(n),--k,j=l;return b!=f&&(c.setStartAfter(a),c.collapse(h)),e}function N(a,b,e){var i,j,k,l,m,n,p,q;e!=g&&(j=d.createDocumentFragment()),i=P(a,e),j&&j.appendChild(i),k=a.parentNode,l=o(a),m=o(b),++l,n=m-l,p=a.nextSibling;while(n>0)q=p.nextSibling,i=R(p,e),j&&j.appendChild(i),p=q,--n;return i=O(b,e),j&&j.appendChild(i),e!=f&&(c.setStartAfter(a),c.collapse(h)),j}function O(a,b){var d=F(c[l],c[m]-1),e,f,j,k,n,o=d!=c[l];if(d==a)return Q(d,o,i,b);e=d.parentNode,f=Q(e,i,i,b);while(e){while(d)j=d.previousSibling,k=Q(d,o,i,b),b!=g&&f.insertBefore(k,f.firstChild),o=h,d=j;if(e==a)return f;d=e.previousSibling,e=e.parentNode,n=Q(e,i,i,b),b!=g&&n.appendChild(f),f=n}}function P(a,b){var d=F(c[k],c[j]),e=d!=c[k],f,l,m,n,o;if(d==a)return Q(d,e,h,b);f=d.parentNode,l=Q(f,i,h,b);while(f){while(d)m=d.nextSibling,n=Q(d,e,h,b),b!=g&&l.appendChild(n),e=h,d=m;if(f==a)return l;d=f.nextSibling,f=f.parentNode,o=Q(f,i,h,b),b!=g&&o.appendChild(l),l=o}}function Q(a,b,d,e){var h,k,l,n,o;if(b)return R(a,e);if(a.nodeType==3){h=a.nodeValue,d?(n=c[j],k=h.substring(n),l=h.substring(0,n)):(n=c[m],k=h.substring(0,n),l=h.substring(n)),e!=f&&(a.nodeValue=l);if(e==g)return;return o=a.cloneNode(i),o.nodeValue=k,o}if(e==g)return;return a.cloneNode(i)}function R(a,b){if(b!=g)return b==f?a.cloneNode(h):a;a.parentNode.removeChild(a)}var c=this,d=a.doc,e=0,f=1,g=2,h=!0,i=!1,j="startOffset",k="startContainer",l="endContainer",m="endOffset",n=tinymce.extend,o=a.nodeIndex;n(c,{startContainer:d,startOffset:0,endContainer:d,endOffset:0,collapsed:h,commonAncestorContainer:d,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:p,setEnd:q,setStartBefore:r,setStartAfter:s,setEndBefore:t,setEndAfter:u,collapse:v,selectNode:w,selectNodeContents:x,compareBoundaryPoints:y,deleteContents:z,extractContents:A,cloneContents:B,insertNode:C,surroundContents:D,cloneRange:E})}a.Range=b}(tinymce.dom),function(){function a(a){function f(b,c){var d,e=0,f,g,h,i,j,k,l=-1,m;d=b.duplicate(),d.collapse(c),m=d.parentElement();if(m.ownerDocument!==a.dom.doc)return;while(m.contentEditable==="false")m=m.parentNode;if(!m.hasChildNodes())return{node:m,inside:1};h=m.children,f=h.length-1;while(e<=f){k=Math.floor((e+f)/2),i=h[k],d.moveToElementText(i),l=d.compareEndPoints(c?"StartToStart":"EndToEnd",b);if(l>0)f=k-1;else if(l<0)e=k+1;else return{node:i}}if(l<0){i?d.collapse(!1):(d.moveToElementText(m),d.collapse(!0),i=m,g=!0),d.setEndPoint(c?"EndToStart":"EndToEnd",b);if(d.compareEndPoints(c?"StartToStart":"StartToEnd",b)>0){d=b.duplicate(),d.collapse(c),j=-1;while(m==d.parentElement()){if(d.move("character",-1)==0)break;j++}}j=j||d.text.replace("\r\n"," ").length}else d.collapse(!0),d.setEndPoint(c?"StartToStart":"StartToEnd",b),j=d.text.replace("\r\n"," ").length;return{node:i,position:l,offset:j,inside:g}}function g(){function m(a){var b=f(d,a),c,g,h=0,i,j,k;c=b.node,g=b.offset;if(b.inside&&!c.hasChildNodes()){e[a?"setStart":"setEnd"](c,0);return}if(g===j){e[a?"setStartBefore":"setEndAfter"](c);return}if(b.position<0){i=b.inside?c.firstChild:c.nextSibling;if(!i){e[a?"setStartAfter":"setEndAfter"](c);return}if(!g){i.nodeType==3?e[a?"setStart":"setEnd"](i,0):e[a?"setStartBefore":"setEndBefore"](i);return}while(i){k=i.nodeValue,h+=k.length;if(h>=g){c=i,h-=g,h=k.length-h;break}i=i.nextSibling}}else{i=c.previousSibling;if(!i)return e[a?"setStartBefore":"setEndBefore"](c);if(!g){c.nodeType==3?e[a?"setStart":"setEnd"](i,c.nodeValue.length):e[a?"setStartAfter":"setEndAfter"](i);return}while(i){h+=i.nodeValue.length;if(h>=g){c=i,h-=g;break}i=i.previousSibling}}e[a?"setStart":"setEnd"](c,h)}var d=a.getRng(),e=c.createRng(),g,h,i,j,k,l;g=d.item?d.item(0):d.parentElement();if(g.ownerDocument!=c.doc)return e;h=a.isCollapsed();if(d.item)return e.setStart(g.parentNode,c.nodeIndex(g)),e.setEnd(e.startContainer,e.startOffset+1),e;try{m(!0),h||m()}catch(n){if(n.number==-2147024809)k=b.getBookmark(2),i=d.duplicate(),i.collapse(!0),g=i.parentElement(),h||(i=d.duplicate(),i.collapse(!1),j=i.parentElement(),j.innerHTML=j.innerHTML),g.innerHTML=g.innerHTML,b.moveToBookmark(k),d=a.getRng(),m(!0),h||m();else throw n}return e}var b=this,c=a.dom,d=!0,e=!1;this.getBookmark=function(b){function i(a){var a,b,d,e,f,g=[];b=a.parentNode,d=c.getRoot().parentNode;while(b!=d&&b.nodeType!==9){e=b.children,f=e.length;while(f--)if(a===e[f]){g.push(f);break}a=b,b=b.parentNode}return g}function j(a){var b;b=f(d,a);if(b)return{position:b.position,offset:b.offset,indexes:i(b.node),inside:b.inside}}var d=a.getRng(),e,g,h={};return b===2&&(d.item?h.start={ctrl:!0,indexes:i(d.item(0))}:(h.start=j(!0),a.isCollapsed()||(h.end=j()))),h},this.moveToBookmark=function(a){function e(a){var b,d,e,f;b=c.getRoot();for(d=a.length-1;d>=0;d--)f=b.children,e=a[d],e<=f.length-1&&(b=f[e]);return b}function f(c){var f=a[c?"start":"end"],g,h,i;f&&(g=f.position>0,h=d.createTextRange(),h.moveToElementText(e(f.indexes)),offset=f.offset,offset!==i?(h.collapse(f.inside||g),h.moveStart("character",g?-offset:offset)):h.collapse(c),b.setEndPoint(c?"StartToStart":"EndToStart",h),c&&b.collapse(!0))}var b,d=c.doc.body;a.start&&(a.start.ctrl?(b=d.createControlRange(),b.addElement(e(a.start.indexes)),b.select()):(b=d.createTextRange(),f(!0),f(),b.select()))},this.addRange=function(b){function m(a){var b,f,m,n,o;m=c.create("a"),b=a?g:i,f=a?h:j,n=e.duplicate();if(b==k||b==k.documentElement)b=l,f=0;b.nodeType==3?(b.parentNode.insertBefore(m,b),n.moveToElementText(m),n.moveStart("character",f),c.remove(m),e.setEndPoint(a?"StartToStart":"EndToEnd",n)):(o=b.childNodes,o.length?(f>=o.length?c.insertAfter(m,o[o.length-1]):b.insertBefore(m,o[f]),n.moveToElementText(m)):(m=k.createTextNode("﻿"),b.appendChild(m),n.moveToElementText(m.parentNode),n.collapse(d)),e.setEndPoint(a?"StartToStart":"EndToEnd",n),c.remove(m))}var e,f,g,h,i,j,k=a.dom.doc,l=k.body;g=b.startContainer,h=b.startOffset,i=b.endContainer,j=b.endOffset,e=l.createTextRange();if(g==i&&g.nodeType==1&&h==j-1&&h==j-1)try{f=l.createControlRange(),f.addElement(g.childNodes[h]),f.select();return}catch(n){}m(!0),m(),e.select()},this.getRangeAt=g}tinymce.dom.TridentSelection=a}(),function(a){var b=a.each,c=a.DOM,d=a.isIE,e=a.isWebKit,f;a.create("tinymce.dom.EventUtils",{EventUtils:function(){this.inits=[],this.events=[]},add:function(e,f,g,h){var i,j=this,k=j.events,l;if(f instanceof Array)return l=[],b(f,function(a){l.push(j.add(e,a,g,h))}),l;if(e&&e.hasOwnProperty&&e instanceof Array)return l=[],b(e,function(a){a=c.get(a),l.push(j.add(a,f,g,h))}),l;e=c.get(e);if(!e)return;return i=function(b){if(j.disabled)return;return b=b||window.event,b&&d&&(b.target||(b.target=b.srcElement),a.extend(b,j._stoppers)),h?g.call(h,b):g(b)},f=="unload"?(a.unloads.unshift({func:i}),i):f=="init"?(j.domLoaded?i():j.inits.push(i),i):(k.push({obj:e,name:f,func:g,cfunc:i,scope:h}),j._add(e,f,i),g)},remove:function(a,d,e){var f=this,g=f.events,h=!1,i;return a&&a.hasOwnProperty&&a instanceof Array?(i=[],b(a,function(a){a=c.get(a),i.push(f.remove(a,d,e))}),i):(a=c.get(a),b(g,function(b,c){if(b.obj==a&&b.name==d&&(!e||b.func==e||b.cfunc==e))return g.splice(c,1),f._remove(a,d,b.cfunc),h=!0,!1}),h)},clear:function(a){var b=this,d=b.events,e,f;if(a){a=c.get(a);for(e=d.length-1;e>=0;e--)f=d[e],f.obj===a&&(b._remove(f.obj,f.name,f.cfunc),f.obj=f.cfunc=null,d.splice(e,1))}},cancel:function(a){return a?(this.stop(a),this.prevent(a)):!1},stop:function(a){return a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,!1},prevent:function(a){return a.preventDefault?a.preventDefault():a.returnValue=!1,!1},destroy:function(){var a=this;b(a.events,function(b,c){a._remove(b.obj,b.name,b.cfunc),b.obj=b.cfunc=null}),a.events=[],a=null},_add:function(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener?a.addEventListener(b,c,!1):a["on"+b]=c},_remove:function(a,b,c){if(a)try{a.detachEvent?a.detachEvent("on"+b,c):a.removeEventListener?a.removeEventListener(b,c,!1):a["on"+b]=null}catch(d){}},_pageInit:function(a){var c=this;if(c.domLoaded)return;c.domLoaded=!0,b(c.inits,function(a){a()}),c.inits=[]},_wait:function(a){var b=this,c=a.document;if(a.tinyMCE_GZ&&tinyMCE_GZ.loaded){b.domLoaded=1;return}c.attachEvent?(c.attachEvent("onreadystatechange",function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",arguments.callee),b._pageInit(a))}),c.documentElement.doScroll&&a==a.top&&function(){if(b.domLoaded)return;try{c.documentElement.doScroll("left")}catch(d){setTimeout(arguments.callee,0);return}b._pageInit(a)}()):c.addEventListener&&b._add(a,"DOMContentLoaded",function(){b._pageInit(a)}),b._add(a,"load",function(){b._pageInit(a)})},_stoppers:{preventDefault:function(){this.returnValue=!1},stopPropagation:function(){this.cancelBubble=!0}}}),f=a.dom.Event=new a.dom.EventUtils,f._wait(window),a.addUnload(function(){f.destroy()})}(tinymce),function(a){a.dom.Element=function(b,c){var d=this,e,f;d.settings=c=c||{},d.id=b,d.dom=e=c.dom||a.DOM,a.isIE||(f=e.get(d.id)),a.each("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get".split(/,/),function(a){d[a]=function(){var c=[b],f;for(f=0;f<arguments.length;f++)c.push(arguments[f]);return c=e[a].apply(e,c),d.update(a),c}}),a.extend(d,{on:function(b,c,e){return a.dom.Event.add(d.id,b,c,e)},getXY:function(){return{x:parseInt(d.getStyle("left")),y:parseInt(d.getStyle("top"))}},getSize:function(){var a=e.get(d.id);return{w:parseInt(d.getStyle("width")||a.clientWidth),h:parseInt(d.getStyle("height")||a.clientHeight)}},moveTo:function(a,b){d.setStyles({left:a,top:b})},moveBy:function(a,b){var c=d.getXY();d.moveTo(c.x+a,c.y+b)},resizeTo:function(a,b){d.setStyles({width:a,height:b})},resizeBy:function(a,b){var c=d.getSize();d.resizeTo(c.w+a,c.h+b)},update:function(b){var f;if(a.isIE6&&c.blocker){b=b||"";if(b.indexOf("get")===0||b.indexOf("has")===0||b.indexOf("is")===0)return;if(b=="remove"){e.remove(d.blocker);return}d.blocker?f=e.get(d.blocker):(d.blocker=e.uniqueId(),f=e.add(c.container||e.getRoot(),"iframe",{id:d.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'}),e.setStyle(f,"opacity",0)),e.setStyles(f,{left:d.getStyle("left",1),top:d.getStyle("top",1),width:d.getStyle("width",1),height:d.getStyle("height",1),display:d.getStyle("display",1),zIndex:parseInt(d.getStyle("zIndex",1)||0)-1})}}})}}(tinymce),function(a){function b(a){return a.replace(/[\n\r]+/g,"")}var c=a.is,d=a.isIE,e=a.each;a.create("tinymce.dom.Selection",{Selection:function(b,c,d){var f=this;f.dom=b,f.win=c,f.serializer=d,e(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(b){f[b]=new a.util.Dispatcher(f)}),f.win.getSelection||(f.tridentSel=new a.dom.TridentSelection(f)),a.isIE&&b.boxModel&&this._fixIESelection(),a.addUnload(f.destroy,f)},setCursorLocation:function(a,b){var c=this,d=c.dom.createRng();d.setStart(a,b),d.setEnd(a,b),c.setRng(d),c.collapse(!1)},getContent:function(a){var b=this,d=b.getRng(),e=b.dom.create("body"),f=b.getSel(),g,h,i;return a=a||{},g=h="",a.get=!0,a.format=a.format||"html",a.forced_root_block="",b.onBeforeGetContent.dispatch(b,a),a.format=="text"?b.isCollapsed()?"":d.text||(f.toString?f.toString():""):(d.cloneContents?(i=d.cloneContents(),i&&e.appendChild(i)):c(d.item)||c(d.htmlText)?(e.innerHTML="<br>"+(d.item?d.item(0).outerHTML:d.htmlText),e.removeChild(e.firstChild)):e.innerHTML=d.toString(),/^\s/.test(e.innerHTML)&&(g=" "),/\s+$/.test(e.innerHTML)&&(h=" "),a.getInner=!0,a.content=b.isCollapsed()?"":g+b.serializer.serialize(e,a)+h,b.onGetContent.dispatch(b,a),a.content)},setContent:function(a,b){var c=this,d=c.getRng(),e,f=c.win.document,g,h;b=b||{format:"html"},b.set=!0,a=b.content=a,b.no_events||c.onBeforeSetContent.dispatch(c,b),a=b.content;if(d.insertNode){a+='<span id="__caret">_</span>',d.startContainer==f&&d.endContainer==f?f.body.innerHTML=a:(d.deleteContents(),f.body.childNodes.length==0?f.body.innerHTML=a:d.createContextualFragment?d.insertNode(d.createContextualFragment(a)):(g=f.createDocumentFragment(),h=f.createElement("div"),g.appendChild(h),h.outerHTML=a,d.insertNode(g))),e=c.dom.get("__caret"),d=f.createRange(),d.setStartBefore(e),d.setEndBefore(e),c.setRng(d),c.dom.remove("__caret");try{c.setRng(d)}catch(i){}}else d.item&&(f.execCommand("Delete",!1,null),d=c.getRng()),/^\s+/.test(a)?(d.pasteHTML('<span id="__mce_tmp">_</span>'+a),c.dom.remove("__mce_tmp")):d.pasteHTML(a);b.no_events||c.onSetContent.dispatch(c,b)},getStart:function(){var a=this.getRng(),b,c,d,e;if(a.duplicate||a.item){if(a.item)return a.item(0);d=a.duplicate(),d.collapse(1),b=d.parentElement(),c=e=a.parentElement();while(e=e.parentNode)if(e==b){b=c;break}return b}return b=a.startContainer,b.nodeType==1&&b.hasChildNodes()&&(b=b.childNodes[Math.min(b.childNodes.length-1,a.startOffset)]),b&&b.nodeType==3?b.parentNode:b},getEnd:function(){var a=this,b=a.getRng(),c,d;return b.duplicate||b.item?b.item?b.item(0):(b=b.duplicate(),b.collapse(0),c=b.parentElement(),c&&c.nodeName=="BODY"?c.lastChild||c:c):(c=b.endContainer,d=b.endOffset,c.nodeType==1&&c.hasChildNodes()&&(c=c.childNodes[d>0?d-1:d]),c&&c.nodeType==3?c.parentNode:c)},getBookmark:function(a,b){function o(a,b){var c=0;return e(d.select(a),function(a,d){a==b&&(c=d)}),c}var c=this,d=c.dom,f,g,h,i,j,k,l,m="﻿",n;if(a==2){function p(){function g(a,d){var f=a[d?"startContainer":"endContainer"],g=a[d?"startOffset":"endOffset"],h=[],i,j,k=0;if(f.nodeType==3){if(b)for(i=f.previousSibling;i&&i.nodeType==3;i=i.previousSibling)g+=i.nodeValue.length;h.push(g)}else j=f.childNodes,g>=j.length&&j.length&&(k=1,g=Math.max(0,j.length-1)),h.push(c.dom.nodeIndex(j[g],b)+k);for(;f&&f!=e;f=f.parentNode)h.push(c.dom.nodeIndex(f,b));return h}var a=c.getRng(!0),e=d.getRoot(),f={};return f.start=g(a,!0),c.isCollapsed()||(f.end=g(a)),f}return c.tridentSel?c.tridentSel.getBookmark(a):p()}if(a)return{rng:c.getRng()};f=c.getRng(),h=d.uniqueId(),i=tinyMCE.activeEditor.selection.isCollapsed(),n="overflow:hidden;line-height:0px";if(f.duplicate||f.item){if(!!f.item)return k=f.item(0),j=k.nodeName,{name:j,index:o(j,k)};g=f.duplicate();try{f.collapse(),f.pasteHTML('<span data-mce-type="bookmark" id="'+h+'_start" style="'+n+'">'+m+"</span>"),i||(g.collapse(!1),f.moveToElementText(g.parentElement()),f.compareEndPoints("StartToEnd",g)==0&&g.move("character",-1),g.pasteHTML('<span data-mce-type="bookmark" id="'+h+'_end" style="'+n+'">'+m+"</span>"))}catch(q){return null}}else{k=c.getNode(),j=k.nodeName;if(j=="IMG")return{name:j,index:o(j,k)};g=f.cloneRange(),i||(g.collapse(!1),g.insertNode(d.create("span",{"data-mce-type":"bookmark",id:h+"_end",style:n},m))),f.collapse(!0),f.insertNode(d.create("span",{"data-mce-type":"bookmark",id:h+"_start",style:n},m))}return c.moveToBookmark({id:h,keep:1}),{id:h}},moveToBookmark:function(b){var c=this,f=c.dom,g,h,i,j,k,l,m,n;if(b)if(b.start){i=f.createRng(),j=f.getRoot();function o(a){var c=b[a?"start":"end"],d,e,f,g;if(c){f=c[0];for(e=j,d=c.length-1;d>=1;d--){g=e.childNodes;if(c[d]>g.length-1)return;e=g[c[d]]}e.nodeType===3&&(f=Math.min(c[0],e.nodeValue.length)),e.nodeType===1&&(f=Math.min(c[0],e.childNodes.length)),a?i.setStart(e,f):i.setEnd(e,f)}return!0}if(c.tridentSel)return c.tridentSel.moveToBookmark(b);o(!0)&&o()&&c.setRng(i)}else if(b.id){function p(c){var d=f.get(b.id+"_"+c),g,h,i,j,o=b.keep;if(d){g=d.parentNode,c=="start"?(o?(g=d.firstChild,h=1):h=f.nodeIndex(d),k=l=g,m=n=h):(o?(g=d.firstChild,h=1):h=f.nodeIndex(d),l=g,n=h);if(!o){j=d.previousSibling,i=d.nextSibling,e(a.grep(d.childNodes),function(a){a.nodeType==3&&(a.nodeValue=a.nodeValue.replace(/\uFEFF/g,""))});while(d=f.get(b.id+"_"+c))f.remove(d,1);j&&i&&j.nodeType==i.nodeType&&j.nodeType==3&&!a.isOpera&&(h=j.nodeValue.length,j.appendData(i.nodeValue),f.remove(i),c=="start"?(k=l=j,m=n=h):(l=j,n=h))}}}function q(a){return f.isBlock(a)&&!a.innerHTML&&(a.innerHTML=d?" ":'<br data-mce-bogus="1" />'),a}p("start"),p("end"),k&&(i=f.createRng(),i.setStart(q(k),m),i.setEnd(q(l),n),c.setRng(i))}else b.name?c.select(f.select(b.name)[b.index]):b.rng&&c.setRng(b.rng)},select:function(b,c){var d=this,e=d.dom,f=e.createRng(),g;if(b){g=e.nodeIndex(b),f.setStart(b.parentNode,g),f.setEnd(b.parentNode,g+1);if(c){function h(b,c){var d=new a.dom.TreeWalker(b,b);do{if(b.nodeType==3&&a.trim(b.nodeValue).length!=0){c?f.setStart(b,0):f.setEnd(b,b.nodeValue.length);return}if(b.nodeName=="BR"){c?f.setStartBefore(b):f.setEndBefore(b);return}}while(b=c?d.next():d.prev())}h(b,1),h(b)}d.setRng(f)}return b},isCollapsed:function(){var a=this,b=a.getRng(),c=a.getSel();return!b||b.item?!1:b.compareEndPoints?b.compareEndPoints("StartToEnd",b)===0:!c||b.collapsed},collapse:function(a){var b=this,c=b.getRng(),d;c.item&&(d=c.item(0),c=b.win.document.body.createTextRange(),c.moveToElementText(d)),c.collapse(!!a),b.setRng(c)},getSel:function(){var a=this,b=this.win;return b.getSelection?b.getSelection():b.document.selection},getRng:function(b){var c=this,d,e,f,g=c.win.document;if(b&&c.tridentSel)return c.tridentSel.getRangeAt(0);try{if(d=c.getSel())e=d.rangeCount>0?d.getRangeAt(0):d.createRange?d.createRange():g.createRange()}catch(h){}return a.isIE&&e&&e.setStart&&g.selection.createRange().item&&(f=g.selection.createRange().item(0),e=g.createRange(),e.setStartBefore(f),e.setEndAfter(f)),e||(e=g.createRange?g.createRange():g.body.createTextRange()),c.selectedRange&&c.explicitRange&&(e.compareBoundaryPoints(e.START_TO_START,c.selectedRange)===0&&e.compareBoundaryPoints(e.END_TO_END,c.selectedRange)===0?e=c.explicitRange:(c.selectedRange=null,c.explicitRange=null)),e},setRng:function(a){var b,c=this;if(!c.tridentSel){b=c.getSel();if(b){c.explicitRange=a;try{b.removeAllRanges()}catch(d){}b.addRange(a),c.selectedRange=b.getRangeAt(0)}}else{if(a.cloneRange){c.tridentSel.addRange(a);return}try{a.select()}catch(d){}}},setNode:function(a){var b=this;return b.setContent(b.dom.getOuterHTML(a)),a},getNode:function(){var a=this,b=a.getRng(),c=a.getSel(),d,e=b.startContainer,f=b.endContainer;if(!b)return a.dom.getRoot();if(b.setStart){d=b.commonAncestorContainer;if(!b.collapsed){b.startContainer==b.endContainer&&b.endOffset-b.startOffset<2&&b.startContainer.hasChildNodes()&&(d=b.startContainer.childNodes[b.startOffset]);if(e.nodeType===3&&f.nodeType===3){function g(a,b){var c=a;while(a&&a.nodeType===3&&a.length===0)a=b?a.nextSibling:a.previousSibling;return a||c}e.length===b.startOffset?e=g(e.nextSibling,!0):e=e.parentNode,b.endOffset===0?f=g(f.previousSibling,!1):f=f.parentNode;if(e&&e===f)return e}}return d&&d.nodeType==3?d.parentNode:d}return b.item?b.item(0):b.parentElement()},getSelectedBlocks:function(b,c){var d=this,e=d.dom,f,g,h,i=[];f=e.getParent(b||d.getStart(),e.isBlock),g=e.getParent(c||d.getEnd(),e.isBlock),f&&i.push(f);if(f&&g&&f!=g){h=f;var j=new a.dom.TreeWalker(f,e.getRoot());while((h=j.next())&&h!=g)e.isBlock(h)&&i.push(h)}return g&&f!=g&&i.push(g),i},normalize:function(){function e(e){var f,g,h,i=b.dom,j=i.getRoot(),k;f=c[(e?"start":"end")+"Container"],g=c[(e?"start":"end")+"Offset"],f.nodeType===9&&(f=f.body,g=0);if(f===j&&f.hasChildNodes()){f=f.childNodes[Math.min(!e&&g>0?g-1:g,f.childNodes.length-1)],g=0;if(f.hasChildNodes()){k=f,h=new a.dom.TreeWalker(f,j);do{if(k.nodeType===3){g=e?0:k.nodeValue.length-1,f=k;break}if(k.nodeName==="BR"){g=i.nodeIndex(k),f=k.parentNode;break}}while(k=e?h.next():h.prev());d=!0}}d&&c["set"+(e?"Start":"End")](f,g)}var b=this,c,d;if(a.isIE)return;c=b.getRng(),e(!0),c.collapsed&&e(),d&&b.setRng(c)},destroy:function(b){var c=this;c.win=null,b||a.removeUnload(c.destroy)},_fixIESelection:function(){function g(a,b){var d=c.createTextRange();try{d.moveToPoint(a,b)}catch(e){d=null}return d}function h(a){var b;a.button?(b=g(a.x,a.y),b&&(b.compareEndPoints("StartToStart",e)>0?b.setEndPoint("StartToStart",e):b.setEndPoint("EndToEnd",e),b.select())):i()}function i(){var c=b.selection.createRange();e&&!c.item&&c.compareEndPoints("StartToEnd",c)===0&&e.select(),a.unbind(b,"mouseup",i),a.unbind(b,"mousemove",h),e=d=0}var a=this.dom,b=a.doc,c=b.body,d,e,f;b.documentElement.unselectable=!0,a.bind(b,["mousedown","contextmenu"],function(c){if(c.target.nodeName==="HTML"){d&&i(),f=b.documentElement;if(f.scrollHeight>f.clientHeight)return;d=1,e=g(c.x,c.y),e&&(a.bind(b,"mouseup",i),a.bind(b,"mousemove",h),a.win.focus(),e.select())}})}})}(tinymce),function(a){a.dom.Serializer=function(b,c,d){var e,f,g=a.isIE,h=a.each,i;return b.apply_source_formatting||(b.indent=!1),b.remove_trailing_brs=!0,c=c||a.DOM,d=d||new a.html.Schema(b),b.entity_encoding=b.entity_encoding||"named",e=new a.util.Dispatcher(self),f=new a.util.Dispatcher(self),i=new a.html.DomParser(b,d),i.addAttributeFilter("src,href,style",function(a,d){var e=a.length,f,g,h="data-mce-"+d,i=b.url_converter,j=b.url_converter_scope,k;while(e--)f=a[e],g=f.attributes.map[h],g!==k?(f.attr(d,g.length>0?g:null),f.attr(h,null)):(g=f.attributes.map[d],d==="style"?g=c.serializeStyle(c.parseStyle(g),f.name):i&&(g=i.call(j,g,d,f.name)),f.attr(d,g.length>0?g:null))}),i.addAttributeFilter("class",function(a,b){var c=a.length,d,e;while(c--)d=a[c],e=d.attr("class").replace(/\s*mce(Item\w+|Selected)\s*/g,""),d.attr("class",e.length>0?e:null)}),i.addAttributeFilter("data-mce-type",function(a,b,c){var d=a.length,e;while(d--)e=a[d],e.attributes.map["data-mce-type"]==="bookmark"&&!c.cleanup&&e.remove()}),i.addNodeFilter("script,style",function(a,b){function f(a){return a.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(\/\/\s*<!--|\/\/\s*<!\[CDATA\[|<!--|<!\[CDATA\[)[\r\n]*/g,"").replace(/\s*(\/\/\s*\]\]>|\/\/\s*-->|\]\]>|-->|\]\]-->)\s*$/g,"")}var c=a.length,d,e;while(c--)d=a[c],e=d.firstChild?d.firstChild.value:"",b==="script"?(d.attr("type",(d.attr("type")||"text/javascript").replace(/^mce\-/,"")),e.length>0&&(d.firstChild.value="// <![CDATA[\n"+f(e)+"\n// ]]>")):e.length>0&&(d.firstChild.value="<!--\n"+f(e)+"\n-->")}),i.addNodeFilter("#comment",function(a,b){var c=a.length,d;while(c--)d=a[c],d.value.indexOf("[CDATA[")===0?(d.name="#cdata",d.type=4,d.value=d.value.replace(/^\[CDATA\[|\]\]$/g,"")):d.value.indexOf("mce:protected ")===0&&(d.name="#text",d.type=3,d.raw=!0,d.value=unescape(d.value).substr(14))}),i.addNodeFilter("xml:namespace,input",function(a,b){var c=a.length,d;while(c--)d=a[c],d.type===7?d.remove():d.type===1&&b==="input"&&!("type"in d.attributes.map)&&d.attr("type","text")}),b.fix_list_elements&&i.addNodeFilter("ul,ol",function(a,b){var c=a.length,d,e;while(c--)d=a[c],e=d.parent,(e.name==="ul"||e.name==="ol")&&d.prev&&d.prev.name==="li"&&d.prev.append(d)}),i.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(a,b){var c=a.length;while(c--)a[c].attr(b,null)}),{schema:d,addNodeFilter:i.addNodeFilter,addAttributeFilter:i.addAttributeFilter,onPreProcess:e,onPostProcess:f,serialize:function(j,k){var l,m,n,o,p;return g&&c.select("script,style,select,map").length>0?(p=j.innerHTML,j=j.cloneNode(!1),c.setHTML(j,p)):j=j.cloneNode(!0),l=j.ownerDocument.implementation,l.createHTMLDocument&&(m=l.createHTMLDocument(""),h(j.nodeName=="BODY"?j.childNodes:[j],function(a){m.body.appendChild(m.importNode(a,!0))}),j.nodeName!="BODY"?j=m.body.firstChild:j=m.body,n=c.doc,c.doc=m),k=k||{},k.format=k.format||"html",k.no_events||(k.node=j,e.dispatch(self,k)),o=new a.html.Serializer(b,d),k.content=o.serialize(i.parse(k.getInner?j.innerHTML:a.trim(c.getOuterHTML(j),k),k)),k.cleanup||(k.content=k.content.replace(/\uFEFF|\u200B/g,"")),k.no_events||f.dispatch(self,k),n&&(c.doc=n),k.node=null,k.content},addRules:function(a){d.addValidElements(a)},setRules:function(a){d.setValidElements(a)}}}}(tinymce),function(a){a.dom.ScriptLoader=function(b){function l(b,c){function j(){e.remove(i),f&&(f.onreadystatechange=f.onload=f=null),c()}function k(){typeof console!="undefined"&&console.log&&console.log("Failed to load: "+b)}var d=this,e=a.DOM,f,g,h,i;i=e.uniqueId();if(a.isIE6){g=new a.util.URI(b),h=location;if(g.host==h.hostname&&g.port==h.port&&g.protocol+":"==h.protocol&&g.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(g.getURI()),success:function(a){var b=e.create("script",{type:"text/javascript"});b.text=a,document.getElementsByTagName("head")[0].appendChild(b),e.remove(b),j()},error:k});return}}f=e.create("script",{id:i,type:"text/javascript",src:a._addVer(b)}),a.isIE||(f.onload=j),f.onerror=k,a.isOpera||(f.onreadystatechange=function(){var a=f.readyState;(a=="complete"||a=="loaded")&&j()}),(document.getElementsByTagName("head")[0]||document.body).appendChild(f)}var c=0,d=1,e=2,f={},g=[],h={},i=[],j=0,k;this.isDone=function(a){return f[a]==e},this.markDone=function(a){f[a]=e},this.add=this.load=function(a,b,d){var e,i=f[a];i==k&&(g.push(a),f[a]=c),b&&(h[a]||(h[a]=[]),h[a].push({func:b,scope:d||this}))},this.loadQueue=function(a,b){this.loadScripts(g,a,b)},this.loadScripts=function(b,c,g){function n(b){a.each(h[b],function(a){a.func.call(a.scope)}),h[b]=k}var m;i.push({func:c,scope:g||this}),m=function(){var c=a.grep(b);b.length=0,a.each(c,function(a){if(f[a]==e){n(a);return}f[a]!=d&&(f[a]=d,j++,l(a,function(){f[a]=e,j--,n(a),m()}))}),j||(a.each(i,function(a){a.func.call(a.scope)}),i.length=0)},m()}},a.ScriptLoader=new a.dom.ScriptLoader}(tinymce),tinymce.dom.TreeWalker=function(a,b){function d(a,c,d,e){var f,g;if(a){if(!e&&a[c])return a[c];if(a!=b){f=a[d];if(f)return f;for(g=a.parentNode;g&&g!=b;g=g.parentNode){f=g[d];if(f)return f}}}}var c=a;this.current=function(){return c},this.next=function(a){return c=d(c,"firstChild","nextSibling",a)},this.prev=function(a){return c=d(c,"lastChild","previousSibling",a)}},function(a){a.dom.RangeUtils=function(b){var c="﻿";this.walk=function(c,d){function p(a){var b;return b=a[0],b.nodeType===3&&b===e&&f>=b.nodeValue.length&&a.splice(0,1),b=a[a.length-1],h===0&&a.length>0&&b===g&&b.nodeType===3&&a.splice(a.length-1,1),a}function q(a,b,c){var d=[];for(;a&&a!=c;a=a[b])d.push(a);return d}function r(a,b){do{if(a.parentNode==b)return a;a=a.parentNode}while(a)}function s(a,b,c){var e=c?"nextSibling":"previousSibling";for(l=a,m=l.parentNode;l&&l!=b;l=m)m=l.parentNode,n=q(l==a?l:l[e],e),n.length&&(c||n.reverse(),d(p(n)))}var e=c.startContainer,f=c.startOffset,g=c.endContainer,h=c.endOffset,i,j,k,l,m,n,o;o=b.select("td.mceSelected,th.mceSelected");if(o.length>0){a.each(o,function(a){d([a])});return}e.nodeType==1&&e.hasChildNodes()&&(e=e.childNodes[f]),g.nodeType==1&&g.hasChildNodes()&&(g=g.childNodes[Math.min(h-1,g.childNodes.length-1)]);if(e==g)return d(p([e]));i=b.findCommonAncestor(e,g);for(l=e;l;l=l.parentNode){if(l===g)return s(e,i,!0);if(l===i)break}for(l=g;l;l=l.parentNode){if(l===e)return s(g,i);if(l===i)break}j=r(e,i)||e,k=r(g,i)||g,s(e,j,!0),n=q(j==e?j:j.nextSibling,"nextSibling",k==g?k.nextSibling:k),n.length&&d(p(n)),s(g,k)},this.split=function(a){function f(a,b){return a.splitText(b)}var b=a.startContainer,c=a.startOffset,d=a.endContainer,e=a.endOffset;return b==d&&b.nodeType==3?c>0&&c<b.nodeValue.length&&(d=f(b,c),b=d.previousSibling,e>c?(e-=c,b=d=f(d,e).previousSibling,e=d.nodeValue.length,c=0):e=0):(b.nodeType==3&&c>0&&c<b.nodeValue.length&&(b=f(b,c),c=0),d.nodeType==3&&e>0&&e<d.nodeValue.length&&(d=f(d,e).previousSibling,e=d.nodeValue.length)),{startContainer:b,startOffset:c,endContainer:d,endOffset:e}}},a.dom.RangeUtils.compareRanges=function(a,b){if(a&&b){if(!a.item&&!a.duplicate)return a.startContainer==b.startContainer&&a.startOffset==b.startOffset;if(a.item&&b.item&&a.item(0)===b.item(0))return!0;if(a.isEqual&&b.isEqual&&b.isEqual(a))return!0}return!1}}(tinymce),function(a){var b=a.dom.Event,c=a.each;a.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(d,e){var f=this,g=d.root,h=d.items,i=d.enableUpDown,j=d.enableLeftRight||!d.enableUpDown,k=d.excludeFromTabOrder,l,m,n,o,p;e=e||a.DOM,l=function(a){p=a.target.id},m=function(a){e.setAttrib(a.target.id,"tabindex","-1")},o=function(a){var b=e.get(p);e.setAttrib(b,"tabindex","0"),b.focus()},f.focus=function(){e.get(p).focus()},f.destroy=function(){c(h,function(a){e.unbind(e.get(a.id),"focus",l),e.unbind(e.get(a.id),"blur",m)}),e.unbind(e.get(g),"focus",o),e.unbind(e.get(g),"keydown",n),h=e=g=f.focus=l=m=n=o=null,f.destroy=function(){}},f.moveFocus=function(a,g){var i=-1,j=f.controls,k;if(!p)return;c(h,function(a,b){if(a.id===p)return i=b,!1}),i+=a,i<0?i=h.length-1:i>=h.length&&(i=0),k=h[i],e.setAttrib(p,"tabindex","-1"),e.setAttrib(k.id,"tabindex","0"),e.get(k.id).focus(),d.actOnFocus&&d.onAction(k.id),g&&b.cancel(g)},n=function(a){var c=37,e=39,g=38,h=40,k=27,l=14,m=13,n=32;switch(a.keyCode){case c:j&&f.moveFocus(-1);break;case e:j&&f.moveFocus(1);break;case g:i&&f.moveFocus(-1);break;case h:i&&f.moveFocus(1);break;case k:d.onCancel&&(d.onCancel(),b.cancel(a));break;case l:case m:case n:d.onAction&&(d.onAction(p),b.cancel(a))}},c(h,function(a,b){var c;a.id||(a.id=e.uniqueId("_mce_item_")),k?(e.bind(a.id,"blur",m),c="-1"):c=b===0?"0":"-1",e.setAttrib(a.id,"tabindex",c),e.bind(e.get(a.id),"focus",l)}),h[0]&&(p=h[0].id),e.setAttrib(g,"tabindex","-1"),e.bind(e.get(g),"focus",o),e.bind(e.get(g),"keydown",n)}})}(tinymce),function(a){var b=a.DOM,c=a.is;a.create("tinymce.ui.Control",{Control:function(b,c,d){this.id=b,this.settings=c=c||{},this.rendered=!1,this.onRender=new a.util.Dispatcher(this),this.classPrefix="",this.scope=c.scope||this,this.disabled=0,this.active=0,this.editor=d},setAriaProperty:function(a,c){var d=b.get(this.id+"_aria")||b.get(this.id);d&&b.setAttrib(d,"aria-"+a,!!c)},focus:function(){b.get(this.id).focus()},setDisabled:function(a){a!=this.disabled&&(this.setAriaProperty("disabled",a),this.setState("Disabled",a),this.setState("Enabled",!a),this.disabled=a)},isDisabled:function(){return this.disabled},setActive:function(a){a!=this.active&&(this.setState("Active",a),this.active=a,this.setAriaProperty("pressed",a))},isActive:function(){return this.active},setState:function(a,c){var d=b.get(this.id);a=this.classPrefix+a,c?b.addClass(d,a):b.removeClass(d,a)},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(a){b.setHTML(a,this.renderHTML())},postRender:function(){var a=this,b;c(a.disabled)&&(b=a.disabled,a.disabled=-1,a.setDisabled(b)),c(a.active)&&(b=a.active,a.active=-1,a.setActive(b))},remove:function(){b.remove(this.id),this.destroy()},destroy:function(){a.dom.Event.clear(this.id)}})}(tinymce),tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(a,b,c){this.parent(a,b,c),this.controls=[],this.lookup={}},add:function(a){return this.lookup[a.id]=a,this.controls.push(a),a},get:function(a){return this.lookup[a]}}),tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(a,b){this.parent(a,b),this.classPrefix="mceSeparator",this.setDisabled(!0)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}}),function(a){var b=a.is,c=a.DOM,d=a.each,e=a.walk;a.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(a,b){this.parent(a,b),this.classPrefix="mceMenuItem"},setSelected:function(a){this.setState("Selected",a),this.setAriaProperty("checked",!!a),this.selected=a},isSelected:function(){return this.selected},postRender:function(){var a=this;a.parent(),b(a.selected)&&a.setSelected(a.selected)}})}(tinymce),function(a){var b=a.is,c=a.DOM,d=a.each,e=a.walk;a.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(b,c){var d=this;d.parent(b,c),d.items={},d.collapsed=!1,d.menuCount=0,d.onAddItem=new a.util.Dispatcher(this)},expand:function(a){var b=this;a&&e(b,function(a){a.expand&&a.expand()},"items",b),b.collapsed=!1},collapse:function(a){var b=this;a&&e(b,function(a){a.collapse&&a.collapse()},"items",b),b.collapsed=!0},isCollapsed:function(){return this.collapsed},add:function(b){return b.settings||(b=new a.ui.MenuItem(b.id||c.uniqueId(),b)),this.onAddItem.dispatch(this,b),this.items[b.id]=b},addSeparator:function(){return this.add({separator:!0})},addMenu:function(a){return a.collapse||(a=this.createMenu(a)),this.menuCount++,this.add(a)},hasMenus:function(){return this.menuCount!==0},remove:function(a){delete this.items[a.id]},removeAll:function(){var a=this;e(a,function(a){a.removeAll?a.removeAll():a.remove(),a.destroy()},"items",a),a.items={}},createMenu:function(b){var d=new a.ui.Menu(b.id||c.uniqueId(),b);return d.
onAddItem.add(this.onAddItem.dispatch,this.onAddItem),d}})}(tinymce),function(a){var b=a.is,c=a.DOM,d=a.each,e=a.dom.Event,f=a.dom.Element;a.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(d,e){e=e||{},e.container=e.container||c.doc.body,e.offset_x=e.offset_x||0,e.offset_y=e.offset_y||0,e.vp_offset_x=e.vp_offset_x||0,e.vp_offset_y=e.vp_offset_y||0,b(e.icons)&&!e.icons&&(e["class"]+=" mceNoIcons"),this.parent(d,e),this.onShowMenu=new a.util.Dispatcher(this),this.onHideMenu=new a.util.Dispatcher(this),this.classPrefix="mceMenu"},createMenu:function(b){var d=this,e=d.settings,f;return b.container=b.container||e.container,b.parent=d,b.constrain=b.constrain||e.constrain,b["class"]=b["class"]||e["class"],b.vp_offset_x=b.vp_offset_x||e.vp_offset_x,b.vp_offset_y=b.vp_offset_y||e.vp_offset_y,b.keyboard_focus=e.keyboard_focus,f=new a.ui.DropMenu(b.id||c.uniqueId(),b),f.onAddItem.add(d.onAddItem.dispatch,d.onAddItem),f},focus:function(){var a=this;a.keyboardNav&&a.keyboardNav.focus()},update:function(){var a=this,b=a.settings,d=c.get("menu_"+a.id+"_tbl"),e=c.get("menu_"+a.id+"_co"),f,g;f=b.max_width?Math.min(d.clientWidth,b.max_width):d.clientWidth,g=b.max_height?Math.min(d.clientHeight,b.max_height):d.clientHeight,c.boxModel?a.element.setStyles({width:f,height:g}):a.element.setStyles({width:f+2,height:g+2}),b.max_width&&c.setStyle(e,"width",f),b.max_height&&(c.setStyle(e,"height",g),d.clientHeight<b.max_height&&c.setStyle(e,"overflow","hidden"))},showMenu:function(b,g,h){var i=this,j=i.settings,k,l=c.getViewPort(),m,n,o,p,q=2,r,s,t=i.classPrefix;i.collapse(1);if(i.isMenuVisible)return;i.rendered?k=c.get("menu_"+i.id):(k=c.add(i.settings.container,i.renderNode()),d(i.items,function(a){a.postRender()}),i.element=new f("menu_"+i.id,{blocker:1,container:j.container})),a.isOpera||c.setStyles(k,{left:-65535,top:-65535}),c.show(k),i.update(),b+=j.offset_x||0,g+=j.offset_y||0,l.w-=4,l.h-=4,j.constrain&&(m=k.clientWidth-q,n=k.clientHeight-q,o=l.x+l.w,p=l.y+l.h,b+j.vp_offset_x+m>o&&(b=h?h-m:Math.max(0,o-j.vp_offset_x-m)),g+j.vp_offset_y+n>p&&(g=Math.max(0,p-j.vp_offset_y-n))),c.setStyles(k,{left:b,top:g}),i.element.update(),i.isMenuVisible=1,i.mouseClickFunc=e.add(k,"click",function(a){var b;a=a.target;if(a&&(a=c.getParent(a,"tr"))&&!c.hasClass(a,t+"ItemSub")){b=i.items[a.id];if(b.isDisabled())return;r=i;while(r)r.hideMenu&&r.hideMenu(),r=r.settings.parent;return b.settings.onclick&&b.settings.onclick(a),e.cancel(a)}}),i.hasMenus()&&(i.mouseOverFunc=e.add(k,"mouseover",function(a){var b,d,e;a=a.target;if(a&&(a=c.getParent(a,"tr"))){b=i.items[a.id],i.lastMenu&&i.lastMenu.collapse(1);if(b.isDisabled())return;a&&c.hasClass(a,t+"ItemSub")&&(d=c.getRect(a),b.showMenu(d.x+d.w-q,d.y-q,d.x),i.lastMenu=b,c.addClass(c.get(b.id).firstChild,t+"ItemActive"))}})),e.add(k,"keydown",i._keyHandler,i),i.onShowMenu.dispatch(i),j.keyboard_focus&&i._setupKeyboardNav()},hideMenu:function(a){var b=this,d=c.get("menu_"+b.id),f;if(!b.isMenuVisible)return;b.keyboardNav&&b.keyboardNav.destroy(),e.remove(d,"mouseover",b.mouseOverFunc),e.remove(d,"click",b.mouseClickFunc),e.remove(d,"keydown",b._keyHandler),c.hide(d),b.isMenuVisible=0,a||b.collapse(1),b.element&&b.element.hide(),(f=c.get(b.id))&&c.removeClass(f.firstChild,b.classPrefix+"ItemActive"),b.onHideMenu.dispatch(b)},add:function(a){var b=this,d;return a=b.parent(a),b.isRendered&&(d=c.get("menu_"+b.id))&&b._add(c.select("tbody",d)[0],a),a},collapse:function(a){this.parent(a),this.hideMenu(1)},remove:function(a){return c.remove(a.id),this.destroy(),this.parent(a)},destroy:function(){var a=this,b=c.get("menu_"+a.id);a.keyboardNav&&a.keyboardNav.destroy(),e.remove(b,"mouseover",a.mouseOverFunc),e.remove(c.select("a",b),"focus",a.mouseOverFunc),e.remove(b,"click",a.mouseClickFunc),e.remove(b,"keydown",a._keyHandler),a.element&&a.element.remove(),c.remove(b)},renderNode:function(){var a=this,b=a.settings,e,g,h,i;return i=c.create("div",{role:"listbox",id:"menu_"+a.id,"class":b["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"}),a.settings.parent&&c.setAttrib(i,"aria-parent","menu_"+a.settings.parent.id),h=c.add(i,"div",{role:"presentation",id:"menu_"+a.id+"_co","class":a.classPrefix+(b["class"]?" "+b["class"]:"")}),a.element=new f("menu_"+a.id,{blocker:1,container:b.container}),b.menu_line&&c.add(h,"span",{"class":a.classPrefix+"Line"}),e=c.add(h,"table",{role:"presentation",id:"menu_"+a.id+"_tbl",border:0,cellPadding:0,cellSpacing:0}),g=c.add(e,"tbody"),d(a.items,function(b){a._add(g,b)}),a.rendered=!0,i},_setupKeyboardNav:function(){var b,d,e=this;b=c.select("#menu_"+e.id)[0],d=c.select("a[role=option]","menu_"+e.id),d.splice(0,0,b),e.keyboardNav=new a.ui.KeyboardNavigation({root:"menu_"+e.id,items:d,onCancel:function(){e.hideMenu()},enableUpDown:!0}),b.focus()},_keyHandler:function(a){var b=this,c;switch(a.keyCode){case 37:b.settings.parent&&(b.hideMenu(),b.settings.parent.focus(),e.cancel(a));break;case 39:b.mouseOverFunc&&b.mouseOverFunc(a)}},_add:function(a,b){var d,e=b.settings,f,g,h,i=this.classPrefix,j;if(e.separator){g=c.add(a,"tr",{id:b.id,"class":i+"ItemSeparator"}),c.add(g,"td",{"class":i+"ItemSeparator"}),(d=g.previousSibling)&&c.addClass(d,"mceLast");return}d=g=c.add(a,"tr",{id:b.id,"class":i+"Item "+i+"ItemEnabled"}),d=h=c.add(d,e.titleItem?"th":"td"),d=f=c.add(d,"a",{id:b.id+"_aria",role:e.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"}),e.parent&&(c.setAttrib(f,"aria-haspopup","true"),c.setAttrib(f,"aria-owns","menu_"+b.id)),c.addClass(h,e["class"]),j=c.add(d,"span",{"class":"mceIcon"+(e.icon?" mce_"+e.icon:"")}),e.icon_src&&c.add(j,"img",{src:e.icon_src}),d=c.add(d,e.element||"span",{"class":"mceText",title:b.settings.title},b.settings.title),b.settings.style&&c.setAttrib(d,"style",b.settings.style),a.childNodes.length==1&&c.addClass(g,"mceFirst"),(d=g.previousSibling)&&c.hasClass(d,i+"ItemSeparator")&&c.addClass(g,"mceFirst"),b.collapse&&c.addClass(g,i+"ItemSub"),(d=g.previousSibling)&&c.removeClass(d,"mceLast"),c.addClass(g,"mceLast")}})}(tinymce),function(a){var b=a.DOM;a.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(a,b,c){this.parent(a,b,c),this.classPrefix="mceButton"},renderHTML:function(){var a=this.classPrefix,c=this.settings,d,e;return e=b.encode(c.label||""),d='<a role="button" id="'+this.id+'" href="javascript:;" class="'+a+" "+a+"Enabled "+c["class"]+(e?" "+a+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" aria-labelledby="'+this.id+'_voice" title="'+b.encode(c.title)+'">',c.image&&(!this.editor||!this.editor.forcedHighContrastMode)?d+='<img class="mceIcon" src="'+c.image+'" alt="'+b.encode(c.title)+'" />'+e:d+='<span class="mceIcon '+c["class"]+'"></span>'+(e?'<span class="'+a+'Label">'+e+"</span>":""),d+='<span class="mceVoiceLabel mceIconOnly" style="display: none;" id="'+this.id+'_voice">'+c.title+"</span>",d+="</a>",d},postRender:function(){var b=this,c=b.settings;a.dom.Event.add(b.id,"click",function(a){if(!b.isDisabled())return c.onclick.call(c.scope,a)})}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.each,e=a.util.Dispatcher;a.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(b,c,d){var f=this;f.parent(b,c,d),f.items=[],f.onChange=new e(f),f.onPostRender=new e(f),f.onAdd=new e(f),f.onRenderMenu=new a.util.Dispatcher(this),f.classPrefix="mceListBox"},select:function(a){var b=this,c,e;if(a==undefined)return b.selectByIndex(-1);a&&a.call?e=a:e=function(b){return b==a},a!=b.selectedValue&&(d(b.items,function(a,d){if(e(a.value))return c=1,b.selectByIndex(d),!1}),c||b.selectByIndex(-1))},selectByIndex:function(a){var c=this,d,e,f;a!=c.selectedIndex&&(d=b.get(c.id+"_text"),f=b.get(c.id+"_voiceDesc"),e=c.items[a],e?(c.selectedValue=e.value,c.selectedIndex=a,b.setHTML(d,b.encode(e.title)),b.setHTML(f,c.settings.title+" - "+e.title),b.removeClass(d,"mceTitle"),b.setAttrib(c.id,"aria-valuenow",e.title)):(b.setHTML(d,b.encode(c.settings.title)),b.setHTML(f,b.encode(c.settings.title)),b.addClass(d,"mceTitle"),c.selectedValue=c.selectedIndex=null,b.setAttrib(c.id,"aria-valuenow",c.settings.title)),d=0)},add:function(b,c,d){var e=this;d=d||{},d=a.extend(d,{title:b,value:c}),e.items.push(d),e.onAdd.dispatch(e,d)},getLength:function(){return this.items.length},renderHTML:function(){var a="",c=this,d=c.settings,e=c.classPrefix;return a='<span role="listbox" aria-haspopup="true" aria-labelledby="'+c.id+'_voiceDesc" aria-describedby="'+c.id+'_voiceDesc"><table role="presentation" tabindex="0" id="'+c.id+'" cellpadding="0" cellspacing="0" class="'+e+" "+e+"Enabled"+(d["class"]?" "+d["class"]:"")+'"><tbody><tr>',a+="<td>"+b.createHTML("span",{id:c.id+"_voiceDesc","class":"voiceLabel",style:"display:none;"},c.settings.title),a+=b.createHTML("a",{id:c.id+"_text",tabindex:-1,href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},b.encode(c.settings.title))+"</td>",a+="<td>"+b.createHTML("a",{id:c.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},'<span><span style="display:none;" class="mceIconOnly" aria-hidden="true">▼</span></span>')+"</td>",a+="</tr></tbody></table></span>",a},showMenu:function(){var e=this,f,g=b.get(this.id),h;if(e.isDisabled()||e.items.length==0)return;if(e.menu&&e.menu.isMenuVisible)return e.hideMenu();e.isMenuRendered||(e.renderMenu(),e.isMenuRendered=!0),f=b.getPos(g),h=e.menu,h.settings.offset_x=f.x,h.settings.offset_y=f.y,h.settings.keyboard_focus=!a.isOpera,e.oldID&&h.items[e.oldID].setSelected(0),d(e.items,function(a){a.value===e.selectedValue&&(h.items[a.id].setSelected(1),e.oldID=a.id)}),h.showMenu(0,g.clientHeight),c.add(b.doc,"mousedown",e.hideMenu,e),b.addClass(e.id,e.classPrefix+"Selected")},hideMenu:function(a){var d=this;if(d.menu&&d.menu.isMenuVisible){b.removeClass(d.id,d.classPrefix+"Selected");if(!(!a||a.type!="mousedown"||a.target.id!=d.id+"_text"&&a.target.id!=d.id+"_open"))return;if(!a||!b.getParent(a.target,".mceMenu"))b.removeClass(d.id,d.classPrefix+"Selected"),c.remove(b.doc,"mousedown",d.hideMenu,d),d.menu.hideMenu()}},renderMenu:function(){var a=this,c;c=a.settings.control_manager.createDropMenu(a.id+"_menu",{menu_line:1,"class":a.classPrefix+"Menu mceNoIcons",max_width:150,max_height:150}),c.onHideMenu.add(function(){a.hideMenu(),a.focus()}),c.add({title:a.settings.title,"class":"mceMenuItemTitle",onclick:function(){a.settings.onselect("")!==!1&&a.select("")}}),d(a.items,function(d){d.value===undefined?c.add({title:d.title,role:"option","class":"mceMenuItemTitle",onclick:function(){a.settings.onselect("")!==!1&&a.select("")}}):(d.id=b.uniqueId(),d.role="option",d.onclick=function(){a.settings.onselect(d.value)!==!1&&a.select(d.value)},c.add(d))}),a.onRenderMenu.dispatch(a,c),a.menu=c},postRender:function(){var d=this,e=d.classPrefix;c.add(d.id,"click",d.showMenu,d),c.add(d.id,"keydown",function(a){a.keyCode==32&&(d.showMenu(a),c.cancel(a))}),c.add(d.id,"focus",function(){d._focused||(d.keyDownHandler=c.add(d.id,"keydown",function(a){a.keyCode==40&&(d.showMenu(),c.cancel(a))}),d.keyPressHandler=c.add(d.id,"keypress",function(a){var b;a.keyCode==13&&(b=d.selectedValue,d.selectedValue=null,c.cancel(a),d.settings.onselect(b))})),d._focused=1}),c.add(d.id,"blur",function(){c.remove(d.id,"keydown",d.keyDownHandler),c.remove(d.id,"keypress",d.keyPressHandler),d._focused=0});if(a.isIE6||!b.boxModel)c.add(d.id,"mouseover",function(){b.hasClass(d.id,e+"Disabled")||b.addClass(d.id,e+"Hover")}),c.add(d.id,"mouseout",function(){b.hasClass(d.id,e+"Disabled")||b.removeClass(d.id,e+"Hover")});d.onPostRender.dispatch(d,b.get(d.id))},destroy:function(){this.parent(),c.clear(this.id+"_text"),c.clear(this.id+"_open")}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.each,e=a.util.Dispatcher;a.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(a,b){this.parent(a,b),this.classPrefix="mceNativeListBox"},setDisabled:function(a){b.get(this.id).disabled=a,this.setAriaProperty("disabled",a)},isDisabled:function(){return b.get(this.id).disabled},select:function(a){var b=this,c,e;if(a==undefined)return b.selectByIndex(-1);a&&a.call?e=a:e=function(b){return b==a},a!=b.selectedValue&&(d(b.items,function(a,d){if(e(a.value))return c=1,b.selectByIndex(d),!1}),c||b.selectByIndex(-1))},selectByIndex:function(a){b.get(this.id).selectedIndex=a+1,this.selectedValue=this.items[a]?this.items[a].value:null},add:function(a,c,d){var e,f=this;d=d||{},d.value=c,f.isRendered()&&b.add(b.get(this.id),"option",d,a),e={title:a,value:c,attribs:d},f.items.push(e),f.onAdd.dispatch(f,e)},getLength:function(){return this.items.length},renderHTML:function(){var a,c=this;return a=b.createHTML("option",{value:""},"-- "+c.settings.title+" --"),d(c.items,function(c){a+=b.createHTML("option",{value:c.value},c.title)}),a=b.createHTML("select",{id:c.id,"class":"mceNativeListBox","aria-labelledby":c.id+"_aria"},a),a+=b.createHTML("span",{id:c.id+"_aria",style:"display: none"},c.settings.title),a},postRender:function(){function g(a){var b=d.items[a.target.selectedIndex-1];b&&(b=b.value)&&(d.onChange.dispatch(d,b),d.settings.onselect&&d.settings.onselect(b))}var d=this,e,f=!0;d.rendered=!0,c.add(d.id,"change",g),c.add(d.id,"keydown",function(b){var h;c.remove(d.id,"change",e),f=!1,h=c.add(d.id,"blur",function(){if(f)return;f=!0,c.add(d.id,"change",g),c.remove(d.id,"blur",h)});if(!(!a.isWebKit||b.keyCode!=37&&b.keyCode!=39))return c.prevent(b);if(b.keyCode==13||b.keyCode==32)return g(b),c.cancel(b)}),d.onPostRender.dispatch(d,b.get(d.id))}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.each;a.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(c,d,e){this.parent(c,d,e),this.onRenderMenu=new a.util.Dispatcher(this),d.menu_container=d.menu_container||b.doc.body},showMenu:function(){var a=this,d,e,f=b.get(a.id),g;if(a.isDisabled())return;a.isMenuRendered||(a.renderMenu(),a.isMenuRendered=!0);if(a.isMenuVisible)return a.hideMenu();d=b.getPos(a.settings.menu_container),e=b.getPos(f),g=a.menu,g.settings.offset_x=e.x,g.settings.offset_y=e.y,g.settings.vp_offset_x=e.x,g.settings.vp_offset_y=e.y,g.settings.keyboard_focus=a._focused,g.showMenu(0,f.clientHeight),c.add(b.doc,"mousedown",a.hideMenu,a),a.setState("Selected",1),a.isMenuVisible=1},renderMenu:function(){var a=this,b;b=a.settings.control_manager.createDropMenu(a.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:a.settings.icons}),b.onHideMenu.add(function(){a.hideMenu(),a.focus()}),a.onRenderMenu.dispatch(a,b),a.menu=b},hideMenu:function(a){var d=this;if(a&&a.type=="mousedown"&&b.getParent(a.target,function(a){return a.id===d.id||a.id===d.id+"_open"}))return;if(!a||!b.getParent(a.target,".mceMenu"))d.setState("Selected",0),c.remove(b.doc,"mousedown",d.hideMenu,d),d.menu&&d.menu.hideMenu();d.isMenuVisible=0},postRender:function(){var a=this,b=a.settings;c.add(a.id,"click",function(){a.isDisabled()||(b.onclick&&b.onclick(a.value),a.showMenu())})}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.each;a.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(a,b,c){this.parent(a,b,c),this.classPrefix="mceSplitButton"},renderHTML:function(){var a,c=this,d=c.settings,e;return a="<tbody><tr>",d.image?e=b.createHTML("img ",{src:d.image,role:"presentation","class":"mceAction "+d["class"]}):e=b.createHTML("span",{"class":"mceAction "+d["class"]},""),e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:c.id+"_voice",style:"display:none;"},d.title),a+="<td >"+b.createHTML("a",{role:"button",id:c.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+d["class"],onclick:"return false;",onmousedown:"return false;",title:d.title},e)+"</td>",e=b.createHTML("span",{"class":"mceOpen "+d["class"]},'<span style="display:none;" class="mceIconOnly" aria-hidden="true">▼</span>'),a+="<td >"+b.createHTML("a",{role:"button",id:c.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+d["class"],onclick:"return false;",onmousedown:"return false;",title:d.title},e)+"</td>",a+="</tr></tbody>",a=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+d["class"],cellpadding:"0",cellspacing:"0",title:d.title},a),b.createHTML("div",{id:c.id,role:"button",tabindex:"0","aria-labelledby":c.id+"_voice","aria-haspopup":"true"},a)},postRender:function(){var d=this,e=d.settings,f;e.onclick&&(f=function(a){d.isDisabled()||(e.onclick(d.value),c.cancel(a))},c.add(d.id+"_action","click",f),c.add(d.id,["click","keydown"],function(a){var b=32,e=14,g=13,h=38,i=40;if((a.keyCode===32||a.keyCode===13||a.keyCode===14)&&!a.altKey&&!a.ctrlKey&&!a.metaKey)f(),c.cancel(a);else if(a.type==="click"||a.keyCode===i)d.showMenu(),c.cancel(a)})),c.add(d.id+"_open","click",function(a){d.showMenu(),c.cancel(a)}),c.add([d.id,d.id+"_open"],"focus",function(){d._focused=1}),c.add([d.id,d.id+"_open"],"blur",function(){d._focused=0});if(a.isIE6||!b.boxModel)c.add(d.id,"mouseover",function(){b.hasClass(d.id,"mceSplitButtonDisabled")||b.addClass(d.id,"mceSplitButtonHover")}),c.add(d.id,"mouseout",function(){b.hasClass(d.id,"mceSplitButtonDisabled")||b.removeClass(d.id,"mceSplitButtonHover")})},destroy:function(){this.parent(),c.clear(this.id+"_action"),c.clear(this.id+"_open"),c.clear(this.id)}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.is,e=a.each;a.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(b,c,d){var e=this;e.parent(b,c,d),e.settings=c=a.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 a.util.Dispatcher(e),e.onHideMenu=new a.util.Dispatcher(e),e.value=c.default_color},showMenu:function(){var a=this,d,e,f,g;if(a.isDisabled())return;a.isMenuRendered||(a.renderMenu(),a.isMenuRendered=!0);if(a.isMenuVisible)return a.hideMenu();f=b.get(a.id),b.show(a.id+"_menu"),b.addClass(f,"mceSplitButtonSelected"),g=b.getPos(f),b.setStyles(a.id+"_menu",{left:g.x,top:g.y+f.clientHeight,zIndex:2e5}),f=0,c.add(b.doc,"mousedown",a.hideMenu,a),a.onShowMenu.dispatch(a),a._focused&&(a._keyHandler=c.add(a.id+"_menu","keydown",function(b){b.keyCode==27&&a.hideMenu()}),b.select("a",a.id+"_menu")[0].focus()),a.isMenuVisible=1},hideMenu:function(a){var d=this;if(d.isMenuVisible){if(a&&a.type=="mousedown"&&b.getParent(a.target,function(a){return a.id===d.id+"_open"}))return;if(!a||!b.getParent(a.target,".mceSplitButtonMenu"))b.removeClass(d.id,"mceSplitButtonSelected"),c.remove(b.doc,"mousedown",d.hideMenu,d),c.remove(d.id+"_menu","keydown",d._keyHandler),b.hide(d.id+"_menu");d.isMenuVisible=0,d.onHideMenu.dispatch()}},renderMenu:function(){var f=this,g,h=0,i=f.settings,j,k,l,m,n;return m=b.add(i.menu_container,"div",{role:"listbox",id:f.id+"_menu","class":i.menu_class+" "+i["class"],style:"position:absolute;left:0;top:-1000px;"}),g=b.add(m,"div",{"class":i["class"]+" mceSplitButtonMenu"}),b.add(g,"span",{"class":"mceMenuLine"}),j=b.add(g,"table",{role:"presentation","class":"mceColorSplitMenu"}),k=b.add(j,"tbody"),h=0,e(d(i.colors,"array")?i.colors:i.colors.split(","),function(a){a=a.replace(/^#/,""),h--||(l=b.add(k,"tr"),h=i.grid_width-1),j=b.add(l,"td"),j=b.add(j,"a",{role:"option",href:"javascript:;",style:{backgroundColor:"#"+a},title:f.editor.getLang("colors."+a,a),"data-mce-color":"#"+a}),f.editor.forcedHighContrastMode&&(j=b.add(j,"canvas",{width:16,height:16,"aria-hidden":"true"}),j.getContext&&(n=j.getContext("2d"))?(n.fillStyle="#"+a,n.fillRect(0,0,16,16)):b.remove(j))}),i.more_colors_func&&(j=b.add(k,"tr"),j=b.add(j,"td",{colspan:i.grid_width,"class":"mceMoreColors"}),j=b.add(j,"a",{role:"option",id:f.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},i.more_colors_title),c.add(j,"click",function(a){return i.more_colors_func.call(i.more_colors_scope||this),c.cancel(a)})),b.addClass(g,"mceColorSplitMenu"),new a.ui.KeyboardNavigation({root:f.id+"_menu",items:b.select("a",f.id+"_menu"),onCancel:function(){f.hideMenu(),f.focus()}}),c.add(f.id+"_menu","mousedown",function(a){return c.cancel(a)}),c.add(f.id+"_menu","click",function(a){var d;return a=b.getParent(a.target,"a",k),a&&a.nodeName.toLowerCase()=="a"&&(d=a.getAttribute("data-mce-color"))&&f.setColor(d),c.cancel(a)}),m},setColor:function(a){this.displayColor(a),this.hideMenu(),this.settings.onselect(a)},displayColor:function(a){var c=this;b.setStyle(c.id+"_preview","backgroundColor",a),c.value=a},postRender:function(){var a=this,c=a.id;a.parent(),b.add(c+"_action","div",{id:c+"_preview","class":"mceColorPreview"}),b.setStyle(a.id+"_preview","backgroundColor",a.value)},destroy:function(){this.parent(),c.clear(this.id+"_menu"),c.clear(this.id+"_more"),b.remove(this.id+"_menu")}})}(tinymce),function(a){var b=a.DOM,c=a.each,d=a.dom.Event;a.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var c=this,d=[],e=c.controls,f=a.each,g=c.settings;return d.push('<div id="'+c.id+'" role="group" aria-labelledby="'+c.id+'_voice">'),d.push("<span role='application'>"),d.push('<span id="'+c.id+'_voice" class="mceVoiceLabel" style="display:none;">'+b.encode(g.name)+"</span>"),f(e,function(a){d.push(a.renderHTML())}),d.push("</span>"),d.push("</div>"),d.join("")},focus:function(){var a=this;b.get(a.id).focus()},postRender:function(){var d=this,e=[];c(d.controls,function(a){c(a.controls,function(a){a.id&&e.push(a)})}),d.keyNav=new a.ui.KeyboardNavigation({root:d.id,items:e,onCancel:function(){a.isWebKit&&b.get(d.editor.id+"_ifr").focus(),d.editor.focus()},excludeFromTabOrder:!d.settings.tab_focus_toolbar})},destroy:function(){var a=this;a.parent(),a.keyNav.destroy(),d.clear(a.id)}})}(tinymce),function(a){var b=a.DOM,c=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var a=this,c="",d,e,f=a.settings,g,h,i,j;j=a.controls;for(g=0;g<j.length;g++)e=j[g],h=j[g-1],i=j[g+1],g===0&&(d="mceToolbarStart",e.Button?d+=" mceToolbarStartButton":e.SplitButton?d+=" mceToolbarStartSplitButton":e.ListBox&&(d+=" mceToolbarStartListBox"),c+=b.createHTML("td",{"class":d},b.createHTML("span",null,"<!-- IE -->"))),h&&e.ListBox&&(h.Button||h.SplitButton)&&(c+=b.createHTML("td",{"class":"mceToolbarEnd"},b.createHTML("span",null,"<!-- IE -->"))),b.stdMode?c+='<td style="position: relative">'+e.renderHTML()+"</td>":c+="<td>"+e.renderHTML()+"</td>",i&&e.ListBox&&(i.Button||i.SplitButton)&&(c+=b.createHTML("td",{"class":"mceToolbarStart"},b.createHTML("span",null,"<!-- IE -->")));return d="mceToolbarEnd",e.Button?d+=" mceToolbarEndButton":e.SplitButton?d+=" mceToolbarEndSplitButton":e.ListBox&&(d+=" mceToolbarEndListBox"),c+=b.createHTML("td",{"class":d},b.createHTML("span",null,"<!-- IE -->")),b.createHTML("table",{id:a.id,"class":"mceToolbar"+(f["class"]?" "+f["class"]:""),cellpadding:"0",cellspacing:"0",align:a.settings.align||"",role:"presentation",tabindex:"-1"},"<tbody><tr>"+c+"</tr></tbody>")}})}(tinymce),function(a){var b=a.util.Dispatcher,c=a.each;a.create("tinymce.AddOnManager",{AddOnManager:function(){var a=this;a.items=[],a.urls={},a.lookup={},a.onAdd=new b(a)},get:function(a){return this.lookup[a]?this.lookup[a].instance:undefined},dependencies:function(a){var b;return this.lookup[a]&&(b=this.lookup[a].dependencies),b||[]},requireLangPack:function(b){var c=a.settings;c&&c.language&&c.language_load!==!1&&a.ScriptLoader.add(this.urls[b]+"/langs/"+c.language+".js")},add:function(a,b,c){return this.items.push(b),this.lookup[a]={instance:b,dependencies:c},this.onAdd.dispatch(this,a,b),b},createUrl:function(a,b){return typeof b=="object"?b:{prefix:a.prefix,resource:b,suffix:a.suffix}},addComponents:function(b,c){var d=this.urls[b];a.each(c,function(b){a.ScriptLoader.add(d+"/"+b)})},load:function(b,c,d,e){function h(){var g=f.dependencies(b);a.each(g,function(a){var b=f.createUrl(c,a);f.load(b.resource,b,undefined,undefined)}),d&&(e?d.call(e):d.call(a.ScriptLoader))}var f=this,g=c;if(f.urls[b])return;typeof c=="object"&&(g=c.prefix+c.resource+c.suffix),g.indexOf("/")!=0&&g.indexOf("://")==-1&&(g=a.baseURL+"/"+g),f.urls[b]=g.substring(0,g.lastIndexOf("/")),f.lookup[b]?h():a.ScriptLoader.add(g,h,e)}}),a.PluginManager=new a.AddOnManager,a.ThemeManager=new a.AddOnManager}(tinymce),function(a){var b=a.each,c=a.extend,d=a.DOM,e=a.dom.Event,f=a.ThemeManager,g=a.PluginManager,h=a.explode,i=a.util.Dispatcher,j,k=0;a.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(a.documentBaseURL)||(a.documentBaseURL+="/"),a.baseURL=(new a.util.URI(a.documentBaseURL)).toAbsolute(a.baseURL),a.baseURI=new a.util.URI(a.baseURL),a.onBeforeUnload=new i(a),e.add(window,"beforeunload",function(b){a.onBeforeUnload.dispatch(a,b)}),a.onAddEditor=new i(a),a.onRemoveEditor=new i(a),a.EditorManager=c(a,{editors:[],i18n:{},activeEditor:null,init:function(f){function o(b,c,d){var e=b[c];if(!e)return;return a.is(e,"string")&&(d=e.replace(/\.\w+$/,""),d=d?a.resolve(d):0,e=a.resolve(e)),e.apply(d||this,Array.prototype.slice.call(arguments,2))}var g=this,i,j=a.ScriptLoader,l,m=[],n;f=c({theme:"simple",language:"en"},f),g.settings=f,e.add(document,"init",function(){var c,e;o(f,"onpageload");switch(f.mode){case"exact":c=f.elements||"",c.length>0&&b(h(c),function(c){d.get(c)?(n=new a.Editor(c,f),m.push(n),n.render(1)):b(document.forms,function(e){b(e.elements,function(b){b.name===c&&(c="mce_editor_"+k++,d.setAttrib(b,"id",c),n=new a.Editor(c,f),m.push(n),n.render(1))})})});break;case"textareas":case"specific_textareas":function i(a,b){return b.constructor===RegExp?b.test(a.className):d.hasClass(a,b)}b(d.select("textarea"),function(b){if(f.editor_deselector&&i(b,f.editor_deselector))return;if(!f.editor_selector||i(b,f.editor_selector)){l=d.get(b.name),!b.id&&!l&&(b.id=b.name);if(!b.id||g.get(b.id))b.id=d.uniqueId();n=new a.Editor(b.id,f),m.push(n),n.render(1)}})}f.oninit&&(c=e=0,b(m,function(a){e++,a.initialized?c++:a.onInit.add(function(){c++,c==e&&o(f,"oninit")}),c==e&&o(f,"oninit")}))})},get:function(a){return a===j?this.editors:this.editors[a]},getInstanceById:function(a){return this.get(a)},add:function(b){var c=this,d=c.editors;return d[b.id]=b,d.push(b),c._setActive(b),c.onAddEditor.dispatch(c,b),a.adapter&&a.adapter.patchEditor(b),b},remove:function(a){var b=this,c,d=b.editors;if(!d[a.id])return null;delete d[a.id];for(c=0;c<d.length;c++)if(d[c]==a){d.splice(c,1);break}return b.activeEditor==a&&b._setActive(d[0]),a.destroy(),b.onRemoveEditor.dispatch(b,a),a},execCommand:function(b,c,d){var e=this,f=e.get(d),g;switch(b){case"mceFocus":return f.focus(),!0;case"mceAddEditor":case"mceAddControl":return e.get(d)||(new a.Editor(d,e.settings)).render(),!0;case"mceAddFrameControl":g=d.window,g.tinyMCE=tinyMCE,g.tinymce=a,a.DOM.doc=g.document,a.DOM.win=g,f=new a.Editor(d.element_id,d),f.render();if(a.isIE){function h(){f.destroy(),g.detachEvent("onunload",h),g=g.tinyMCE=g.tinymce=null}g.attachEvent("onunload",h)}return d.page_window=null,!0;case"mceRemoveEditor":case"mceRemoveControl":return f&&f.remove(),!0;case"mceToggleEditor":if(!f)return e.execCommand("mceAddControl",0,d),!0;return f.isHidden()?f.show():f.hide(),!0}return e.activeEditor?e.activeEditor.execCommand(b,c,d):!1},execInstanceCommand:function(a,b,c,d){var e=this.get(a);return e?e.execCommand(b,c,d):!1},triggerSave:function(){b(this.editors,function(a){a.save()})},addI18n:function(c,d){var e,f=this.i18n;a.is(c,"string")?b(d,function(a,b){f[c+"."+b]=a}):b(c,function(a,c){b(a,function(a,d){b(a,function(a,b){d==="common"?f[c+"."+b]=a:f[c+"."+d+"."+b]=a})})})},_setActive:function(a){this.selectedInstance=this.activeEditor=a}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.extend,e=a.util.Dispatcher,f=a.each,g=a.isGecko,h=a.isIE,i=a.isWebKit,j=a.is,k=a.ThemeManager,l=a.PluginManager,m=a.inArray,n=a.grep,o=a.explode;a.create("tinymce.Editor",{Editor:function(b,c){var g=this;g.id=g.editorId=b,g.execCommands={},g.queryStateCommands={},g.queryValueCommands={},g.isNotDirty=!1,g.plugins={},f(["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(a){g[a]=new e(g)}),g.settings=c=d({id:b,language:"en",docs_language:"en",theme:"simple",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:a.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:a.isIE6?'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">':"<!DOCTYPE>",visual_table_class:"mceItemTable",visual:1,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",hidden_input:1,padd_empty_editor:1,render_ui:1,init_theme:1,force_p_newlines:1,indentation:"30px",keep_styles:1,fix_table_elements:1,inline_styles:1,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",validate:!0,entity_encoding:"named",url_converter:g.convertURL,url_converter_scope:g,ie7_compat:!0},c),g.documentBaseURI=new a.util.URI(c.document_base_url||a.documentBaseURL,{base_uri:tinyMCE.baseURI}),g.baseURI=a.baseURI,g.contentCSS=[],g.execCallback("setup",g)},render:function(d){function j(){g.language&&g.language_load!==!1&&i.add(a.baseURL+"/langs/"+g.language+".js"),g.theme&&g.theme.charAt(0)!="-"&&!k.urls[g.theme]&&k.load(g.theme,"themes/"+g.theme+"/editor_template"+a.suffix+".js"),f(o(g.plugins),function(b){if(b&&!l.urls[b])if(b.charAt(0)=="-"){b=b.substr(1,b.length);var c=l.dependencies(b);f(c,function(b){var c={prefix:"plugins/",resource:b,suffix:"/editor_plugin"+a.suffix+".js"},b=l.createUrl(c,b);l.load(b.resource,b)})}else{if(b=="safari")return;l.load(b,{prefix:"plugins/",resource:b,suffix:"/editor_plugin"+a.suffix+".js"})}}),i.loadQueue(function(){e.removed||e.init()})}var e=this,g=e.settings,h=e.id,i=a.ScriptLoader;if(!c.domLoaded){c.add(document,"init",function(){e.render()});return}tinyMCE.settings=g;if(!e.getElement())return;if(a.isIDevice&&!a.isIOS5)return;!/TEXTAREA|INPUT/i.test(e.getElement().nodeName)&&g.hidden_input&&b.getParent(h,"form")&&b.insertAfter(b.create("input",{type:"hidden",name:h}),h),a.WindowManager&&(e.windowManager=new a.WindowManager(e)),g.encoding=="xml"&&e.onGetContent.add(function(a,c){c.save&&(c.content=b.encode(c.content))}),g.add_form_submit_trigger&&e.onSubmit.addToTop(function(){e.initialized&&(e.save(),e.isNotDirty=1)}),g.add_unload_trigger&&(e._beforeUnload=tinyMCE.onBeforeUnload.add(function(){e.initialized&&!e.destroyed&&!e.isHidden()&&e.save({format:"raw",no_events:!0})})),a.addUnload(e.destroy,e),g.submit_patch&&e.onBeforeRenderUI.add(function(){var b=e.getElement().form;if(!b)return;if(b._mceOldSubmit)return;!b.submit.nodeType&&!b.submit.length&&(e.formElement=b,b._mceOldSubmit=b.submit,b.submit=function(){return a.triggerSave(),e.isNotDirty=1,e.formElement._mceOldSubmit(e.formElement)}),b=null}),j()},init:function(){function w(b){var c=l.get(b),e=l.urls[b]||a.documentBaseURL.replace(/\/$/,""),g;c&&a.inArray(v,b)===-1&&(f(l.dependencies(b),function(a){w(a)}),g=new c(d,e),d.plugins[b]=g,g.init&&(g.init(d,e),v.push(b)))}var c,d=this,e=d.settings,i,j,m=d.getElement(),n,p,q,r,s,t,u,v=[];a.add(d),e.aria_label=e.aria_label||b.getAttrib(m,"aria-label",d.getLang("aria.rich_text_area")),e.theme&&(e.theme=e.theme.replace(/-/,""),n=k.get(e.theme),d.theme=new n,d.theme.init&&e.init_theme&&d.theme.init(d,k.urls[e.theme]||a.documentBaseURL.replace(/\/$/,""))),f(o(e.plugins.replace(/\-/g,"")),w),e.popup_css!==!1&&(e.popup_css?e.popup_css=d.documentBaseURI.toAbsolute(e.popup_css):e.popup_css=d.baseURI.toAbsolute("themes/"+e.theme+"/skins/"+e.skin+"/dialog.css")),e.popup_css_add&&
(e.popup_css+=","+d.documentBaseURI.toAbsolute(e.popup_css_add)),d.controlManager=new a.ControlManager(d),e.custom_undo_redo&&(d.onBeforeExecCommand.add(function(a,b,c,e,f){b!="Undo"&&b!="Redo"&&b!="mceRepaint"&&(!f||!f.skip_undo)&&d.undoManager.beforeChange()}),d.onExecCommand.add(function(a,b,c,e,f){b!="Undo"&&b!="Redo"&&b!="mceRepaint"&&(!f||!f.skip_undo)&&d.undoManager.add()})),d.onExecCommand.add(function(a,b){/^(FontName|FontSize)$/.test(b)||d.nodeChanged()});if(g){function x(a,b){(!b||!b.initial)&&d.execCommand("mceRepaint")}d.onUndo.add(x),d.onRedo.add(x),d.onSetContent.add(x)}d.onBeforeRenderUI.dispatch(d,d.controlManager),e.render_ui&&(i=e.width||m.style.width||m.offsetWidth,j=e.height||m.style.height||m.offsetHeight,d.orgDisplay=m.style.display,t=/^[0-9\.]+(|px)$/i,t.test(""+i)&&(i=Math.max(parseInt(i)+(n.deltaWidth||0),100)),t.test(""+j)&&(j=Math.max(parseInt(j)+(n.deltaHeight||0),100)),n=d.theme.renderUI({targetNode:m,width:i,height:j,deltaWidth:e.delta_width,deltaHeight:e.delta_height}),d.editorContainer=n.editorContainer),document.domain&&location.hostname!=document.domain&&(a.relaxedDomain=document.domain),b.setStyles(n.sizeContainer||n.editorContainer,{width:i,height:j}),e.content_css&&a.each(o(e.content_css),function(a){d.contentCSS.push(d.documentBaseURI.toAbsolute(a))}),j=(n.iframeHeight||j)+(typeof j=="number"?n.deltaHeight||0:""),j<100&&(j=100),d.iframeHTML=e.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">',e.document_base_url!=a.documentBaseURL&&(d.iframeHTML+='<base href="'+d.documentBaseURI.getURI()+'" />'),e.ie7_compat?d.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />':d.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=edge" />',d.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';for(u=0;u<d.contentCSS.length;u++)d.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+d.contentCSS[u]+'" />';r=e.body_id||"tinymce",r.indexOf("=")!=-1&&(r=d.getParam("body_id","","hash"),r=r[d.id]||r),s=e.body_class||"",s.indexOf("=")!=-1&&(s=d.getParam("body_class","","hash"),s=s[d.id]||""),d.iframeHTML+='</head><body id="'+r+'" class="mceContentBody '+s+'"><br></body></html>',a.relaxedDomain&&(h||a.isOpera&&parseFloat(opera.version())<11)&&(q='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+d.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'),c=b.add(n.iframeContainer,"iframe",{id:d.id+"_ifr",src:q||'javascript:""',frameBorder:"0",allowTransparency:"true",title:e.aria_label,style:{width:"100%",height:j,display:"block"}}),d.contentAreaContainer=n.iframeContainer,b.get(n.editorContainer).style.display=d.orgDisplay,b.get(d.id).style.display="none",b.setAttrib(d.id,"aria-hidden",!0),(!a.relaxedDomain||!q)&&d.setupIframe(),m=c=n=null},setupIframe:function(){var d=this,e=d.settings,i=b.get(d.id),j=d.getDoc(),k,l;if(!h||!a.relaxedDomain)j.open(),j.write(d.iframeHTML),j.close(),a.relaxedDomain&&(j.domain=a.relaxedDomain);l=d.getBody(),l.disabled=!0,e.readonly||(l.contentEditable=!0),l.disabled=!1,d.schema=new a.html.Schema(e),d.dom=new a.dom.DOMUtils(d.getDoc(),{keep_values:!0,url_converter:d.convertURL,url_converter_scope:d,hex_colors:e.force_hex_style_colors,class_filter:e.class_filter,update_styles:1,fix_ie_paragraphs:1,schema:d.schema}),d.parser=new a.html.DomParser(e,d.schema),d.settings.allow_html_in_named_anchor||d.parser.addAttributeFilter("name",function(a,b){var c=a.length,d,e,f,g;while(c--){g=a[c];if(g.name==="a"&&g.firstChild){f=g.parent,d=g.lastChild;do e=d.prev,f.insert(d,g),d=e;while(d)}}}),d.parser.addAttributeFilter("src,href,style",function(a,b){var c=a.length,e,f=d.dom,g,h;while(c--)e=a[c],g=e.attr(b),h="data-mce-"+b,e.attributes.map[h]||(b==="style"?e.attr(h,f.serializeStyle(f.parseStyle(g),e.name)):e.attr(h,d.convertURL(g,b,e.name)))}),d.parser.addNodeFilter("script",function(a,b){var c=a.length,d;while(c--)d=a[c],d.attr("type","mce-"+(d.attr("type")||"text/javascript"))}),d.parser.addNodeFilter("#cdata",function(a,b){var c=a.length,d;while(c--)d=a[c],d.type=8,d.name="#comment",d.value="[CDATA["+d.value+"]]"}),d.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(b,c){var e=b.length,f,g=d.schema.getNonEmptyElements();while(e--)f=b[e],f.isEmpty(g)&&(f.empty().append(new a.html.Node("br",1)).shortEnded=!0)}),d.serializer=new a.dom.Serializer(e,d.dom,d.schema),d.selection=new a.dom.Selection(d.dom,d.getWin(),d.serializer),d.formatter=new a.Formatter(this),d.formatter.register({alignleft:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"}},{selector:"img,table",collapsed:!1,styles:{"float":"left"}}],aligncenter:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"}},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"}},{selector:"img,table",collapsed:!1,styles:{"float":"right"}}],alignfull:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"}}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:!1},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:!1},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(a){return!0},onformat:function(a,b,c){f(c,function(b,c){d.dom.setAttrib(a,c,b)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]}),f("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(a){d.formatter.register(a,{block:a,remove:"all"})}),d.formatter.register(d.settings.formats),d.undoManager=new a.UndoManager(d),d.undoManager.onAdd.add(function(a,b){if(a.hasUndo())return d.onChange.dispatch(d,b,a)}),d.undoManager.onUndo.add(function(a,b){return d.onUndo.dispatch(d,b,a)}),d.undoManager.onRedo.add(function(a,b){return d.onRedo.dispatch(d,b,a)}),d.forceBlocks=new a.ForceBlocks(d,{forced_root_block:e.forced_root_block}),d.editorCommands=new a.EditorCommands(d),d.serializer.onPreProcess.add(function(a,b){return d.onPreProcess.dispatch(d,b,a)}),d.serializer.onPostProcess.add(function(a,b){return d.onPostProcess.dispatch(d,b,a)}),d.onPreInit.dispatch(d),e.gecko_spellcheck||(d.getBody().spellcheck=0),e.readonly||d._addEvents(),d.controlManager.onPostRender.dispatch(d,d.controlManager),d.onPostRender.dispatch(d),d.quirks=new a.util.Quirks(this),e.directionality&&(d.getBody().dir=e.directionality),e.nowrap&&(d.getBody().style.whiteSpace="nowrap"),e.handle_node_change_callback&&d.onNodeChange.add(function(a,b,c){d.execCallback("handle_node_change_callback",d.id,c,-1,-1,!0,d.selection.isCollapsed())}),e.save_callback&&d.onSaveContent.add(function(a,b){var c=d.execCallback("save_callback",d.id,b.content,d.getBody());c&&(b.content=c)}),e.onchange_callback&&d.onChange.add(function(a,b){d.execCallback("onchange_callback",d,b)}),e.protect&&d.onBeforeSetContent.add(function(a,b){e.protect&&f(e.protect,function(a){b.content=b.content.replace(a,function(a){return"<!--mce:protected "+escape(a)+"-->"})})}),e.convert_newlines_to_brs&&d.onBeforeSetContent.add(function(a,b){b.initial&&(b.content=b.content.replace(/\r?\n/g,"<br />"))}),e.preformatted&&d.onPostProcess.add(function(a,b){b.content=b.content.replace(/^\s*<pre.*?>/,""),b.content=b.content.replace(/<\/pre>\s*$/,""),b.set&&(b.content='<pre class="mceItemHidden">'+b.content+"</pre>")}),e.verify_css_classes&&(d.serializer.attribValueFilter=function(a,b){var c,e;return a=="class"?(d.classesRE||(e=d.dom.getClasses(),e.length>0&&(c="",f(e,function(a){c+=(c?"|":"")+a["class"]}),d.classesRE=new RegExp("("+c+")","gi"))),!d.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(b)||d.classesRE.test(b)?b:""):b}),e.cleanup_callback&&(d.onBeforeSetContent.add(function(a,b){b.content=d.execCallback("cleanup_callback","insert_to_editor",b.content,b)}),d.onPreProcess.add(function(a,b){b.set&&d.execCallback("cleanup_callback","insert_to_editor_dom",b.node,b),b.get&&d.execCallback("cleanup_callback","get_from_editor_dom",b.node,b)}),d.onPostProcess.add(function(a,b){b.set&&(b.content=d.execCallback("cleanup_callback","insert_to_editor",b.content,b)),b.get&&(b.content=d.execCallback("cleanup_callback","get_from_editor",b.content,b))})),e.save_callback&&d.onGetContent.add(function(a,b){b.save&&(b.content=d.execCallback("save_callback",d.id,b.content,d.getBody()))}),e.handle_event_callback&&d.onEvent.add(function(a,b,e){d.execCallback("handle_event_callback",b,a,e)===!1&&c.cancel(b)}),d.onSetContent.add(function(){d.addVisual(d.getBody())}),e.padd_empty_editor&&d.onPostProcess.add(function(a,b){b.content=b.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")});if(g){function m(a,b){f(a.dom.select("a"),function(b){var c=b.parentNode;a.dom.isBlock(c)&&c.lastChild===b&&a.dom.add(c,"br",{"data-mce-bogus":1})})}d.onExecCommand.add(function(a,b){b==="CreateLink"&&m(a)}),d.onSetContent.add(d.selection.onSetContent.add(m))}d.load({initial:!0,format:"html"}),d.startContent=d.getContent({format:"raw"}),d.undoManager.add(),d.initialized=!0,d.onInit.dispatch(d),d.execCallback("setupcontent_callback",d.id,d.getBody(),d.getDoc()),d.execCallback("init_instance_callback",d),d.focus(!0),d.nodeChanged({initial:1}),f(d.contentCSS,function(a){d.dom.loadCSS(a)}),e.auto_focus&&setTimeout(function(){var b=a.get(e.auto_focus);b.selection.select(b.getBody(),1),b.selection.collapse(1),b.getBody().focus(),b.getWin().focus()},100),i=null},focus:function(b){var c,d=this,e=d.selection,f=d.settings.content_editable,g,h,i=d.getDoc();b||(g=e.getRng(),g.item&&(h=g.item(0)),d._refreshContentEditable(),e.normalize(),f||d.getWin().focus(),a.isGecko&&d.getBody().focus(),h&&h.ownerDocument==i&&(g=i.body.createControlRange(),g.addElement(h),g.select())),a.activeEditor!=d&&((c=a.activeEditor)!=null&&c.onDeactivate.dispatch(c,d),d.onActivate.dispatch(d,c)),a._setActive(d)},execCallback:function(b){var c=this,d=c.settings[b],e;if(!d)return;return c.callbackLookup&&(e=c.callbackLookup[b])&&(d=e.func,e=e.scope),j(d,"string")&&(e=d.replace(/\.\w+$/,""),e=e?a.resolve(e):0,d=a.resolve(d),c.callbackLookup=c.callbackLookup||{},c.callbackLookup[b]={func:d,scope:e}),d.apply(e||c,Array.prototype.slice.call(arguments,1))},translate:function(b){var c=this.settings.language||"en",d=a.i18n;return b?d[c+"."+b]||b.replace(/{\#([^}]+)\}/g,function(a,b){return d[c+"."+b]||"{#"+b+"}"}):""},getLang:function(b,c){return a.i18n[(this.settings.language||"en")+"."+b]||(j(c)?c:"{#"+b+"}")},getParam:function(b,c,d){var e=a.trim,g=j(this.settings[b])?this.settings[b]:c,h;return d==="hash"?(h={},j(g,"string")?f(g.indexOf("=")>0?g.split(/[;,](?![^=;,]*(?:[;,]|$))/):g.split(","),function(a){a=a.split("="),a.length>1?h[e(a[0])]=e(a[1]):h[e(a[0])]=e(a)}):h=g,h):g},nodeChanged:function(a){var b=this,c=b.selection,d=c.getStart()||b.getBody();b.initialized&&(a=a||{},d=h&&d.ownerDocument!=b.getDoc()?b.getBody():d,a.parents=[],b.dom.getParent(d,function(b){if(b.nodeName=="BODY")return!0;a.parents.push(b)}),b.onNodeChange.dispatch(b,a?a.controlManager||b.controlManager:b.controlManager,d,c.isCollapsed(),a))},addButton:function(a,b){var c=this;c.buttons=c.buttons||{},c.buttons[a]=b},addCommand:function(a,b,c){this.execCommands[a]={func:b,scope:c||this}},addQueryStateHandler:function(a,b,c){this.queryStateCommands[a]={func:b,scope:c||this}},addQueryValueHandler:function(a,b,c){this.queryValueCommands[a]={func:b,scope:c||this}},addShortcut:function(a,b,c,d){var e=this,g;return e.settings.custom_shortcuts?(e.shortcuts=e.shortcuts||{},j(c,"string")&&(g=c,c=function(){e.execCommand(g,!1,null)}),j(c,"object")&&(g=c,c=function(){e.execCommand(g[0],g[1],g[2])}),f(o(a),function(a){var g={func:c,scope:d||this,desc:b,alt:!1,ctrl:!1,shift:!1};f(o(a,"+"),function(a){switch(a){case"alt":case"ctrl":case"shift":g[a]=!0;break;default:g.charCode=a.charCodeAt(0),g.keyCode=a.toUpperCase().charCodeAt(0)}}),e.shortcuts[(g.ctrl?"ctrl":"")+","+(g.alt?"alt":"")+","+(g.shift?"shift":"")+","+g.keyCode]=g}),!0):!1},execCommand:function(a,b,c,d){var e=this,g=0,h,i;!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(a)&&(!d||!d.skip_focus)&&e.focus(),h={},e.onBeforeExecCommand.dispatch(e,a,b,c,h);if(h.terminate)return!1;if(e.execCallback("execcommand_callback",e.id,e.selection.getNode(),a,b,c))return e.onExecCommand.dispatch(e,a,b,c,d),!0;if(h=e.execCommands[a]){i=h.func.call(h.scope,b,c);if(i!==!0)return e.onExecCommand.dispatch(e,a,b,c,d),i}f(e.plugins,function(f){if(f.execCommand&&f.execCommand(a,b,c))return e.onExecCommand.dispatch(e,a,b,c,d),g=1,!1});if(g)return!0;if(e.theme&&e.theme.execCommand&&e.theme.execCommand(a,b,c))return e.onExecCommand.dispatch(e,a,b,c,d),!0;if(e.editorCommands.execCommand(a,b,c))return e.onExecCommand.dispatch(e,a,b,c,d),!0;e.getDoc().execCommand(a,b,c),e.onExecCommand.dispatch(e,a,b,c,d)},queryCommandState:function(a){var b=this,c,d;if(b._isHidden())return;if(c=b.queryStateCommands[a]){d=c.func.call(c.scope);if(d!==!0)return d}c=b.editorCommands.queryCommandState(a);if(c!==-1)return c;try{return this.getDoc().queryCommandState(a)}catch(e){}},queryCommandValue:function(a){var b=this,c,d;if(b._isHidden())return;if(c=b.queryValueCommands[a]){d=c.func.call(c.scope);if(d!==!0)return d}c=b.editorCommands.queryCommandValue(a);if(j(c))return c;try{return this.getDoc().queryCommandValue(a)}catch(e){}},show:function(){var a=this;b.show(a.getContainer()),b.hide(a.id),a.load()},hide:function(){var a=this,c=a.getDoc();h&&c&&c.execCommand("SelectAll"),a.save(),b.hide(a.getContainer()),b.setStyle(a.id,"display",a.orgDisplay)},isHidden:function(){return!b.isHidden(this.id)},setProgressState:function(a,b,c){return this.onSetProgressState.dispatch(this,a,b,c),a},load:function(a){var b=this,c=b.getElement(),d;if(c)return a=a||{},a.load=!0,d=b.setContent(j(c.value)?c.value:c.innerHTML,a),a.element=c,a.no_events||b.onLoadContent.dispatch(b,a),a.element=c=null,d},save:function(a){var c=this,d=c.getElement(),e,g;if(!d||!c.initialized)return;return a=a||{},a.save=!0,a.no_events||(c.undoManager.typing=!1,c.undoManager.add()),a.element=d,e=a.content=c.getContent(a),a.no_events||c.onSaveContent.dispatch(c,a),e=a.content,/TEXTAREA|INPUT/i.test(d.nodeName)?d.value=e:(d.innerHTML=e,(g=b.getParent(c.id,"form"))&&f(g.elements,function(a){if(a.name==c.id)return a.value=e,!1})),a.element=d=null,e},setContent:function(b,c){var d=this,e,f=d.getBody(),g;c=c||{},c.format=c.format||"html",c.set=!0,c.content=b,c.no_events||d.onBeforeSetContent.dispatch(d,c),b=c.content;if(!a.isIE&&(b.length===0||/^\s+$/.test(b))){g=d.settings.forced_root_block,g?b="<"+g+'><br data-mce-bogus="1"></'+g+">":b='<br data-mce-bogus="1">',f.innerHTML=b,d.selection.select(f,!0),d.selection.collapse(!0);return}return c.format!=="raw"&&(b=(new a.html.Serializer({},d.schema)).serialize(d.parser.parse(b))),c.content=a.trim(b),d.dom.setHTML(f,c.content),c.no_events||d.onSetContent.dispatch(d,c),d.selection.normalize(),c.content},getContent:function(b){var c=this,d;return b=b||{},b.format=b.format||"html",b.get=!0,b.no_events||c.onBeforeGetContent.dispatch(c,b),b.format=="raw"?d=c.getBody().innerHTML:d=c.serializer.serialize(c.getBody(),b),b.content=a.trim(d),b.no_events||c.onGetContent.dispatch(c,b),b.content},isDirty:function(){var b=this;return a.trim(b.startContent)!=a.trim(b.getContent({format:"raw",no_events:1}))&&!b.isNotDirty},getContainer:function(){var a=this;return a.container||(a.container=b.get(a.editorContainer||a.id+"_parent")),a.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return b.get(this.settings.content_element||this.id)},getWin:function(){var a=this,c;return a.contentWindow||(c=b.get(a.id+"_ifr"),c&&(a.contentWindow=c.contentWindow)),a.contentWindow},getDoc:function(){var a=this,b;return a.contentDocument||(b=a.getWin(),b&&(a.contentDocument=b.document)),a.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(a,b,c){var d=this,e=d.settings;return e.urlconverter_callback?d.execCallback("urlconverter_callback",a,c,!0,b):!e.convert_urls||c&&c.nodeName=="LINK"||a.indexOf("file:")===0?a:e.relative_urls?d.documentBaseURI.toRelative(a):(a=d.documentBaseURI.toAbsolute(a,e.remove_script_host),a)},addVisual:function(a){var b=this,c=b.settings;a=a||b.getBody(),j(b.hasVisual)||(b.hasVisual=c.visual),f(b.dom.select("table,a",a),function(a){var d;switch(a.nodeName){case"TABLE":d=b.dom.getAttrib(a,"border");if(!d||d=="0")b.hasVisual?b.dom.addClass(a,c.visual_table_class):b.dom.removeClass(a,c.visual_table_class);return;case"A":d=b.dom.getAttrib(a,"name"),d&&(b.hasVisual?b.dom.addClass(a,"mceItemAnchor"):b.dom.removeClass(a,"mceItemAnchor"));return}}),b.onVisualAid.dispatch(b,a,b.hasVisual)},remove:function(){var c=this,d=c.getContainer();c.removed=1,c.hide(),c.execCallback("remove_instance_callback",c),c.onRemove.dispatch(c),c.onExecCommand.listeners=[],a.remove(c),b.remove(d)},destroy:function(b){var d=this;if(d.destroyed)return;b||(a.removeUnload(d.destroy),tinyMCE.onBeforeUnload.remove(d._beforeUnload),d.theme&&d.theme.destroy&&d.theme.destroy(),d.controlManager.destroy(),d.selection.destroy(),d.dom.destroy(),d.settings.content_editable||(c.clear(d.getWin()),c.clear(d.getDoc())),c.clear(d.getBody()),c.clear(d.formElement)),d.formElement&&(d.formElement.submit=d.formElement._mceOldSubmit,d.formElement._mceOldSubmit=null),d.contentAreaContainer=d.formElement=d.container=d.settings.content_element=d.bodyElement=d.contentDocument=d.contentWindow=null,d.selection&&(d.selection=d.selection.win=d.selection.dom=d.selection.dom.doc=null),d.destroyed=1},_addEvents:function(){function k(a,b){var c=a.type;if(d.removed)return;d.onEvent.dispatch(d,a,b)!==!1&&d[j[a.fakeType||a.type]].dispatch(d,a,b)}var d=this,e,h=d.settings,i=d.dom,j={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};f(j,function(a,c){switch(c){case"contextmenu":i.bind(d.getDoc(),c,k);break;case"paste":i.bind(d.getBody(),c,function(a){k(a)});break;case"submit":case"reset":i.bind(d.getElement().form||b.getParent(d.id,"form"),c,k);break;default:i.bind(h.content_editable?d.getBody():d.getDoc(),c,k)}}),i.bind(h.content_editable?d.getBody():g?d.getDoc():d.getWin(),"focus",function(a){d.focus(!0)}),a.isGecko&&i.bind(d.getDoc(),"DOMNodeInserted",function(a){var b;a=a.target,a.nodeType===1&&a.nodeName==="IMG"&&(b=a.getAttribute("data-mce-src"))&&(a.src=d.documentBaseURI.toAbsolute(b))});if(g){function l(){var a=this,b=a.getDoc(),c=a.settings;if(g&&!c.readonly){a._refreshContentEditable();try{b.execCommand("styleWithCSS",0,!1)}catch(d){if(!a._isHidden())try{b.execCommand("useCSS",0,!0)}catch(d){}}if(!c.table_inline_editing)try{b.execCommand("enableInlineTableEditing",!1,!1)}catch(d){}if(!c.object_resizing)try{b.execCommand("enableObjectResizing",!1,!1)}catch(d){}}}d.onBeforeExecCommand.add(l),d.onMouseDown.add(l)}d.onMouseUp.add(d.nodeChanged),d.onKeyUp.add(function(b,c){var e=c.keyCode;(e>=33&&e<=36||e>=37&&e<=40||e==13||e==45||e==46||e==8||a.isMac&&(e==91||e==93)||c.ctrlKey)&&d.nodeChanged()}),d.onKeyDown.add(function(a,b){if(b.keyCode!=8)return;var c=a.selection.getRng().startContainer,d=a.selection.getRng().startOffset;while(c&&c.nodeType&&c.nodeType!=1&&c.parentNode)c=c.parentNode;if(c&&c.parentNode&&c.parentNode.tagName==="BLOCKQUOTE"&&c.parentNode.firstChild==c&&d==0){a.formatter.toggle("blockquote",null,c.parentNode);var e=a.selection.getRng();e.setStart(c,0),e.setEnd(c,0),a.selection.setRng(e),a.selection.collapse(!1)}}),d.onReset.add(function(){d.setContent(d.startContent,{format:"raw"})});if(h.custom_shortcuts){h.custom_undo_redo_keyboard_shortcuts&&(d.addShortcut("ctrl+z",d.getLang("undo_desc"),"Undo"),d.addShortcut("ctrl+y",d.getLang("redo_desc"),"Redo")),d.addShortcut("ctrl+b",d.getLang("bold_desc"),"Bold"),d.addShortcut("ctrl+i",d.getLang("italic_desc"),"Italic"),d.addShortcut("ctrl+u",d.getLang("underline_desc"),"Underline");for(e=1;e<=6;e++)d.addShortcut("ctrl+"+e,"",["FormatBlock",!1,"h"+e]);d.addShortcut("ctrl+7","",["FormatBlock",!1,"p"]),d.addShortcut("ctrl+8","",["FormatBlock",!1,"div"]),d.addShortcut("ctrl+9","",["FormatBlock",!1,"address"]);function m(b){var c=null;return!b.altKey&&!b.ctrlKey&&!b.metaKey?c:(f(d.shortcuts,function(d){if(a.isMac&&d.ctrl!=b.metaKey)return;if(!a.isMac&&d.ctrl!=b.ctrlKey)return;if(d.alt!=b.altKey)return;if(d.shift!=b.shiftKey)return;if(b.keyCode==d.keyCode||b.charCode&&b.charCode==d.charCode)return c=d,!1}),c)}d.onKeyUp.add(function(a,b){var d=m(b);if(d)return c.cancel(b)}),d.onKeyPress.add(function(a,b){var d=m(b);if(d)return c.cancel(b)}),d.onKeyDown.add(function(a,b){var d=m(b);if(d)return d.func.call(d.scope),c.cancel(b)})}a.isIE&&i.bind(d.getDoc(),"controlselect",function(a){var b=d.resizeInfo,e;a=a.target;if(a.nodeName!=="IMG")return;b&&i.unbind(b.node,b.ev,b.cb),i.hasClass(a,"mceItemNoResize")?(ev="resizestart",e=i.bind(a,"resizestart",c.cancel,c)):(ev="resizeend",e=i.bind(a,ev,function(a){var b;a=a.target;if(b=i.getStyle(a,"width"))i.setAttrib(a,"width",b.replace(/[^0-9%]+/g,"")),i.setStyle(a,"width","");if(b=i.getStyle(a,"height"))i.setAttrib(a,"height",b.replace(/[^0-9%]+/g,"")),i.setStyle(a,"height","")})),b=d.resizeInfo={node:a,ev:ev,cb:e}}),a.isOpera&&d.onClick.add(function(a,b){c.prevent(b)});if(h.custom_undo_redo){function n(){d.undoManager.typing=!1,d.undoManager.add()}i.bind(d.getDoc(),"focusout",function(a){!d.removed&&d.undoManager.typing&&n()}),d.dom.bind(d.dom.getRoot(),"dragend",function(a){n()}),d.onKeyUp.add(function(a,b){var c=b.keyCode;(c>=33&&c<=36||c>=37&&c<=40||c==13||c==45||b.ctrlKey)&&n()}),d.onKeyDown.add(function(b,e){var f=e.keyCode,g;if(f==8){g=d.getDoc().selection;if(g&&g.createRange&&g.createRange().item)return d.undoManager.beforeChange(),b.dom.remove(g.createRange().item(0)),n(),c.cancel(e)}if(f>=33&&f<=36||f>=37&&f<=40||f==13||f==45){a.isIE&&f==13&&d.undoManager.beforeChange(),d.undoManager.typing&&n();return}(f<16||f>20)&&f!=224&&f!=91&&!d.undoManager.typing&&(d.undoManager.beforeChange(),d.undoManager.typing=!0,d.undoManager.add())}),d.onMouseDown.add(function(){d.undoManager.typing&&n()})}if(a.isGecko){function o(){var a=d.dom.getAttribs(d.selection.getStart().cloneNode(!1));return function(){var b=d.selection.getStart();b!==d.getBody()&&(d.dom.setAttrib(b,"style",null),f(a,function(a){b.setAttributeNode(a.cloneNode(!0))}))}}function p(){var a=d.selection;return!a.isCollapsed()&&a.getStart()!=a.getEnd()}d.onKeyPress.add(function(a,b){var e;if((b.keyCode==8||b.keyCode==46)&&p())return e=o(),d.getDoc().execCommand("delete",!1,null),e(),c.cancel(b)}),d.dom.bind(d.getDoc(),"cut",function(a){var b;p()&&(b=o(),d.onKeyUp.addToTop(c.cancel,c),setTimeout(function(){b(),d.onKeyUp.remove(c.cancel,c)},0))})}},_refreshContentEditable:function(){var a=this,b,c;a._isHidden()&&(b=a.getBody(),c=b.parentNode,c.removeChild(b),c.appendChild(b),b.focus())},_isHidden:function(){var a;return g?(a=this.selection.getSel(),!a||!a.rangeCount||a.rangeCount==0):0}})}(tinymce),function(a){var b=a.each,c,d=!0,e=!1;a.EditorCommands=function(f){function m(a,b,c){var f;return a=a.toLowerCase(),(f=i.exec[a])?(f(a,b,c),d):e}function n(a){var b;return a=a.toLowerCase(),(b=i.state[a])?b(a):-1}function o(a){var b;return a=a.toLowerCase(),(b=i.value[a])?b(a):e}function p(a,c){c=c||"exec",b(a,function(a,d){b(d.toLowerCase().split(","),function(b){i[c][b]=a})})}function q(a,b,d){return b===c&&(b=e),d===c&&(d=null),f.getDoc().execCommand(a,b,d)}function r(a){return k.match(a)}function s(a,b){k.toggle(a,b?{value:b}:c)}function t(a){l=h.getBookmark(a)}function u(){h.moveToBookmark(l)}var g=f.dom,h=f.selection,i={state:{},exec:{},value:{}},j=f.settings,k=f.formatter,l;a.extend(this,{execCommand:m,queryCommandState:n,queryCommandValue:o,addCommands:p}),p({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){f.undoManager.add()},"Cut,Copy,Paste":function(b){var c=f.getDoc(),e;try{q(b)}catch(g){e=d}if(e||!c.queryCommandSupported(b))a.isGecko?f.windowManager.confirm(f.getLang("clipboard_msg"),function(a){a&&open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}):f.windowManager.alert(f.getLang("clipboard_no_support"))},unlink:function(a){h.isCollapsed()&&h.select(h.getNode()),q(a),h.collapse(e)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(a){var c=a.substring(7);b("left,center,right,full".split(","),function(a){c!=a&&k.remove("align"+a)}),s("align"+c),m("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(a){var b,c;q(a),b=g.getParent(h.getNode(),"ol,ul"),b&&(c=b.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(c.nodeName)&&(t(),g.split(c,b),u()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(a){s(a)},"ForeColor,HiliteColor,FontName":function(a,b,c){s(a,c)},FontSize:function(b,c,d){var e,f;d>=1&&d<=7&&(f=a.explode(j.font_size_style_values),e=a.explode(j.font_size_classes),e?d=e[d-1]||d:d=f[d-1]||d),s(b,d)},RemoveFormat:function(a){k.remove(a)},mceBlockQuote:function(a){s("blockquote")},FormatBlock:function(a,b,c){return s(c||"p")},mceCleanup:function(){var a=h.getBookmark();f.setContent(f.getContent({cleanup:d}),{cleanup:d}),h.moveToBookmark(a)},mceRemoveNode:function(a,b,c){var e=c||h.getNode();e!=f.getBody()&&(t(),f.dom.remove(e,d),u())},mceSelectNodeDepth:function(a,b,c){var d=0;g.getParent(h.getNode(),function(a){if(a.nodeType==1&&d++==c)return h.select(a),e},f.getBody())},mceSelectNode:function(a,b,c){h.select(c)},mceInsertContent:function(b,c,d){var e,i,j,k,l,m,n,o,p,q,r,s,t,u;e=f.parser,i=new a.html.Serializer({},f.schema),t='<span id="mce_marker" data-mce-type="bookmark">﻿</span>',m={content:d,format:"html"},h.onBeforeSetContent.dispatch(h,m),d=m.content,d.indexOf("{$caret}")==-1&&(d+="{$caret}"),d=d.replace(/\{\$caret\}/,t),h.isCollapsed()||f.getDoc().execCommand("Delete",!1,null),j=h.getNode(),m={context:j.nodeName.toLowerCase()},l=e.parse(d,m),r=l.lastChild;if(r.attr("id")=="mce_marker"){n=r;for(r=r.prev;r;r=r.walk(!0))if(r.type==3||!g.isBlock(r.name)){r.parent.insert(n,r,r.name==="br");break}}if(!m.invalid)d=i.serialize(l),r=j.firstChild,s=j.lastChild,!r||r===s&&r.nodeName==="BR"?g.setHTML(j,d):h.setContent(d);else{h.setContent(t),j=f.selection.getNode(),k=f.getBody(),j.nodeType==9?j=r=k:r=j;while(r!==k)j=r,r=r.parentNode;d=j==k?k.innerHTML:g.getOuterHTML(j),d=i.serialize(e.parse(d.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return i.serialize(l)}))),j==k?g.setHTML(k,d):g.setOuterHTML(j,d)}n=g.get("mce_marker"),o=g.getRect(n),p=g.getViewPort(f.getWin());if(o.y+o.h>p.y+p.h||o.y<p.y||o.x>p.x+p.w||o.x<p.x)u=a.isIE?f.getDoc().documentElement:f.getBody(),u.scrollLeft=o.x,u.scrollTop=o.y-p.h+25;q=g.createRng(),r=n.previousSibling,r&&r.nodeType==3?q.setStart(r,r.nodeValue.length):(q.setStartBefore(n),q.setEndBefore(n)),g.remove(n),h.setRng(q),h.onSetContent.dispatch(h,m),f.addVisual()},mceInsertRawHTML:function(a,b,c){h.setContent("tiny_mce_marker"),f.setContent(f.getContent().replace(/tiny_mce_marker/g,function(){return c}))},mceSetContent:function(a,b,c){f.setContent(c)},"Indent,Outdent":function(a){var c,d,e;c=j.indentation,d=/[a-z%]+$/i.exec(c),c=parseInt(c),!n("InsertUnorderedList")&&!n("InsertOrderedList")?b(h.getSelectedBlocks(),function(b){a=="outdent"?(e=Math.max(0,parseInt(b.style.paddingLeft||0)-c),g.setStyle(b,"paddingLeft",e?e+d:"")):g.setStyle(b,"paddingLeft",parseInt(b.style.paddingLeft||0)+c+d)}):q(a)},mceRepaint:function(){var b;if(a.isGecko)try{t(d),h.getSel()&&h.getSel().selectAllChildren(f.getBody()),h.collapse(d),u()}catch(c){}},mceToggleFormat:function(a,b,c){k.toggle(c)},InsertHorizontalRule:function(){f.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){f.hasVisual=!f.hasVisual,f.addVisual()},mceReplaceContent:function(a,b,c){f.execCommand("mceInsertContent",!1,c.replace(/\{\$selection\}/g,h.getContent({format:"text"})))},mceInsertLink:function(a,b,c){var d;typeof c=="string"&&(c={href:c}),d=g.getParent(h.getNode(),"a"),c.href=c.href.replace(" ","%20"),(!d||!c.href)&&k.remove("link"),c.href&&k.apply("link",c,d)},selectAll:function(){var a=g.getRoot(),b=g.createRng();b.setStart(a,0),b.setEnd(a,a.childNodes.length),f.selection.setRng(b)}}),p({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(a){return r("align"+a.substring(7))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(a){return r(a)},mceBlockQuote:function(){return r("blockquote")},Outdent:function(){var a;if(j.inline_styles){if((a=g.getParent(h.getStart(),g.isBlock))&&parseInt(a.style.paddingLeft)>0)return d;if((a=g.getParent(h.getEnd(),g.isBlock))&&parseInt(a.style.paddingLeft)>0)return d}return n("InsertUnorderedList")||n("InsertOrderedList")||!j.inline_styles&&!!g.getParent(h.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(a){return g.getParent(h.getNode(),a=="insertunorderedlist"?"UL":"OL")}},"state"),p({"FontSize,FontName":function(a){var b=0,c;if(c=g.getParent(h.getNode(),"span"))a=="fontsize"?b=c.style.fontSize:b=c.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase();return b}},"value"),j.custom_undo_redo&&p({Undo:function(){f.undoManager.undo()},Redo:function(){f.undoManager.redo()}})}}(tinymce),function(a){var b=a.util.Dispatcher;a.UndoManager=function(c){function h(){return a.trim(c.getContent({format:"raw",no_events:1}))}var d,e=0,f=[],g;return d={typing:!1,onAdd:new b(d),onUndo:new b(d),onRedo:new b(d),beforeChange:function(){g=c.selection.getBookmark(2,!0)},add:function(a){var b,i=c.settings,j;a=a||{},a.content=h(),j=f[e];if(j&&j.content==a.content)return null;f[e]&&(f[e].beforeBookmark=g);if(i.custom_undo_redo_levels&&f.length>i.custom_undo_redo_levels){for(b=0;b<f.length-1;b++)f[b]=f[b+1];f.length--,e=f.length}return a.bookmark=c.selection.getBookmark(2,!0),e<f.length-1&&(f.length=e+1),f.push(a),e=f.length-1,d.onAdd.dispatch(d,a),c.isNotDirty=0,a},undo:function(){var a,b;return d.typing&&(d.add(),d.typing=!1),e>0&&(a=f[--e],c.setContent(a.content,{format:"raw"}),c.selection.moveToBookmark(a.beforeBookmark),d.onUndo.dispatch(d,a)),a},redo:function(){var a;return e<f.length-1&&(a=f[++e],c.setContent(a.content,{format:"raw"}),c.selection.moveToBookmark(a.bookmark),d.onRedo.dispatch(d,a)),a},clear:function(){f=[],e=0,d.typing=!1},hasUndo:function(){return e>0||this.typing},hasRedo:function(){return e<f.length-1&&!this.typing}}}}(tinymce),function(a){function j(a){var b,c,d;do/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(a.nodeName)&&(b?(c=a.cloneNode(!1),c.appendChild(b),b=c):b=d=a.cloneNode(!1),b.removeAttribute("id"));while(a=a.parentNode);if(b)return{wrapper:b,inner:d}}function k(a,b){var c=b.ownerDocument.createRange();return c.setStart(a.endContainer,a.endOffset),c.setEndAfter(b),c.cloneContents().textContent.length==0}function l(a,b,c){var d,e;return b.isEmpty(c)?(d=b.getParent(c,"ul,ol"),b.getParent(d.parentNode,"ul,ol")||(b.split(d,c),e=b.create("p",0,'<br data-mce-bogus="1" />'),b.replace(e,c),a.select(e,1)),i):h}var b=a.dom.Event,c=a.isIE,d=a.isGecko,e=a.isOpera,f=a.each,g=a.extend,h=!0,i=!1;a.create("tinymce.ForceBlocks",{ForceBlocks:function(a){var b=this,c=a.settings,d;b.editor=a,b.dom=a.dom,d=(c.forced_root_block||"p").toLowerCase(),c.element=d.toUpperCase(),a.onPreInit.add(b.setup,b)},setup:function(){var e=this,f=e.editor,g=f.settings,i=f.dom,k=f.selection,l=f.schema.getBlockElements();if(g.forced_root_block){function m(){var a=k.getStart(),b=f.getBody(),c,d,e,h,j,m,n,o=-16777215;if(!a||a.nodeType!==1)return;while(a!=b){if(l[a.nodeName]
)return;a=a.parentNode}c=k.getRng(),c.setStart?(d=c.startContainer,e=c.startOffset,h=c.endContainer,j=c.endOffset):(c.item&&(c=f.getDoc().body.createTextRange(),c.moveToElementText(c.item(0))),tmpRng=c.duplicate(),tmpRng.collapse(!0),e=tmpRng.move("character",o)*-1,tmpRng.collapsed||(tmpRng=c.duplicate(),tmpRng.collapse(!1),j=tmpRng.move("character",o)*-1-e));for(a=b.firstChild;a;a)a.nodeType===3||a.nodeType==1&&!l[a.nodeName]?(m||(m=i.create(g.forced_root_block),a.parentNode.insertBefore(m,a)),n=a,a=a.nextSibling,m.appendChild(n)):(m=null,a=a.nextSibling);if(c.setStart)c.setStart(d,e),c.setEnd(h,j),k.setRng(c);else try{c=f.getDoc().body.createTextRange(),c.moveToElementText(b),c.collapse(!0),c.moveStart("character",e),j>0&&c.moveEnd("character",j),c.select()}catch(p){}f.nodeChanged()}f.onKeyUp.add(m),f.onClick.add(m)}g.force_br_newlines&&c&&f.onKeyPress.add(function(a,c){var d;if(c.keyCode==13&&k.getNode().nodeName!="LI")return k.setContent('<br id="__" /> ',{format:"raw"}),d=i.get("__"),d.removeAttribute("id"),k.select(d),k.collapse(),b.cancel(c)}),g.force_p_newlines&&(c?(a.addUnload(function(){e._previousFormats=0}),f.onKeyPress.add(function(a,b){e._previousFormats=0,b.keyCode==13&&!b.shiftKey&&a.selection.isCollapsed()&&g.keep_styles&&(e._previousFormats=j(a.selection.getStart()))}),f.onKeyUp.add(function(a,b){if(b.keyCode==13&&!b.shiftKey){var c=a.selection.getStart(),d=e._previousFormats;!c.hasChildNodes()&&d&&(c=i.getParent(c,i.isBlock),c&&c.nodeName!="LI"&&(c.innerHTML="",e._previousFormats?(c.appendChild(d.wrapper),d.inner.innerHTML="﻿"):c.innerHTML="﻿",k.select(c,1),k.collapse(!0),a.getDoc().execCommand("Delete",!1,null),e._previousFormats=0))}})):f.onKeyPress.add(function(a,c){c.keyCode==13&&!c.shiftKey&&!e.insertPara(c)&&b.cancel(c)}),d&&f.onKeyDown.add(function(a,b){(b.keyCode==8||b.keyCode==46)&&!b.shiftKey&&e.backspaceDelete(b,b.keyCode==8)}));if(a.isWebKit){function n(a){var b=k.getRng(),c,d=i.create("div",null," "),e,f=i.getViewPort(a.getWin()).h;b.insertNode(c=i.create("br")),b.setStartAfter(c),b.setEndAfter(c),k.setRng(b),k.getSel().focusNode==c.previousSibling&&(k.select(i.insertAfter(i.doc.createTextNode(" "),c)),k.collapse(h)),i.insertAfter(d,c),e=i.getPos(d).y,i.remove(d),e>f&&a.getWin().scrollTo(0,e)}f.onKeyPress.add(function(a,c){c.keyCode==13&&(c.shiftKey||g.force_br_newlines&&!i.getParent(k.getNode(),"h1,h2,h3,h4,h5,h6,ol,ul"))&&(n(a),b.cancel(c))})}c&&g.element!="P"&&(f.onKeyPress.add(function(a,b){e.lastElm=k.getNode().nodeName}),f.onKeyUp.add(function(a,b){var c,d=k.getNode(),f=a.getBody();f.childNodes.length===1&&d.nodeName=="P"?(d=i.rename(d,g.element),k.select(d),k.collapse(),a.nodeChanged()):b.keyCode==13&&!b.shiftKey&&e.lastElm!="P"&&(c=i.getParent(d,"p"),c&&(i.rename(c,g.element),a.nodeChanged()))}))},getParentBlock:function(a){var b=this.dom;return b.getParent(a,b.isBlock)},insertPara:function(a){function I(a,b){var c=[],f,h,j;a.innerHTML="";if(g.keep_styles){h=b;do/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(h.nodeName)&&(f=h.cloneNode(i),d.setAttrib(f,"id",""),c.push(f));while(h=h.parentNode)}if(c.length>0){for(j=c.length-1,f=a;j>=0;j--)f=f.appendChild(c[j]);return c[0].innerHTML=e?" ":"<br />",c[0]}a.innerHTML=e?" ":"<br />"}var b=this,c=b.editor,d=c.dom,f=c.getDoc(),g=c.settings,j=c.selection.getSel(),m=j.getRangeAt(0),n=f.body,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D=d.getViewPort(c.getWin()),E,F,G;c.undoManager.beforeChange(),o=f.createRange(),o.setStart(j.anchorNode,j.anchorOffset),o.collapse(h),p=f.createRange(),p.setStart(j.focusNode,j.focusOffset),p.collapse(h),q=o.compareBoundaryPoints(o.START_TO_END,p)<0,r=q?j.anchorNode:j.focusNode,s=q?j.anchorOffset:j.focusOffset,t=q?j.focusNode:j.anchorNode,u=q?j.focusOffset:j.anchorOffset;if(r===t&&/^(TD|TH)$/.test(r.nodeName))return r.firstChild.nodeName=="BR"&&d.remove(r.firstChild),r.childNodes.length==0?(c.dom.add(r,g.element,null,"<br />"),z=c.dom.add(r,g.element,null,"<br />")):(C=r.innerHTML,r.innerHTML="",c.dom.add(r,g.element,null,C),z=c.dom.add(r,g.element,null,"<br />")),m=f.createRange(),m.selectNodeContents(z),m.collapse(1),c.selection.setRng(m),i;r==n&&t==n&&n.firstChild&&c.dom.isBlock(n.firstChild)&&(r=t=r.firstChild,s=u=0,o=f.createRange(),o.setStart(r,0),p=f.createRange(),p.setStart(t,0)),f.body.hasChildNodes()||f.body.appendChild(d.create("br")),r=r.nodeName=="HTML"?f.body:r,r=r.nodeName=="BODY"?r.firstChild:r,t=t.nodeName=="HTML"?f.body:t,t=t.nodeName=="BODY"?t.firstChild:t,v=b.getParentBlock(r),w=b.getParentBlock(t),x=v?v.nodeName:g.element;if(C=b.dom.getParent(v,"li,pre"))return C.nodeName=="LI"?l(c.selection,b.dom,C):h;v&&(v.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(d.getStyle(v,"position",1)))&&(x=g.element,v=null),w&&(w.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(d.getStyle(v,"position",1)))&&(x=g.element,w=null);if(/(TD|TABLE|TH|CAPTION)/.test(x)||v&&x=="DIV"&&/left|right/gi.test(d.getStyle(v,"float",1)))x=g.element,v=w=null;y=v&&v.nodeName==x?v.cloneNode(0):c.dom.create(x),z=w&&w.nodeName==x?w.cloneNode(0):c.dom.create(x),z.removeAttribute("id"),/^(H[1-6])$/.test(x)&&k(m,v)&&(z=c.dom.create(g.element)),C=A=r;do{if(C==n||C.nodeType==9||b.dom.isBlock(C)||/(TD|TABLE|TH|CAPTION)/.test(C.nodeName))break;A=C}while(C=C.previousSibling?C.previousSibling:C.parentNode);C=B=t;do{if(C==n||C.nodeType==9||b.dom.isBlock(C)||/(TD|TABLE|TH|CAPTION)/.test(C.nodeName))break;B=C}while(C=C.nextSibling?C.nextSibling:C.parentNode);A.nodeName==x?o.setStart(A,0):o.setStartBefore(A),o.setEnd(r,s),y.appendChild(o.cloneContents()||f.createTextNode(""));try{p.setEndAfter(B)}catch(H){}return p.setStart(t,u),z.appendChild(p.cloneContents()||f.createTextNode("")),m=f.createRange(),!A.previousSibling&&A.parentNode.nodeName==x?m.setStartBefore(A.parentNode):o.startContainer.nodeName==x&&o.startOffset==0?m.setStartBefore(o.startContainer):m.setStart(o.startContainer,o.startOffset),!B.nextSibling&&B.parentNode.nodeName==x?m.setEndAfter(B.parentNode):m.setEnd(p.endContainer,p.endOffset),m.deleteContents(),e&&c.getWin().scrollTo(0,D.y),y.firstChild&&y.firstChild.nodeName==x&&(y.innerHTML=y.firstChild.innerHTML),z.firstChild&&z.firstChild.nodeName==x&&(z.innerHTML=z.firstChild.innerHTML),d.isEmpty(y)&&I(y,r),d.isEmpty(z)&&(G=I(z,t)),e&&parseFloat(opera.version())<9.5?(m.insertNode(y),m.insertNode(z)):(m.insertNode(z),m.insertNode(y)),z.normalize(),y.normalize(),c.selection.select(z,!0),c.selection.collapse(!0),E=c.dom.getPos(z).y,(E<D.y||E+25>D.y+D.h)&&c.getWin().scrollTo(0,E<D.y?E:E-D.h+25),c.undoManager.add(),i},backspaceDelete:function(c,d){var e=this,f=e.editor,g=f.getBody(),h=f.dom,j,k=f.selection,l=k.getRng(),m=l.startContainer,j,n,o,p;if(!d&&l.collapsed&&m.nodeType==1&&l.startOffset==m.childNodes.length){p=new a.dom.TreeWalker(m.lastChild,m);for(j=m.lastChild;j;j=p.prev())if(j.nodeType==3){l.setStart(j,j.nodeValue.length),l.collapse(!0),k.setRng(l);return}}if(m&&f.dom.isBlock(m)&&!/^(TD|TH)$/.test(m.nodeName)&&d)if(m.childNodes.length==0||m.childNodes.length==1&&m.firstChild.nodeName=="BR"){j=m;while((j=j.previousSibling)&&!f.dom.isBlock(j));if(j){if(m!=g.firstChild){n=f.dom.doc.createTreeWalker(j,NodeFilter.SHOW_TEXT,null,i);while(o=n.nextNode())j=o;l=f.getDoc().createRange(),l.setStart(j,j.nodeValue?j.nodeValue.length:0),l.setEnd(j,j.nodeValue?j.nodeValue.length:0),k.setRng(l),f.dom.remove(m)}return b.cancel(c)}}}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.each,e=a.extend;a.create("tinymce.ControlManager",{ControlManager:function(b,c){var e=this,f;c=c||{},e.editor=b,e.controls={},e.onAdd=new a.util.Dispatcher(e),e.onPostRender=new a.util.Dispatcher(e),e.prefix=c.prefix||b.id+"_",e._cls={},e.onPostRender.add(function(){d(e.controls,function(a){a.postRender()})})},get:function(a){return this.controls[this.prefix+a]||this.controls[a]},setActive:function(a,b){var c=null;return(c=this.get(a))&&c.setActive(b),c},setDisabled:function(a,b){var c=null;return(c=this.get(a))&&c.setDisabled(b),c},add:function(a){var b=this;return a&&(b.controls[a.id]=a,b.onAdd.dispatch(a,b)),a},createControl:function(a){var b,c=this,e=c.editor;d(e.plugins,function(d){if(d.createControl){b=d.createControl(a,c);if(b)return!1}});switch(a){case"|":case"separator":return c.createSeparator()}return!b&&e.buttons&&(b=e.buttons[a])?c.createButton(a,b):c.add(b)},createDropMenu:function(b,c,d){var f=this,g=f.editor,h,i,j,k;c=e({"class":"mceDropDown",constrain:g.settings.constrain_menus},c),c["class"]=c["class"]+" "+g.getParam("skin")+"Skin";if(j=g.getParam("skin_variant"))c["class"]+=" "+g.getParam("skin")+"Skin"+j.substring(0,1).toUpperCase()+j.substring(1);return b=f.prefix+b,k=d||f._cls.dropmenu||a.ui.DropMenu,h=f.controls[b]=new k(b,c),h.onAddItem.add(function(a,b){var c=b.settings;c.title=g.getLang(c.title,c.title),c.onclick||(c.onclick=function(a){c.cmd&&g.execCommand(c.cmd,c.ui||!1,c.value)})}),g.onRemove.add(function(){h.destroy()}),a.isIE&&(h.onShowMenu.add(function(){g.focus(),i=g.selection.getBookmark(1)}),h.onHideMenu.add(function(){i&&(g.selection.moveToBookmark(i),i=0)})),f.add(h)},createListBox:function(b,d,f){function l(b){return b.settings.use_accessible_selects&&!a.isGecko}var g=this,h=g.editor,i,j,k;return g.get(b)?null:(d.title=h.translate(d.title),d.scope=d.scope||h,d.onselect||(d.onselect=function(a){h.execCommand(d.cmd,d.ui||!1,a||d.value)}),d=e({title:d.title,"class":"mce_"+b,scope:d.scope,control_manager:g},d),b=g.prefix+b,h.settings.use_native_selects||l(h)?j=new a.ui.NativeListBox(b,d):(k=f||g._cls.listbox||a.ui.ListBox,j=new k(b,d,h)),g.controls[b]=j,a.isWebKit&&j.onPostRender.add(function(a,b){c.add(b,"mousedown",function(){h.bookmark=h.selection.getBookmark(1)}),c.add(b,"focus",function(){h.selection.moveToBookmark(h.bookmark),h.bookmark=null})}),j.hideMenu&&h.onMouseDown.add(j.hideMenu,j),g.add(j))},createButton:function(b,c,d){var f=this,g=f.editor,h,i,j;return f.get(b)?null:(c.title=g.translate(c.title),c.label=g.translate(c.label),c.scope=c.scope||g,!c.onclick&&!c.menu_button&&(c.onclick=function(){g.execCommand(c.cmd,c.ui||!1,c.value)}),c=e({title:c.title,"class":"mce_"+b,unavailable_prefix:g.getLang("unavailable",""),scope:c.scope,control_manager:f},c),b=f.prefix+b,c.menu_button?(j=d||f._cls.menubutton||a.ui.MenuButton,i=new j(b,c,g),g.onMouseDown.add(i.hideMenu,i)):(j=f._cls.button||a.ui.Button,i=new j(b,c,g)),f.add(i))},createMenuButton:function(a,b,c){return b=b||{},b.menu_button=1,this.createButton(a,b,c)},createSplitButton:function(b,c,d){var f=this,g=f.editor,h,i,j;return f.get(b)?null:(c.title=g.translate(c.title),c.scope=c.scope||g,c.onclick||(c.onclick=function(a){g.execCommand(c.cmd,c.ui||!1,a||c.value)}),c.onselect||(c.onselect=function(a){g.execCommand(c.cmd,c.ui||!1,a||c.value)}),c=e({title:c.title,"class":"mce_"+b,scope:c.scope,control_manager:f},c),b=f.prefix+b,j=d||f._cls.splitbutton||a.ui.SplitButton,i=f.add(new j(b,c,g)),g.onMouseDown.add(i.hideMenu,i),i)},createColorSplitButton:function(b,c,d){var f=this,g=f.editor,h,i,j,k;return f.get(b)?null:(c.title=g.translate(c.title),c.scope=c.scope||g,c.onclick||(c.onclick=function(b){a.isIE&&(k=g.selection.getBookmark(1)),g.execCommand(c.cmd,c.ui||!1,b||c.value)}),c.onselect||(c.onselect=function(a){g.execCommand(c.cmd,c.ui||!1,a||c.value)}),c=e({title:c.title,"class":"mce_"+b,menu_class:g.getParam("skin")+"Skin",scope:c.scope,more_colors_title:g.getLang("more_colors")},c),b=f.prefix+b,j=d||f._cls.colorsplitbutton||a.ui.ColorSplitButton,i=new j(b,c,g),g.onMouseDown.add(i.hideMenu,i),g.onRemove.add(function(){i.destroy()}),a.isIE&&(i.onShowMenu.add(function(){g.focus(),k=g.selection.getBookmark(1)}),i.onHideMenu.add(function(){k&&(g.selection.moveToBookmark(k),k=0)})),f.add(i))},createToolbar:function(b,c,d){var e,f=this,g;return b=f.prefix+b,g=d||f._cls.toolbar||a.ui.Toolbar,e=new g(b,c,f.editor),f.get(b)?null:f.add(e)},createToolbarGroup:function(b,c,d){var e,f=this,g;return b=f.prefix+b,g=d||this._cls.toolbarGroup||a.ui.ToolbarGroup,e=new g(b,c,f.editor),f.get(b)?null:f.add(e)},createSeparator:function(b){var c=b||this._cls.separator||a.ui.Separator;return new c},setControlType:function(a,b){return this._cls[a.toLowerCase()]=b},destroy:function(){d(this.controls,function(a){a.destroy()}),this.controls=null}})}(tinymce),function(a){var b=a.util.Dispatcher,c=a.each,d=a.isIE,e=a.isOpera;a.create("tinymce.WindowManager",{WindowManager:function(a){var c=this;c.editor=a,c.onOpen=new b(c),c.onClose=new b(c),c.params={},c.features={}},open:function(b,f){var g=this,h="",i,j,k=g.editor.settings.dialog_type=="modal",l,m,n,o=a.DOM.getViewPort(),p;b=b||{},f=f||{},m=e?o.w:screen.width,n=e?o.h:screen.height,b.name=b.name||"mc_"+(new Date).getTime(),b.width=parseInt(b.width||320),b.height=parseInt(b.height||240),b.resizable=!0,b.left=b.left||parseInt(m/2)-b.width/2,b.top=b.top||parseInt(n/2)-b.height/2,f.inline=!1,f.mce_width=b.width,f.mce_height=b.height,f.mce_auto_focus=b.auto_focus,k&&d&&(b.center=!0,b.help=!1,b.dialogWidth=b.width+"px",b.dialogHeight=b.height+"px",b.scroll=b.scrollbars||!1),c(b,function(b,c){a.is(b,"boolean")&&(b=b?"yes":"no"),/^(name|url)$/.test(c)||(d&&k?h+=(h?";":"")+c+":"+b:h+=(h?",":"")+c+"="+b)}),g.features=b,g.params=f,g.onOpen.dispatch(g,b,f),p=b.url||b.file,p=a._addVer(p);try{d&&k?(l=1,window.showModalDialog(p,window,h)):l=window.open(p,b.name,h)}catch(q){}l||alert(g.editor.getLang("popup_blocked"))},close:function(a){a.close(),this.onClose.dispatch(this)},createInstance:function(b,c,d,e,f,g){var h=a.resolve(b);return new h(c,d,e,f,g)},confirm:function(a,b,c,d){d=d||window,b.call(c||this,d.confirm(this._decode(this.editor.getLang(a,a))))},alert:function(a,b,c,d){var e=this;d=d||window,d.alert(e._decode(e.editor.getLang(a,a))),b&&b.call(c||e)},resizeBy:function(a,b,c){c.resizeBy(a,b)},_decode:function(b){return a.DOM.decode(b).replace(/\\n/g,"\n")}})}(tinymce),function(a){a.Formatter=function(b){function r(a){return a instanceof Array}function s(a,b){return e.getParents(a,b,e.getRoot())}function t(a){return a.nodeType===1&&(a.face==="mceinline"||a.style.fontFamily==="mceinline")}function u(a){return a?c[a]:c}function v(a,b){a&&(typeof a!="string"?d(a,function(a,b){v(b,a)}):(b=b.length?b:[b],d(b,function(a){a.deep===q&&(a.deep=!a.selector),a.split===q&&(a.split=!a.selector||a.inline),a.remove===q&&a.selector&&!a.inline&&(a.remove="none"),a.selector&&a.inline&&(a.mixed=!0,a.block_expand=!0),typeof a.classes=="string"&&(a.classes=a.classes.split(/\s+/))}),c[a]=b))}function y(c,k,l){function w(a){var b=a.startContainer,c=a.startOffset,d,e;if(b.nodeType==1||b.nodeValue===""){b=b.nodeType==1?b.childNodes[c]:b;if(b){d=new g(b,b.parentNode);for(e=d.current();e;e=d.next())if(e.nodeType==3&&!J(e)){a.setStart(e,0);break}}}return a}function y(a,b){b=b||n,a&&(b.onformat&&b.onformat(a,b,k,l),d(b.styles,function(b,c){e.setStyle(a,c,I(b,k))}),d(b.attributes,function(b,c){e.setAttrib(a,c,I(b,k))}),d(b.classes,function(b){b=I(b,k),e.hasClass(a,b)||e.addClass(a,b)}))}function z(){function a(a,b){var c=new g(b);for(l=c.current();l;l=c.prev())if(l.childNodes.length>1||l==a)return l}var c=b.selection.getRng(),d=c.startContainer,e=c.endContainer;if(d!=e&&c.endOffset==0){var f=a(d,e),h=f.nodeType==3?f.length:f.childNodes.length;c.setEnd(f,h)}return c}function A(b,c,f,g,h){var i=[],j=-1,k,l=-1,m=-1,n;return d(b.childNodes,function(a,b){if(a.nodeName==="UL"||a.nodeName==="OL")return j=b,k=a,!1}),d(b.childNodes,function(a,b){a.nodeName==="SPAN"&&e.getAttrib(a,"data-mce-type")=="bookmark"&&(a.id==c.id+"_start"?l=b:a.id==c.id+"_end"&&(m=b))}),j<=0||l<j&&m>j?(d(a.grep(b.childNodes),h),0):(n=f.cloneNode(o),d(a.grep(b.childNodes),function(a,b){if(l<j&&b<j||l>j&&b>j)i.push(a),a.parentNode.removeChild(a)}),l<j?b.insertBefore(n,k):l>j&&b.insertBefore(n,k.nextSibling),g.push(n),d(i,function(a){n.appendChild(a)}),n)}function C(b,f,g){var l=[],q,r;q=n.inline||n.block,r=e.create(q),y(r),h.walk(b,function(b){function j(b){var p=b.nodeName.toLowerCase(),s=b.parentNode.nodeName.toLowerCase(),u;if(G(p,"br")){h=0,n.block&&e.remove(b);return}if(n.wrapper&&B(b,c,k)){h=0;return}if(n.block&&!n.wrapper&&R(p)){b=e.rename(b,q),y(b),l.push(b),h=0;return}if(n.selector){d(m,function(a){if("collapsed"in a&&a.collapsed!==v)return;e.is(b,a.selector)&&!t(b)&&(y(b,a),u=!0)});if(!n.inline||u){h=0;return}}!i(q,p)||!i(s,q)||!g&&b.nodeType===3&&b.nodeValue.length===1&&b.nodeValue.charCodeAt(0)===65279||b.id==="_mce_caret"?p=="li"&&f?h=A(b,f,r,l,j):(h=0,d(a.grep(b.childNodes),j),h=0):(h||(h=r.cloneNode(o),b.parentNode.insertBefore(h,b),l.push(h)),h.appendChild(b))}var h;d(b,j)}),n.wrap_links===!1&&d(l,function(b){function c(b){var e,f,g;if(b.nodeName==="A"){f=r.cloneNode(o),l.push(f),g=a.grep(b.childNodes);for(e=0;e<g.length;e++)f.appendChild(g[e]);b.appendChild(f)}d(a.grep(b.childNodes),c)}c(b)}),d(l,function(a){function f(a){var b=0;return d(a.childNodes,function(a){!J(a)&&!P(a)&&b++}),b}function g(a){var b,c;return d(a.childNodes,function(a){if(a.nodeType==1&&!P(a)&&!t(a))return b=a,o}),b&&F(b,n)&&(c=b.cloneNode(o),y(c),e.replace(c,a,p),e.remove(b,1)),c||a}var b;b=f(a);if((l.length>1||!j(a))&&b===0){e.remove(a,1);return}if(n.inline||n.wrapper){!n.exact&&b===1&&(a=g(a)),d(m,function(b){d(e.select(b.inline,a),function(a){var c;if(b.wrap_links===!1){c=a.parentNode;do if(c.nodeName==="A")return;while(c=c.parentNode)}M(b,k,a,b.exact?a:null)})});if(B(a.parentNode,c,k))return e.remove(a,1),a=0,p;n.merge_with_parents&&e.getParent(a.parentNode,function(b){if(B(b,c,k))return e.remove(a,1),a=0,p}),a&&n.merge_siblings!==!1&&(a=Q(O(a),a),a=Q(a,O(a,p)))}})}var m=u(c),n=m[0],q,r,s,v=f.isCollapsed();if(n)if(l)l.nodeType?(r=e.createRng(),r.setStartBefore(l),r.setEndAfter(l),C(L(r,m),null,!0)):C(l,null,!0);else if(!v||!n.inline||e.select("td.mceSelected,th.mceSelected").length){var D=b.selection.getNode();b.selection.setRng(z()),q=f.getBookmark(),C(L(f.getRng(p),m),q),n.styles&&(n.styles.color||n.styles.textDecoration)&&(a.walk(D,x,"childNodes"),x(D)),f.moveToBookmark(q),f.setRng(w(f.getRng(p))),b.nodeChanged()}else T("apply",c,k)}function z(c,i,k){function x(a){var b=a.startContainer,c=a.startOffset,d,h,i,j;b.nodeType==3&&c>=b.nodeValue.length-1&&(b=b.parentNode,c=l(b)+1);if(b.nodeType==1){i=b.childNodes,b=i[Math.min(c,i.length-1)],d=new g(b),c>i.length-1&&d.next();for(h=d.current();h;h=d.next())if(h.nodeType==3&&!J(h)){j=e.create("a",null,m),h.parentNode.insertBefore(j,h),a.setStart(h,0),f.setRng(a),e.remove(j);return}}}function y(b){var c,d,e;c=a.grep(b.childNodes);for(d=0,e=n.length;d<e;d++)if(M(n[d],i,b,b))break;if(q.deep)for(d=0,e=c.length;d<e;d++)y(c[d])}function z(a){var b;return d(s(a.parentNode).reverse(),function(a){var d;!b&&a.id!="_start"&&a.id!="_end"&&(d=B(a,c,i),d&&d.split!==!1&&(b=a))}),b}function A(a,b,c,d){var f,g,h,k,l,m;if(a){m=a.parentNode;for(f=b.parentNode;f&&f!=m;f=f.parentNode){g=f.cloneNode(o);for(l=0;l<n.length;l++)if(M(n[l],i,g,g)){g=0;break}g&&(h&&g.appendChild(h),k||(k=g),h=g)}d&&(!q.mixed||!j(a))&&(b=e.split(a,b)),h&&(c.parentNode.insertBefore(h,c),k.appendChild(c))}return b}function D(a){return A(z(a),a,a,!0)}function E(a){var b=e.get(a?"_start":"_end"),c=b[a?"firstChild":"lastChild"];return P(c)&&(c=c[a?"firstChild":"lastChild"]),e.remove(b,!0),c}function F(a){var c,e;a=L(a,n,p),q.split&&(c=S(a,p),e=S(a),c!=e?(c=K(c,"span",{id:"_start","data-mce-type":"bookmark"}),e=K(e,"span",{id:"_end","data-mce-type":"bookmark"}),D(c),D(e),c=E(p),e=E()):c=e=D(c),a.startContainer=c.parentNode,a.startOffset=l(c),a.endContainer=e.parentNode,a.endOffset=l(e)+1),h.walk(a,function(a){d(a,function(a){y(a),a.nodeType===1&&b.dom.getStyle(a,"text-decoration")==="underline"&&a.parentNode&&w(a.parentNode)==="underline"&&M({deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,a)})})}var n=u(c),q=n[0],r,t,v;if(k){k.nodeType?(v=e.createRng(),v.setStartBefore(k),v.setEndAfter(k),F(v)):F(k);return}!f.isCollapsed()||!q.inline||e.select("td.mceSelected,th.mceSelected").length?(r=f.getBookmark(),F(f.getRng(p)),f.moveToBookmark(r),q.inline&&C(c,i,f.getStart())&&x(f.getRng(!0)),b.nodeChanged()):T("remove",c,i),a.isWebKit&&b.execCommand("mceCleanup")}function A(a,b,c){var d=u(a);!C(a,b,c)||"toggle"in d[0]&&!d[0].toggle?y(a,b,c):z(a,b,c)}function B(a,b,c,d){function j(a,b,f){var g,h,i=b[f],j;if(b.onmatch)return b.onmatch(a,b,f);if(i)if(i.length===q){for(g in i)if(i.hasOwnProperty(g)){f==="attributes"?h=e.getAttrib(a,g):h=H(a,g);if(d&&!h&&!b.exact)return;if((!d||b.exact)&&!G(h,I(i[g],c)))return}}else for(j=0;j<i.length;j++)if(f==="attributes"?e.getAttrib(a,i[j]):H(a,i[j]))return b;return b}var f=u(b),g,h,i;if(f&&a)for(h=0;h<f.length;h++){g=f[h];if(F(a,g)&&j(a,g,"attributes")&&j(a,g,"styles")){if(i=g.classes)for(h=0;h<i.length;h++)if(!e.hasClass(a,i[h]))return;return g}}}function C(a,b,c){function g(c){return c=e.getParent(c,function(c){return!!B(c,a,b,!0)}),B(c,a,b)}var d;return c?g(c):(c=f.getNode(),g(c)?p:(d=f.getStart(),d!=c&&g(d)?p:o))}function D(a,b){var c,d=[],g={},h,i,j;return c=f.getStart(),e.getParent(c,function(c){var e,f;for(e=0;e<a.length;e++)f=a[e],!g[f]&&B(c,f,b)&&(g[f]=!0,d.push(f))}),d}function E(a){var b=u(a),c,d,g,h,i;if(b){c=f.getStart(),d=s(c);for(h=b.length-1;h>=0;h--){i=b[h].selector;if(!i)return p;for(g=d.length-1;g>=0;g--)if(e.is(d[g],i))return p}}return o}function F(a,b){if(G(a,b.inline))return p;if(G(a,b.block))return p;if(b.selector)return e.is(a,b.selector)}function G(a,b){return a=a||"",b=b||"",a=""+(a.nodeName||a),b=""+(b.nodeName||b),a.toLowerCase()==b.toLowerCase()}function H(a,b){var c=e.getStyle(a,b);if(b=="color"||b=="backgroundColor")c=e.toHex(c);return b=="fontWeight"&&c==700&&(c="bold"),""+c}function I(a,b){return typeof a!="string"?a=a(b):b&&(a=a.replace(/%(\w+)/g,function(a,c){return b[c]||a})),a}function J(a){return a&&a.nodeType===3&&/^([\t \r\n]+|)$/.test(a.nodeValue)}function K(a,b,c){var d=e.create(b,c);return a.parentNode.insertBefore(d,a),d.appendChild(a),d}function L(a,c,d){function t(a){var b,d,g,l,m;b=d=a?f:i,m=a?"previousSibling":"nextSibling",root=e.getRoot();if(b.nodeType==3&&!J(b))if(a?h>0:k<b.nodeValue.length)return b;for(;;){if(d==root||!c[0].block_expand&&j(d))return d;for(l=d[m];l;l=l[m])if(!P(l)&&!J(l))return d;d=d.parentNode}return b}function u(a,b){b===q&&(b=a.nodeType===3?a.length:a.childNodes.length);while(a&&a.hasChildNodes())a=a.childNodes[b],a&&(b=a.nodeType===3?a.length:a.childNodes.length);return{node:a,offset:b}}var f=a.startContainer,h=a.startOffset,i=a.endContainer,k=a.endOffset,m,n,p,r;f.nodeType==1&&f.hasChildNodes()&&(n=f.childNodes.length-1,f=f.childNodes[h>n?n:h],f.nodeType==3&&(h=0)),i.nodeType==1&&i.hasChildNodes()&&(n=i.childNodes.length-1,i=i.childNodes[k>n?n:k-1],i.nodeType==3&&(k=i.nodeValue.length));if(P(f.parentNode)||P(f))f=P(f)?f:f.parentNode,f=f.nextSibling||f,f.nodeType==3&&(h=0);if(P(i.parentNode)||P(i))i=P(i)?i:i.parentNode,i=i.previousSibling||i,i.nodeType==3&&(k=i.length);if(c[0].inline){if(a.collapsed){function v(a,c,f){function m(a,b){var c,e,g=a.nodeValue;return typeof b=="undefined"&&(b=f?g.length:0),f?(c=g.lastIndexOf(" ",b),e=g.lastIndexOf(" ",b),c=c>e?c:e,c!==-1&&!d&&c++):(c=g.indexOf(" ",b),e=g.indexOf(" ",b),c=c!==-1&&(e===-1||c<e)?c:e),c}var h,i,k,l;if(a.nodeType===3){k=m(a,c);if(k!==-1)return{container:a,offset:k};l=a}h=new g(a,e.getParent(a,j)||b.getBody());while(i=h[f?"prev":"next"]())if(i.nodeType===3){l=i,k=m(i);if(k!==-1)return{container:i,offset:k}}else if(j(i))break;if(l)return f?c=0:c=l.length,{container:l,offset:c}}r=v(f,h,!0),r&&(f=r.container,h=r.offset),r=v(i,k),r&&(i=r.container,k=r.offset)}p=u(i,k);if(p.node){while(p.node&&p.offset===0&&p.node.previousSibling)p=u(p.node.previousSibling);p.node&&p.offset>0&&p.node.nodeType===3&&p.node.nodeValue.charAt(p.offset-1)===" "&&(p.offset>1?(i=p.node,i.splitText(p.offset-1)):!p.node.previousSibling)}}if(c[0].inline||c[0].block_expand){if(!c[0].inline||f.nodeType!=3||h===0)f=t(!0);if(!c[0].inline||i.nodeType!=3||k===i.nodeValue.length)i=t()}if(c[0].selector&&c[0].expand!==o&&!c[0].inline){function w(b,d){var f,g,h,i;b.nodeType==3&&b.nodeValue.length==0&&b[d]&&(b=b[d]),f=s(b);for(g=0;g<f.length;g++)for(h=0;h<c.length;h++){i=c[h];if("collapsed"in i&&i.collapsed!==a.collapsed)continue;if(e.is(f[g],i.selector))return f[g]}return b}f=w(f,"previousSibling"),i=w(i,"nextSibling")}if(c[0].block||c[0].selector){function x(a,b,d){var f;c[0].wrapper||(f=e.getParent(a,c[0].block)),f||(f=e.getParent(a.nodeType==3?a.parentNode:a,j)),f&&c[0].wrapper&&(f=s(f,"ul,ol").reverse()[0]||f);if(!f){f=a;while(f[b]&&!j(f[b])){f=f[b];if(G(f,"br"))break}}return f||a}f=x(f,"previousSibling"),i=x(i,"nextSibling"),c[0].block&&(j(f)||(f=t(!0)),j(i)||(i=t()))}return f.nodeType==1&&(h=l(f),f=f.parentNode),i.nodeType==1&&(k=l(i)+1,i=i.parentNode),{startContainer:f,startOffset:h,endContainer:i,endOffset:k}}function M(a,b,c,f){var g,h,i;if(!F(c,a))return o;if(a.remove!="all"){d(a.styles,function(a,d){a=I(a,b),typeof d=="number"&&(d=a,f=0),(!f||G(H(f,d),a))&&e.setStyle(c,d,""),i=1}),i&&e.getAttrib(c,"style")==""&&(c.removeAttribute("style"),c.removeAttribute("data-mce-style")),d(a.attributes,function(a,g){var h;a=I(a,b),typeof g=="number"&&(g=a,f=0);if(!f||G(e.getAttrib(f,g),a)){if(g=="class"){a=e.getAttrib(c,g);if(a){h="",d(a.split(/\s+/),function(a){/mce\w+/.test(a)&&(h+=(h?" ":"")+a)});if(h){e.setAttrib(c,g,h);return}}}g=="class"&&c.removeAttribute("className"),n.test(g)&&c.removeAttribute("data-mce-"+g),c.removeAttribute(g)}}),d(a.classes,function(a){a=I(a,b),(!f||e.hasClass(f,a))&&e.removeClass(c,a)}),h=e.getAttribs(c);for(g=0;g<h.length;g++)if(h[g].nodeName.indexOf("_")!==0)return o}if(a.remove!="none")return N(c,a),p}function N(b,c){var f=b.parentNode,g;if(c.block)if(!k){function h(a,b,c){return a=O(a,b,c),!a||a.nodeName=="BR"||j(a)}j(b)&&!j(f)&&(!h(b,o)&&!h(b.firstChild,p,1)&&b.insertBefore(e.create("br"),b.firstChild),!h(b,p)&&!h(b.lastChild,o,1)&&b.appendChild(e.create("br")))}else f==e.getRoot()&&(!c.list_block||!G(b,c.list_block))&&d(a.grep(b.childNodes),function(a){i(k,a.nodeName.toLowerCase())?g?g.appendChild(a):g=K(a,k):g=0});if(c.selector&&c.inline&&!G(c.inline,b))return;e.remove(b,1)}function O(a,b,c){if(a){b=b?"nextSibling":"previousSibling";for(a=c?a:a[b];a;a=a[b])if(a.nodeType==1||!J(a))return a}}function P(a){return a&&a.nodeType==1&&a.getAttribute("data-mce-type")=="bookmark"}function Q(b,c){function i(a,b){function c(a){var b={};return d(e.getAttribs(a),function(c){var d=c.nodeName.toLowerCase();d.indexOf("_")!==0&&d!=="style"&&(b[d]=e.getAttrib(a,d))}),b}function f(a,b){var c,d;for(d in a)if(a.hasOwnProperty(d)){c=b[d];if(c===q)return o;if(a[d]!=c)return o;delete b[d]}for(d in b)if(b.hasOwnProperty(d))return o;return p}return a.nodeName!=b.nodeName?o:f(c(a),c(b))?f(e.parseStyle(e.getAttrib(a,"style")),e.parseStyle(e.getAttrib(b,"style")))?p:o:o}var f,g,h;if(b&&c){function j(a,b){for(g=a;g;g=g[b]){if(g.nodeType==3&&g.nodeValue.length!==0)return a;if(g.nodeType==1&&!P(g))return g}return a}b=j(b,"previousSibling"),c=j(c,"nextSibling");if(i(b,c)){for(g=b.nextSibling;g&&g!=c;)h=g,g=g.nextSibling,b.appendChild(h);return e.remove(c),d(a.grep(c.childNodes),function(a){b.appendChild(a)}),b}}return c}function R(a){return/^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(a)}function S(a,c){var d,e,f,h;return d=a[c?"startContainer":"endContainer"],e=a[c?"startOffset":"endOffset"],d.nodeType==1&&(f=d.childNodes.length-1,!c&&e&&e--,d=d.childNodes[e>f?f:e]),d.nodeType===3&&c&&e>=d.nodeValue.length&&(d=(new g(d,b.getBody())).next()||d),d.nodeType===3&&!c&&e==0&&(d=(new g(d,b.getBody())).prev()||d),d}function T(c,d,i){function n(a){var c=e.create("span",{id:k,"data-mce-bogus":!0,style:l?"color:red":""});return a&&c.appendChild(b.getDoc().createTextNode(j)),c}function o(a,b){while(a){if(a.nodeType===3&&a.nodeValue!==j||a.childNodes.length>1)return!1;b&&a.nodeType===1&&b.push(a),a=a.firstChild}return!0}function p(a){while(a){if(a.id===k)return a;a=a.parentNode}}function q(a){var b;if(a){b=new g(a,a);for(a=b.current();a;a=b.next())if(a.nodeType===3)return a}}function r(a,b){var c,d;if(!a){a=p(f.getStart());if(!a)while(a=e.get(k))r(a,!1)}else d=f.getRng(!0),o(a)?(b!==!1&&(d.setStartBefore(a),d.setEndBefore(a)),e.remove(a)):(c=q(a),c=c.deleteData(0,1),e.remove(a,1)),f.setRng(d)}function s(){var a,b,c,e,g,k,l;a=f.getRng(!0),e=a.startOffset,k=a.startContainer,l=k.nodeValue,b=p(f.getStart()),b&&(c=q(b)),l&&e>0&&e<l.length&&/\w/.test(l.charAt(e))&&/\w/.test(l.charAt(e-1))?(g=f.getBookmark(),a.collapse(!0),a=L(a,u(d)),a=h.split(a),y(d,i,a),f.moveToBookmark(g)):(!b||c.nodeValue!==j?(b=n(!0),c=b.firstChild,a.insertNode(b),e=1,y(d,i,b)):y(d,i,b),f.setCursorLocation(c,e))}function t(){var a=f.getRng(!0),b,c,g,k,l,m,o=[],p,q;b=a.startContainer,c=a.startOffset,l=b;if(b.nodeType==3){if(c!=b.nodeValue.length||b.nodeValue===j)k=!0;l=l.parentNode}while(l){if(B(l,d,i)){m=l;break}l.nextSibling&&(k=!0),o.push(l),l=l.parentNode}if(!m)return;if(k)g=f.getBookmark(),a.collapse(!0),a=L(a,u(d),!0),a=h.split(a),z(d,i,a),f.moveToBookmark(g);else{q=n(),l=q;for(p=o.length-1;p>=0;p--)l.appendChild(o[p].cloneNode(!1)),l=l.firstChild;l.appendChild(e.doc.createTextNode(j)),l=l.firstChild,e.insertAfter(q,m),f.setCursorLocation(l,1)}}var j,k="_mce_caret",l=b.settings.caret_debug;j=a.isGecko?"​":m,b.onBeforeGetContent.addToTop(function(){var a=[],b;if(o(p(f.getStart()),a)){b=a.length;while(b--)e.setAttrib(a[b],"data-mce-bogus","1")}}),a.each("onMouseUp onKeyUp".split(" "),function(a){b[a].addToTop(function(){r()})}),b.onKeyDown.addToTop(function(a,b){var c=b.keyCode;(c==8||c==37||c==39)&&r(p(f.getStart()))}),c=="apply"?s():t()}var c={},d=a.each,e=b.dom,f=b.selection,g=a.dom.TreeWalker,h=new a.dom.RangeUtils(e),i=b.schema.isValidChild,j=e.isBlock,k=b.settings.forced_root_block,l=e.nodeIndex,m="﻿",n=/^(src|href|style)$/,o=!1,p=!0,q,w=function(a){var c;return b.dom.getParent(a,function(a){return c=b.dom.getStyle(a,"text-decoration"),c&&c!=="none"}),c},x=function(a){var c;a.nodeType===1&&a.parentNode&&a.parentNode.nodeType===1&&(c=w(a.parentNode),b.dom.getStyle(a,"color")&&c?b.dom.setStyle(a,"text-decoration",c):b.dom.getStyle(a,"textdecoration")===c&&b.dom.setStyle(a,"text-decoration",null))};a.extend(this,{get:u,register:v,apply:y,remove:z,toggle:A,match:C,matchAll:D,matchNode:B,canApply:E})}}(tinymce),tinymce.onAddEditor.add(function(a,b){var c,d,e,f=b.settings;if(f.inline_styles){d=a.explode(f.font_size_legacy_values);function g(b,c){a.each(c,function(a,c){a&&e.setStyle(b,c,a)}),e.rename(b,"span")}c={font:function(a,b){g(b,{backgroundColor:b.style.backgroundColor,color:b.color,fontFamily:b.face,fontSize:d[parseInt(b.size)-1]})},u:function(a,b){g(b,{textDecoration:"underline"})},strike:function(a,b){g(b,{textDecoration:"line-through"})}};function h(d,g){e=d.dom,f.convert_fonts_to_spans&&a.each(e.select("font,u,strike",g.node),function(a){c[a.nodeName.toLowerCase()](b.dom,a)})}b.onPreProcess.add(h),b.onSetContent.add(h),b.onInit.add(function(){b.selection.onSetContent.add(h)})}}),function(a){function f(){function c(a){a==="remove"&&this.each(function(a,b){var c=f(b);c&&c.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(a,b){var c=tinyMCE.get(b.id.replace(/_parent$/,""));c&&c.remove()})}function d(a){var d=this,e;if(a!==b)c.call(d),d.each(function(b,c){var d;(d=tinyMCE.get(c.id))&&d.setContent(a)});else if(d.length>0)if(e=tinyMCE.get(d[0].id))return e.getContent()}function f(a){var b=null;return a&&a.id&&e.tinymce&&(b=tinyMCE.get(a.id)),b}function g(a){return!!(a&&a.length&&e.tinymce&&a.is(":tinymce"))}var h={};a.each(["text","html","val"],function(c,e){var i=h[e]=a.fn[e],l=e==="text";a.fn[e]=function(c){var e=this;if(!g(e))return i.apply(e,arguments);if(c!==b)return d.call(e.filter(":tinymce"),c),i.apply(e.not(":tinymce"),arguments),e;var h="",j=arguments;return(l?e:e.eq(0)).each(function(b,c){var d=f(c);h+=d?l?d.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):d.getContent():i.apply(a(c),j)}),h}}),a.each(["append","prepend"],function(c,d){var e=h[d]=a.fn[d],i=d==="prepend";a.fn[d]=function(a){var c=this;if(!g(c))return e.apply(c,arguments);if(a!==b)return c.filter(":tinymce").each(function(b,c){var d=f(c);d&&d.setContent(i?a+d.getContent():d.getContent()+a)}),e.apply(c.not(":tinymce"),arguments),c}}),a.each(["remove","replaceWith","replaceAll","empty"],function(b,d){var e=h[d]=a.fn[d];a.fn[d]=function(){return c.call(this,d),e.apply(this,arguments)}}),h.attr=a.fn.attr,a.fn.attr=function(c,e,i){var l=this;if(!c||c!=="value"||!g(l))return h.attr.call(l,c,e,i);if(e!==b)return d.call(l.filter(":tinymce"),e),h.attr.call(l.not(":tinymce"),c,e,i),l;var m=l[0],n=f(m);return n?n.getContent():h.attr.call(a(m),c,e,i)}}var b,c,d=[],e=window;a.fn.tinymce=function(b){function o(){var c=[],d=0;f&&(f(),f=null),g.each(function(a,e){var f,h=e.id,i=b.oninit;h||(e.id=h=tinymce.DOM.uniqueId()),f=new tinymce.Editor(h,b),c.push(f),f.onInit
.add(function(){var a,b=i;g.css("visibility",""),i&&++d==c.length&&(tinymce.is(b,"string")&&(a=b.indexOf(".")===-1?null:tinymce.resolve(b.replace(/\.\w+$/,"")),b=tinymce.resolve(b)),b.apply(a||tinymce,c))})}),a.each(c,function(a,b){b.render()})}var g=this,h,i,j,k,l,m="",n="";return g.length?b?(g.css("visibility","hidden"),!e.tinymce&&!c&&(h=b.script_url)?(c=1,j=h.substring(0,h.lastIndexOf("/")),/_(src|dev)\.js/g.test(h)&&(n="_src"),k=h.lastIndexOf("?"),k!=-1&&(m=h.substring(k+1)),e.tinyMCEPreInit=e.tinyMCEPreInit||{base:j,suffix:n,query:m},h.indexOf("gzip")!=-1&&(l=b.language||"en",h=h+(/\?/.test(h)?"&":"?")+"js=true&core=true&suffix="+escape(n)+"&themes="+escape(b.theme)+"&plugins="+escape(b.plugins)+"&languages="+l,e.tinyMCE_GZ||(tinyMCE_GZ={start:function(){function c(a){tinymce.ScriptLoader.markDone(tinyMCE.baseURI.toAbsolute(a))}tinymce.suffix=n,c("langs/"+l+".js"),c("themes/"+b.theme+"/editor_template"+n+".js"),c("themes/"+b.theme+"/langs/"+l+".js"),a.each(b.plugins.split(","),function(a,b){b&&(c("plugins/"+b+"/editor_plugin"+n+".js"),c("plugins/"+b+"/langs/"+l+".js"))})},end:function(){}})),a.ajax({type:"GET",url:h,dataType:"script",cache:!0,success:function(){tinymce.dom.Event.domLoaded=1,c=2,b.script_loaded&&b.script_loaded(),o(),a.each(d,function(a,b){b()})}})):c===1?d.push(o):o(),g):tinyMCE.get(g[0].id):g},a.extend(a.expr[":"],{tinymce:function(a){return a.id&&!!tinyMCE.get(a.id)}})}(jQuery),EAL.prototype={has_error:function(){this.error=!0;for(var a in EAL.prototype)EAL.prototype[a]=function(){}},set_browser_infos:function(a){ua=navigator.userAgent,a.isWebKit=/WebKit/.test(ua),a.isGecko=!a.isWebKit&&/Gecko/.test(ua),a.isMac=/Mac/.test(ua),a.isIE=navigator.appName=="Microsoft Internet Explorer",a.isIE&&(a.isIE=ua.replace(/^.*?MSIE\s+([0-9\.]+).*$/,"$1"),a.isIE<6&&a.has_error());if(a.isOpera=ua.indexOf("Opera")!=-1)a.isOpera=ua.replace(/^.*?Opera.*?([0-9\.]+).*$/i,"$1"),a.isOpera<9&&a.has_error(),a.isIE=!1;if(a.isFirefox=ua.indexOf("Firefox")!=-1)a.isFirefox=ua.replace(/^.*?Firefox.*?([0-9\.]+).*$/i,"$1");ua.indexOf("Iceweasel")!=-1&&(a.isFirefox=ua.replace(/^.*?Iceweasel.*?([0-9\.]+).*$/i,"$1")),ua.indexOf("GranParadiso")!=-1&&(a.isFirefox=ua.replace(/^.*?GranParadiso.*?([0-9\.]+).*$/i,"$1")),ua.indexOf("BonEcho")!=-1&&(a.isFirefox=ua.replace(/^.*?BonEcho.*?([0-9\.]+).*$/i,"$1")),ua.indexOf("SeaMonkey")!=-1&&(a.isFirefox=ua.replace(/^.*?SeaMonkey.*?([0-9\.]+).*$/i,"$1")+1);if(a.isCamino=ua.indexOf("Camino")!=-1)a.isCamino=ua.replace(/^.*?Camino.*?([0-9\.]+).*$/i,"$1");if(a.isSafari=ua.indexOf("Safari")!=-1)a.isSafari=ua.replace(/^.*?Version\/([0-9]+\.[0-9]+).*$/i,"$1");if(a.isChrome=ua.indexOf("Chrome")!=-1)a.isChrome=ua.replace(/^.*?Chrome.*?([0-9\.]+).*$/i,"$1"),a.isSafari=!1},window_loaded:function(){eAL.win="loaded";if(document.forms)for(var a=0;a<document.forms.length;a++){var b=document.forms[a];b.edit_area_replaced_submit=null;try{b.edit_area_replaced_submit=b.onsubmit,b.onsubmit=""}catch(c){}eAL.add_event(b,"submit",EAL.prototype.submit),eAL.add_event(b,"reset",EAL.prototype.reset)}eAL.add_event(window,"unload",function(){for(var a in eAs)eAL.delete_instance(a)})},init_ie_textarea:function(a){var b=document.getElementById(a);try{b&&typeof b.focused=="undefined"&&(b.focus(),b.focused=!0,b.selectionStart=b.selectionEnd=0,get_IE_selection(b),eAL.add_event(b,"focus",IE_textarea_focus),eAL.add_event(b,"blur",IE_textarea_blur))}catch(c){}},init:function(a){var b=this,c=a,d;c.id||b.has_error();if(b.error)return;eAs[c.id]&&b.delete_instance(c.id);for(d in b.default_settings)typeof c[d]=="undefined"&&(c[d]=b.default_settings[d]);if(c["browsers"]=="known"&&b.isValidBrowser==0)return;c.begin_toolbar.length>0&&(c.toolbar=c.begin_toolbar+","+c.toolbar),c.end_toolbar.length>0&&(c.toolbar=c.toolbar+","+c.end_toolbar),c.tab_toolbar=c.toolbar.replace(/ /g,"").split(","),c.plugins=c.plugins.replace(/ /g,"").split(",");for(d=0;d<c.plugins.length;d++)c["plugins"][d].length==0&&c.plugins.splice(d,1);b.get_template(),b.load_script(b.baseURL+"langs/"+c.language+".js"),c.syntax.length>0&&(c.syntax=c.syntax.toLowerCase(),b.load_script(b.baseURL+"reg_syntax/"+c.syntax+".js")),eAs[c.id]={settings:c},eAs[c.id].displayed=!1,eAs[c.id].hidden=!1,b.start(c.id)},delete_instance:function(a){var b=document,c=window.frames,d,e;eAL.execCommand(a,"EA_delete"),c["frame_"+a]&&c["frame_"+a].editArea&&(eAs[a].displayed&&eAL.toggle(a,"off"),c["frame_"+a].editArea.execCommand("EA_unload")),d=b.getElementById("EditAreaArroundInfos_"+a),d&&d.parentNode.removeChild(d),e=b.getElementById("frame_"+a);if(e){e.parentNode.removeChild(e);try{delete c["frame_"+a]}catch(f){}}delete eAs[a]},start:function(a){var b=this,c=document,d,e,f,g,h="",i="",j,k,l;if(b.win!="loaded"){setTimeout("eAL.start('"+a+"');",50);return}for(l in b.waiting_loading)if(b.waiting_loading[l]!="loaded"&&typeof b.waiting_loading[l]!="function"){setTimeout("eAL.start('"+a+"');",50);return}if(!b.lang[eAs[a].settings.language]||eAs[a].settings.syntax.length>0&&!b.load_syntax[eAs[a].settings.syntax]){setTimeout("eAL.start('"+a+"');",50);return}eAs[a].settings.syntax.length>0&&b.init_syntax_regexp(),!c.getElementById("EditAreaArroundInfos_"+a)&&(eAs[a].settings.debug||eAs[a].settings.allow_toggle)&&(e=c.createElement("span"),e.id="EditAreaArroundInfos_"+a,eAs[a].settings.allow_toggle&&(checked=eAs[a]["settings"]["display"]=="onload"?"checked='checked'":"",h+="<div id='edit_area_toggle_"+l+"'>",h+="<input id='edit_area_toggle_checkbox_"+a+"' class='toggle_"+a+"' type='checkbox' onclick='eAL.toggle(\""+a+"\");' accesskey='e' "+checked+" />",h+="<label for='edit_area_toggle_checkbox_"+a+"'>{$toggle}</label></div>"),eAs[a].settings.debug&&(h+="<textarea id='edit_area_debug_"+a+"' spellcheck='off' style='z-index:20;width:100%;height:120px;overflow:auto;border:solid black 1px;'></textarea><br />"),h=b.translate(h,eAs[a].settings.language),e.innerHTML=h,f=c.getElementById(a).parentNode,g=c.getElementById(a).nextSibling,g==null?f.appendChild(e):f.insertBefore(e,g));if(!eAs[a].initialized){b.execCommand(a,"EA_init");if(eAs[a]["settings"]["display"]=="later"){eAs[a].initialized=!0;return}}b.isIE&&b.init_ie_textarea(a);var m=eAs[a];for(l=0;l<m.settings.tab_toolbar.length;l++)i+=b.get_control_html(m.settings.tab_toolbar[l],m.settings.language);i=b.translate(i,m.settings.language,"template");if(!b.iframe_script){b.iframe_script="";for(l=0;l<b.sub_scripts_to_load.length;l++)b.iframe_script+='<script language="javascript" type="text/javascript" src="'+b.baseURL+b.sub_scripts_to_load[l]+'.js"></script>'}for(l=0;l<m.settings.plugins.length;l++)b.all_plugins_loaded||(b.iframe_script+='<script language="javascript" type="text/javascript" src="'+b.baseURL+"plugins/"+m.settings.plugins[l]+"/"+m.settings.plugins[l]+'.js"></script>'),b.iframe_script+='<script language="javascript" type="text/javascript" src="'+b.baseURL+"plugins/"+m.settings.plugins[l]+"/langs/"+m.settings.language+'.js"></script>';b.iframe_css||(b.iframe_css="<link href='"+b.baseURL+"edit_area.css' rel='stylesheet' type='text/css' />"),j=b.template.replace(/\[__BASEURL__\]/g,b.baseURL),j=j.replace("[__TOOLBAR__]",i),j=b.translate(j,m.settings.language,"template"),j=j.replace("[__CSSRULES__]",b.iframe_css),j=j.replace("[__JSCODE__]",b.iframe_script),j=j.replace("[__EA_VERSION__]",b.version),m.textarea=c.getElementById(m.settings.id),eAs[m.settings.id].textarea=m.textarea,typeof window.frames["frame_"+m["settings"]["id"]]!="undefined"&&delete window.frames["frame_"+m.settings.id],f=m.textarea.parentNode,k=c.createElement("iframe"),k.name="frame_"+m.settings.id,k.id="frame_"+m.settings.id,k.style.borderWidth="0px",setAttribute(k,"frameBorder","0"),k.style.overflow="hidden",k.style.display="none",g=m.textarea.nextSibling,g==null?f.appendChild(k):f.insertBefore(k,g),d=window.frames["frame_"+m.settings.id],d.document.open(),d.eAs=eAs,d.area_id=m.settings.id,d.document.area_id=m.settings.id,d.document.write(j),d.document.close()},toggle:function(a,b){return b||(b=eAs[a]["displayed"]==1?"off":"on"),eAs[a]["displayed"]==1&&b=="off"?this.toggle_off(a):eAs[a]["displayed"]==0&&b=="on"&&this.toggle_on(a),!1},toggle_off:function(a){var b=window.frames,c,d,e,f,g,h,i,j;if(b["frame_"+a]){c=b["frame_"+a],d=eAs[a].textarea,c.editArea.fullscreen.isFull&&c.editArea.toggle_full_screen(!1),eAs[a].displayed=!1,d.wrap="off",setAttribute(d,"wrap","off"),e=d.parentNode,f=d.nextSibling,e.removeChild(d),e.insertBefore(d,f),d.value=c.editArea.textarea.value,g=c.editArea.last_selection.selectionStart,h=c.editArea.last_selection.selectionEnd,i=c.document.getElementById("result").scrollTop,j=c.document.getElementById("result").scrollLeft,document.getElementById("frame_"+a).style.display="none",d.style.display="inline";try{d.focus()}catch(k){}if(this.isIE)d.selectionStart=g,d.selectionEnd=h,d.focused=!0,set_IE_selection(d);else{this.isOpera&&this.isOpera<9.6&&d.setSelectionRange(0,0);try{d.setSelectionRange(g,h)}catch(k){}}d.scrollTop=i,d.scrollLeft=j,c.editArea.execCommand("toggle_off")}},toggle_on:function(a){var b=window.frames,c,d,e=0,f=0,g=0,h=0,i,j;if(b["frame_"+a]){c=b["frame_"+a],d=eAs[a].textarea,area=c.editArea,area.textarea.value=d.value,i=eAs[a].settings.cursor_position;if(d.use_last==1)e=d.last_selectionStart,f=d.last_selectionEnd,g=d.last_scrollTop,h=d.last_scrollLeft,d.use_last=!1;else if(i=="auto")try{e=d.selectionStart,f=d.selectionEnd,g=d.scrollTop,h=d.scrollLeft}catch(k){}this.set_editarea_size_from_textarea(a,document.getElementById("frame_"+a)),d.style.display="none",document.getElementById("frame_"+a).style.display="inline",area.execCommand("focus"),eAs[a].displayed=!0,area.execCommand("update_size"),c.document.getElementById("result").scrollTop=g,c.document.getElementById("result").scrollLeft=h,area.area_select(e,f-e),area.execCommand("toggle_on")}else j=document.getElementById(a),j.last_selectionStart=j.selectionStart,j.last_selectionEnd=j.selectionEnd,j.last_scrollTop=j.scrollTop,j.last_scrollLeft=j.scrollLeft,j.use_last=!0,eAL.start(a)},set_editarea_size_from_textarea:function(a,b){var c,d,e;c=document.getElementById(a),d=Math.max(eAs[a].settings.min_width,c.offsetWidth)+"px",e=Math.max(eAs[a].settings.min_height,c.offsetHeight)+"px",c.style.width.indexOf("%")!=-1&&(d=c.style.width),c.style.height.indexOf("%")!=-1&&(e=c.style.height),b.style.width=d,b.style.height=e},set_base_url:function(){var a=this,b,c,d;if(!this.baseURL){b=document.getElementsByTagName("script");for(c=0;c<b.length;c++)if(b[c].src&&b[c].src.match(/edit_area_[^\\\/]*$/i)){var e=unescape(b[c].src);e=e.substring(0,e.lastIndexOf("/")),this.baseURL=e,this.file_name=b[c].src.substr(b[c].src.lastIndexOf("/")+1);break}}d=document.location.href,d.indexOf("?")!=-1&&(d=d.substring(0,d.indexOf("?"))),d=d.substring(0,d.lastIndexOf("/")),a.baseURL.indexOf("://")==-1&&a.baseURL.charAt(0)!="/"&&(a.baseURL=d+"/"+a.baseURL),a.baseURL+="/"},get_button_html:function(a,b,c,d,e){var f,g;return e||(e=this.baseURL),f="editArea.execCommand('"+c+"')",g='<a id="a_'+a+'" href="javascript:'+f+'" onclick="'+f+';return false;" onmousedown="return false;" target="_self" fileSpecific="'+(d?"yes":"no")+'">',g+='<img id="'+a+'" src="'+e+"images/"+b+'" title="{$'+a+'}" width="20" height="20" class="editAreaButtonNormal" onmouseover="editArea.switchClass(this,\'editAreaButtonOver\');" onmouseout="editArea.restoreClass(this);" onmousedown="editArea.restoreAndSwitchClass(this,\'editAreaButtonDown\');" /></a>',g},get_control_html:function(a,b){var c=this,d,e,f,g;for(d=0;d<c.advanced_buttons.length;d++){e=c.advanced_buttons[d];if(e[0]==a)return c.get_button_html(e[0],e[1],e[2],e[3])}switch(a){case"*":case"return":return"<br />";case"|":case"separator":return'<img src="'+c.baseURL+'images/spacer.gif" width="1" height="15" class="editAreaSeparatorLine">';case"select_font":f="<select id='area_font_size' onchange='javascript:editArea.execCommand(\"change_font_size\")' fileSpecific='yes'>",f+="<option value='-1'>{$font_size}</option>",g=[8,9,10,11,12,14];for(d=0;d<g.length;d++)f+="<option value='"+g[d]+"'>"+g[d]+" pt</option>";return f+="</select>",f;case"syntax_selection":return f="<select id='syntax_selection' onchange='javascript:editArea.execCommand(\"change_syntax\",this.value)' fileSpecific='yes'>",f+="<option value='-1'>{$syntax_selection}</option>",f+="</select>",f}return"<span id='tmp_tool_"+a+"'>["+a+"]</span>"},get_template:function(){if(this.template==""){var a=null;if(window.XMLHttpRequest)a=new XMLHttpRequest;else if(window.ActiveXObject)a=new ActiveXObject("Microsoft.XMLHTTP");else{alert("XMLHTTPRequest not supported. EditArea not loaded");return}a.open("GET",this.baseURL+"template.html",!1),a.send(null),a.readyState==4?this.template=a.responseText:this.has_error()}},translate:function(a,b,c){if(c=="word")a=eAL.get_word_translation(a,b);else if(c="template")eAL.current_language=b,a=a.replace(/\{\$([^\}]+)\}/gm,eAL.translate_template);return a},translate_template:function(){return eAL.get_word_translation(EAL.prototype.translate_template.arguments[1],eAL.current_language)},get_word_translation:function(a,b){var c;for(c in eAL.lang[b])if(c==a)return eAL.lang[b][c];return"_"+a},load_script:function(a){var b=this,c=document,d,e;if(b.loadedFiles[a])return;try{d=c.createElement("script"),d.type="text/javascript",d.src=a,d.charset="UTF-8",c.getElementsByTagName("head")[0].appendChild(d)}catch(f){c.write('<script language="javascript" type="text/javascript" src="'+a+'" charset="UTF-8"></sc'+"ript>")}b.loadedFiles[a]=!0},add_event:function(a,b,c){try{a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener(b,c,!1)}catch(d){}},remove_event:function(a,b,c){try{a.detachEvent?a.detachEvent("on"+b,c):a.removeEventListener(b,c,!1)}catch(d){}},reset:function(a){var b,c,d,e;b=eAL.isIE?window.event.srcElement:a.target,b.tagName!="FORM"&&(b=b.form);for(d in eAs){c=!1;for(e=0;e<b.elements.length;e++)b.elements[e].id==d&&(c=!0);if(window.frames["frame_"+d]&&c&&eAs[d]["displayed"]==1){var f='window.frames["frame_'+d+'"].editArea.textarea.value=document.getElementById("'+d+'").value;';f+='window.frames["frame_'+d+'"].editArea.execCommand("focus");',f+='window.frames["frame_'+d+'"].editArea.check_line_selection();',f+='window.frames["frame_'+d+'"].editArea.execCommand("reset");',window.setTimeout(f,10)}}return},submit:function(a){var b,c,d=window.frames,e,f;b=eAL.isIE?window.event.srcElement:a.target,b.tagName!="FORM"&&(b=b.form);for(e in eAs){c=!1;for(f=0;f<b.elements.length;f++)b.elements[f].id==e&&(c=!0);c&&(d["frame_"+e]&&eAs[e]["displayed"]==1&&(document.getElementById(e).value=d["frame_"+e].editArea.textarea.value),eAL.execCommand(e,"EA_submit"))}if(typeof b.edit_area_replaced_submit=="function"){res=b.edit_area_replaced_submit();if(res==0){if(eAL.isIE)return!1;a.preventDefault()}}return},getValue:function(a){return window.frames["frame_"+a]&&eAs[a]["displayed"]==1?window.frames["frame_"+a].editArea.textarea.value:(elem=document.getElementById(a))?elem.value:!1},setValue:function(a,b){var c=window.frames;if((f=c["frame_"+a])&&eAs[a]["displayed"]==1)f.editArea.textarea.value=b,f.editArea.execCommand("focus"),f.editArea.check_line_selection(!1),f.editArea.execCommand("onchange");else if(elem=document.getElementById(a))elem.value=b},getSelectionRange:function(a){var b,c,d=window.frames;b={start:0,end:0};if(d["frame_"+a]&&eAs[a]["displayed"]==1)c=d["frame_"+a].editArea,b.start=c.textarea.selectionStart,b.end=c.textarea.selectionEnd;else if(elem=document.getElementById(a))b=getSelectionRange(elem);return b},setSelectionRange:function(a,b,c){var d=window.frames;d["frame_"+a]&&eAs[a]["displayed"]==1?(d["frame_"+a].editArea.area_select(b,c-b),this.isIE||(d["frame_"+a].editArea.check_line_selection(!1),d["frame_"+a].editArea.scroll_to_view())):(elem=document.getElementById(a))&&setSelectionRange(elem,b,c)},getSelectedText:function(a){var b=this.getSelectionRange(a);return this.getValue(a).substring(b.start,b.end)},setSelectedText:function(a,b){var c=window.frames,d=document,e,f,g,h,i;b=b.replace(/\r/g,""),e=this.getSelectionRange(a),f=this.getValue(a),c["frame_"+a]&&eAs[a]["displayed"]==1?(g=c["frame_"+a].document.getElementById("result").scrollTop,h=c["frame_"+a].document.getElementById("result").scrollLeft):(g=d.getElementById(a).scrollTop,h=d.getElementById(a).scrollLeft),f=f.substring(0,e.start)+b+f.substring(e.end),this.setValue(a,f),i=e.start+b.length,this.setSelectionRange(a,e.start,i),b!=this.getSelectedText(a).replace(/\r/g,"")&&this.setSelectionRange(a,e.start,i+b.split("\n").length-1),c["frame_"+a]&&eAs[a]["displayed"]==1?(c["frame_"+a].document.getElementById("result").scrollTop=g,c["frame_"+a].document.getElementById("result").scrollLeft=h,c["frame_"+a].editArea.execCommand("onchange")):(d.getElementById(a).scrollTop=g,d.getElementById(a).scrollLeft=h)},insertTags:function(a,b,c){var d,e;d=this.getSelectionRange(a),text=b+this.getSelectedText(a)+c,eAL.setSelectedText(a,text),e=this.getSelectionRange(a),d.end>d.start?this.setSelectionRange(a,e.end,e.end):this.setSelectionRange(a,d.start+b.length,d.start+b.length)},hide:function(a){var b=window.frames,c=document,d=this,e,f,g;c.getElementById(a)&&!d.hidden[a]&&(d.hidden[a]={},d.hidden[a].selectionRange=d.getSelectionRange(a),c.getElementById(a).style.display!="none"&&(d.hidden[a].scrollTop=c.getElementById(a).scrollTop,d.hidden[a].scrollLeft=c.getElementById(a).scrollLeft),b["frame_"+a]&&(d.hidden[a].toggle=eAs[a].displayed,b["frame_"+a]&&eAs[a]["displayed"]==1?(e=b["frame_"+a].document.getElementById("result").scrollTop,f=b["frame_"+a].document.getElementById("result").scrollLeft):(e=c.getElementById(a).scrollTop,f=c.getElementById(a).scrollLeft),d.hidden[a].scrollTop=e,d.hidden[a].scrollLeft=f,eAs[a]["displayed"]==1&&eAL.toggle_off(a)),g=c.getElementById("EditAreaArroundInfos_"+a),g&&(g.style.display="none"),c.getElementById(a).style.display="none")},show:function(a){var b=window.frames,c=document,d=this,e;(elem=c.getElementById(a))&&d.hidden[a]&&(elem.style.display="inline",elem.scrollTop=d.hidden[a].scrollTop,elem.scrollLeft=d.hidden[a].scrollLeft,e=c.getElementById("EditAreaArroundInfos_"+a),e&&(e.style.display="inline"),b["frame_"+a]&&(elem.style.display="inline",d.hidden[a]["toggle"]==1&&eAL.toggle_on(a),scrollTop=d.hidden[a].scrollTop,scrollLeft=d.hidden[a].scrollLeft,b["frame_"+a]&&eAs[a]["displayed"]==1?(b["frame_"+a].document.getElementById("result").scrollTop=scrollTop,b["frame_"+a].document.getElementById("result").scrollLeft=scrollLeft):(elem.scrollTop=scrollTop,elem.scrollLeft=scrollLeft)),sel=d.hidden[a].selectionRange,d.setSelectionRange(a,sel.start,sel.end),delete d.hidden[a])},getCurrentFile:function(a){return this.execCommand(a,"get_file",this.execCommand(a,"curr_file"))},getFile:function(a,b){return this.execCommand(a,"get_file",b)},getAllFiles:function(a){return this.execCommand(a,"get_all_files()")},openFile:function(a,b){return this.execCommand(a,"open_file",b)},closeFile:function(a,b){return this.execCommand(a,"close_file",b)},setFileEditedMode:function(a,b,c){var d,e;return d=new RegExp("\\\\","g"),e=new RegExp('"',"g"),this.execCommand(a,'set_file_edited_mode("'+b.replace(d,"\\\\").replace(e,'\\"')+'",'+c+")")},execCommand:function(id,cmd,fct_param){switch(cmd){case"EA_init":eAs[id].settings.EA_init_callback.length>0&&eval(eAs[id].settings.EA_init_callback+"('"+id+"');");break;case"EA_delete":eAs[id].settings.EA_delete_callback.length>0&&eval(eAs[id].settings.EA_delete_callback+"('"+id+"');");break;case"EA_submit":eAs[id].settings.submit_callback.length>0&&eval(eAs[id].settings.submit_callback+"('"+id+"');")}return window.frames["frame_"+id]&&window.frames["frame_"+id].editArea?fct_param!=undefined?eval('window.frames["frame_'+id+'"].editArea.'+cmd+"(fct_param);"):eval('window.frames["frame_'+id+'"].editArea.'+cmd+";"):!1}};var eAL=new EAL,eAs={},_mCE,nav=eAL.nav;eAL.waiting_loading["elements_functions.js"]="loaded",EAL.prototype.start_resize_area=function(){var a=document,b,c,d,e,f;a.onmouseup=eAL.end_resize_area,a.onmousemove=eAL.resize_area,eAL.toggle(eAL.resize.id),b=eAs[eAL.resize.id].textarea,c=a.getElementById("edit_area_resize"),c||(c=a.createElement("div"),c.id="edit_area_resize",c.style.border="dashed #888888 1px"),d=b.offsetWidth-2,e=b.offsetHeight-2,c.style.display="block",c.style.width=d+"px",c.style.height=e+"px",f=b.parentNode,f.insertBefore(c,b),b.style.display="none",eAL.resize.start_top=calculeOffsetTop(c),eAL.resize.start_left=calculeOffsetLeft(c)},EAL.prototype.end_resize_area=function(a){var b=document,c,d,e,f;return b.onmouseup="",b.onmousemove="",c=b.getElementById("edit_area_resize"),d=eAs[eAL.resize.id].textarea,e=Math.max(eAs[eAL.resize.id].settings.min_width,c.offsetWidth-4),f=Math.max(eAs[eAL.resize.id].settings.min_height,c.offsetHeight-4),eAL.isIE==6&&(e-=2,f-=2),d.style.width=e+"px",d.style.height=f+"px",c.style.display="none",d.style.display="inline",d.selectionStart=eAL.resize.selectionStart,d.selectionEnd=eAL.resize.selectionEnd,eAL.toggle(eAL.resize.id),!1},EAL.prototype.resize_area=function(a){var b,c,d;b=eAs[eAL.resize.id].settings.allow_resize;if(b=="both"||b=="y")c=Math.max(20,getMouseY(a)-eAL.resize.start_top),document.getElementById("edit_area_resize").style.height=c+"px";if(b=="both"||b=="x")d=Math.max(20,getMouseX(a)-eAL.resize.start_left),document.getElementById("edit_area_resize").style.width=d+"px";return!1},eAL.waiting_loading["resize_area.js"]="loaded",EAL.prototype.get_regexp=function(a){res="(\\b)(";for(i=0;i<a.length;i++)i>0&&(res+="|"),res+=this.get_escaped_regexp(a[i]);return res+=")(\\b)",reg=new RegExp(res),res},EAL.prototype.get_escaped_regexp=function(a){return a.toString().replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\}|\{|\$|\^|\|)/g,"\\$1")},EAL.prototype.init_syntax_regexp=function(){var a={};for(var b in this.load_syntax)if(!this.syntax[b]){this.syntax[b]={},this.syntax[b].keywords_reg_exp={},this.keywords_reg_exp_nb=0;if(this.load_syntax[b].KEYWORDS){param="g",this.load_syntax[b].KEYWORD_CASE_SENSITIVE===!1&&(param+="i");for(var c in this.load_syntax[b].KEYWORDS){if(typeof this.load_syntax[b]["KEYWORDS"][c]=="function")continue;this.syntax[b].keywords_reg_exp[c]=new RegExp(this.get_regexp(this.load_syntax[b].KEYWORDS[c]),param),this.keywords_reg_exp_nb++}}if(this.load_syntax[b].OPERATORS){var d="",e=0;for(var c in this.load_syntax[b].OPERATORS){if(typeof this.load_syntax[b]["OPERATORS"][c]=="function")continue;e>0&&(d+="|"),d+=this.get_escaped_regexp(this.load_syntax[b].OPERATORS[c]),e++}d.length>0&&(this.syntax[b].operators_reg_exp=new RegExp("("+d+")","g"))}if(this.load_syntax[b].DELIMITERS){var d="",e=0;for(var c in this.load_syntax[b].DELIMITERS){if(typeof this.load_syntax[b]["DELIMITERS"][c]=="function")continue;e>0&&(d+="|"),d+=this.get_escaped_regexp(this.load_syntax[b].DELIMITERS[c]),e++}d.length>0&&(this.syntax[b].delimiters_reg_exp=new RegExp("("+d+")","g"))}var f=[];this.syntax[b].quotes={};var g=[];if(this.load_syntax[b].QUOTEMARKS)for(var c in this.load_syntax[b].QUOTEMARKS){if(typeof this.load_syntax[b]["QUOTEMARKS"][c]=="function")continue;var h=this.get_escaped_regexp(this.load_syntax[b].QUOTEMARKS[c]);this.syntax[b].quotes[h]=h,g[g.length]="("+h+"(\\\\.|[^"+h+"])*(?:"+h+"|$))",f.push(h)}this.syntax[b].comments={};if(this.load_syntax[b].COMMENT_SINGLE)for(var c in this.load_syntax[b].COMMENT_SINGLE){if(typeof this.load_syntax[b]["COMMENT_SINGLE"][c]=="function")continue;var h=this.get_escaped_regexp(this.load_syntax[b].COMMENT_SINGLE[c]);g[g.length]="("+h+"(.|\\r|\\t)*(\\n|$))",f.push(h),this.syntax[b].comments[h]="\n"}if(this.load_syntax[b].COMMENT_MULTI)for(var c in this.load_syntax[b].COMMENT_MULTI){if(typeof this.load_syntax[b]["COMMENT_MULTI"][c]=="function")continue;var i=this.get_escaped_regexp(c),j=this.get_escaped_regexp(this.load_syntax[b].COMMENT_MULTI[c]);g[g.length]="("+i+"(.|\\n|\\r)*?("+j+"|$))",f.push(i),f.push(j),this.syntax[b].comments[c]=this.load_syntax[b].COMMENT_MULTI[c]}g.length>0&&(this.syntax[b].comment_or_quote_reg_exp=new RegExp("("+g.join("|")+")","gi")),f.length>0&&(this.syntax[b].syntax_trace_regexp=new RegExp("((.|\n)*?)(\\\\*("+f.join("|")+"|$))","gmi"));if(this.load_syntax[b].SCRIPT_DELIMITERS){this.syntax[b].script_delimiters={};for(var c in this.load_syntax[b].SCRIPT_DELIMITERS){if(typeof this.load_syntax[b]["SCRIPT_DELIMITERS"][c]=="function")continue;this.syntax[b].script_delimiters[c]=this.load_syntax[b].SCRIPT_DELIMITERS}}this.syntax[b].custom_regexp={};if(this.load_syntax[b].REGEXPS)for(var c in this.load_syntax[b].REGEXPS){if(typeof this.load_syntax[b]["REGEXPS"][c]=="function")continue;var k=this.load_syntax[b].REGEXPS[c];this.syntax[b].custom_regexp[k.execute]||(this.syntax[b].custom_regexp[k.execute]={}),this.syntax[b].custom_regexp[k.execute][c]={regexp:new RegExp(k.search,k.modifiers),"class":k["class"]}}if(this.load_syntax[b].STYLES){a[b]={};for(var c in this.load_syntax[b].STYLES){if(typeof this.load_syntax[b]["STYLES"][c]=="function")continue;if(typeof this.load_syntax[b]["STYLES"][c]!="string")for(var l in this.load_syntax[b].STYLES[c])a[b][l]=this.load_syntax[b].STYLES[c][l];else a[b][c]=this.load_syntax[b].STYLES[c]}}var m="";for(var c in a[b])a[b][c].length>0&&(m+="."+b+" ."+c.toLowerCase()+" span{"+a[b][c]+"}\n",m+="."+b+" ."+c.toLowerCase()+"{"+a[b][c]+"}\n");this.syntax[b].styles=m}},eAL.waiting_loading["reg_syntax.js"]="loaded";var editAreaLoader=eAL,editAreas=eAs;EditAreaLoader=EAL,editAreaLoader.iframe_script='<script type=\'text/javascript\'> Ã EA(){var t=Á;t.error=Ì;t.inlinePopup=[{popup_id:"area_search_replace",icon_id:"search"},{popup_id:"edit_area_help",icon_id:"help"}];t.plugins={};t.line_number=0;È.eAL.set_browser_infos(t);if(t.isIE >=8)t.isIE=7;t.É={};t.last_text_to_highlight="";t.last_hightlighted_text="";t.syntax_list=[];t.allready_used_syntax={};t.check_line_selection_timer=50;t.ÂFocused=Ì;t.highlight_selection_line=null;t.previous=[];t.next=[];t.last_undo="";t.files={};t.filesIdAssoc={};t.curr_file=\'\';t.assocBracket={};t.revertAssocBracket={};t.assocBracket["("]=")";t.assocBracket["{"]="}";t.assocBracket["["]="]";for(var index in t.assocBracket){t.revertAssocBracket[t.assocBracket[index]]=index;}t.is_editable=Ë;t.lineHeight=16;t.tab_nb_char=8;if(t.isOpera)t.tab_nb_char=6;t.is_tabbing=Ì;t.fullscreen={\'isFull\':Ì};t.isResizing=Ì;t.id=area_id;t.Å=eAs[t.id]["Å"];if((""+t.Å[\'replace_tab_by_spaces\']).match(/^[0-9]+$/)){t.tab_nb_char=t.Å[\'replace_tab_by_spaces\'];t.tabulation="";for(var i=0;i<t.tab_nb_char;i++)t.tabulation+=" ";}\nelse{t.tabulation="\t";}if(t.Å["syntax_selection_allow"]&&t.Å["syntax_selection_allow"].Æ>0)t.syntax_list=t.Å["syntax_selection_allow"].replace(/ /g,"").split(",");if(t.Å[\'syntax\'])t.allready_used_syntax[t.Å[\'syntax\']]=Ë;};EA.Ä.init=Ã(){var t=Á,a,s=t.Å;t.Â=_$("Â");t.container=_$("container");t.result=_$("result");t.content_highlight=_$("content_highlight");t.selection_field=_$("selection_field");t.selection_field_text=_$("selection_field_text");t.processing_screen=_$("processing");t.editor_area=_$("editor");t.tab_browsing_area=_$("tab_browsing_area");t.test_font_size=_$("test_font_size");a=t.Â;if(!s[\'is_editable\'])t.set_editable(Ì);t.set_show_line_colors(s[\'show_line_colors\']);if(syntax_selec=_$("syntax_selection")){for(var i=0;i<t.syntax_list.Æ;i++){var syntax=t.syntax_list[i];var option=document.createElement("option");option.Ê=syntax;if(syntax==s[\'syntax\'])option.selected="selected";dispSyntax=È.eAL.syntax_display_name[ syntax ];option.innerHTML=typeof(dispSyntax)==\'undefined\' ? syntax.substring(0,1).toUpperCase()+syntax.substring(1):dispSyntax;syntax_selec.appendChild(option);}}spans=È.getChildren(_$("toolbar_1"),"span","","","all",-1);for(var i=0;i<spans.Æ;i++){id=spans[i].id.replace(/tmp_tool_(.*)/,"$1");if(id!=spans[i].id){for(var j in t.plugins){if(typeof(t.plugins[j].get_control_html)=="Ã"){html=t.plugins[j].get_control_html(id);if(html!=Ì){html=t.get_translation(html,"template");var new_span=document.createElement("span");new_span.innerHTML=html;var father=spans[i].ÈNode;spans[i].ÈNode.replaceChild(new_span,spans[i]);break;}}}}}if(s["debug"]){t.debug=È.document.getElementById("edit_area_debug_"+t.id);}if(_$("redo")!=null)t.switchClassSticky(_$("redo"),\'editAreaButtonDisabled\',Ë);if(typeof(È.eAL.syntax[s["syntax"]])!="undefined"){for(var i in È.eAL.syntax){if(typeof(È.eAL.syntax[i]["Çs"])!="undefined"){t.add_Ç(È.eAL.syntax[i]["Çs"]);}}}if(t.isOpera)_$("editor").onkeypress=keyDown;\nelse _$("editor").onkeydown=keyDown;for(var i=0;i<t.inlinePopup.Æ;i++){if(t.isOpera)_$(t.inlinePopup[i]["popup_id"]).onkeypress=keyDown;\nelse _$(t.inlinePopup[i]["popup_id"]).onkeydown=keyDown;}if(s["allow_resize"]=="both"||s["allow_resize"]=="x"||s["allow_resize"]=="y")t.allow_resize(Ë);È.eAL.toggle(t.id,"on");t.change_smooth_selection_mode(eA.smooth_selection);t.execCommand("change_highlight",s["start_highlight"]);t.set_font(eA.Å["font_family"],eA.Å["font_size"]);children=È.getChildren(document.body,"","selec","none","all",-1);for(var i=0;i<children.Æ;i++){if(t.isIE)children[i].unselectable=Ë;\nelse children[i].onmousedown=Ã(){return Ì};}a.spellcheck=s["gecko_spellcheck"];if(t.isFirefox >=\'3\'){t.content_highlight.Ç.paddingLeft="1px";t.selection_field.Ç.paddingLeft="1px";t.selection_field_text.Ç.paddingLeft="1px";}if(t.isIE&&t.isIE < 8){a.Ç.marginTop="-1px";}if(t.isSafari){t.editor_area.Ç.position="absolute";a.Ç.marginLeft="-3px";if(t.isSafari < 3.2)a.Ç.marginTop="1px";}È.eAL.add_event(t.result,"click",Ã(e){if((e.target||e.srcElement)==eA.result){eA.area_select(eA.Â.Ê.Æ,0);}});if(s[\'is_multi_files\']!=Ì)t.open_file({\'id\':t.curr_file,\'text\':\'\'});t.set_word_wrap(s[\'word_wrap\']);setTimeout("eA.focus();eA.manage_size();eA.execCommand(\'EA_load\');",10);t.check_undo();t.check_line_selection(Ë);t.scroll_to_view();for(var i in t.plugins){if(typeof(t.plugins[i].onload)=="Ã")t.plugins[i].onload();}if(s[\'fullscreen\']==Ë)t.toggle_full_screen(Ë);È.eAL.add_event(window,"resize",eA.update_size);È.eAL.add_event(È.window,"resize",eA.update_size);È.eAL.add_event(top.window,"resize",eA.update_size);È.eAL.add_event(window,"unload",Ã(){if(È.eAL){È.eAL.remove_event(È.window,"resize",eA.update_size);È.eAL.remove_event(top.window,"resize",eA.update_size);}if(eAs[eA.id]&&eAs[eA.id]["displayed"]){eA.execCommand("EA_unload");}});};EA.Ä.update_size=Ã(){var d=document,pd=È.document,height,width,popup,maxLeft,maxTop;if(typeof eAs !=\'undefined\'&&eAs[eA.id]&&eAs[eA.id]["displayed"]==Ë){if(eA.fullscreen[\'isFull\']){pd.getElementById("frame_"+eA.id).Ç.width=pd.getElementsByTagName("html")[0].clientWidth+"px";pd.getElementById("frame_"+eA.id).Ç.height=pd.getElementsByTagName("html")[0].clientHeight+"px";}if(eA.tab_browsing_area.Ç.display==\'block\'&&(!eA.isIE||eA.isIE >=8)){eA.tab_browsing_area.Ç.height="0px";eA.tab_browsing_area.Ç.height=(eA.result.offsetTop-eA.tab_browsing_area.offsetTop-1)+"px";}height=d.body.offsetHeight-eA.get_all_toolbar_height()-4;eA.result.Ç.height=height+"px";width=d.body.offsetWidth-2;eA.result.Ç.width=width+"px";for(i=0;i < eA.inlinePopup.Æ;i++){popup=_$(eA.inlinePopup[i]["popup_id"]);maxLeft=d.body.offsetWidth-popup.offsetWidth;maxTop=d.body.offsetHeight-popup.offsetHeight;if(popup.offsetTop > maxTop)popup.Ç.top=maxTop+"px";if(popup.offsetLeft > maxLeft)popup.Ç.left=maxLeft+"px";}eA.manage_size(Ë);eA.fixLinesHeight(eA.Â.Ê,0,-1);}};EA.Ä.manage_size=Ã(onlyOneTime){if(!eAs[Á.id])return Ì;if(eAs[Á.id]["displayed"]==Ë&&Á.ÂFocused){var area_height,resized=Ì;if(!Á.Å[\'word_wrap\']){var area_width=Á.Â.scrollWidth;area_height=Á.Â.scrollHeight;if(Á.isOpera&&Á.isOpera < 9.6){area_width=10000;}if(Á.Â.previous_scrollWidth!=area_width){Á.container.Ç.width=area_width+"px";Á.Â.Ç.width=area_width+"px";Á.content_highlight.Ç.width=area_width+"px";Á.Â.previous_scrollWidth=area_width;resized=Ë;}}if(Á.Å[\'word_wrap\']){newW=Á.Â.offsetWidth;if(Á.isFirefox||Á.isIE)newW-=2;if(Á.isSafari)newW-=6;Á.content_highlight.Ç.width=Á.selection_field_text.Ç.width=Á.selection_field.Ç.width=Á.test_font_size.Ç.width=newW+"px";}if(Á.isOpera||Á.isFirefox||Á.isSafari){area_height=Á.getLinePosTop(Á.É["nb_line"]+1);}\nelse{area_height=Á.Â.scrollHeight;}if(Á.Â.previous_scrollHeight!=area_height){Á.container.Ç.height=(area_height+2)+"px";Á.Â.Ç.height=area_height+"px";Á.content_highlight.Ç.height=area_height+"px";Á.Â.previous_scrollHeight=area_height;resized=Ë;}if(Á.É["nb_line"] >=Á.line_number){var newLines=\'\',destDiv=_$("line_number"),start=Á.line_number,end=Á.É["nb_line"]+100;for(i=start+1;i < end;i++){newLines+=\'<div id="line_\'+i+\'">\'+i+"</div>";Á.line_number++;}destDiv.innerHTML=destDiv.innerHTML+newLines;if(Á.Å[\'word_wrap\']){Á.fixLinesHeight(Á.Â.Ê,start,-1);}}Á.Â.scrollTop="0px";Á.Â.scrollLeft="0px";if(resized==Ë){Á.scroll_to_view();}}if(!onlyOneTime)setTimeout("eA.manage_size();",100);};EA.Ä.execCommand=Ã(cmd,param){for(var i in Á.plugins){if(typeof(Á.plugins[i].execCommand)=="Ã"){if(!Á.plugins[i].execCommand(cmd,param))return;}}switch(cmd){case "save":if(Á.Å["save_callback"].Æ>0)eval("È."+Á.Å["save_callback"]+"(\'"+Á.id+"\',eA.Â.Ê);");break;case "load":if(Á.Å["load_callback"].Æ>0)eval("È."+Á.Å["load_callback"]+"(\'"+Á.id+"\');");break;case "onchange":if(Á.Å["change_callback"].Æ>0)eval("È."+Á.Å["change_callback"]+"(\'"+Á.id+"\');");break;case "EA_load":if(Á.Å["EA_load_callback"].Æ>0)eval("È."+Á.Å["EA_load_callback"]+"(\'"+Á.id+"\');");break;case "EA_unload":if(Á.Å["EA_unload_callback"].Æ>0)eval("È."+Á.Å["EA_unload_callback"]+"(\'"+Á.id+"\');");break;case "toggle_on":if(Á.Å["EA_toggle_on_callback"].Æ>0)eval("È."+Á.Å["EA_toggle_on_callback"]+"(\'"+Á.id+"\');");break;case "toggle_off":if(Á.Å["EA_toggle_off_callback"].Æ>0)eval("È."+Á.Å["EA_toggle_off_callback"]+"(\'"+Á.id+"\');");break;case "re_sync":if(!Á.do_highlight)break;case "file_switch_on":if(Á.Å["EA_file_switch_on_callback"].Æ>0)eval("È."+Á.Å["EA_file_switch_on_callback"]+"(param);");break;case "file_switch_off":if(Á.Å["EA_file_switch_off_callback"].Æ>0)eval("È."+Á.Å["EA_file_switch_off_callback"]+"(param);");break;case "file_close":if(Á.Å["EA_file_close_callback"].Æ>0)return eval("È."+Á.Å["EA_file_close_callback"]+"(param);");break;default:if(typeof(eval("eA."+cmd))=="Ã"){if(Á.Å["debug"])eval("eA."+cmd+"(param);");\nelse try{eval("eA."+cmd+"(param);");}catch(e){};}}};EA.Ä.get_translation=Ã(word,mode){if(mode=="template")return È.eAL.translate(word,Á.Å["language"],mode);\nelse return È.eAL.get_word_translation(word,Á.Å["language"]);};EA.Ä.add_plugin=Ã(plug_name,plug_obj){for(var i=0;i<Á.Å["plugins"].Æ;i++){if(Á.Å["plugins"][i]==plug_name){Á.plugins[plug_name]=plug_obj;plug_obj.baseURL=È.eAL.baseURL+"plugins/"+plug_name+"/";if(typeof(plug_obj.init)=="Ã")plug_obj.init();}}};EA.Ä.load_css=Ã(url){try{link=document.createElement("link");link.type="text/css";link.rel="Çsheet";link.media="all";link.href=url;head=document.getElementsByTagName("head");head[0].appendChild(link);}catch(e){document.write("<link href=\'"+url+"\' rel=\'Çsheet\' type=\'text/css\' />");}};EA.Ä.load_script=Ã(url){try{script=document.createElement("script");script.type="text/javascript";script.src=url;script.charset="UTF-8";head=document.getElementsByTagName("head");head[0].appendChild(script);}catch(e){document.write("<script type=\'text/javascript\' src=\'"+url+"\' charset=\\"UTF-8\\"><"+"/script>");}};EA.Ä.add_lang=Ã(language,Ês){if(!È.eAL.lang[language])È.eAL.lang[language]={};for(var i in Ês)È.eAL.lang[language][i]=Ês[i];};Ã _$(id){return document.getElementById(id);};var eA=new EA();È.eAL.add_event(window,"load",init);Ã init(){setTimeout("eA.init();",10);};\tEA.Ä.focus=Ã(){Á.Â.focus();Á.ÂFocused=Ë;};EA.Ä.check_line_selection=Ã(timer_checkup){var changes,infos,new_top,new_width,i;var t1=t2=t2_1=t3=tLines=tend=new Date().getTime();if(!eAs[Á.id])return Ì;if(!Á.smooth_selection&&!Á.do_highlight){}\nelse if(Á.ÂFocused&&eAs[Á.id]["displayed"]==Ë&&Á.isResizing==Ì){infos=Á.get_selection_infos();changes=Á.checkTextEvolution(typeof(Á.É[\'full_text\'])==\'undefined\' ? \'\':Á.É[\'full_text\'],infos[\'full_text\']);t2=new Date().getTime();if(Á.É["line_start"] !=infos["line_start"]||Á.É["line_nb"] !=infos["line_nb"]||infos["full_text"] !=Á.É["full_text"]||Á.reload_highlight||Á.É["selectionStart"] !=infos["selectionStart"]||Á.É["selectionEnd"] !=infos["selectionEnd"]||!timer_checkup){new_top=Á.getLinePosTop(infos["line_start"]);new_width=Math.max(Á.Â.scrollWidth,Á.container.clientWidth-50);Á.selection_field.Ç.top=Á.selection_field_text.Ç.top=new_top+"px";if(!Á.Å[\'word_wrap\']){Á.selection_field.Ç.width=Á.selection_field_text.Ç.width=Á.test_font_size.Ç.width=new_width+"px";}if(Á.do_highlight==Ë){var curr_text=infos["full_text"].split("\\n");var content="";var start=Math.max(0,infos["line_start"]-1);var end=Math.min(curr_text.Æ,infos["line_start"]+infos["line_nb"]-1);for(i=start;i< end;i++){content+=curr_text[i]+"\\n";}selLength=infos[\'selectionEnd\']-infos[\'selectionStart\'];content=content.substr(0,infos["curr_pos"]-1)+"\\r\\r"+content.substr(infos["curr_pos"]-1,selLength)+"\\r\\r"+content.substr(infos["curr_pos"]-1+selLength);content=\'<span>\'+content.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace("\\r\\r",\'</span><strong>\').replace("\\r\\r",\'</strong><span>\')+\'</span>\';if(Á.isIE||(Á.isOpera&&Á.isOpera < 9.6)){Á.selection_field.innerHTML="<pre>"+content.replace(/^\\r?\\n/,"<br>")+"</pre>";}\nelse{Á.selection_field.innerHTML=content;}Á.selection_field_text.innerHTML=Á.selection_field.innerHTML;t2_1=new Date().getTime();if(Á.reload_highlight||(infos["full_text"] !=Á.last_text_to_highlight&&(Á.É["line_start"]!=infos["line_start"]||Á.show_line_colors||Á.Å[\'word_wrap\']||Á.É["line_nb"]!=infos["line_nb"]||Á.É["nb_line"]!=infos["nb_line"]))){Á.maj_highlight(infos);}}}t3=new Date().getTime();if(Á.Å[\'word_wrap\']&&infos["full_text"] !=Á.É["full_text"]){if(changes.newText.split("\\n").Æ==1&&Á.É[\'nb_line\']&&infos[\'nb_line\']==Á.É[\'nb_line\']){Á.fixLinesHeight(infos[\'full_text\'],changes.lineStart,changes.lineStart);}\nelse{Á.fixLinesHeight(infos[\'full_text\'],changes.lineStart,-1);}}tLines=new Date().getTime();if(infos["line_start"] !=Á.É["line_start"]||infos["curr_pos"] !=Á.É["curr_pos"]||infos["full_text"].Æ!=Á.É["full_text"].Æ||Á.reload_highlight||!timer_checkup){var selec_char=infos["curr_line"].charAt(infos["curr_pos"]-1);var no_real_move=Ë;if(infos["line_nb"]==1&&(Á.assocBracket[selec_char]||Á.revertAssocBracket[selec_char])){no_real_move=Ì;if(Á.findEndBracket(infos,selec_char)===Ë){_$("end_bracket").Ç.visibility="visible";_$("cursor_pos").Ç.visibility="visible";_$("cursor_pos").innerHTML=selec_char;_$("end_bracket").innerHTML=(Á.assocBracket[selec_char]||Á.revertAssocBracket[selec_char]);}\nelse{_$("end_bracket").Ç.visibility="hidden";_$("cursor_pos").Ç.visibility="hidden";}}\nelse{_$("cursor_pos").Ç.visibility="hidden";_$("end_bracket").Ç.visibility="hidden";}Á.displayToCursorPosition("cursor_pos",infos["line_start"],infos["curr_pos"]-1,infos["curr_line"],no_real_move);if(infos["line_nb"]==1&&infos["line_start"]!=Á.É["line_start"])Á.scroll_to_view();}Á.É=infos;}tend=new Date().getTime();if(timer_checkup){setTimeout("eA.check_line_selection(Ë)",Á.check_line_selection_timer);}};EA.Ä.get_selection_infos=Ã(){var sel={},start,end,len,str;Á.getIESelection();start=Á.Â.selectionStart;end=Á.Â.selectionEnd;if(Á.É["selectionStart"]==start&&Á.É["selectionEnd"]==end&&Á.É["full_text"]==Á.Â.Ê){return Á.É;}if(Á.tabulation!="\t"&&Á.Â.Ê.indexOf("\t")!=-1){len=Á.Â.Ê.Æ;Á.Â.Ê=Á.replace_tab(Á.Â.Ê);start=end=start+(Á.Â.Ê.Æ-len);Á.area_select(start,0);}sel["selectionStart"]=start;sel["selectionEnd"]=end;sel["full_text"]=Á.Â.Ê;sel["line_start"]=1;sel["line_nb"]=1;sel["curr_pos"]=0;sel["curr_line"]="";sel["indexOfCursor"]=0;sel["selec_direction"]=Á.É["selec_direction"];var splitTab=sel["full_text"].split("\\n");var nbLine=Math.max(0,splitTab.Æ);var nbChar=Math.max(0,sel["full_text"].Æ-(nbLine-1));if(sel["full_text"].indexOf("\\r")!=-1)nbChar=nbChar-(nbLine-1);sel["nb_line"]=nbLine;sel["nb_char"]=nbChar;if(start>0){str=sel["full_text"].substr(0,start);sel["curr_pos"]=start-str.lastIndexOf("\\n");sel["line_start"]=Math.max(1,str.split("\\n").Æ);}\nelse{sel["curr_pos"]=1;}if(end>start){sel["line_nb"]=sel["full_text"].substring(start,end).split("\\n").Æ;}sel["indexOfCursor"]=start;sel["curr_line"]=splitTab[Math.max(0,sel["line_start"]-1)];if(sel["selectionStart"]==Á.É["selectionStart"]){if(sel["selectionEnd"]>Á.É["selectionEnd"])sel["selec_direction"]="down";\nelse if(sel["selectionEnd"]==Á.É["selectionStart"])sel["selec_direction"]=Á.É["selec_direction"];}\nelse if(sel["selectionStart"]==Á.É["selectionEnd"]&&sel["selectionEnd"]>Á.É["selectionEnd"]){sel["selec_direction"]="down";}\nelse{sel["selec_direction"]="up";}_$("nbLine").innerHTML=nbLine;_$("nbChar").innerHTML=nbChar;_$("linePos").innerHTML=sel["line_start"];_$("currPos").innerHTML=sel["curr_pos"];return sel;};EA.Ä.getIESelection=Ã(){var selectionStart,selectionEnd,range,stored_range;if(!Á.isIE)return Ì;if(Á.Å[\'word_wrap\'])Á.Â.wrap=\'off\';try{range=document.selection.createRange();stored_range=range.duplicate();stored_range.moveToElementText(Á.Â);stored_range.setEndPoint(\'EndToEnd\',range);if(stored_range.ÈElement()!=Á.Â)throw "invalid focus";var scrollTop=Á.result.scrollTop+document.body.scrollTop;var relative_top=range.offsetTop-È.calculeOffsetTop(Á.Â)+scrollTop;var line_start=Math.round((relative_top / Á.lineHeight)+1);var line_nb=Math.round(range.boundingHeight / Á.lineHeight);selectionStart=stored_range.text.Æ-range.text.Æ;selectionStart+=(line_start-Á.Â.Ê.substr(0,selectionStart).split("\\n").Æ)*2;selectionStart-=(line_start-Á.Â.Ê.substr(0,selectionStart).split("\\n").Æ)* 2;selectionEnd=selectionStart+range.text.Æ;selectionEnd+=(line_start+line_nb-1-Á.Â.Ê.substr(0,selectionEnd).split("\\n").Æ)*2;Á.Â.selectionStart=selectionStart;Á.Â.selectionEnd=selectionEnd;}catch(e){}if(Á.Å[\'word_wrap\'])Á.Â.wrap=\'soft\';};EA.Ä.setIESelection=Ã(){var a=Á.Â,nbLineStart,nbLineEnd,range;if(!Á.isIE)return Ì;nbLineStart=a.Ê.substr(0,a.selectionStart).split("\\n").Æ-1;nbLineEnd=a.Ê.substr(0,a.selectionEnd).split("\\n").Æ-1;range=document.selection.createRange();range.moveToElementText(a);range.setEndPoint(\'EndToStart\',range);range.moveStart(\'character\',a.selectionStart-nbLineStart);range.moveEnd(\'character\',a.selectionEnd-nbLineEnd-(a.selectionStart-nbLineStart));range.select();};EA.Ä.checkTextEvolution=Ã(lastText,newText){var ch={},baseStep=200,cpt=0,end,step,tStart=new Date().getTime();end=Math.min(newText.Æ,lastText.Æ);step=baseStep;while(cpt<end&&step>=1){if(lastText.substr(cpt,step)==newText.substr(cpt,step)){cpt+=step;}\nelse{step=Math.floor(step/2);}}ch.posStart=cpt;ch.lineStart=newText.substr(0,ch.posStart).split("\\n").Æ-1;cpt_last=lastText.Æ;cpt=newText.Æ;step=baseStep;while(cpt>=0&&cpt_last>=0&&step>=1){if(lastText.substr(cpt_last-step,step)==newText.substr(cpt-step,step)){cpt-=step;cpt_last-=step;}\nelse{step=Math.floor(step/2);}}ch.posNewEnd=cpt;ch.posLastEnd=cpt_last;if(ch.posNewEnd<=ch.posStart){if(lastText.Æ < newText.Æ){ch.posNewEnd=ch.posStart+newText.Æ-lastText.Æ;ch.posLastEnd=ch.posStart;}\nelse{ch.posLastEnd=ch.posStart+lastText.Æ-newText.Æ;ch.posNewEnd=ch.posStart;}}ch.newText=newText.substring(ch.posStart,ch.posNewEnd);ch.lastText=lastText.substring(ch.posStart,ch.posLastEnd);ch.lineNewEnd=newText.substr(0,ch.posNewEnd).split("\\n").Æ-1;ch.lineLastEnd=lastText.substr(0,ch.posLastEnd).split("\\n").Æ-1;ch.newTextLine=newText.split("\\n").slice(ch.lineStart,ch.lineNewEnd+1).join("\\n");ch.lastTextLine=lastText.split("\\n").slice(ch.lineStart,ch.lineLastEnd+1).join("\\n");return ch;};EA.Ä.tab_selection=Ã(){if(Á.is_tabbing)return;Á.is_tabbing=Ë;Á.getIESelection();var start=Á.Â.selectionStart;var end=Á.Â.selectionEnd;var insText=Á.Â.Ê.substring(start,end);var pos_start=start;var pos_end=end;if(insText.Æ==0){Á.Â.Ê=Á.Â.Ê.substr(0,start)+Á.tabulation+Á.Â.Ê.substr(end);pos_start=start+Á.tabulation.Æ;pos_end=pos_start;}\nelse{start=Math.max(0,Á.Â.Ê.substr(0,start).lastIndexOf("\\n")+1);endText=Á.Â.Ê.substr(end);startText=Á.Â.Ê.substr(0,start);tmp=Á.Â.Ê.substring(start,end).split("\\n");insText=Á.tabulation+tmp.join("\\n"+Á.tabulation);Á.Â.Ê=startText+insText+endText;pos_start=start;pos_end=Á.Â.Ê.indexOf("\\n",startText.Æ+insText.Æ);if(pos_end==-1)pos_end=Á.Â.Ê.Æ;}Á.Â.selectionStart=pos_start;Á.Â.selectionEnd=pos_end;if(Á.isIE){Á.setIESelection();setTimeout("eA.is_tabbing=Ì;",100);}\nelse{Á.is_tabbing=Ì;}};EA.Ä.invert_tab_selection=Ã(){var t=Á,a=Á.Â;if(t.is_tabbing)return;t.is_tabbing=Ë;t.getIESelection();var start=a.selectionStart;var end=a.selectionEnd;var insText=a.Ê.substring(start,end);var pos_start=start;var pos_end=end;if(insText.Æ==0){if(a.Ê.substring(start-t.tabulation.Æ,start)==t.tabulation){a.Ê=a.Ê.substr(0,start-t.tabulation.Æ)+a.Ê.substr(end);pos_start=Math.max(0,start-t.tabulation.Æ);pos_end=pos_start;}}\nelse{start=a.Ê.substr(0,start).lastIndexOf("\\n")+1;endText=a.Ê.substr(end);startText=a.Ê.substr(0,start);tmp=a.Ê.substring(start,end).split("\\n");insText="";for(i=0;i<tmp.Æ;i++){for(j=0;j<t.tab_nb_char;j++){if(tmp[i].charAt(0)=="\t"){tmp[i]=tmp[i].substr(1);j=t.tab_nb_char;}\nelse if(tmp[i].charAt(0)==" ")tmp[i]=tmp[i].substr(1);}insText+=tmp[i];if(i<tmp.Æ-1)insText+="\\n";}a.Ê=startText+insText+endText;pos_start=start;pos_end=a.Ê.indexOf("\\n",startText.Æ+insText.Æ);if(pos_end==-1)pos_end=a.Ê.Æ;}a.selectionStart=pos_start;a.selectionEnd=pos_end;if(t.isIE){t.setIESelection();setTimeout("eA.is_tabbing=Ì;",100);}\nelse t.is_tabbing=Ì;};EA.Ä.press_enter=Ã(){if(!Á.smooth_selection)return Ì;Á.getIESelection();var scrollTop=Á.result.scrollTop;var scrollLeft=Á.result.scrollLeft;var start=Á.Â.selectionStart;var end=Á.Â.selectionEnd;var start_last_line=Math.max(0,Á.Â.Ê.substring(0,start).lastIndexOf("\\n")+1);var begin_line=Á.Â.Ê.substring(start_last_line,start).replace(/^([ \t]*).*/gm,"$1");var lineStart=Á.Â.Ê.substring(0,start).split("\\n").Æ;if(begin_line=="\\n"||begin_line=="\\r"||begin_line.Æ==0){return Ì;}if(Á.isIE||(Á.isOpera&&Á.isOpera < 9.6)){begin_line="\\r\\n"+begin_line;}\nelse{begin_line="\\n"+begin_line;}Á.Â.Ê=Á.Â.Ê.substring(0,start)+begin_line+Á.Â.Ê.substring(end);Á.area_select(start+begin_line.Æ,0);if(Á.isIE){Á.result.scrollTop=scrollTop;Á.result.scrollLeft=scrollLeft;}return Ë;};EA.Ä.findEndBracket=Ã(infos,bracket){var start=infos["indexOfCursor"];var normal_order=Ë;if(Á.assocBracket[bracket])endBracket=Á.assocBracket[bracket];\nelse if(Á.revertAssocBracket[bracket]){endBracket=Á.revertAssocBracket[bracket];normal_order=Ì;}var end=-1;var nbBracketOpen=0;for(var i=start;i<infos["full_text"].Æ&&i>=0;){if(infos["full_text"].charAt(i)==endBracket){nbBracketOpen--;if(nbBracketOpen<=0){end=i;break;}}\nelse if(infos["full_text"].charAt(i)==bracket)nbBracketOpen++;if(normal_order)i++;\nelse i--;}if(end==-1)return Ì;var endLastLine=infos["full_text"].substr(0,end).lastIndexOf("\\n");if(endLastLine==-1)line=1;\nelse line=infos["full_text"].substr(0,endLastLine).split("\\n").Æ+1;var curPos=end-endLastLine-1;var endLineLength=infos["full_text"].substring(end).split("\\n")[0].Æ;Á.displayToCursorPosition("end_bracket",line,curPos,infos["full_text"].substring(endLastLine+1,end+endLineLength));return Ë;};EA.Ä.displayToCursorPosition=Ã(id,start_line,cur_pos,lineContent,no_real_move){var elem,dest,content,posLeft=0,posTop,fixPadding,topOffset,endElem;elem=Á.test_font_size;dest=_$(id);content="<span id=\'test_font_size_inner\'>"+lineContent.substr(0,cur_pos).replace(/&/g,"&amp;").replace(/</g,"&lt;")+"</span><span id=\'endTestFont\'>"+lineContent.substr(cur_pos).replace(/&/g,"&amp;").replace(/</g,"&lt;")+"</span>";if(Á.isIE||(Á.isOpera&&Á.isOpera < 9.6)){elem.innerHTML="<pre>"+content.replace(/^\\r?\\n/,"<br>")+"</pre>";}\nelse{elem.innerHTML=content;}endElem=_$(\'endTestFont\');topOffset=endElem.offsetTop;fixPadding=parseInt(Á.content_highlight.Ç.paddingLeft.replace("px",""));posLeft=45+endElem.offsetLeft+(!isNaN(fixPadding)&&topOffset > 0 ? fixPadding:0);posTop=Á.getLinePosTop(start_line)+topOffset;if(Á.isIE&&cur_pos > 0&&endElem.offsetLeft==0){posTop+=Á.lineHeight;}if(no_real_move!=Ë){dest.Ç.top=posTop+"px";dest.Ç.left=posLeft+"px";}dest.cursor_top=posTop;dest.cursor_left=posLeft;};EA.Ä.getLinePosTop=Ã(start_line){var elem=_$(\'line_\'+start_line),posTop=0;if(elem)posTop=elem.offsetTop;\nelse posTop=Á.lineHeight *(start_line-1);return posTop;};EA.Ä.getTextHeight=Ã(text){var t=Á,elem,height;elem=t.test_font_size;content=text.replace(/&/g,"&amp;").replace(/</g,"&lt;");if(t.isIE||(Á.isOpera&&Á.isOpera < 9.6)){elem.innerHTML="<pre>"+content.replace(/^\\r?\\n/,"<br>")+"</pre>";}\nelse{elem.innerHTML=content;}height=elem.offsetHeight;height=Math.max(1,Math.floor(elem.offsetHeight / Á.lineHeight))* Á.lineHeight;return height;};EA.Ä.fixLinesHeight=Ã(textValue,lineStart,lineEnd){var aText=textValue.split("\\n");if(lineEnd==-1)lineEnd=aText.Æ-1;for(var i=Math.max(0,lineStart);i <=lineEnd;i++){if(elem=_$(\'line_\'+(i+1))){elem.Ç.height=typeof(aText[i])!="undefined" ? Á.getTextHeight(aText[i])+"px":Á.lineHeight;}}};EA.Ä.area_select=Ã(start,Æ){Á.Â.focus();start=Math.max(0,Math.min(Á.Â.Ê.Æ,start));end=Math.max(start,Math.min(Á.Â.Ê.Æ,start+Æ));if(Á.isIE){Á.Â.selectionStart=start;Á.Â.selectionEnd=end;Á.setIESelection();}\nelse{if(Á.isOpera&&Á.isOpera < 9.6){Á.Â.setSelectionRange(0,0);}Á.Â.setSelectionRange(start,end);}Á.check_line_selection();};EA.Ä.area_get_selection=Ã(){var text="";if(document.selection){var range=document.selection.createRange();text=range.text;}\nelse{text=Á.Â.Ê.substring(Á.Â.selectionStart,Á.Â.selectionEnd);}return text;}; EA.Ä.replace_tab=Ã(text){return text.replace(/((\\n?)([^\t\\n]*)\t)/gi,eA.smartTab);};EA.Ä.smartTab=Ã(){val="                   ";return EA.Ä.smartTab.arguments[2]+EA.Ä.smartTab.arguments[3]+val.substr(0,eA.tab_nb_char-(EA.Ä.smartTab.arguments[3].Æ)%eA.tab_nb_char);};EA.Ä.show_waiting_screen=Ã(){width=Á.editor_area.offsetWidth;height=Á.editor_area.offsetHeight;if(!(Á.isIE&&Á.isIE<6)){width-=2;height-=2;}Á.processing_screen.Ç.display="block";Á.processing_screen.Ç.width=width+"px";Á.processing_screen.Ç.height=height+"px";Á.waiting_screen_displayed=Ë;};EA.Ä.hide_waiting_screen=Ã(){Á.processing_screen.Ç.display="none";Á.waiting_screen_displayed=Ì;};EA.Ä.add_Ç=Ã(Çs){if(Çs.Æ>0){newcss=document.createElement("Ç");newcss.type="text/css";newcss.media="all";if(newcss.ÇSheet){newcss.ÇSheet.cssText=Çs;}\nelse{newcss.appendChild(document.createTextNode(Çs));}document.getElementsByTagName("head")[0].appendChild(newcss);}};EA.Ä.set_font=Ã(family,size){var t=Á,a=Á.Â,s=Á.Å,elem_font,i,elem;var elems=["Â","content_highlight","cursor_pos","end_bracket","selection_field","selection_field_text","line_number"];if(family&&family!="")s["font_family"]=family;if(size&&size>0)s["font_size"]=size;if(t.isOpera&&t.isOpera < 9.6)s[\'font_family\']="monospace";if(elem_font=_$("area_font_size")){for(i=0;i < elem_font.Æ;i++){if(elem_font.options[i].Ê&&elem_font.options[i].Ê==s["font_size"])elem_font.options[i].selected=Ë;}}if(t.isFirefox){var nbTry=3;do{var div1=document.createElement(\'div\'),text1=document.createElement(\'Â\');var Çs={width:\'40px\',overflow:\'scroll\',zIndex:50,visibility:\'hidden\',fontFamily:s["font_family"],fontSize:s["font_size"]+"pt",lineHeight:t.lineHeight+"px",padding:\'0\',margin:\'0\',border:\'none\',whiteSpace:\'nowrap\'};var diff,changed=Ì;for(i in Çs){div1.Ç[ i ]=Çs[i];text1.Ç[ i ]=Çs[i];}text1.wrap=\'off\';text1.setAttribute(\'wrap\',\'off\');t.container.appendChild(div1);t.container.appendChild(text1);div1.innerHTML=text1.Ê=\'azertyuiopqsdfghjklm\';div1.innerHTML=text1.Ê=text1.Ê+\'wxcvbn^p*ù$!:;,,\';diff=text1.scrollWidth-div1.scrollWidth;if(Math.abs(diff)>=2){s["font_size"]++;changed=Ë;}t.container.removeChild(div1);t.container.removeChild(text1);nbTry--;}while(changed&&nbTry > 0);}elem=t.test_font_size;elem.Ç.fontFamily=""+s["font_family"];elem.Ç.fontSize=s["font_size"]+"pt";elem.innerHTML="0";t.lineHeight=elem.offsetHeight;for(i=0;i<elems.Æ;i++){elem=_$(elems[i]);elem.Ç.fontFamily=s["font_family"];elem.Ç.fontSize=s["font_size"]+"pt";elem.Ç.lineHeight=t.lineHeight+"px";}t.add_Ç("pre{font-family:"+s["font_family"]+"}");if((t.isOpera&&t.isOpera < 9.6)||t.isIE >=8){var parNod=a.ÈNode,nxtSib=a.nextSibling,start=a.selectionStart,end=a.selectionEnd;parNod.removeChild(a);parNod.insertBefore(a,nxtSib);t.area_select(start,end-start);}Á.focus();Á.update_size();Á.check_line_selection();};EA.Ä.change_font_size=Ã(){var size=_$("area_font_size").Ê;if(size>0)Á.set_font("",size);};EA.Ä.open_inline_popup=Ã(popup_id){Á.close_all_inline_popup();var popup=_$(popup_id);var editor=_$("editor");for(var i=0;i<Á.inlinePopup.Æ;i++){if(Á.inlinePopup[i]["popup_id"]==popup_id){var icon=_$(Á.inlinePopup[i]["icon_id"]);if(icon){Á.switchClassSticky(icon,\'editAreaButtonSelected\',Ë);break;}}}popup.Ç.height="auto";popup.Ç.overflow="visible";if(document.body.offsetHeight< popup.offsetHeight){popup.Ç.height=(document.body.offsetHeight-10)+"px";popup.Ç.overflow="auto";}if(!popup.positionned){var new_left=editor.offsetWidth /2-popup.offsetWidth /2;var new_top=editor.offsetHeight /2-popup.offsetHeight /2;popup.Ç.left=new_left+"px";popup.Ç.top=new_top+"px";popup.positionned=Ë;}popup.Ç.visibility="visible";};EA.Ä.close_inline_popup=Ã(popup_id){var popup=_$(popup_id);for(var i=0;i<Á.inlinePopup.Æ;i++){if(Á.inlinePopup[i]["popup_id"]==popup_id){var icon=_$(Á.inlinePopup[i]["icon_id"]);if(icon){Á.switchClassSticky(icon,\'editAreaButtonNormal\',Ì);break;}}}popup.Ç.visibility="hidden";};EA.Ä.close_all_inline_popup=Ã(e){for(var i=0;i<Á.inlinePopup.Æ;i++){Á.close_inline_popup(Á.inlinePopup[i]["popup_id"]);}Á.Â.focus();};EA.Ä.show_help=Ã(){Á.open_inline_popup("edit_area_help");};EA.Ä.new_document=Ã(){Á.Â.Ê="";Á.area_select(0,0);};EA.Ä.get_all_toolbar_height=Ã(){var area=_$("editor");var results=È.getChildren(area,"div","class","area_toolbar","all","0");var height=0;for(var i=0;i<results.Æ;i++){height+=results[i].offsetHeight;}return height;};EA.Ä.go_to_line=Ã(line){if(!line){var icon=_$("go_to_line");if(icon !=null){Á.restoreClass(icon);Á.switchClassSticky(icon,\'editAreaButtonSelected\',Ë);}line=prompt(Á.get_translation("go_to_line_prompt"));if(icon !=null)Á.switchClassSticky(icon,\'editAreaButtonNormal\',Ì);}if(line&&line!=null&&line.search(/^[0-9]+$/)!=-1){var start=0;var lines=Á.Â.Ê.split("\\n");if(line > lines.Æ)start=Á.Â.Ê.Æ;\nelse{for(var i=0;i<Math.min(line-1,lines.Æ);i++)start+=lines[i].Æ+1;}Á.area_select(start,0);}};EA.Ä.change_smooth_selection_mode=Ã(setTo){if(Á.do_highlight)return;if(setTo !=null){if(setTo===Ì)Á.smooth_selection=Ë;\nelse Á.smooth_selection=Ì;}var icon=_$("change_smooth_selection");Á.Â.focus();if(Á.smooth_selection===Ë){Á.switchClassSticky(icon,\'editAreaButtonNormal\',Ì);Á.smooth_selection=Ì;Á.selection_field.Ç.display="none";_$("cursor_pos").Ç.display="none";_$("end_bracket").Ç.display="none";}\nelse{Á.switchClassSticky(icon,\'editAreaButtonSelected\',Ì);Á.smooth_selection=Ë;Á.selection_field.Ç.display="block";_$("cursor_pos").Ç.display="block";_$("end_bracket").Ç.display="block";}};EA.Ä.scroll_to_view=Ã(show){var zone,lineElem;if(!Á.smooth_selection)return;zone=_$("result");var cursor_pos_top=_$("cursor_pos").cursor_top;if(show=="bottom"){cursor_pos_top+=Á.getLinePosTop(Á.É[\'line_start\']+Á.É[\'line_nb\']-1);}var max_height_visible=zone.clientHeight+zone.scrollTop;var miss_top=cursor_pos_top+Á.lineHeight-max_height_visible;if(miss_top>0){zone.scrollTop=zone.scrollTop+miss_top;}\nelse if(zone.scrollTop > cursor_pos_top){zone.scrollTop=cursor_pos_top;}var cursor_pos_left=_$("cursor_pos").cursor_left;var max_width_visible=zone.clientWidth+zone.scrollLeft;var miss_left=cursor_pos_left+10-max_width_visible;if(miss_left>0){zone.scrollLeft=zone.scrollLeft+miss_left+50;}\nelse if(zone.scrollLeft > cursor_pos_left){zone.scrollLeft=cursor_pos_left;}\nelse if(zone.scrollLeft==45){zone.scrollLeft=0;}};EA.Ä.check_undo=Ã(only_once){if(!eAs[Á.id])return Ì;if(Á.ÂFocused&&eAs[Á.id]["displayed"]==Ë){var text=Á.Â.Ê;if(Á.previous.Æ<=1)Á.switchClassSticky(_$("undo"),\'editAreaButtonDisabled\',Ë);if(!Á.previous[Á.previous.Æ-1]||Á.previous[Á.previous.Æ-1]["text"] !=text){Á.previous.push({"text":text,"selStart":Á.Â.selectionStart,"selEnd":Á.Â.selectionEnd});if(Á.previous.Æ > Á.Å["max_undo"]+1)Á.previous.shift();}if(Á.previous.Æ >=2)Á.switchClassSticky(_$("undo"),\'editAreaButtonNormal\',Ì);}if(!only_once)setTimeout("eA.check_undo()",3000);};EA.Ä.undo=Ã(){if(Á.previous.Æ > 0){Á.getIESelection();Á.next.push({"text":Á.Â.Ê,"selStart":Á.Â.selectionStart,"selEnd":Á.Â.selectionEnd});var prev=Á.previous.pop();if(prev["text"]==Á.Â.Ê&&Á.previous.Æ > 0)prev=Á.previous.pop();Á.Â.Ê=prev["text"];Á.last_undo=prev["text"];Á.area_select(prev["selStart"],prev["selEnd"]-prev["selStart"]);Á.switchClassSticky(_$("redo"),\'editAreaButtonNormal\',Ì);Á.resync_highlight(Ë);Á.check_file_changes();}};EA.Ä.redo=Ã(){if(Á.next.Æ > 0){var next=Á.next.pop();Á.previous.push(next);Á.Â.Ê=next["text"];Á.last_undo=next["text"];Á.area_select(next["selStart"],next["selEnd"]-next["selStart"]);Á.switchClassSticky(_$("undo"),\'editAreaButtonNormal\',Ì);Á.resync_highlight(Ë);Á.check_file_changes();}if(Á.next.Æ==0)Á.switchClassSticky(_$("redo"),\'editAreaButtonDisabled\',Ë);};EA.Ä.check_redo=Ã(){if(eA.next.Æ==0||eA.Â.Ê!=eA.last_undo){eA.next=[];eA.switchClassSticky(_$("redo"),\'editAreaButtonDisabled\',Ë);}\nelse{Á.switchClassSticky(_$("redo"),\'editAreaButtonNormal\',Ì);}};EA.Ä.switchClass=Ã(element,class_name,lock_state){var lockChanged=Ì;if(typeof(lock_state)!="undefined"&&element !=null){element.classLock=lock_state;lockChanged=Ë;}if(element !=null&&(lockChanged||!element.classLock)){element.oldClassName=element.className;element.className=class_name;}};EA.Ä.restoreAndSwitchClass=Ã(element,class_name){if(element !=null&&!element.classLock){Á.restoreClass(element);Á.switchClass(element,class_name);}};EA.Ä.restoreClass=Ã(element){if(element !=null&&element.oldClassName&&!element.classLock){element.className=element.oldClassName;element.oldClassName=null;}};EA.Ä.setClassLock=Ã(element,lock_state){if(element !=null)element.classLock=lock_state;};EA.Ä.switchClassSticky=Ã(element,class_name,lock_state){var lockChanged=Ì;if(typeof(lock_state)!="undefined"&&element !=null){element.classLock=lock_state;lockChanged=Ë;}if(element !=null&&(lockChanged||!element.classLock)){element.className=class_name;element.oldClassName=class_name;}};EA.Ä.scroll_page=Ã(params){var dir=params["dir"],shift_pressed=params["shift"];var lines=Á.Â.Ê.split("\\n");var new_pos=0,Æ=0,char_left=0,line_nb=0,curLine=0;var toScrollAmount=_$("result").clientHeight-30;var nbLineToScroll=0,diff=0;if(dir=="up"){nbLineToScroll=Math.ceil(toScrollAmount / Á.lineHeight);for(i=Á.É["line_start"];i-diff > Á.É["line_start"]-nbLineToScroll;i--){if(elem=_$(\'line_\'+i)){diff+=Math.floor((elem.offsetHeight-1)/ Á.lineHeight);}}nbLineToScroll-=diff;if(Á.É["selec_direction"]=="up"){for(line_nb=0;line_nb< Math.min(Á.É["line_start"]-nbLineToScroll,lines.Æ);line_nb++){new_pos+=lines[line_nb].Æ+1;}char_left=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É["curr_pos"]-1);if(shift_pressed)Æ=Á.É["selectionEnd"]-new_pos-char_left;Á.area_select(new_pos+char_left,Æ);view="top";}\nelse{view="bottom";for(line_nb=0;line_nb< Math.min(Á.É["line_start"]+Á.É["line_nb"]-1-nbLineToScroll,lines.Æ);line_nb++){new_pos+=lines[line_nb].Æ+1;}char_left=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É["curr_pos"]-1);if(shift_pressed){start=Math.min(Á.É["selectionStart"],new_pos+char_left);Æ=Math.max(new_pos+char_left,Á.É["selectionStart"])-start;if(new_pos+char_left < Á.É["selectionStart"])view="top";}\nelse start=new_pos+char_left;Á.area_select(start,Æ);}}\nelse{var nbLineToScroll=Math.floor(toScrollAmount / Á.lineHeight);for(i=Á.É["line_start"];i+diff < Á.É["line_start"]+nbLineToScroll;i++){if(elem=_$(\'line_\'+i)){diff+=Math.floor((elem.offsetHeight-1)/ Á.lineHeight);}}nbLineToScroll-=diff;if(Á.É["selec_direction"]=="down"){view="bottom";for(line_nb=0;line_nb< Math.min(Á.É["line_start"]+Á.É["line_nb"]-2+nbLineToScroll,lines.Æ);line_nb++){if(line_nb==Á.É["line_start"]-1)char_left=Á.É["selectionStart"]-new_pos;new_pos+=lines[line_nb].Æ+1;}if(shift_pressed){Æ=Math.abs(Á.É["selectionStart"]-new_pos);Æ+=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É["curr_pos"]);Á.area_select(Math.min(Á.É["selectionStart"],new_pos),Æ);}\nelse{Á.area_select(new_pos+char_left,0);}}\nelse{view="top";for(line_nb=0;line_nb< Math.min(Á.É["line_start"]+nbLineToScroll-1,lines.Æ,lines.Æ);line_nb++){if(line_nb==Á.É["line_start"]-1)char_left=Á.É["selectionStart"]-new_pos;new_pos+=lines[line_nb].Æ+1;}if(shift_pressed){Æ=Math.abs(Á.É["selectionEnd"]-new_pos-char_left);Æ+=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É["curr_pos"])-char_left-1;Á.area_select(Math.min(Á.É["selectionEnd"],new_pos+char_left),Æ);if(new_pos+char_left > Á.É["selectionEnd"])view="bottom";}\nelse{Á.area_select(new_pos+char_left,0);}}}Á.check_line_selection();Á.scroll_to_view(view);};EA.Ä.start_resize=Ã(e){È.eAL.resize["id"]=eA.id;È.eAL.resize["start_x"]=(e)? e.pageX:event.x+document.body.scrollLeft;È.eAL.resize["start_y"]=(e)? e.pageY:event.y+document.body.scrollTop;if(eA.isIE){eA.Â.focus();eA.getIESelection();}È.eAL.resize["selectionStart"]=eA.Â.selectionStart;È.eAL.resize["selectionEnd"]=eA.Â.selectionEnd;È.eAL.start_resize_area();};EA.Ä.toggle_full_screen=Ã(to){var t=Á,p=È,a=t.Â,html,frame,selStart,selEnd,old,icon;if(typeof(to)=="undefined")to=!t.fullscreen[\'isFull\'];old=t.fullscreen[\'isFull\'];t.fullscreen[\'isFull\']=to;icon=_$("fullscreen");selStart=t.Â.selectionStart;selEnd=t.Â.selectionEnd;html=p.document.getElementsByTagName("html")[0];frame=p.document.getElementById("frame_"+t.id);if(to&&to!=old){t.fullscreen[\'old_overflow\']=p.get_css_property(html,"overflow");t.fullscreen[\'old_height\']=p.get_css_property(html,"height");t.fullscreen[\'old_width\']=p.get_css_property(html,"width");t.fullscreen[\'old_scrollTop\']=html.scrollTop;t.fullscreen[\'old_scrollLeft\']=html.scrollLeft;t.fullscreen[\'old_zIndex\']=p.get_css_property(frame,"z-index");if(t.isOpera){html.Ç.height="100%";html.Ç.width="100%";}html.Ç.overflow="hidden";html.scrollTop=0;html.scrollLeft=0;frame.Ç.position="absolute";frame.Ç.width=html.clientWidth+"px";frame.Ç.height=html.clientHeight+"px";frame.Ç.display="block";frame.Ç.zIndex="999999";frame.Ç.top="0px";frame.Ç.left="0px";frame.Ç.top="-"+p.calculeOffsetTop(frame)+"px";frame.Ç.left="-"+p.calculeOffsetLeft(frame)+"px";t.switchClassSticky(icon,\'editAreaButtonSelected\',Ì);t.fullscreen[\'allow_resize\']=t.resize_allowed;t.allow_resize(Ì);if(t.isFirefox){p.eAL.execCommand(t.id,"update_size();");t.area_select(selStart,selEnd-selStart);t.scroll_to_view();t.focus();}\nelse{setTimeout("È.eAL.execCommand(\'"+t.id+"\',\'update_size();\');eA.focus();",10);}}\nelse if(to!=old){frame.Ç.position="static";frame.Ç.zIndex=t.fullscreen[\'old_zIndex\'];if(t.isOpera){html.Ç.height="auto";html.Ç.width="auto";html.Ç.overflow="auto";}\nelse if(t.isIE&&p!=top){html.Ç.overflow="auto";}\nelse{html.Ç.overflow=t.fullscreen[\'old_overflow\'];}html.scrollTop=t.fullscreen[\'old_scrollTop\'];html.scrollLeft=t.fullscreen[\'old_scrollLeft\'];p.eAL.hide(t.id);p.eAL.show(t.id);t.switchClassSticky(icon,\'editAreaButtonNormal\',Ì);if(t.fullscreen[\'allow_resize\'])t.allow_resize(t.fullscreen[\'allow_resize\']);if(t.isFirefox){t.area_select(selStart,selEnd-selStart);setTimeout("eA.scroll_to_view();",10);}}};EA.Ä.allow_resize=Ã(allow){var resize=_$("resize_area");if(allow){resize.Ç.visibility="visible";È.eAL.add_event(resize,"mouseup",eA.start_resize);}\nelse{resize.Ç.visibility="hidden";È.eAL.remove_event(resize,"mouseup",eA.start_resize);}Á.resize_allowed=allow;};EA.Ä.change_syntax=Ã(new_syntax,is_waiting){if(new_syntax==Á.Å[\'syntax\'])return Ë;var founded=Ì;for(var i=0;i<Á.syntax_list.Æ;i++){if(Á.syntax_list[i]==new_syntax)founded=Ë;}if(founded==Ë){if(!È.eAL.load_syntax[new_syntax]){if(!is_waiting)È.eAL.load_script(È.eAL.baseURL+"reg_syntax/"+new_syntax+".js");setTimeout("eA.change_syntax(\'"+new_syntax+"\',Ë);",100);Á.show_waiting_screen();}\nelse{if(!Á.allready_used_syntax[new_syntax]){È.eAL.init_syntax_regexp();Á.add_Ç(È.eAL.syntax[new_syntax]["Çs"]);Á.allready_used_syntax[new_syntax]=Ë;}var sel=_$("syntax_selection");if(sel&&sel.Ê!=new_syntax){for(var i=0;i<sel.Æ;i++){if(sel.options[i].Ê&&sel.options[i].Ê==new_syntax)sel.options[i].selected=Ë;}}Á.Å[\'syntax\']=new_syntax;Á.resync_highlight(Ë);Á.hide_waiting_screen();return Ë;}}return Ì;};EA.Ä.set_editable=Ã(is_editable){if(is_editable){document.body.className="";Á.Â.readOnly=Ì;Á.is_editable=Ë;}\nelse{document.body.className="non_editable";Á.Â.readOnly=Ë;Á.is_editable=Ì;}if(eAs[Á.id]["displayed"]==Ë)Á.update_size();};EA.Ä.toggle_word_wrap=Ã(){Á.set_word_wrap(!Á.Å[\'word_wrap\']);};EA.Ä.set_word_wrap=Ã(to){var t=Á,a=t.Â;if(t.isOpera&&t.isOpera < 9.8){Á.Å[\'word_wrap\']=Ì;t.switchClassSticky(_$("word_wrap"),\'editAreaButtonDisabled\',Ë);return Ì;}if(to){wrap_mode=\'soft\';Á.container.className+=\' word_wrap\';Á.container.Ç.width="";Á.content_highlight.Ç.width="";a.Ç.width="100%";if(t.isIE&&t.isIE < 7){a.Ç.width=(a.offsetWidth-5)+"px";}t.switchClassSticky(_$("word_wrap"),\'editAreaButtonSelected\',Ì);}\nelse{wrap_mode=\'off\';Á.container.className=Á.container.className.replace(/word_wrap/g,\'\');t.switchClassSticky(_$("word_wrap"),\'editAreaButtonNormal\',Ë);}Á.Â.previous_scrollWidth=\'\';Á.Â.previous_scrollHeight=\'\';a.wrap=wrap_mode;a.setAttribute(\'wrap\',wrap_mode);if(!Á.isIE){var start=a.selectionStart,end=a.selectionEnd;var parNod=a.ÈNode,nxtSib=a.nextSibling;parNod.removeChild(a);parNod.insertBefore(a,nxtSib);Á.area_select(start,end-start);}Á.Å[\'word_wrap\']=to;Á.focus();Á.update_size();Á.check_line_selection();};EA.Ä.open_file=Ã(Å){if(Å[\'id\']!="undefined"){var id=Å[\'id\'];var new_file={};new_file[\'id\']=id;new_file[\'title\']=id;new_file[\'text\']="";new_file[\'É\']="";new_file[\'last_text_to_highlight\']="";new_file[\'last_hightlighted_text\']="";new_file[\'previous\']=[];new_file[\'next\']=[];new_file[\'last_undo\']="";new_file[\'smooth_selection\']=Á.Å[\'smooth_selection\'];new_file[\'do_highlight\']=Á.Å[\'start_highlight\'];new_file[\'syntax\']=Á.Å[\'syntax\'];new_file[\'scroll_top\']=0;new_file[\'scroll_left\']=0;new_file[\'selection_start\']=0;new_file[\'selection_end\']=0;new_file[\'edited\']=Ì;new_file[\'font_size\']=Á.Å["font_size"];new_file[\'font_family\']=Á.Å["font_family"];new_file[\'word_wrap\']=Á.Å["word_wrap"];new_file[\'toolbar\']={\'links\':{},\'selects\':{}};new_file[\'compare_edited_text\']=new_file[\'text\'];Á.files[id]=new_file;Á.update_file(id,Å);Á.files[id][\'compare_edited_text\']=Á.files[id][\'text\'];var html_id=\'tab_file_\'+encodeURIComponent(id);Á.filesIdAssoc[html_id]=id;Á.files[id][\'html_id\']=html_id;if(!_$(Á.files[id][\'html_id\'])&&id!=""){Á.tab_browsing_area.Ç.display="block";var elem=document.createElement(\'li\');elem.id=Á.files[id][\'html_id\'];var close="<img src=\\""+È.eAL.baseURL+"images/close.gif\\" title=\\""+Á.get_translation(\'close_tab\',\'word\')+"\\" onclick=\\"eA.execCommand(\'close_file\',eA.filesIdAssoc[\'"+html_id+"\']);return Ì;\\" class=\\"hidden\\" onmouseover=\\"Á.className=\'\'\\" onmouseout=\\"Á.className=\'hidden\'\\" />";elem.innerHTML="<a onclick=\\"javascript:eA.execCommand(\'switch_to_file\',eA.filesIdAssoc[\'"+html_id+"\']);\\" selec=\\"none\\"><b><span><strong class=\\"edited\\">*</strong>"+Á.files[id][\'title\']+close+"</span></b></a>";_$(\'tab_browsing_list\').appendChild(elem);var elem=document.createElement(\'text\');Á.update_size();}if(id!="")Á.execCommand(\'file_open\',Á.files[id]);Á.switch_to_file(id,Ë);return Ë;}\nelse return Ì;};EA.Ä.close_file=Ã(id){if(Á.files[id]){Á.save_file(id);if(Á.execCommand(\'file_close\',Á.files[id])!==Ì){var li=_$(Á.files[id][\'html_id\']);li.ÈNode.removeChild(li);if(id==Á.curr_file){var next_file="";var is_next=Ì;for(var i in Á.files){if(is_next){next_file=i;break;}\nelse if(i==id)is_next=Ë;\nelse next_file=i;}Á.switch_to_file(next_file);}delete(Á.files[id]);Á.update_size();}}};EA.Ä.save_file=Ã(id){var t=Á,save,a_links,a_selects,save_butt,img,i;if(t.files[id]){var save=t.files[id];save[\'É\']=t.É;save[\'last_text_to_highlight\']=t.last_text_to_highlight;save[\'last_hightlighted_text\']=t.last_hightlighted_text;save[\'previous\']=t.previous;save[\'next\']=t.next;save[\'last_undo\']=t.last_undo;save[\'smooth_selection\']=t.smooth_selection;save[\'do_highlight\']=t.do_highlight;save[\'syntax\']=t.Å[\'syntax\'];save[\'text\']=t.Â.Ê;save[\'scroll_top\']=t.result.scrollTop;save[\'scroll_left\']=t.result.scrollLeft;save[\'selection_start\']=t.É["selectionStart"];save[\'selection_end\']=t.É["selectionEnd"];save[\'font_size\']=t.Å["font_size"];save[\'font_family\']=t.Å["font_family"];save[\'word_wrap\']=t.Å["word_wrap"];save[\'toolbar\']={\'links\':{},\'selects\':{}};a_links=_$("toolbar_1").getElementsByTagName("a");for(i=0;i<a_links.Æ;i++){if(a_links[i].getAttribute(\'fileSpecific\')==\'yes\'){save_butt={};img=a_links[i].getElementsByTagName(\'img\')[0];save_butt[\'classLock\']=img.classLock;save_butt[\'className\']=img.className;save_butt[\'oldClassName\']=img.oldClassName;save[\'toolbar\'][\'links\'][a_links[i].id]=save_butt;}}a_selects=_$("toolbar_1").getElementsByTagName("select");for(i=0;i<a_selects.Æ;i++){if(a_selects[i].getAttribute(\'fileSpecific\')==\'yes\'){save[\'toolbar\'][\'selects\'][a_selects[i].id]=a_selects[i].Ê;}}t.files[id]=save;return save;}return Ì;};EA.Ä.update_file=Ã(id,new_Ês){for(var i in new_Ês){Á.files[id][i]=new_Ês[i];}};EA.Ä.display_file=Ã(id){var t=Á,a=t.Â,new_file,a_lis,a_selects,a_links,a_options,i,j;if(id==\'\'){a.readOnly=Ë;t.tab_browsing_area.Ç.display="none";_$("no_file_selected").Ç.display="block";t.result.className="empty";if(!t.files[\'\']){t.open_file({id:\'\'});}}\nelse if(typeof(t.files[id])==\'undefined\'){return Ì;}\nelse{t.result.className="";a.readOnly=!t.is_editable;_$("no_file_selected").Ç.display="none";t.tab_browsing_area.Ç.display="block";}t.check_redo(Ë);t.check_undo(Ë);t.curr_file=id;a_lis=t.tab_browsing_area.getElementsByTagName(\'li\');for(i=0;i<a_lis.Æ;i++){if(a_lis[i].id==t.files[id][\'html_id\'])a_lis[i].className=\'selected\';\nelse a_lis[i].className=\'\';}new_file=t.files[id];a.Ê=new_file[\'text\'];t.set_font(new_file[\'font_family\'],new_file[\'font_size\']);t.area_select(new_file[\'selection_start\'],new_file[\'selection_end\']-new_file[\'selection_start\']);t.manage_size(Ë);t.result.scrollTop=new_file[\'scroll_top\'];t.result.scrollLeft=new_file[\'scroll_left\'];t.previous=new_file[\'previous\'];t.next=new_file[\'next\'];t.last_undo=new_file[\'last_undo\'];t.check_redo(Ë);t.check_undo(Ë);t.execCommand("change_highlight",new_file[\'do_highlight\']);t.execCommand("change_syntax",new_file[\'syntax\']);t.execCommand("change_smooth_selection_mode",new_file[\'smooth_selection\']);t.execCommand("set_word_wrap",new_file[\'word_wrap\']);a_links=new_file[\'toolbar\'][\'links\'];for(i in a_links){if(img=_$(i).getElementsByTagName(\'img\')[0]){img.classLock=a_links[i][\'classLock\'];img.className=a_links[i][\'className\'];img.oldClassName=a_links[i][\'oldClassName\'];}}a_selects=new_file[\'toolbar\'][\'selects\'];for(i in a_selects){a_options=_$(i).options;for(j=0;j<a_options.Æ;j++){if(a_options[j].Ê==a_selects[i])_$(i).options[j].selected=Ë;}}};EA.Ä.switch_to_file=Ã(file_to_show,force_refresh){if(file_to_show!=Á.curr_file||force_refresh){Á.save_file(Á.curr_file);if(Á.curr_file!=\'\')Á.execCommand(\'file_switch_off\',Á.files[Á.curr_file]);Á.display_file(file_to_show);if(file_to_show!=\'\')Á.execCommand(\'file_switch_on\',Á.files[file_to_show]);}};EA.Ä.get_file=Ã(id){if(id==Á.curr_file)Á.save_file(id);return Á.files[id];};EA.Ä.get_all_files=Ã(){tmp_files=Á.files;Á.save_file(Á.curr_file);if(tmp_files[\'\'])delete(Á.files[\'\']);return tmp_files;};EA.Ä.check_file_changes=Ã(){var id=Á.curr_file;if(Á.files[id]&&Á.files[id][\'compare_edited_text\']!=undefined){if(Á.files[id][\'compare_edited_text\'].Æ==Á.Â.Ê.Æ&&Á.files[id][\'compare_edited_text\']==Á.Â.Ê){if(Á.files[id][\'edited\']!=Ì)Á.set_file_edited_mode(id,Ì);}\nelse{if(Á.files[id][\'edited\']!=Ë)Á.set_file_edited_mode(id,Ë);}}};EA.Ä.set_file_edited_mode=Ã(id,to){if(Á.files[id]&&_$(Á.files[id][\'html_id\'])){var link=_$(Á.files[id][\'html_id\']).getElementsByTagName(\'a\')[0];if(to==Ë){link.className=\'edited\';}\nelse{link.className=\'\';if(id==Á.curr_file)text=Á.Â.Ê;\nelse text=Á.files[id][\'text\'];Á.files[id][\'compare_edited_text\']=text;}Á.files[id][\'edited\']=to;}};EA.Ä.set_show_line_colors=Ã(new_Ê){Á.show_line_colors=new_Ê;if(new_Ê)Á.selection_field.className+=\' show_colors\';\nelse Á.selection_field.className=Á.selection_field.className.replace(/ show_colors/g,\'\');};var EA_keys={8:"Retour arriere",9:"Tabulation",12:"Milieu(pave numerique)",13:"Entrer",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"Verr Maj",27:"Esc",32:"Space",33:"Page up",34:"Page down",35:"End",36:"Begin",37:"Left",38:"Up",39:"Right",40:"Down",44:"Impr ecran",45:"Inser",46:"Suppr",91:"Menu Demarrer Windows / touche pomme Mac",92:"Menu Demarrer Windows",93:"Menu contextuel Windows",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Verr Num",145:"Arret defil"};Ã keyDown(e){if(!e){e=event;}for(var i in eA.plugins){if(typeof(eA.plugins[i].onkeydown)=="Ã"){if(eA.plugins[i].onkeydown(e)===Ì){if(eA.isIE)e.keyCode=0;return Ì;}}}var target_id=(e.target||e.srcElement).id;var use=Ì;if(EA_keys[e.keyCode])letter=EA_keys[e.keyCode];\nelse letter=String.fromCharCode(e.keyCode);var low_letter=letter.toLowerCase();if(letter=="Page up"&&!AltPressed(e)&&!eA.isOpera){eA.execCommand("scroll_page",{"dir":"up","shift":ShiftPressed(e)});use=Ë;}\nelse if(letter=="Page down"&&!AltPressed(e)&&!eA.isOpera){eA.execCommand("scroll_page",{"dir":"down","shift":ShiftPressed(e)});use=Ë;}\nelse if(eA.is_editable==Ì){return Ë;}\nelse if(letter=="Tabulation"&&target_id=="Â"&&!CtrlPressed(e)&&!AltPressed(e)){if(ShiftPressed(e))eA.execCommand("invert_tab_selection");\nelse eA.execCommand("tab_selection");use=Ë;if(eA.isOpera||(eA.isFirefox&&eA.isMac))setTimeout("eA.execCommand(\'focus\');",1);}\nelse if(letter=="Entrer"&&target_id=="Â"){if(eA.press_enter())use=Ë;}\nelse if(letter=="Entrer"&&target_id=="area_search"){eA.execCommand("area_search");use=Ë;}\nelse  if(letter=="Esc"){eA.execCommand("close_all_inline_popup",e);use=Ë;}\nelse if(CtrlPressed(e)&&!AltPressed(e)&&!ShiftPressed(e)){switch(low_letter){case "f":eA.execCommand("area_search");use=Ë;break;case "r":eA.execCommand("area_replace");use=Ë;break;case "q":eA.execCommand("close_all_inline_popup",e);use=Ë;break;case "h":eA.execCommand("change_highlight");use=Ë;break;case "g":setTimeout("eA.execCommand(\'go_to_line\');",5);use=Ë;break;case "e":eA.execCommand("show_help");use=Ë;break;case "z":use=Ë;eA.execCommand("undo");break;case "y":use=Ë;eA.execCommand("redo");break;default:break;}}if(eA.next.Æ > 0){setTimeout("eA.check_redo();",10);}setTimeout("eA.check_file_changes();",10);if(use){if(eA.isIE)e.keyCode=0;return Ì;}return Ë;};Ã AltPressed(e){if(window.event){return(window.event.altKey);}\nelse{if(e.modifiers)return(e.altKey||(e.modifiers % 2));\nelse return e.altKey;}};Ã CtrlPressed(e){if(window.event){return(window.event.ctrlKey);}\nelse{return(e.ctrlKey||(e.modifiers==2)||(e.modifiers==3)||(e.modifiers>5));}};Ã ShiftPressed(e){if(window.event){return(window.event.shiftKey);}\nelse{return(e.shiftKey||(e.modifiers>3));}};\tEA.Ä.show_search=Ã(){if(_$("area_search_replace").Ç.visibility=="visible"){Á.hidden_search();}\nelse{Á.open_inline_popup("area_search_replace");var text=Á.area_get_selection();var search=text.split("\\n")[0];_$("area_search").Ê=search;_$("area_search").focus();}};EA.Ä.hidden_search=Ã(){Á.close_inline_popup("area_search_replace");};EA.Ä.area_search=Ã(mode){if(!mode)mode="search";_$("area_search_msg").innerHTML="";var search=_$("area_search").Ê;Á.Â.focus();Á.Â.ÂFocused=Ë;var infos=Á.get_selection_infos();var start=infos["selectionStart"];var pos=-1;var pos_begin=-1;var Æ=search.Æ;if(_$("area_search_replace").Ç.visibility!="visible"){Á.show_search();return;}if(search.Æ==0){_$("area_search_msg").innerHTML=Á.get_translation("search_field_empty");return;}if(mode!="replace"){if(_$("area_search_reg_exp").checked)start++;\nelse start+=search.Æ;}if(_$("area_search_reg_exp").checked){var opt="m";if(!_$("area_search_match_case").checked)opt+="i";var reg=new RegExp(search,opt);pos=infos["full_text"].substr(start).search(reg);pos_begin=infos["full_text"].search(reg);if(pos!=-1){pos+=start;Æ=infos["full_text"].substr(start).match(reg)[0].Æ;}\nelse if(pos_begin!=-1){Æ=infos["full_text"].match(reg)[0].Æ;}}\nelse{if(_$("area_search_match_case").checked){pos=infos["full_text"].indexOf(search,start);pos_begin=infos["full_text"].indexOf(search);}\nelse{pos=infos["full_text"].toLowerCase().indexOf(search.toLowerCase(),start);pos_begin=infos["full_text"].toLowerCase().indexOf(search.toLowerCase());}}if(pos==-1&&pos_begin==-1){_$("area_search_msg").innerHTML="<strong>"+search+"</strong> "+Á.get_translation("not_found");return;}\nelse if(pos==-1&&pos_begin !=-1){begin=pos_begin;_$("area_search_msg").innerHTML=Á.get_translation("restart_search_at_begin");}\nelse begin=pos;if(mode=="replace"&&pos==infos["indexOfCursor"]){var replace=_$("area_replace").Ê;var new_text="";if(_$("area_search_reg_exp").checked){var opt="m";if(!_$("area_search_match_case").checked)opt+="i";var reg=new RegExp(search,opt);new_text=infos["full_text"].substr(0,begin)+infos["full_text"].substr(start).replace(reg,replace);}\nelse{new_text=infos["full_text"].substr(0,begin)+replace+infos["full_text"].substr(begin+Æ);}Á.Â.Ê=new_text;Á.area_select(begin,Æ);Á.area_search();}\nelse Á.area_select(begin,Æ);};EA.Ä.area_replace=Ã(){Á.area_search("replace");};EA.Ä.area_replace_all=Ã(){var base_text=Á.Â.Ê;var search=_$("area_search").Ê;var replace=_$("area_replace").Ê;if(search.Æ==0){_$("area_search_msg").innerHTML=Á.get_translation("search_field_empty");return;}var new_text="";var nb_change=0;if(_$("area_search_reg_exp").checked){var opt="mg";if(!_$("area_search_match_case").checked)opt+="i";var reg=new RegExp(search,opt);nb_change=infos["full_text"].match(reg).Æ;new_text=infos["full_text"].replace(reg,replace);}\nelse{if(_$("area_search_match_case").checked){var tmp_tab=base_text.split(search);nb_change=tmp_tab.Æ-1;new_text=tmp_tab.join(replace);}\nelse{var lower_Ê=base_text.toLowerCase();var lower_search=search.toLowerCase();var start=0;var pos=lower_Ê.indexOf(lower_search);while(pos!=-1){nb_change++;new_text+=Á.Â.Ê.substring(start,pos)+replace;start=pos+search.Æ;pos=lower_Ê.indexOf(lower_search,pos+1);}new_text+=Á.Â.Ê.substring(start);}}if(new_text==base_text){_$("area_search_msg").innerHTML="<strong>"+search+"</strong> "+Á.get_translation("not_found");}\nelse{Á.Â.Ê=new_text;_$("area_search_msg").innerHTML="<strong>"+nb_change+"</strong> "+Á.get_translation("occurrence_replaced");setTimeout("eA.Â.focus();eA.Â.ÂFocused=Ë;",100);}}; EA.Ä.change_highlight=Ã(change_to){if(Á.Å["syntax"].Æ==0&&change_to==Ì){Á.switchClassSticky(_$("highlight"),\'editAreaButtonDisabled\',Ë);Á.switchClassSticky(_$("reset_highlight"),\'editAreaButtonDisabled\',Ë);return Ì;}if(Á.do_highlight==change_to)return Ì;Á.getIESelection();var pos_start=Á.Â.selectionStart;var pos_end=Á.Â.selectionEnd;if(Á.do_highlight===Ë||change_to==Ì)Á.disable_highlight();\nelse Á.enable_highlight();Á.Â.focus();Á.Â.selectionStart=pos_start;Á.Â.selectionEnd=pos_end;Á.setIESelection();};EA.Ä.disable_highlight=Ã(displayOnly){var t=Á,a=t.Â,new_Obj,old_class,new_class;t.selection_field.innerHTML="";t.selection_field_text.innerHTML="";t.content_highlight.Ç.visibility="hidden";new_Obj=t.content_highlight.cloneNode(Ì);new_Obj.innerHTML="";t.content_highlight.ÈNode.insertBefore(new_Obj,t.content_highlight);t.content_highlight.ÈNode.removeChild(t.content_highlight);t.content_highlight=new_Obj;old_class=È.getAttribute(a,"class");if(old_class){new_class=old_class.replace("hidden","");È.setAttribute(a,"class",new_class);}a.Ç.backgroundColor="transÈ";t.switchClassSticky(_$("highlight"),\'editAreaButtonNormal\',Ë);t.switchClassSticky(_$("reset_highlight"),\'editAreaButtonDisabled\',Ë);t.do_highlight=Ì;t.switchClassSticky(_$("change_smooth_selection"),\'editAreaButtonSelected\',Ë);if(typeof(t.smooth_selection_before_highlight)!="undefined"&&t.smooth_selection_before_highlight===Ì){t.change_smooth_selection_mode(Ì);}};EA.Ä.enable_highlight=Ã(){var t=Á,a=t.Â,new_class;t.show_waiting_screen();t.content_highlight.Ç.visibility="visible";new_class=È.getAttribute(a,"class")+" hidden";È.setAttribute(a,"class",new_class);if(t.isIE)a.Ç.backgroundColor="#FFFFFF";t.switchClassSticky(_$("highlight"),\'editAreaButtonSelected\',Ì);t.switchClassSticky(_$("reset_highlight"),\'editAreaButtonNormal\',Ì);t.smooth_selection_before_highlight=t.smooth_selection;if(!t.smooth_selection)t.change_smooth_selection_mode(Ë);t.switchClassSticky(_$("change_smooth_selection"),\'editAreaButtonDisabled\',Ë);t.do_highlight=Ë;t.resync_highlight();t.hide_waiting_screen();};EA.Ä.maj_highlight=Ã(infos){var debug_opti="",tps_start=new Date().getTime(),tps_middle_opti=new Date().getTime();var t=Á,hightlighted_text,updated_highlight;var textToHighlight=infos["full_text"],doSyntaxOpti=Ì,doHtmlOpti=Ì,stay_begin="",stay_end="",trace_new,trace_last;if(t.last_text_to_highlight==infos["full_text"]&&t.resync_highlight!==Ë)return;if(t.reload_highlight===Ë){t.reload_highlight=Ì;}\nelse if(textToHighlight.Æ==0){textToHighlight="\\n ";}\nelse{changes=t.checkTextEvolution(t.last_text_to_highlight,textToHighlight);trace_new=t.get_syntax_trace(changes.newTextLine).replace(/\\r/g,\'\');trace_last=t.get_syntax_trace(changes.lastTextLine).replace(/\\r/g,\'\');doSyntaxOpti=(trace_new==trace_last);if(!doSyntaxOpti&&trace_new=="\\n"+trace_last&&/^[ \ts]*\\n[ \ts]*$/.test(changes.newText.replace(/\\r/g,\'\'))&&changes.lastText==""){doSyntaxOpti=Ë;}if(doSyntaxOpti){tps_middle_opti=new Date().getTime();stay_begin=t.last_hightlighted_text.split("\\n").slice(0,changes.lineStart).join("\\n");if(changes.lineStart>0)stay_begin+="\\n";stay_end=t.last_hightlighted_text.split("\\n").slice(changes.lineLastEnd+1).join("\\n");if(stay_end.Æ>0)stay_end="\\n"+stay_end;if(stay_begin.split(\'<span\').Æ !=stay_begin.split(\'</span\').Æ||stay_end.split(\'<span\').Æ !=stay_end.split(\'</span\').Æ){doSyntaxOpti=Ì;stay_end=\'\';stay_begin=\'\';}\nelse{if(stay_begin.Æ==0&&changes.posLastEnd==-1)changes.newTextLine+="\\n";textToHighlight=changes.newTextLine;}}if(t.Å["debug"]){var ch=changes;debug_opti=(doSyntaxOpti?"Optimisation":"No optimisation")+" start:"+ch.posStart+"("+ch.lineStart+")"+" end_new:"+ch.posNewEnd+"("+ch.lineNewEnd+")"+" end_last:"+ch.posLastEnd+"("+ch.lineLastEnd+")"+"\\nchanged_text:"+ch.newText+"=> trace:"+trace_new+"\\nchanged_last_text:"+ch.lastText+"=> trace:"+trace_last+"\\nchanged_line:"+ch.newTextLine+"\\nlast_changed_line:"+ch.lastTextLine+"\\nstay_begin:"+stay_begin.slice(-100)+"\\nstay_end:"+stay_end.substr(0,100);+"\\n";}}tps_end_opti=new Date().getTime();updated_highlight=t.colorize_text(textToHighlight);tpsAfterReg=new Date().getTime();doSyntaxOpti=doHtmlOpti=Ì;if(doSyntaxOpti){try{var replacedBloc,i,nbStart=\'\',nbEnd=\'\',newHtml,ÆOld,ÆNew;replacedBloc=t.last_hightlighted_text.substring(stay_begin.Æ,t.last_hightlighted_text.Æ-stay_end.Æ);ÆOld=replacedBloc.Æ;ÆNew=updated_highlight.Æ;for(i=0;i < ÆOld&&i < ÆNew&&replacedBloc.charAt(i)==updated_highlight.charAt(i);i++){}nbStart=i;for(i=0;i+nbStart < ÆOld&&i+nbStart < ÆNew&&replacedBloc.charAt(ÆOld-i-1)==updated_highlight.charAt(ÆNew-i-1);i++){}nbEnd=i;lastHtml=replacedBloc.substring(nbStart,ÆOld-nbEnd);newHtml=updated_highlight.substring(nbStart,ÆNew-nbEnd);if(newHtml.indexOf(\'<span\')==-1&&newHtml.indexOf(\'</span\')==-1&&lastHtml.indexOf(\'<span\')==-1&&lastHtml.indexOf(\'</span\')==-1){var beginStr,nbOpendedSpan,nbClosedSpan,nbUnchangedChars,span,textNode;doHtmlOpti=Ë;beginStr=t.last_hightlighted_text.substr(0,stay_begin.Æ+nbStart);newHtml=newHtml.replace(/&lt;/g,\'<\').replace(/&gt;/g,\'>\').replace(/&amp;/g,\'&\');nbOpendedSpan=beginStr.split(\'<span\').Æ-1;nbClosedSpan=beginStr.split(\'</span\').Æ-1;span=t.content_highlight.getElementsByTagName(\'span\')[ nbOpendedSpan ];ÈSpan=span;maxStartOffset=maxEndOffset=0;if(nbOpendedSpan==nbClosedSpan){while(ÈSpan.ÈNode !=t.content_highlight&&ÈSpan.ÈNode.tagName !=\'PRE\'){ÈSpan=ÈSpan.ÈNode;}}\nelse{maxStartOffset=maxEndOffset=beginStr.Æ+1;nbClosed=beginStr.substr(Math.max(0,beginStr.lastIndexOf(\'<span\',maxStartOffset-1))).split(\'</span\').Æ-1;while(nbClosed > 0){nbClosed--;ÈSpan=ÈSpan.ÈNode;}while(ÈSpan.ÈNode !=t.content_highlight&&ÈSpan.ÈNode.tagName !=\'PRE\'&&(tmpMaxStartOffset=Math.max(0,beginStr.lastIndexOf(\'<span\',maxStartOffset-1)))<(tmpMaxEndOffset=Math.max(0,beginStr.lastIndexOf(\'</span\',maxEndOffset-1)))){maxStartOffset=tmpMaxStartOffset;maxEndOffset=tmpMaxEndOffset;}}if(ÈSpan.ÈNode==t.content_highlight||ÈSpan.ÈNode.tagName==\'PRE\'){maxStartOffset=Math.max(0,beginStr.indexOf(\'<span\'));}if(maxStartOffset==beginStr.Æ){nbSubSpanBefore=0;}\nelse{lastEndPos=Math.max(0,beginStr.lastIndexOf(\'>\',maxStartOffset));nbSubSpanBefore=beginStr.substr(lastEndPos).split(\'<span\').Æ-1;}if(nbSubSpanBefore==0){textNode=ÈSpan.firstChild;}\nelse{lastSubSpan=ÈSpan.getElementsByTagName(\'span\')[ nbSubSpanBefore-1 ];while(lastSubSpan.ÈNode !=ÈSpan){lastSubSpan=lastSubSpan.ÈNode;}if(lastSubSpan.nextSibling==null||lastSubSpan.nextSibling.nodeType !=3){textNode=document.createTextNode(\'\');lastSubSpan.ÈNode.insertBefore(textNode,lastSubSpan.nextSibling);}\nelse{textNode=lastSubSpan.nextSibling;}}if((lastIndex=beginStr.lastIndexOf(\'>\'))==-1){nbUnchangedChars=beginStr.Æ;}\nelse{nbUnchangedChars=beginStr.substr(lastIndex+1).replace(/&lt;/g,\'<\').replace(/&gt;/g,\'>\').replace(/&amp;/g,\'&\').Æ;}if(t.isIE){nbUnchangedChars-=(beginStr.substr(beginStr.Æ-nbUnchangedChars).split("\\n").Æ-1);textNode.replaceData(nbUnchangedChars,lastHtml.replace(/\\n/g,\'\').Æ,newHtml.replace(/\\n/g,\'\'));}\nelse{textNode.replaceData(nbUnchangedChars,lastHtml.Æ,newHtml);}}}catch(e){doHtmlOpti=Ì;}}tpsAfterOpti2=new Date().getTime();hightlighted_text=stay_begin+updated_highlight+stay_end;if(!doHtmlOpti){var new_Obj=t.content_highlight.cloneNode(Ì);if((t.isIE&&t.isIE < 8)||(t.isOpera&&t.isOpera < 9.6))new_Obj.innerHTML="<pre><span class=\'"+t.Å["syntax"]+"\'>"+hightlighted_text+"</span></pre>";\nelse new_Obj.innerHTML="<span class=\'"+t.Å["syntax"]+"\'>"+hightlighted_text+"</span>";t.content_highlight.ÈNode.replaceChild(new_Obj,t.content_highlight);t.content_highlight=new_Obj;}t.last_text_to_highlight=infos["full_text"];t.last_hightlighted_text=hightlighted_text;tps3=new Date().getTime();if(t.Å["debug"]){t.debug.Ê="Tps optimisation "+(tps_end_opti-tps_start)+" | tps reg exp:"+(tpsAfterReg-tps_end_opti)+" | tps opti HTML:"+(tpsAfterOpti2-tpsAfterReg)+\' \'+(doHtmlOpti ? \'yes\':\'no\')+" | tps update highlight content:"+(tps3-tpsAfterOpti2)+" | tpsTotal:"+(tps3-tps_start)+"("+tps3+")\\n"+debug_opti;}};EA.Ä.resync_highlight=Ã(reload_now){Á.reload_highlight=Ë;Á.last_text_to_highlight="";Á.focus();if(reload_now)Á.check_line_selection(Ì);}; EA.Ä.comment_or_quote=Ã(){var new_class="",close_tag="",sy,arg,i;sy=È.eAL.syntax[eA.current_code_lang];arg=EA.Ä.comment_or_quote.arguments[0];for(i in sy["quotes"]){if(arg.indexOf(i)==0){new_class="quotesmarks";close_tag=sy["quotes"][i];}}if(new_class.Æ==0){for(var i in sy["comments"]){if(arg.indexOf(i)==0){new_class="comments";close_tag=sy["comments"][i];}}}if(close_tag=="\\n"){return "µ__"+new_class+"__µ"+arg.replace(/(\\r?\\n)?$/m,"µ_END_µ$1");}\nelse{reg=new RegExp(È.eAL.get_escaped_regexp(close_tag)+"$","m");if(arg.search(reg)!=-1)return "µ__"+new_class+"__µ"+arg+"µ_END_µ";\nelse return "µ__"+new_class+"__µ"+arg;}};EA.Ä.get_syntax_trace=Ã(text){if(Á.Å["syntax"].Æ>0&&È.eAL.syntax[Á.Å["syntax"]]["syntax_trace_regexp"])return text.replace(È.eAL.syntax[Á.Å["syntax"]]["syntax_trace_regexp"],"$3");};EA.Ä.colorize_text=Ã(text){text=" "+text;if(Á.Å["syntax"].Æ>0)text=Á.apply_syntax(text,Á.Å["syntax"]);return text.substr(1).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/µ_END_µ/g,"</span>").replace(/µ__([a-zA-Z0-9]+)__µ/g,"<span class=\'$1\'>");};EA.Ä.apply_syntax=Ã(text,lang){var sy;Á.current_code_lang=lang;if(!È.eAL.syntax[lang])return text;sy=È.eAL.syntax[lang];if(sy["custom_regexp"][\'before\']){for(var i in sy["custom_regexp"][\'before\']){var convert="$1µ__"+sy["custom_regexp"][\'before\'][i][\'class\']+"__µ$2µ_END_µ$3";text=text.replace(sy["custom_regexp"][\'before\'][i][\'regexp\'],convert);}}if(sy["comment_or_quote_reg_exp"]){text=text.replace(sy["comment_or_quote_reg_exp"],Á.comment_or_quote);}if(sy["keywords_reg_exp"]){for(var i in sy["keywords_reg_exp"]){text=text.replace(sy["keywords_reg_exp"][i],\'µ__\'+i+\'__µ$2µ_END_µ\');}}if(sy["delimiters_reg_exp"]){text=text.replace(sy["delimiters_reg_exp"],\'µ__delimiters__µ$1µ_END_µ\');}if(sy["operators_reg_exp"]){text=text.replace(sy["operators_reg_exp"],\'µ__operators__µ$1µ_END_µ\');}if(sy["custom_regexp"][\'after\']){for(var i in sy["custom_regexp"][\'after\']){var convert="$1µ__"+sy["custom_regexp"][\'after\'][i][\'class\']+"__µ$2µ_END_µ$3";text=text.replace(sy["custom_regexp"][\'after\'][i][\'regexp\'],convert);}}return text;};var editArea= eA;EditArea=EA;</script>'
.replace(/Á/g,"this").replace(/Â/g,"textarea").replace(/Ã/g,"function").replace(/Ä/g,"prototype").replace(/Å/g,"settings").replace(/Æ/g,"length").replace(/Ç/g,"style").replace(/È/g,"parent").replace(/É/g,"last_selection").replace(/Ê/g,"value").replace(/Ë/g,"true").replace(/Ì/g,"false"),editAreaLoader.template="<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"> <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" > <head> <title>EditArea</title> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /> <meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\"/> [__CSSRULES__] [__JSCODE__] </head> <body> <div id='editor'> <div class='area_toolbar' id='toolbar_1'>[__TOOLBAR__]</div> <div class='area_toolbar' id='tab_browsing_area'><ul id='tab_browsing_list' class='menu'> <li> </li> </ul></div> <div id='result'> <div id='no_file_selected'></div> <div id='container'> <div id='cursor_pos' class='edit_area_cursor'>&nbsp;</div> <div id='end_bracket' class='edit_area_cursor'>&nbsp;</div> <div id='selection_field'></div> <div id='line_number' selec='none'></div> <div id='content_highlight'></div> <div id='test_font_size'></div> <div id='selection_field_text'></div> <textarea id='textarea' wrap='off' onchange='editArea.execCommand(\"onchange\");' onfocus='javascript:editArea.textareaFocused=true;' onblur='javascript:editArea.textareaFocused=false;'> </textarea> </div> </div> <div class='area_toolbar' id='toolbar_2'> <table class='statusbar' cellspacing='0' cellpadding='0'> <tr> <td class='total' selec='none'>{$position}:</td> <td class='infos' selec='none'> {$line_abbr} <span  id='linePos'>0</span>, {$char_abbr} <span id='currPos'>0</span> </td> <td class='total' selec='none'>{$total}:</td> <td class='infos' selec='none'> {$line_abbr} <span id='nbLine'>0</span>, {$char_abbr} <span id='nbChar'>0</span> </td> <td class='resize'> <span id='resize_area'><img src='[__BASEURL__]images/statusbar_resize.gif' alt='resize' selec='none'></span> </td> </tr> </table> </div> </div> <div id='processing'> <div id='processing_text'> {$processing} </div> </div> <div id='area_search_replace' class='editarea_popup'> <table cellspacing='2' cellpadding='0' style='width: 100%'> <tr> <td selec='none'>{$search}</td> <td><input type='text' id='area_search' /></td> <td id='close_area_search_replace'> <a onclick='Javascript:editArea.execCommand(\"hidden_search\")'><img selec='none' src='[__BASEURL__]images/close.gif' alt='{$close_popup}' title='{$close_popup}' /></a><br /> </tr><tr> <td selec='none'>{$replace}</td> <td><input type='text' id='area_replace' /></td> <td><img id='move_area_search_replace' onmousedown='return parent.start_move_element(event,\"area_search_replace\", parent.frames[\"frame_\"+editArea.id]);'  src='[__BASEURL__]images/move.gif' alt='{$move_popup}' title='{$move_popup}' /></td> </tr> </table> <div class='button'> <input type='checkbox' id='area_search_match_case' /><label for='area_search_match_case' selec='none'>{$match_case}</label> <input type='checkbox' id='area_search_reg_exp' /><label for='area_search_reg_exp' selec='none'>{$reg_exp}</label> <br /> <a onclick='Javascript:editArea.execCommand(\"area_search\")' selec='none'>{$find_next}</a> <a onclick='Javascript:editArea.execCommand(\"area_replace\")' selec='none'>{$replace}</a> <a onclick='Javascript:editArea.execCommand(\"area_replace_all\")' selec='none'>{$replace_all}</a><br /> </div> <div id='area_search_msg' selec='none'></div> </div> <div id='edit_area_help' class='editarea_popup'> <div class='close_popup'> <a onclick='Javascript:editArea.execCommand(\"close_all_inline_popup\")'><img src='[__BASEURL__]images/close.gif' alt='{$close_popup}' title='{$close_popup}' /></a> </div> <div><h2>Editarea [__EA_VERSION__]</h2><br /> <h3>{$shortcuts}:</h3> {$tab}: {$add_tab}<br /> {$shift}+{$tab}: {$remove_tab}<br /> {$ctrl}+f: {$search_command}<br /> {$ctrl}+r: {$replace_command}<br /> {$ctrl}+h: {$highlight}<br /> {$ctrl}+g: {$go_to_line}<br /> {$ctrl}+z: {$undo}<br /> {$ctrl}+y: {$redo}<br /> {$ctrl}+e: {$help}<br /> {$ctrl}+q, {$esc}: {$close_popup}<br /> {$accesskey} E: {$toggle}<br /> <br /> <em>{$about_notice}</em> <br /><div class='copyright'>&copy; Christophe Dolivet 2007-2010</div> </div> </div> </body> </html> ",editAreaLoader.iframe_css="<style>body,html{margin:0;padding:0;height:100%;border:none;overflow:hidden;background-color:#FFF;}body,html,table,form,textarea{font:12px monospace,sans-serif;}#editor{border:solid #888 1px;overflow:hidden;}#result{z-index:4;overflow-x:auto;overflow-y:scroll;border-top:solid #888 1px;border-bottom:solid #888 1px;position:relative;clear:both;}#result.empty{overflow:hidden;}#container{overflow:hidden;border:solid blue 0;position:relative;z-index:10;padding:0 5px 0 45px;}#textarea{position:relative;top:0;left:0;margin:0;padding:0;width:100%;height:100%;overflow:hidden;z-index:7;border-width:0;background-color:transparent;resize:none;}#textarea,#textarea:hover{outline:none;}#content_highlight{white-space:pre;margin:0;padding:0;position:absolute;z-index:4;overflow:visible;}#selection_field,#selection_field_text{margin:0;background-color:#E1F2F9;position:absolute;z-index:5;top:-100px;padding:0;white-space:pre;overflow:hidden;}#selection_field.show_colors {z-index:3;background-color:#EDF9FC;}#selection_field strong{font-weight:normal;}#selection_field.show_colors *,#selection_field_text * {visibility:hidden;}#selection_field_text{background-color:transparent;}#selection_field_text strong{font-weight:normal;background-color:#3399FE;color:#FFF;visibility:visible;}#container.word_wrap #content_highlight,#container.word_wrap #selection_field,#container.word_wrap #selection_field_text,#container.word_wrap #test_font_size{white-space:pre-wrap;white-space:-moz-pre-wrap !important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;width:99%;}#line_number{position:absolute;overflow:hidden;border-right:solid black 1px;z-index:8;width:38px;padding:0 5px 0 0;margin:0 0 0 -45px;text-align:right;color:#AAAAAA;}#test_font_size{padding:0;margin:0;visibility:hidden;position:absolute;white-space:pre;}pre{margin:0;padding:0;}.hidden{opacity:0.2;filter:alpha(opacity=20);}#result .edit_area_cursor{position:absolute;z-index:6;background-color:#FF6633;top:-100px;margin:0;}#result .edit_area_selection_field .overline{background-color:#996600;}.editarea_popup{border:solid 1px #888888;background-color:#ECE9D8;width:250px;padding:4px;position:absolute;visibility:hidden;z-index:15;top:-500px;}.editarea_popup,.editarea_popup table{font-family:sans-serif;font-size:10pt;}.editarea_popup img{border:0;}.editarea_popup .close_popup{float:right;line-height:16px;border:0;padding:0;}.editarea_popup h1,.editarea_popup h2,.editarea_popup h3,.editarea_popup h4,.editarea_popup h5,.editarea_popup h6{margin:0;padding:0;}.editarea_popup .copyright{text-align:right;}div#area_search_replace{}div#area_search_replace img{border:0;}div#area_search_replace div.button{text-align:center;line-height:1.7em;}div#area_search_replace .button a{cursor:pointer;border:solid 1px #888888;background-color:#DEDEDE;text-decoration:none;padding:0 2px;color:#000000;white-space:nowrap;}div#area_search_replace a:hover{background-color:#EDEDED;}div#area_search_replace  #move_area_search_replace{cursor:move;border:solid 1px #888;}div#area_search_replace  #close_area_search_replace{text-align:right;vertical-align:top;white-space:nowrap;}div#area_search_replace  #area_search_msg{height:18px;overflow:hidden;border-top:solid 1px #888;margin-top:3px;}#edit_area_help{width:350px;}#edit_area_help div.close_popup{float:right;}.area_toolbar{width:100%;margin:0;padding:0;background-color:#ECE9D8;text-align:center;}.area_toolbar,.area_toolbar table{font:11px sans-serif;}.area_toolbar img{border:0;vertical-align:middle;}.area_toolbar input{margin:0;padding:0;}.area_toolbar select{font-family:'MS Sans Serif',sans-serif,Verdana,Arial;font-size:7pt;font-weight:normal;margin:2px 0 0 0 ;padding:0;vertical-align:top;background-color:#F0F0EE;}table.statusbar{width:100%;}.area_toolbar td.infos{text-align:center;width:130px;border-right:solid 1px #888;border-width:0 1px 0 0;padding:0;}.area_toolbar td.total{text-align:right;width:50px;padding:0;}.area_toolbar td.resize{text-align:right;}.area_toolbar span#resize_area{cursor:nw-resize;visibility:hidden;}.editAreaButtonNormal,.editAreaButtonOver,.editAreaButtonDown,.editAreaSeparator,.editAreaSeparatorLine,.editAreaButtonDisabled,.editAreaButtonSelected {border:0; margin:0; padding:0; background:transparent;margin-top:0;margin-left:1px;padding:0;}.editAreaButtonNormal {border:1px solid #ECE9D8 !important;cursor:pointer;}.editAreaButtonOver {border:1px solid #0A246A !important;cursor:pointer;background-color:#B6BDD2;}.editAreaButtonDown {cursor:pointer;border:1px solid #0A246A !important;background-color:#8592B5;}.editAreaButtonSelected {border:1px solid #C0C0BB !important;cursor:pointer;background-color:#F4F2E8;}.editAreaButtonDisabled {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);-moz-opacity:0.3;opacity:0.3;border:1px solid #F0F0EE !important;cursor:pointer;}.editAreaSeparatorLine {margin:1px 2px;background-color:#C0C0BB;width:2px;height:18px;}#processing{display:none;background-color:#ECE9D8;border:solid #888 1px;position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;text-align:center;}#processing_text{position:absolute;left:50%;top:50%;width:200px;height:20px;margin-left:-100px;margin-top:-10px;text-align:center;}#tab_browsing_area{display:none;background-color:#CCC9A8;border-top:1px solid #888;text-align:left;margin:0;}#tab_browsing_list {padding:0;margin:0;list-style-type:none;white-space:nowrap;}#tab_browsing_list li {float:left;margin:-1px;}#tab_browsing_list a {position:relative;display:block;text-decoration:none;float:left;cursor:pointer;line-height:14px;}#tab_browsing_list a span {display:block;color:#000;background:#ECE9D8;border:1px solid #888;border-width:1px 1px 0;text-align:center;padding:2px 2px 1px 4px;position:relative;}#tab_browsing_list a b {display:block;border-bottom:2px solid #617994;}#tab_browsing_list a .edited {display:none;}#tab_browsing_list a.edited .edited {display:inline;}#tab_browsing_list a img{margin-left:7px;}#tab_browsing_list a.edited img{margin-left:3px;}#tab_browsing_list a:hover span {background:#F4F2E8;border-color:#0A246A;}#tab_browsing_list .selected a span{background:#046380;color:#FFF;}#no_file_selected{height:100%;width:150%;background:#CCC;display:none;z-index:20;position:absolute;}.non_editable #editor{border-width:0 1px;}.non_editable .area_toolbar{display:none;}#auto_completion_area{background:#FFF;border:solid 1px #888;position:absolute;z-index:15;width:280px;height:180px;overflow:auto;display:none;}#auto_completion_area a,#auto_completion_area a:visited{display:block;padding:0 2px 1px;color:#000;text-decoration:none;}#auto_completion_area a:hover,#auto_completion_area a:focus,#auto_completion_area a.focus{background:#D6E1FE;text-decoration:none;}#auto_completion_area ul{margin:0;padding:0;list-style:none inside;}#auto_completion_area li{padding:0;}#auto_completion_area .prefix{font-style:italic;padding:0 3px;}</style>";if(!webpagesJSinit){var webpagesJSinit=!0;function initEditor(a){calc_height=$(window).height()-350,calc_height<220&&(calc_height=220),$(a).find(".body_text").css("height",calc_height);try{$(a).find(".body_text").tinymce({theme:"advanced",plugins:"paste, advimage",file_browser_callback:"tastenboxFilebrowser",theme_advanced_buttons1:"formatselect,forecolorpicker,backcolorpicker,|,bullist,numlist,|,bold,italic,link,unlink,anchor,image, separator, justifyleft, justifycenter,justifyright,justifyfull, separator, cut,copy,paste,pastetext,pasteword,|,code",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_buttons4:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"left"})}catch(b){console.log(b.message())}}(function(a){function i(d,h,i,k){var l=f[d];e=a("#"+l.id).find("ul:first").clone(!0),e.css(l.menuStyle).find("li").css(l.itemStyle).hover(function(){a(this).css(l.itemHoverStyle)},function(){a(this).css(l.itemStyle)}).find("img").css({verticalAlign:"middle",paddingRight:"2px"}),b.html(e),!l.onShowMenu||(b=l.onShowMenu(i,b)),a.each(l.bindings,function(c,d){a("#"+c,b).bind("click",function(a){j(),d(h,g)})}),b.css({left:i[l.eventPosX],top:i[l.eventPosY]}).show(),l.shadow&&c.css({width:b.width(),height:b.height(),left:i.pageX+2,top:i.pageY+2}).show(),a(document).one("click",j)}function j(){b.hide(),c.hide()}var b,c,d,e,f,g,h={menuStyle:{listStyle:"none",padding:"1px",margin:"0px",backgroundColor:"#fff",border:"1px solid #999",width:"100px"},itemStyle:{margin:"0px",color:"#000",display:"block",cursor:"default",padding:"3px",border:"1px solid #fff",backgroundColor:"transparent"},itemHoverStyle:{border:"1px solid #0a246a",backgroundColor:"#b6bdd2"},eventPosX:"pageX",eventPosY:"pageY",shadow:!0,onContextMenu:null,onShowMenu:null};a.fn.contextMenu=function(d,e){b||(b=a('<div id="jqContextMenu"></div>').hide().css({position:"absolute",zIndex:"500"}).appendTo("body").bind("click",function(a){a.stopPropagation()})),c||(c=a("<div></div>").css({backgroundColor:"#000",position:"absolute",opacity:.2,zIndex:499}).appendTo("body").hide()),f=f||[],f.push({id:d,menuStyle:a.extend({},h.menuStyle,e.menuStyle||{}),itemStyle:a.extend({},h.itemStyle,e.itemStyle||{}),itemHoverStyle:a.extend({},h.itemHoverStyle,e.itemHoverStyle||{}),bindings:e.bindings||{},shadow:e.shadow||e.shadow===!1?e.shadow:h.shadow,onContextMenu:e.onContextMenu||h.onContextMenu,onShowMenu:e.onShowMenu||h.onShowMenu,eventPosX:e.eventPosX||h.eventPosX,eventPosY:e.eventPosY||h.eventPosY});var g=f.length-1;return a(this).bind("contextmenu",function(a){var b=f[g].onContextMenu?f[g].onContextMenu(a):!0;return b&&i(g,this,a,e),!1}),this},a.contextMenu={defaults:function(b){a.each(b,function(b,c){typeof c=="object"&&h[b]?a.extend(h[b],c):h[b]=c})}}})(jQuery),$(function(){$("div.contextMenu").hide()});var calc_height=$(window).height()-350,setupWebpage=function(a){$(a).find(".webpage-cur-locale").unbind("change").bind("change",function(a){var b=$(this).find("option:selected").val(),c=this,d=$(c).closest("form");if(b=="new"){var e=prompt("Name","");$(this).find("option[value=new]").before($("<option/>").val(e).text(e)),$(this).find("option[value="+e+"]").attr("selected",!0)}else b!=""&&($.ajax({url:$(d).attr("action")+"/locale",data:{edit_locale:b},dataType:"json",type:"get",success:function(a){var d=$(c).closest("form");$(d).find("#webpage_name").val(a.name),tinyMCE.activeEditor&&tinyMCE.activeEditor.remove(),$(".body_text").val(a.body_text),setTimeout(function(){initEditor(d)},500),$(d).find("#webpage_meta_keywords").val(a.meta_keywords),$(d).find("#webpage_meta_description").val(a.meta_description),$(d).find("#webpage_sidebar_text").val(a.sidebar_text),$(d).find("#webpage_subtitle").val(a.subtitle),$(d).find("#remove_locale").attr("href",function(){return this.href.replace(/edit_locale=[\w]+/,"edit_locale="+b)})}}),$("#remove_locale").fadeIn(200))}),$(".order-list").sortable({placeholder:"ui-state-highlight",forcePlaceholderSize:!0,stop:function(a,b){$.ajax({url:"/documents/"+$(this).attr("id").replace("order_","")+"/sort",type:"post",data:$(this).sortable("serialize"),dataType:"script"})}}),initEditor(a),setFocus()};function setupImagesContextMenu(){$("div[contentEditable=true] img").contextMenu("image-context-menu",{bindings:{left:function(a){$(a).css({"float":"left",margin:"0 10px 0 0"})},right:function(a){$(a).css({"float":"right",margin:"0 0 0 10px"})},text:function(a){$(a).css({"float":"none",margin:"0"})},add_link:function(a){var b=null;$(a).closest("a").length>0&&(b=$(a).closest("a").attr("href"));var c=prompt("Enter link here:",b!=null?b:"");b?$(a).closest("a").attr("href",c):$(a).wrap('<a href="'+c+'"></a>')},remove_link:function(a){var b=$(a).closest("a");$(b).replaceWith($(b).html())}}})}function saveSelection(){if(window.getSelection){sel=window.getSelection();if(sel.getRangeAt&&sel.rangeCount){var a=[];for(var b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null}function restoreSelection(a){if(a)if(window.getSelection){sel=window.getSelection(),sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}function getLinksInSelection(){var a=[],b,c,d,e;if(window.getSelection){sel=window.getSelection();if(sel.getRangeAt&&sel.rangeCount){e=document.createRange();for(var f=0;f<sel.rangeCount;++f){b=sel.getRangeAt(f),c=b.commonAncestorContainer,c.nodeType!=1&&(c=c.parentNode);if(c.nodeName.toLowerCase()=="a")a.push(c);else{d=c.getElementsByTagName("a");for(var g=0;g<d.length;++g)e.selectNodeContents(d[g]),e.compareBoundaryPoints(b.END_TO_START,b)<1&&e.compareBoundaryPoints(b.START_TO_END,b)>-1&&a.push(d[g])}}e.detach()}}else if(document.selection&&document.selection.type!="Control"){b=document.selection.createRange(),c=b.parentElement();if(c.nodeName.toLowerCase()=="a")a.push(c);else{d=c.getElementsByTagName("a"),e=document.body.createTextRange();for(var g=0;g<d.length;++g)e.moveToElementText(d[g]),e.compareEndPoints("StartToEnd",b)>-1&&e.compareEndPoints("EndToStart",b)<1&&a.push(d[g])}}return a}function setupPageButtons(){$("#page-add-link").click(function(){selected_text=saveSelection();var a=prompt("External link",getLinksInSelection());restoreSelection(selected_text),a.length>0&&document.execCommand("CreateLink",!1,a)}),$("#page-add-cssclass").click(function(){selected_text=saveSelection(),sel=$(window.getSelection().getRangeAt(0).endContainer);var a="";$(sel).attr("class")&&(a=$(sel).attr("class")),a=prompt("External link",a),a.length>0&&$(sel).addClass(a)}),$("#page-edit-source").click(function(){var a=$('<textarea id="tastenbox-page-source-editor"/>');calc_height=$(window).height()-100,calc_height<220&&(calc_height=220),$(a).css("width","680px;").css("height",calc_height+"px").text($("#tastenbox-page-content").html()),$("#tastenbox-dialog").html("").append(a).css("height",calc_height+"px").center(),$("#tastenbox-dialog").prepend('<div id="tastenbox-close-dialog" class="ui-icon ui-icon-closethick tastenbox-corner-all"></div>'),$("#tastenbox-overlay").css("height",$(document).height()+"px").fadeIn({duration:300,easing:"easeOutBack"}),$("#tastenbox-dialog").fadeIn({duration:500,easing:"easeOutQuart"}).css("zIndex","20000"),editAreaLoader.init({id:"tastenbox-page-source-editor",syntax:"html",toolbar:"save, |, fullscreen, |,  search, go_to_line, |, undo, redo, |, select_font, |, change_smooth_selection, highlight, reset_highlight",save_callback:"closeEditArea",fullscreen:!0,allow_resize:!0,allow_toggle:!1,gecko_spellcheck:!0,start_highlight:!0})})}function closeEditArea(){$("#tastenbox-page-content").html(editAreaLoader.getValue("tastenbox-page-source-editor")),$("#tastenbox-dialog").fadeOut({easing:"easeOutQuart",duration:300}).css("zIndex","9999"),$("#tastenbox-overlay").fadeOut({easing:"easeOutQuart",duration:1200}),TastenboxNotifier.show("WARNING! Content not saved yet. It might be a good point to hit 'save' now.","error")}$(document).ready(function(){if($("#tastenbox-page-content").length){document.getElementById("tastenbox-page-content").contentEditable=!0,document.getElementById("tastenbox-page-content").designMode="on";if($("#webpage-html-controls-container").length){$("#webpage-html-controls-container").show().css("left",$(window).width()-$("#webpage-html-controls-container").width()-100+"px").draggable();var a=$("#webpage-html-controls-container").offset().top;$(window).scroll(function(){$("#webpage-html-controls-container").animate({top:$(window).scrollTop()+a+"px"},{queue:!1,duration:350})})}}$("#tastenbox-page-save").bind("click",function(a){a.preventDefault(),$("#webpage_body_text").val($("#tastenbox-page-content").html()),$("#webpage_sidebar_text").val($("#tastenbox-page-sidebar_text").html()),$("#webpage_meta_description").val($("#tastenbox-page-sidebar_text").html()),$(this).closest("form").find("input[type=submit]").click()}),$(".insertable-image").live("click",function(a){a.preventDefault(),document.execCommand("insertImage",!1,$(this).attr("href")),setTimeout(function(){setupImagesContextMenu()},500)}),$("body").append($("<div/>").attr("id","image-context-menu").addClass("contextMenu").css("display","none").append($("<ul/>").append($("<li/>").attr("id","left").text("left")).append($("<li/>").attr("id","right").text("right")).append($("<li/>").attr("id","text").text("in text")).append($("<li/>").attr("id","add_link").text("add/edit link")).append($("<li/>").attr("id","remove_link").text("remove link")))),setupImagesContextMenu(),setupPageButtons()})}
