function getType(d){if(typeof d=="undefined"){return"undefined"}if(d===null){return"null"}switch(d.constructor){case Array:return"Array";case Boolean:return"Boolean";case Date:return"Date";case Error:return"Error";case Function:return"Function";case Number:return"Number";case RegExp:return"RegExp";case String:return"String";default:if(typeof(d.nodeType)!="undefined"){return"HTML "+d.nodeName.toUpperCase()+" Element"}if(d.toString){if(d.toString().match("Event")){return"Event"}}return"Object"}}function print_r(B,A,u,t){if(!t){t=""}if(!u){u=(t?t:(A?"&nbsp;&nbsp;&nbsp;&nbsp;":"\t"))}var y=(A?"<br />":"")+"\n";var s="";var v={"null":true,Array:true,Object:true,"undefined":true};var w=getType(B);var x="";if(w=="Array"){s+=w+":"+y+t+"("+y;var p=t+")"+y;t+=u;for(var q=0;q<B.length;++q){var z=getType(B[q]);s+=t+q+" => "+(v[z]?"":" ("+getType(B[q])+")")+" ";if((z=="Array")||(z=="Object")){s+=print_r(B[q],A,u,t)}else{s+=B[q]+y}}s+=p}else{if(w=="Object"){s+=w+":"+y+t+"("+y;var p=t+")"+y;t+=u;for(q in B){var z=getType(B[q]);s+=t+q+" => "+(v[z]?"":" ("+getType(B[q])+")")+" ";if((z=="Array")||(z=="Object")){s+=print_r(B[q],A,u,t)}else{s+=B[q]+y}}s+=p}else{s+=B}}return s}function TinyMCE_Engine(){var d;this.majorVersion="2";this.minorVersion="1.2";this.releaseDate="2007-08-21";this.instances=[];this.switchClassCache=[];this.windowArgs=[];this.loadedFiles=[];this.pendingFiles=[];this.loadingIndex=0;this.configs=[];this.currentConfig=0;this.eventHandlers=[];this.log=[];this.undoLevels=[];this.undoIndex=0;this.typingUndoIndex=-1;this.settings=[];d=navigator.userAgent;this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.isMSIE5=this.isMSIE&&(d.indexOf("MSIE 5")!=-1);this.isMSIE5_0=this.isMSIE&&(d.indexOf("MSIE 5.0")!=-1);this.isMSIE7=this.isMSIE&&(d.indexOf("MSIE 7")!=-1);this.isGecko=d.indexOf("Gecko")!=-1;this.isSafari=d.indexOf("Safari")!=-1;this.isOpera=window.opera&&opera.buildNumber?true:false;this.isMac=d.indexOf("Mac")!=-1;this.isNS7=d.indexOf("Netscape/7")!=-1;this.isNS71=d.indexOf("Netscape/7.1")!=-1;this.dialogCounter=0;this.plugins=[];this.themes=[];this.menus=[];this.loadedPlugins=[];this.buttonMap=[];this.isLoaded=false;if(this.isOpera){this.isMSIE=true;this.isGecko=false;this.isSafari=false}this.isIE=this.isMSIE;this.isRealIE=this.isMSIE&&!this.isOpera;this.idCounter=0}TinyMCE_Engine.prototype={init:function(w){var p,y,C="",i,v,e,h,x,z,A=[],B;if(this.isMSIE5_0){return}this.settings=w;if(typeof(document.execCommand)=="undefined"){return}if(!tinyMCE.baseURL){B=document.getElementsByTagName("head")[0];if(B){for(i=0,y=B.getElementsByTagName("script");i<y.length;i++){A.push(y[i])}}for(i=0,y=document.getElementsByTagName("script");i<y.length;i++){A.push(y[i])}y=document.getElementsByTagName("base");for(i=0;i<y.length;i++){if(y[i].href){C=y[i].href}}for(i=0;i<A.length;i++){if(A[i].src&&(A[i].src.indexOf("tiny_mce.js")!=-1||A[i].src.indexOf("tiny_mce_dev.js")!=-1||A[i].src.indexOf("tiny_mce_src.js")!=-1||A[i].src.indexOf("tiny_mce_gzip")!=-1)){z=A[i].src;tinyMCE.srcMode=(z.indexOf("_src")!=-1||z.indexOf("_dev")!=-1)?"_src":"";tinyMCE.gzipMode=z.indexOf("_gzip")!=-1;z=z.substring(0,z.lastIndexOf("/"));if(w.exec_mode=="src"||w.exec_mode=="normal"){tinyMCE.srcMode=w.exec_mode=="src"?"_src":""}if(C!==""&&z.indexOf("://")==-1){tinyMCE.baseURL=C+z}else{tinyMCE.baseURL=z}break}}}this.documentBasePath=document.location.href;if(this.documentBasePath.indexOf("?")!=-1){this.documentBasePath=this.documentBasePath.substring(0,this.documentBasePath.indexOf("?"))}this.documentURL=this.documentBasePath;this.documentBasePath=this.documentBasePath.substring(0,this.documentBasePath.lastIndexOf("/"));if(tinyMCE.baseURL.indexOf("://")==-1&&tinyMCE.baseURL.charAt(0)!="/"){tinyMCE.baseURL=this.documentBasePath+"/"+tinyMCE.baseURL}this._def("mode","none");this._def("theme","advanced");this._def("plugins","",true);this._def("language","en");this._def("docs_language",this.settings.language);this._def("elements","");this._def("textarea_trigger","mce_editable");this._def("editor_selector","");this._def("editor_deselector","mceNoEditor");this._def("valid_elements","+a[id|style|rel|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/-b[class|style],-em/-i[class|style],-strike[class|style],-u[class|style],#p[id|style|dir|class|align],-ol[class|style],-ul[class|style],-li[class|style],br,img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|alt=|title|hspace|vspace|width|height|align],-sub[style|class],-sup[style|class],-blockquote[dir|style],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],-tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],thead[id|class],tfoot[id|class],#td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],-th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],-span[style|class|align],-pre[class|align|style],address[class|align|style],-h1[id|style|dir|class|align],-h2[id|style|dir|class|align],-h3[id|style|dir|class|align],-h4[id|style|dir|class|align],-h5[id|style|dir|class|align],-h6[id|style|dir|class|align],hr[class|style],-font[face|size|style|id|class|dir|color],dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang],cite[title|id|class|style|dir|lang],abbr[title|id|class|style|dir|lang],acronym[title|id|class|style|dir|lang],del[title|id|class|style|dir|lang|datetime|cite],ins[title|id|class|style|dir|lang|datetime|cite]");this._def("extended_valid_elements","");this._def("invalid_elements","");this._def("encoding","");this._def("urlconverter_callback",tinyMCE.getParam("urlconvertor_callback","TinyMCE_Engine.prototype.convertURL"));this._def("save_callback","");this._def("force_br_newlines",false);this._def("force_p_newlines",true);this._def("add_form_submit_trigger",true);this._def("relative_urls",true);this._def("remove_script_host",true);this._def("focus_alert",true);this._def("document_base_url",this.documentURL);this._def("visual",true);this._def("visual_table_class","mceVisualAid");this._def("setupcontent_callback","");this._def("fix_content_duplication",true);this._def("custom_undo_redo",true);this._def("custom_undo_redo_levels",-1);this._def("custom_undo_redo_keyboard_shortcuts",true);this._def("custom_undo_redo_restore_selection",true);this._def("custom_undo_redo_global",false);this._def("verify_html",true);this._def("apply_source_formatting",false);this._def("directionality","ltr");this._def("cleanup_on_startup",false);this._def("inline_styles",false);this._def("convert_newlines_to_brs",false);this._def("auto_reset_designmode",true);this._def("entities","39,#39,160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,34,quot,38,amp,60,lt,62,gt,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro",true);this._def("entity_encoding","named");this._def("cleanup_callback","");this._def("add_unload_trigger",true);this._def("ask",false);this._def("nowrap",false);this._def("auto_resize",false);this._def("auto_focus",false);this._def("cleanup",true);this._def("remove_linebreaks",true);this._def("button_tile_map",false);this._def("submit_patch",true);this._def("browsers","msie,safari,gecko,opera",true);this._def("dialog_type","window");this._def("accessibility_warnings",true);this._def("accessibility_focus",true);this._def("merge_styles_invalid_parents","");this._def("force_hex_style_colors",true);this._def("trim_span_elements",true);this._def("convert_fonts_to_spans",false);this._def("doctype",'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">');this._def("font_size_classes","");this._def("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large",true);this._def("event_elements","a,img",true);this._def("convert_urls",true);this._def("table_inline_editing",false);this._def("object_resizing",true);this._def("custom_shortcuts",true);this._def("convert_on_click",false);this._def("content_css","");this._def("fix_list_elements",true);this._def("fix_table_elements",false);this._def("strict_loading_mode",document.contentType=="application/xhtml+xml");this._def("hidden_tab_class","");this._def("display_tab_class","");this._def("gecko_spellcheck",false);this._def("hide_selects_on_submit",true);this._def("forced_root_block",false);this._def("remove_trailing_nbsp",false);this._def("save_on_tinymce_forms",false);if(this.isMSIE&&!this.isOpera){this.settings.strict_loading_mode=false}if(this.isMSIE&&this.settings.browsers.indexOf("msie")==-1){return}if(this.isGecko&&this.settings.browsers.indexOf("gecko")==-1){return}if(this.isSafari&&this.settings.browsers.indexOf("safari")==-1){return}if(this.isOpera&&this.settings.browsers.indexOf("opera")==-1){return}C=tinyMCE.settings.document_base_url;h=document.location.href;x=h.indexOf("://");if(x>0&&document.location.protocol!="file:"){x=h.indexOf("/",x+3);h=h.substring(0,x);if(C.indexOf("://")==-1){C=h+C}tinyMCE.settings.document_base_url=C;tinyMCE.settings.document_base_prefix=h}if(C.indexOf("?")!=-1){C=C.substring(0,C.indexOf("?"))}this.settings.base_href=C.substring(0,C.lastIndexOf("/"))+"/";p=this.settings.theme;this.inlineStrict="A|BR|SPAN|BDO|MAP|OBJECT|IMG|TT|I|B|BIG|SMALL|EM|STRONG|DFN|CODE|Q|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|SUB|SUP|#text|#comment";this.inlineTransitional="A|BR|SPAN|BDO|OBJECT|APPLET|IMG|MAP|IFRAME|TT|I|B|U|S|STRIKE|BIG|SMALL|FONT|BASEFONT|EM|STRONG|DFN|CODE|Q|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|SUB|SUP|INPUT|SELECT|TEXTAREA|LABEL|BUTTON|#text|#comment";this.blockElms="H[1-6]|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|FORM|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP";this.blockRegExp=new RegExp("^("+this.blockElms+")$","i");this.posKeyCodes=[13,45,36,35,33,34,37,38,39,40];this.uniqueURL="javascript:void(091039730);";this.uniqueTag='<div id="mceTMPElement" style="display: none">TMP</div>';this.callbacks=["onInit","getInfo","getEditorTemplate","setupContent","onChange","onPageLoad","handleNodeChange","initInstance","execCommand","getControlHTML","handleEvent","cleanup","removeInstance"];this.settings.theme_href=tinyMCE.baseURL+"/themes/"+p;if(!tinyMCE.isIE||tinyMCE.isOpera){this.settings.force_br_newlines=false}if(tinyMCE.getParam("popups_css",false)){v=tinyMCE.getParam("popups_css","");if(v.indexOf("://")==-1&&v.charAt(0)!="/"){this.settings.popups_css=this.documentBasePath+"/"+v}else{this.settings.popups_css=v}}else{this.settings.popups_css=tinyMCE.baseURL+"/themes/"+p+"/css/editor_popup.css"}if(tinyMCE.getParam("editor_css",false)){v=tinyMCE.getParam("editor_css","");if(v.indexOf("://")==-1&&v.charAt(0)!="/"){this.settings.editor_css=this.documentBasePath+"/"+v}else{this.settings.editor_css=v}}else{if(this.settings.editor_css!==""){this.settings.editor_css=tinyMCE.baseURL+"/themes/"+p+"/css/editor_ui.css"}}if(this.configs.length==0){if(typeof(TinyMCECompressed)=="undefined"){tinyMCE.addEvent(window,"DOMContentLoaded",TinyMCE_Engine.prototype.onLoad);if(tinyMCE.isRealIE){if(document.body){tinyMCE.addEvent(document.body,"readystatechange",TinyMCE_Engine.prototype.onLoad)}else{tinyMCE.addEvent(document,"readystatechange",TinyMCE_Engine.prototype.onLoad)}}tinyMCE.addEvent(window,"load",TinyMCE_Engine.prototype.onLoad);tinyMCE._addUnloadEvents()}}this.loadScript(tinyMCE.baseURL+"/themes/"+this.settings.theme+"/editor_template"+tinyMCE.srcMode+".js");this.loadScript(tinyMCE.baseURL+"/langs/"+this.settings.language+".js");this.loadCSS(this.settings.editor_css);x=tinyMCE.getParam("plugins","",true,",");if(x.length>0){for(i=0;i<x.length;i++){if(x[i].charAt(0)!="-"){this.loadScript(tinyMCE.baseURL+"/plugins/"+x[i]+"/editor_plugin"+tinyMCE.srcMode+".js")}}}if(tinyMCE.getParam("entity_encoding")=="named"){w.cleanup_entities=[];e=tinyMCE.getParam("entities","",true,",");for(i=0;i<e.length;i+=2){w.cleanup_entities["c"+e[i]]=e[i+1]}}w.index=this.configs.length;this.configs[this.configs.length]=w;this.loadNextScript();if(this.isIE&&!this.isOpera){try{document.execCommand("BackgroundImageCache",false,true)}catch(D){}}this.xmlEncodeRe=new RegExp('[<>&"]',"g")},_addUnloadEvents:function(){var d=tinyMCE.settings.add_unload_trigger;if(tinyMCE.isIE){if(d){tinyMCE.addEvent(window,"unload",TinyMCE_Engine.prototype.unloadHandler);tinyMCE.addEvent(window.document,"beforeunload",TinyMCE_Engine.prototype.unloadHandler)}}else{if(d){tinyMCE.addEvent(window,"unload",function(){tinyMCE.triggerSave(true,true)})}}},_def:function(i,k,j){var h=tinyMCE.getParam(i,k);h=j?h.replace(/\s+/g,""):h;this.settings[i]=h},hasPlugin:function(d){return typeof(this.plugins[d])!="undefined"&&this.plugins[d]!=null},addPlugin:function(h,f){var i=this.plugins[h];f.baseURL=i?i.baseURL:tinyMCE.baseURL+"/plugins/"+h;this.plugins[h]=f;this.loadNextScript()},setPluginBaseURL:function(h,f){var i=this.plugins[h];if(i){i.baseURL=f}else{this.plugins[h]={baseURL:f}}},loadPlugin:function(f,e){e=e.indexOf(".js")!=-1?e.substring(0,e.lastIndexOf("/")):e;e=e.charAt(e.length-1)=="/"?e.substring(0,e.length-1):e;this.plugins[f]={baseURL:e};this.loadScript(e+"/editor_plugin"+(tinyMCE.srcMode?"_src":"")+".js")},hasTheme:function(d){return typeof(this.themes[d])!="undefined"&&this.themes[d]!=null},addTheme:function(f,e){this.themes[f]=e;this.loadNextScript()},addMenu:function(f,e){this.menus[f]=e},hasMenu:function(d){return typeof(this.plugins[d])!="undefined"&&this.plugins[d]!=null},loadScript:function(e){var f;for(f=0;f<this.loadedFiles.length;f++){if(this.loadedFiles[f]==e){return}}if(tinyMCE.settings.strict_loading_mode){this.pendingFiles[this.pendingFiles.length]=e}else{document.write('<script language="javascript" type="text/javascript" src="'+e+'" charset="utf8"><\/script>')}this.loadedFiles[this.loadedFiles.length]=e},loadNextScript:function(){var f=document,d;if(!tinyMCE.settings.strict_loading_mode){return}if(this.loadingIndex<this.pendingFiles.length){d=f.createElementNS("http://www.w3.org/1999/xhtml","script");d.setAttribute("language","javascript");d.setAttribute("type","text/javascript");d.setAttribute("src",this.pendingFiles[this.loadingIndex++]);d.charset="utf-8";f.getElementsByTagName("head")[0].appendChild(d)}else{this.loadingIndex=-1}},loadCSS:function(t){var s=t.replace(/\s+/,"").split(",");var p=0,i=0,n=false;var o=0,q=0,u,v;for(o=0,i=s.length;o<i;o++){if(s[o]!=null&&s[o]!="null"&&s[o].length>0){for(q=0,p=this.loadedFiles.length;q<p;q++){if(this.loadedFiles[q]==s[o]){n=true;break}}if(!n){if(tinyMCE.settings.strict_loading_mode){u=document.getElementsByTagName("head");v=document.createElement("link");v.setAttribute("href",s[o]);v.setAttribute("rel","stylesheet");v.setAttribute("type","text/css");u[0].appendChild(v)}else{document.write('<link href="'+s[o]+'" rel="stylesheet" type="text/css" />')}this.loadedFiles[this.loadedFiles.length]=s[o]}}}},importCSS:function(n,p){var q=p.replace(/\s+/,"").split(",");var o,m,t,l,s;for(l=0,o=q.length;l<o;l++){s=q[l];if(s!=null&&s!="null"&&s.length>0){if(s.indexOf("://")==-1&&s.charAt(0)!="/"){s=this.documentBasePath+"/"+s}if(typeof(n.createStyleSheet)=="undefined"){m=n.createElement("link");m.rel="stylesheet";m.href=s;if((t=n.getElementsByTagName("head"))!=null&&t.length>0){t[0].appendChild(m)}}else{n.createStyleSheet(s)}}}},confirmAdd:function(j,k){var i=tinyMCE.isIE?event.srcElement:j.target;var e=i.name?i.name:i.id;tinyMCE.settings=k;if(tinyMCE.settings.convert_on_click||(!i.getAttribute("mce_noask")&&confirm(tinyMCELang.lang_edit_confirm))){tinyMCE.addMCEControl(i,e)}i.setAttribute("mce_noask","true")},updateContent:function(i){var m,j,l,k;m=document.getElementById(i);for(j in tinyMCE.instances){l=tinyMCE.instances[j];if(!tinyMCE.isInstance(l)){continue}l.switchSettings();if(l.formElement==m){k=l.getDoc();tinyMCE._setHTML(k,l.formElement.value);if(!tinyMCE.isIE){k.body.innerHTML=tinyMCE._cleanupHTML(l,k,this.settings,k.body,l.visualAid)}}}},addMCEControl:function(k,i,m){var j="mce_editor_"+tinyMCE.idCounter++;var l=new TinyMCE_Control(tinyMCE.settings);l.editorId=j;this.instances[j]=l;l._onAdd(k,i,m)},removeInstance:function(j){var k=[],i,h;for(i in tinyMCE.instances){h=tinyMCE.instances[i];if(tinyMCE.isInstance(h)&&j!=h){k[i]=h}}tinyMCE.instances=k;i=[];k=tinyMCE.undoLevels;for(h=0;h<k.length;h++){if(k[h]!=j){i.push(k[h])}}tinyMCE.undoLevels=i;tinyMCE.undoIndex=i.length;tinyMCE.dispatchCallback(j,"remove_instance_callback","removeInstance",j);return j},removeMCEControl:function(m){var n=tinyMCE.getInstanceById(m),p,q,o,h,l;if(n){n.switchSettings();m=n.editorId;p=tinyMCE.getContent(m);this.removeInstance(n);tinyMCE.selectedElement=null;tinyMCE.selectedInstance=null;tinyMCE.selectedElement=null;tinyMCE.selectedInstance=null;for(l in tinyMCE.instances){if(!tinyMCE.isInstance(tinyMCE.instances[l])){continue}tinyMCE.selectedInstance=tinyMCE.instances[l];break}q=document.getElementById(m+"_parent");o=n.oldTargetElement;h=o.nodeName.toLowerCase();if(h=="textarea"||h=="input"){q.parentNode.removeChild(q);o.style.display="inline";o.value=p}else{o.innerHTML=p;o.style.display="block";q.parentNode.insertBefore(o,q);q.parentNode.removeChild(q)}}},triggerSave:function(k,h){var j,i;if(typeof(k)=="undefined"){k=false}if(typeof(h)=="undefined"){h=false}for(i in tinyMCE.instances){j=tinyMCE.instances[i];if(!tinyMCE.isInstance(j)){continue}j.triggerSave(k,h)}},resetForm:function(k){var m,l,j,i=document.forms[k];for(j in tinyMCE.instances){l=tinyMCE.instances[j];if(!tinyMCE.isInstance(l)){continue}l.switchSettings();for(m=0;m<i.elements.length;m++){if(l.formTargetElementId==i.elements[m].name){l.getBody().innerHTML=l.startContent}}}},execInstanceCommand:function(m,n,l,o,k){var p=tinyMCE.getInstanceById(m),q;if(p){q=p.selection.getRng();if(typeof(k)=="undefined"){k=true}if(k&&(!q||!q.item)){p.contentWindow.focus()}p.autoResetDesignMode();this.selectedElement=p.getFocusElement();p.select();tinyMCE.execCommand(n,l,o);if(tinyMCE.isIE&&window.event!=null){tinyMCE.cancelEvent(window.event)}}},execCommand:function(o,m,s){var t=tinyMCE.selectedInstance,n,e,p;m=m?m:false;s=s?s:null;if(t){t.switchSettings()}switch(o){case"Undo":if(this.getParam("custom_undo_redo_global")){if(this.undoIndex>0){tinyMCE.nextUndoRedoAction="Undo";t=this.undoLevels[--this.undoIndex];t.select();if(!tinyMCE.nextUndoRedoInstanceId){t.execCommand("Undo")}}}else{t.execCommand("Undo")}return true;case"Redo":if(this.getParam("custom_undo_redo_global")){if(this.undoIndex<=this.undoLevels.length-1){tinyMCE.nextUndoRedoAction="Redo";t=this.undoLevels[this.undoIndex++];t.select();if(!tinyMCE.nextUndoRedoInstanceId){t.execCommand("Redo")}}}else{t.execCommand("Redo")}return true;case"mceFocus":t=tinyMCE.getInstanceById(s);if(t){t.getWin().focus()}return;case"mceAddControl":case"mceAddEditor":tinyMCE.addMCEControl(tinyMCE._getElementById(s),s);return;case"mceAddFrameControl":tinyMCE.addMCEControl(tinyMCE._getElementById(s.element,s.document),s.element,s.document);return;case"mceRemoveControl":case"mceRemoveEditor":tinyMCE.removeMCEControl(s);return;case"mceToggleEditor":t=tinyMCE.getInstanceById(s);if(t){e=document.getElementById(t.editorId+"_parent");p=t.oldTargetElement;if(typeof(t.enabled)=="undefined"){t.enabled=true}t.enabled=!t.enabled;if(!t.enabled){e.style.display="none";if(p.nodeName=="TEXTAREA"||p.nodeName=="INPUT"){p.value=t.getHTML()}else{p.innerHTML=t.getHTML()}p.style.display=t.oldTargetDisplay;tinyMCE.dispatchCallback(t,"hide_instance_callback","hideInstance",t)}else{e.style.display="block";p.style.display="none";if(p.nodeName=="TEXTAREA"||p.nodeName=="INPUT"){t.setHTML(p.value)}else{t.setHTML(p.innerHTML)}t.useCSS=false;tinyMCE.dispatchCallback(t,"show_instance_callback","showInstance",t)}}else{tinyMCE.addMCEControl(tinyMCE._getElementById(s),s)}return;case"mceResetDesignMode":if(tinyMCE.isGecko){for(n in tinyMCE.instances){if(!tinyMCE.isInstance(tinyMCE.instances[n])){continue}try{tinyMCE.instances[n].getDoc().designMode="off";tinyMCE.instances[n].getDoc().designMode="on";tinyMCE.instances[n].useCSS=false}catch(q){}}}return}if(t){t.execCommand(o,m,s)}else{if(tinyMCE.settings.focus_alert){alert(tinyMCELang.lang_focus_alert)}}},_createIFrame:function(n,o,p){var t,m=n.getAttribute("id");var q,e;if(typeof(o)=="undefined"){o=document}if(typeof(p)=="undefined"){p=window}t=o.createElement("iframe");q=""+tinyMCE.settings.area_width;e=""+tinyMCE.settings.area_height;if(q.indexOf("%")==-1){q=parseInt(q);q=(isNaN(q)||q<0)?300:q;q=q+"px"}if(e.indexOf("%")==-1){e=parseInt(e);e=(isNaN(e)||e<0)?240:e;e=e+"px"}t.setAttribute("id",m);t.setAttribute("name",m);t.setAttribute("class","mceEditorIframe");t.setAttribute("border","0");t.setAttribute("frameBorder","0");t.setAttribute("marginWidth","0");t.setAttribute("marginHeight","0");t.setAttribute("leftMargin","0");t.setAttribute("topMargin","0");t.setAttribute("width",q);t.setAttribute("height",e);t.setAttribute("allowtransparency","true");t.className="mceEditorIframe";if(tinyMCE.settings.auto_resize){t.setAttribute("scrolling","no")}if(tinyMCE.isRealIE){t.setAttribute("src",this.settings.default_document)}t.style.width=q;t.style.height=e;if(tinyMCE.settings.strict_loading_mode){t.style.marginBottom="-4px"}if(tinyMCE.isRealIE){n.outerHTML=t.outerHTML}else{n.parentNode.replaceChild(t,n)}if(tinyMCE.isRealIE){try{p.frames[m]}catch(s){return false}return p.frames[m]}else{return t}},setupContent:function(p){var w=tinyMCE.instances[p],x,i=w.getDoc(),q=i.getElementsByTagName("head").item(0);var t=w.startContent,e,v;if(tinyMCE.settings.strict_loading_mode){t=t.replace(/&lt;/g,"<");t=t.replace(/&gt;/g,">");t=t.replace(/&quot;/g,'"');t=t.replace(/&amp;/g,"&")}tinyMCE.selectedInstance=w;w.switchSettings();if(!tinyMCE.isIE&&tinyMCE.getParam("setupcontent_reload",false)&&i.title!="blank_page"){try{i.location.href=tinyMCE.baseURL+"/blank.htm"}catch(s){}window.setTimeout("tinyMCE.setupContent('"+p+"');",1000);return}if(!q||!i.body){window.setTimeout("tinyMCE.setupContent('"+p+"');",10);return}tinyMCE.importCSS(w.getDoc(),tinyMCE.baseURL+"/themes/"+w.settings.theme+"/css/editor_content.css");if(typeof(w.settings.content_css)==="object"){for(iI=0;iI<w.settings.content_css.length;iI++){tinyMCE.importCSS(w.getDoc(),w.settings.content_css[iI])}}else{tinyMCE.importCSS(w.getDoc(),w.settings.content_css)}tinyMCE.dispatchCallback(w,"init_instance_callback","initInstance",w);if(tinyMCE.getParam("custom_undo_redo_keyboard_shortcuts")){w.addShortcut("ctrl","z","lang_undo_desc","Undo");w.addShortcut("ctrl","y","lang_redo_desc","Redo")}for(x=1;x<=6;x++){w.addShortcut("ctrl",""+x,"","FormatBlock",false,"<h"+x+">")}w.addShortcut("ctrl","7","","FormatBlock",false,"<p>");w.addShortcut("ctrl","8","","FormatBlock",false,"<div>");w.addShortcut("ctrl","9","","FormatBlock",false,"<address>");if(tinyMCE.isGecko){w.addShortcut("ctrl","b","lang_bold_desc","Bold");w.addShortcut("ctrl","i","lang_italic_desc","Italic");w.addShortcut("ctrl","u","lang_underline_desc","Underline")}if(tinyMCE.getParam("convert_fonts_to_spans")){w.getBody().setAttribute("id","mceSpanFonts")}if(tinyMCE.settings.nowrap){i.body.style.whiteSpace="nowrap"}i.body.dir=this.settings.directionality;i.editorId=p;if(!tinyMCE.isIE){i.documentElement.editorId=p}w.setBaseHREF(tinyMCE.settings.base_href);if(tinyMCE.settings.convert_newlines_to_brs){t=tinyMCE.regexpReplace(t,"\r\n","<br />","gi");t=tinyMCE.regexpReplace(t,"\r","<br />","gi");t=tinyMCE.regexpReplace(t,"\n","<br />","gi")}t=tinyMCE.storeAwayURLs(t);t=tinyMCE._customCleanup(w,"insert_to_editor",t);if(tinyMCE.isIE){window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["'+p+'"].getDoc(), "'+p+'");}catch(e){}',500);if(tinyMCE.settings.force_br_newlines){i.styleSheets[0].addRule("p","margin: 0;")}v=w.getBody();v.editorId=p}t=tinyMCE.cleanupHTMLCode(t);if(!tinyMCE.isIE){e=w.getDoc().createElement("body");i=w.getDoc();e.innerHTML=t;if(tinyMCE.settings.cleanup_on_startup){tinyMCE.setInnerHTML(w.getBody(),tinyMCE._cleanupHTML(w,i,this.settings,e))}else{tinyMCE.setInnerHTML(w.getBody(),t)}tinyMCE.convertAllRelativeURLs(w.getBody())}else{if(tinyMCE.settings.cleanup_on_startup){tinyMCE._setHTML(w.getDoc(),t);try{tinyMCE.setInnerHTML(w.getBody(),tinyMCE._cleanupHTML(w,w.contentDocument,this.settings,w.getBody()))}catch(u){}}else{tinyMCE._setHTML(w.getDoc(),t)}}tinyMCE.handleVisualAid(w.getBody(),true,tinyMCE.settings.visual,w);tinyMCE.dispatchCallback(w,"setupcontent_callback","setupContent",p,w.getBody(),w.getDoc());if(!tinyMCE.isIE){tinyMCE.addEventHandlers(w)}if(tinyMCE.isIE){tinyMCE.addEvent(w.getBody(),"blur",TinyMCE_Engine.prototype._eventPatch);tinyMCE.addEvent(w.getBody(),"beforedeactivate",TinyMCE_Engine.prototype._eventPatch);if(!tinyMCE.isOpera){tinyMCE.addEvent(i.body,"mousemove",TinyMCE_Engine.prototype.onMouseMove);tinyMCE.addEvent(i.body,"beforepaste",TinyMCE_Engine.prototype._eventPatch);tinyMCE.addEvent(i.body,"drop",TinyMCE_Engine.prototype._eventPatch)}}w.select();tinyMCE.selectedElement=w.contentWindow.document.body;tinyMCE._customCleanup(w,"insert_to_editor_dom",w.getBody());tinyMCE._customCleanup(w,"setup_content_dom",w.getBody());tinyMCE._setEventsEnabled(w.getBody(),false);tinyMCE.cleanupAnchors(w.getDoc());if(tinyMCE.getParam("convert_fonts_to_spans")){tinyMCE.convertSpansToFonts(w.getDoc())}w.startContent=tinyMCE.trim(w.getBody().innerHTML);w.undoRedo.add({content:w.startContent});if(tinyMCE.isGecko){tinyMCE.selectNodes(w.getBody(),function(a){if(a.nodeType==3||a.nodeType==8){a.nodeValue=a.nodeValue.replace(new RegExp('\\s(mce_src|mce_href)="[^"]*"',"gi"),"")}return false})}if(tinyMCE.isGecko){w.getBody().spellcheck=tinyMCE.getParam("gecko_spellcheck")}tinyMCE._removeInternal(w.getBody());w.select();tinyMCE.triggerNodeChange(false,true)},storeAwayURLs:function(d){if(!d.match(/(mce_src|mce_href)/gi,d)){d=d.replace(new RegExp('src\\s*=\\s*"([^ >"]*)"',"gi"),'src="$1" mce_src="$1"');d=d.replace(new RegExp('href\\s*=\\s*"([^ >"]*)"',"gi"),'href="$1" mce_href="$1"')}return d},_removeInternal:function(d){if(tinyMCE.isGecko){tinyMCE.selectNodes(d,function(a){if(a.nodeType==3||a.nodeType==8){a.nodeValue=a.nodeValue.replace(new RegExp('\\s(mce_src|mce_href)="[^"]*"',"gi"),"")}return false})}},removeTinyMCEFormElements:function(i){var h,f;if(!tinyMCE.getParam("hide_selects_on_submit")){return}if(typeof(i)=="undefined"||i==null){return}if(i.nodeName!="FORM"){if(i.form){i=i.form}else{i=tinyMCE.getParentElement(i,"form")}}if(i==null){return}for(h=0;h<i.elements.length;h++){f=i.elements[h].name?i.elements[h].name:i.elements[h].id;if(f.indexOf("mce_editor_")==0){i.elements[h].disabled=true}}},handleEvent:function(x){var A=tinyMCE.selectedInstance,B,w,F;if(typeof(tinyMCE)=="undefined"){return true}if(tinyMCE.executeCallback(tinyMCE.selectedInstance,"handle_event_callback","handleEvent",x)){return false}switch(x.type){case"beforedeactivate":case"blur":if(tinyMCE.selectedInstance){tinyMCE.selectedInstance.execCommand("mceEndTyping")}tinyMCE.hideMenus();return;case"drop":case"beforepaste":if(tinyMCE.selectedInstance){tinyMCE.selectedInstance.setBaseHREF(null)}if(tinyMCE.isRealIE){var E=tinyMCE.selectedInstance.iframeElement;if(E.style.height.indexOf("%")!=-1){E._oldHeight=E.style.height;E.style.height=E.clientHeight}}window.setTimeout("tinyMCE.selectedInstance.setBaseHREF(tinyMCE.settings.base_href);tinyMCE._resetIframeHeight();",1);return;case"submit":tinyMCE.formSubmit(tinyMCE.isMSIE?window.event.srcElement:x.target);return;case"reset":var z=tinyMCE.isIE?window.event.srcElement:x.target;for(B=0;B<document.forms.length;B++){if(document.forms[B]==z){window.setTimeout("tinyMCE.resetForm("+B+");",10)}}return;case"keypress":if(A&&A.handleShortcut(x)){return false}if(x.target.editorId){tinyMCE.instances[x.target.editorId].select()}else{if(x.target.ownerDocument.editorId){tinyMCE.instances[x.target.ownerDocument.editorId].select()}}if(tinyMCE.selectedInstance){tinyMCE.selectedInstance.switchSettings()}if((tinyMCE.isGecko||tinyMCE.isOpera||tinyMCE.isSafari)&&tinyMCE.settings.force_p_newlines&&x.keyCode==13&&!x.shiftKey){if(TinyMCE_ForceParagraphs._insertPara(tinyMCE.selectedInstance,x)){tinyMCE.execCommand("mceAddUndoLevel");return tinyMCE.cancelEvent(x)}}if((tinyMCE.isGecko&&!tinyMCE.isSafari)&&tinyMCE.settings.force_p_newlines&&(x.keyCode==8||x.keyCode==46)&&!x.shiftKey){if(TinyMCE_ForceParagraphs._handleBackSpace(tinyMCE.selectedInstance,x.type)){tinyMCE.execCommand("mceAddUndoLevel");return tinyMCE.cancelEvent(x)}}if(tinyMCE.isIE&&tinyMCE.settings.force_br_newlines&&x.keyCode==13){if(x.target.editorId){tinyMCE.instances[x.target.editorId].select()}if(tinyMCE.selectedInstance){var C=tinyMCE.selectedInstance.getDoc().selection;var D=C.createRange();if(tinyMCE.getParentElement(D.parentElement(),"li")!=null){return false}x.returnValue=false;x.cancelBubble=true;D.pasteHTML("<br />");D.collapse(false);D.select();tinyMCE.execCommand("mceAddUndoLevel");tinyMCE.triggerNodeChange(false);return false}}if(x.keyCode==8||x.keyCode==46){tinyMCE.selectedElement=x.target;tinyMCE.linkElement=tinyMCE.getParentElement(x.target,"a");tinyMCE.imgElement=tinyMCE.getParentElement(x.target,"img");tinyMCE.triggerNodeChange(false)}return false;case"keyup":case"keydown":tinyMCE.hideMenus();tinyMCE.hasMouseMoved=false;if(A&&A.handleShortcut(x)){return false}A._fixRootBlocks();if(A.settings.remove_trailing_nbsp){A._fixTrailingNbsp()}if(x.target.editorId){tinyMCE.instances[x.target.editorId].select()}if(tinyMCE.selectedInstance){tinyMCE.selectedInstance.switchSettings()}A=tinyMCE.selectedInstance;if(tinyMCE.isGecko&&tinyMCE.settings.force_p_newlines&&(x.keyCode==8||x.keyCode==46)&&!x.shiftKey){if(TinyMCE_ForceParagraphs._handleBackSpace(tinyMCE.selectedInstance,x.type)){tinyMCE.execCommand("mceAddUndoLevel");x.preventDefault();return false}}tinyMCE.selectedElement=null;tinyMCE.selectedNode=null;w=tinyMCE.selectedInstance.getFocusElement();tinyMCE.linkElement=tinyMCE.getParentElement(w,"a");tinyMCE.imgElement=tinyMCE.getParentElement(w,"img");tinyMCE.selectedElement=w;if(tinyMCE.isGecko&&x.type=="keyup"&&x.keyCode==9){tinyMCE.handleVisualAid(tinyMCE.selectedInstance.getBody(),true,tinyMCE.settings.visual,tinyMCE.selectedInstance)}if(tinyMCE.isIE&&x.type=="keydown"&&x.keyCode==13){tinyMCE.enterKeyElement=tinyMCE.selectedInstance.getFocusElement()}if(tinyMCE.isIE&&x.type=="keyup"&&x.keyCode==13){w=tinyMCE.enterKeyElement;if(w){var e=new RegExp("^HR|IMG|BR$","g");var v=new RegExp("^H[1-6]$","g");if(!w.hasChildNodes()&&!e.test(w.nodeName)){if(v.test(w.nodeName)){w.innerHTML="&nbsp;&nbsp;"}else{w.innerHTML="&nbsp;"}}}}F=tinyMCE.posKeyCodes;var y=false;for(B=0;B<F.length;B++){if(F[B]==x.keyCode){y=true;break}}if(tinyMCE.isIE&&tinyMCE.settings.custom_undo_redo){F=[8,46];for(B=0;B<F.length;B++){if(F[B]==x.keyCode){if(x.type=="keyup"){tinyMCE.triggerNodeChange(false)}}}}if(x.keyCode==17){return true}if(tinyMCE.isGecko){if(!y&&x.type=="keyup"&&!x.ctrlKey||(x.ctrlKey&&(x.keyCode==86||x.keyCode==88))){tinyMCE.execCommand("mceStartTyping")}}else{if(!y&&x.type=="keyup"){tinyMCE.execCommand("mceStartTyping")}}if(x.type=="keydown"&&(y||x.ctrlKey)&&A){A.undoBookmark=A.selection.getBookmark()}if(x.type=="keyup"&&(y||x.ctrlKey)){tinyMCE.execCommand("mceEndTyping")}if(y&&x.type=="keyup"){tinyMCE.triggerNodeChange(false)}if(tinyMCE.isIE&&x.ctrlKey){window.setTimeout("tinyMCE.triggerNodeChange(false);",1)}break;case"mousedown":case"mouseup":case"click":case"dblclick":case"focus":tinyMCE.hideMenus();if(tinyMCE.selectedInstance){tinyMCE.selectedInstance.switchSettings();tinyMCE.selectedInstance.isFocused=true}var i=tinyMCE.getParentElement(x.target,"html");for(var u in tinyMCE.instances){if(!tinyMCE.isInstance(tinyMCE.instances[u])){continue}A=tinyMCE.instances[u];A.autoResetDesignMode();if(A.getBody().parentNode==i){A.select();tinyMCE.selectedElement=x.target;tinyMCE.linkElement=tinyMCE.getParentElement(tinyMCE.selectedElement,"a");tinyMCE.imgElement=tinyMCE.getParentElement(tinyMCE.selectedElement,"img");break}}if(!tinyMCE.selectedInstance.undoRedo.undoLevels[0].bookmark&&(x.type=="mouseup"||x.type=="dblclick")){tinyMCE.selectedInstance.undoRedo.undoLevels[0].bookmark=tinyMCE.selectedInstance.selection.getBookmark()}if(x.type!="focus"){tinyMCE.selectedNode=null}tinyMCE.triggerNodeChange(false);tinyMCE.execCommand("mceEndTyping");if(x.type=="mouseup"){tinyMCE.execCommand("mceAddUndoLevel")}if(!tinyMCE.selectedInstance&&x.target.editorId){tinyMCE.instances[x.target.editorId].select()}return false}},getButtonHTML:function(x,w,s,u,m,v){var q="",t,h,p="";u="tinyMCE.execInstanceCommand('{$editor_id}','"+u+"'";if(typeof(m)!="undefined"&&m!=null){u+=","+m}if(typeof(v)!="undefined"&&v!=null){u+=",'"+v+"'"}u+=");";if(tinyMCE.isRealIE){p='onmouseover="tinyMCE.lastHover = this;"'}if(tinyMCE.getParam("button_tile_map")&&(!tinyMCE.isIE||tinyMCE.isOpera)&&(t=this.buttonMap[x])!=null&&(tinyMCE.getParam("language")=="en"||s.indexOf("$lang")==-1)){h=0-(t*20)==0?"0":0-(t*20);q+='<a id="{$editor_id}_'+x+'" href="javascript:'+u+'" onclick="'+u+'return false;" onmousedown="return false;" '+p+' class="mceTiledButton mceButtonNormal" target="_self">';q+='<img src="{$themeurl}/images/spacer.gif" style="background-position: '+h+'px 0" alt="{$'+w+'}" title="{$'+w+'}" />';q+="</a>"}else{q+='<a id="{$editor_id}_'+x+'" href="javascript:'+u+'" onclick="'+u+'return false;" onmousedown="return false;" '+p+' class="mceButtonNormal" target="_self">';q+='<img src="'+s+'" alt="{$'+w+'}" title="{$'+w+'}" />';q+="</a>"}return q},getMenuButtonHTML:function(x,w,s,h,t,p,v){var q="",u,m;h="tinyMCE.execInstanceCommand('{$editor_id}','"+h+"');";t="tinyMCE.execInstanceCommand('{$editor_id}','"+t+"'";if(typeof(p)!="undefined"&&p!=null){t+=","+p}if(typeof(v)!="undefined"&&v!=null){t+=",'"+v+"'"}t+=");";if(tinyMCE.getParam("button_tile_map")&&(!tinyMCE.isIE||tinyMCE.isOpera)&&(u=tinyMCE.buttonMap[x])!=null&&(tinyMCE.getParam("language")=="en"||s.indexOf("$lang")==-1)){m=0-(u*20)==0?"0":0-(u*20);if(tinyMCE.isRealIE){q+='<span id="{$editor_id}_'+x+'" class="mceMenuButton" onmouseover="tinyMCE._menuButtonEvent(\'over\',this);tinyMCE.lastHover = this;" onmouseout="tinyMCE._menuButtonEvent(\'out\',this);">'}else{q+='<span id="{$editor_id}_'+x+'" class="mceMenuButton">'}q+='<a href="javascript:'+t+'" onclick="'+t+'return false;" onmousedown="return false;" class="mceTiledButton mceMenuButtonNormal" target="_self">';q+='<img src="{$themeurl}/images/spacer.gif" style="width: 20px; height: 20px; background-position: '+m+'px 0" title="{$'+w+'}" /></a>';q+='<a href="javascript:'+h+'" onclick="'+h+'return false;" onmousedown="return false;"><img src="{$themeurl}/images/button_menu.gif" title="{$'+w+'}" class="mceMenuButton" />';q+="</a></span>"}else{if(tinyMCE.isRealIE){q+='<span id="{$editor_id}_'+x+'" dir="ltr" class="mceMenuButton" onmouseover="tinyMCE._menuButtonEvent(\'over\',this);tinyMCE.lastHover = this;" onmouseout="tinyMCE._menuButtonEvent(\'out\',this);">'}else{q+='<span id="{$editor_id}_'+x+'" dir="ltr" class="mceMenuButton">'}q+='<a href="javascript:'+t+'" onclick="'+t+'return false;" onmousedown="return false;" class="mceMenuButtonNormal" target="_self">';q+='<img src="'+s+'" title="{$'+w+'}" /></a>';q+='<a href="javascript:'+h+'" onclick="'+h+'return false;" onmousedown="return false;"><img src="{$themeurl}/images/button_menu.gif" title="{$'+w+'}" class="mceMenuButton" />';q+="</a></span>"}return q},_menuButtonEvent:function(e,f){if(f.className=="mceMenuButtonFocus"){return}if(e=="over"){f.className=f.className+" mceMenuHover"}else{f.className=f.className.replace(/\s.*$/,"")}},addButtonMap:function(i){var a,h=i.replace(/\s+/,"").split(",");for(a=0;a<h.length;a++){this.buttonMap[h[a]]=a}},formSubmit:function(l,k){var j,m,f=false;if(l.form){l=l.form}if(true){for(j in tinyMCE.instances){m=tinyMCE.instances[j];if(!tinyMCE.isInstance(m)){continue}if(m.formElement){if(l==m.formElement.form){f=true;m.isNotDirty=true}}}}else{f=true}if(f){tinyMCE.removeTinyMCEFormElements(l);tinyMCE.triggerSave()}if(l.mceOldSubmit&&k){l.mceOldSubmit()}},submitPatch:function(){tinyMCE.formSubmit(this,true)},onLoad:function(){var D,w,G,i,A,E,v,y,x,H;var z,B,F,C;if(tinyMCE.settings.strict_loading_mode&&this.loadingIndex!=-1){window.setTimeout("tinyMCE.onLoad();",1);return}if(tinyMCE.isRealIE&&window.event.type=="readystatechange"&&document.readyState!="complete"){return true}if(tinyMCE.isLoaded){return true}tinyMCE.isLoaded=true;if(tinyMCE.isRealIE&&document.body&&window.location.href!=window.top.location.href){D=document.body.createTextRange();D.collapse(true);D.select()}tinyMCE.dispatchCallback(null,"onpageload","onPageLoad");for(G=0;G<tinyMCE.configs.length;G++){tinyMCE.settings=tinyMCE.configs[G];z=tinyMCE.getParam("editor_selector");B=tinyMCE.getParam("editor_deselector");F=[];if(document.forms&&tinyMCE.settings.add_form_submit_trigger&&!tinyMCE.submitTriggers){for(w=0;w<document.forms.length;w++){C=document.forms[w];tinyMCE.addEvent(C,"submit",TinyMCE_Engine.prototype.handleEvent);tinyMCE.addEvent(C,"reset",TinyMCE_Engine.prototype.handleEvent);tinyMCE.submitTriggers=true;if(tinyMCE.settings.submit_patch){try{C.mceOldSubmit=C.submit;C.submit=TinyMCE_Engine.prototype.submitPatch}catch(e){}}}}i=tinyMCE.settings.mode;switch(i){case"exact":E=tinyMCE.getParam("elements","",true,",");for(w=0;w<E.length;w++){v=tinyMCE._getElementById(E[w]);A=v?v.getAttribute(tinyMCE.settings.textarea_trigger):"";if(new RegExp("\\b"+B+"\\b").test(tinyMCE.getAttrib(v,"class"))){continue}if(A=="false"){continue}if((tinyMCE.settings.ask||tinyMCE.settings.convert_on_click)&&v){F[F.length]=v;continue}if(v){tinyMCE.addMCEControl(v,E[w])}}break;case"specific_textareas":case"textareas":E=document.getElementsByTagName("textarea");for(w=0;w<E.length;w++){H=E.item(w);A=H.getAttribute(tinyMCE.settings.textarea_trigger);if(z!==""&&!new RegExp("\\b"+z+"\\b").test(tinyMCE.getAttrib(H,"class"))){continue}if(z!==""){A=z!==""?"true":""}if(new RegExp("\\b"+B+"\\b").test(tinyMCE.getAttrib(H,"class"))){continue}if((i=="specific_textareas"&&A=="true")||(i=="textareas"&&A!="false")){F[F.length]=H}}break}for(w=0;w<F.length;w++){v=F[w];x=v.name?v.name:v.id;if(tinyMCE.settings.ask||tinyMCE.settings.convert_on_click){if(tinyMCE.isGecko){y=tinyMCE.settings;tinyMCE.addEvent(v,"focus",function(a){window.setTimeout(function(){TinyMCE_Engine.prototype.confirmAdd(a,y)},10)});if(v.nodeName!="TEXTAREA"&&v.nodeName!="INPUT"){tinyMCE.addEvent(v,"click",function(a){window.setTimeout(function(){TinyMCE_Engine.prototype.confirmAdd(a,y)},10)})}}else{y=tinyMCE.settings;tinyMCE.addEvent(v,"focus",function(){TinyMCE_Engine.prototype.confirmAdd(null,y)});tinyMCE.addEvent(v,"click",function(){TinyMCE_Engine.prototype.confirmAdd(null,y)})}}else{tinyMCE.addMCEControl(v,x)}}if(tinyMCE.settings.auto_focus){window.setTimeout(function(){var a=tinyMCE.getInstanceById(tinyMCE.settings.auto_focus);a.selection.selectNode(a.getBody(),true,true);a.contentWindow.focus()},100)}tinyMCE.dispatchCallback(null,"oninit","onInit")}},isInstance:function(d){return d!=null&&typeof(d)=="object"&&d.isTinyMCE_Control},getParam:function(p,i,l,q){var o,n,m=(typeof(this.settings[p])=="undefined")?i:this.settings[p];if(m=="true"||m=="false"){return(m=="true")}if(l){m=tinyMCE.regexpReplace(m,"[ \t\r\n]","")}if(typeof(q)!="undefined"&&q!=null){m=m.split(q);n=[];for(o=0;o<m.length;o++){if(m[o]&&m[o]!==""){n[n.length]=m[o]}}m=n}return m},getLang:function(m,j,n,l){var o=(typeof(tinyMCELang[m])=="undefined")?j:tinyMCELang[m],k;if(n){o=tinyMCE.entityDecode(o)}if(l){for(k in l){o=this.replaceVar(o,k,l[k])}}return o},entityDecode:function(e){var f=document.createElement("div");f.innerHTML=e;return !f.firstChild?e:f.firstChild.nodeValue},addToLang:function(h,i){var f;for(f in i){if(typeof(i[f])=="function"){continue}tinyMCELang[(f.indexOf("lang_")==-1?"lang_":"")+(h!==""?(h+"_"):"")+f]=i[f]}this.loadNextScript()},triggerNodeChange:function(n,q){var t,w,x,v=-1,o=-1,s,u=false,p;if(tinyMCE.selectedInstance){w=tinyMCE.selectedInstance;t=(typeof(q)!="undefined"&&q)?tinyMCE.selectedElement:w.getFocusElement();x=w.editorId;p=w.selection.getSelectedText();if(tinyMCE.settings.auto_resize){w.resizeToContent()}if(q&&tinyMCE.isGecko&&w.isHidden()){t=w.getBody()}w.switchSettings();if(tinyMCE.selectedElement){u=(tinyMCE.selectedElement.nodeName.toLowerCase()=="img")||(p&&p.length>0)}if(tinyMCE.settings.custom_undo_redo){v=w.undoRedo.undoIndex;o=w.undoRedo.undoLevels.length}tinyMCE.dispatchCallback(w,"handle_node_change_callback","handleNodeChange",x,t,v,o,w.visualAid,u,q)}if(this.selectedInstance&&(typeof(n)=="undefined"||n)){this.selectedInstance.contentWindow.focus()}},_customCleanup:function(l,n,m){var o,i,p,q;q=tinyMCE.settings.cleanup_callback;if(q!=""){m=tinyMCE.resolveDots(tinyMCE.settings.cleanup_callback,window)(n,m,l)}i=tinyMCE.themes[tinyMCE.settings.theme];if(i&&i.cleanup){m=i.cleanup(n,m,l)}o=l.plugins;for(p=0;p<o.length;p++){i=tinyMCE.plugins[o[p]];if(i&&i.cleanup){m=i.cleanup(n,m,l)}}return m},setContent:function(d){if(tinyMCE.selectedInstance){tinyMCE.selectedInstance.execCommand("mceSetContent",false,d);tinyMCE.selectedInstance.repaint()}},importThemeLanguagePack:function(d){if(typeof(d)=="undefined"){d=tinyMCE.settings.theme}tinyMCE.loadScript(tinyMCE.baseURL+"/themes/"+d+"/langs/"+tinyMCE.settings.language+".js")},importPluginLanguagePack:function(f){var e=tinyMCE.baseURL+"/plugins/"+f;if(this.plugins[f]){e=this.plugins[f].baseURL}tinyMCE.loadScript(e+"/langs/"+tinyMCE.settings.language+".js")},applyTemplate:function(f,e){return f.replace(new RegExp("\\{\\$([a-z0-9_]+)\\}","gi"),function(d,a){if(a.indexOf("lang_")==0&&tinyMCELang[a]){return tinyMCELang[a]}if(e&&e[a]){return e[a]}if(tinyMCE.settings[a]){return tinyMCE.settings[a]}if(d=="themeurl"){return tinyMCE.themeURL}return d})},replaceVar:function(i,h,f){return i.replace(new RegExp("{\\$"+h+"}","g"),f)},openWindow:function(I,w){var B,D,H,e,v,E,z,F,G,A,J,C;w=!w?{}:w;w.mce_template_file=I.file;w.mce_width=I.width;w.mce_height=I.height;tinyMCE.windowArgs=w;B=I.html;if(!(D=parseInt(I.width))){D=320}if(!(H=parseInt(I.height))){H=200}if(tinyMCE.isIE){H+=40}else{H+=20}e=parseInt(screen.width/2)-(D/2);v=parseInt(screen.height/2)-(H/2);E=(w&&w.resizable)?w.resizable:"no";z=(w&&w.scrollbars)?w.scrollbars:"no";if(I.file.charAt(0)!="/"&&I.file.indexOf("://")==-1){F=tinyMCE.baseURL+"/themes/"+tinyMCE.getParam("theme")+"/"+I.file}else{F=I.file}for(G in w){if(typeof(w[G])=="function"){continue}F=tinyMCE.replaceVar(F,G,escape(w[G]))}if(B){B=tinyMCE.replaceVar(B,"css",this.settings.popups_css);B=tinyMCE.applyTemplate(B,w);A=window.open("","mcePopup"+new Date().getTime(),"top="+v+",left="+e+",scrollbars="+z+",dialog=yes,minimizable="+E+",modal=yes,width="+D+",height="+H+",resizable="+E);if(A==null){alert(tinyMCELang.lang_popup_blocked);return}A.document.write(B);A.document.close();A.resizeTo(D,H);A.focus()}else{if((tinyMCE.isRealIE)&&E!="yes"&&tinyMCE.settings.dialog_type=="modal"){H+=10;C="resizable:"+E+";scroll:"+z+";status:yes;center:yes;help:no;dialogWidth:"+D+"px;dialogHeight:"+H+"px;";window.showModalDialog(F,window,C)}else{J=(E=="yes")?"no":"yes";if(tinyMCE.isGecko&&tinyMCE.isMac){J="no"}if(I.close_previous!="no"){try{tinyMCE.lastWindow.close()}catch(x){}}A=window.open(F,"mcePopup"+new Date().getTime(),"top="+v+",left="+e+",scrollbars="+z+",dialog="+J+",minimizable="+E+",modal="+J+",width="+D+",height="+H+",resizable="+E);if(A==null){alert(tinyMCELang.lang_popup_blocked);return}if(I.close_previous!="no"){tinyMCE.lastWindow=A}try{A.resizeTo(D,H)}catch(y){}if(tinyMCE.isGecko){if(A.document.defaultView.statusbar.visible){A.resizeBy(0,tinyMCE.isMac?10:24)}}A.focus()}}},closeWindow:function(d){d.close()},getVisualAidClass:function(n,o){var q,m,i,p,l=tinyMCE.settings.visual_table_class;if(typeof(o)=="undefined"){o=tinyMCE.settings.visual}m=[];i=n.split(" ");for(q=0;q<i.length;q++){if(i[q]==l){i[q]=""}if(i[q]!==""){m[m.length]=i[q]}}if(o){m[m.length]=l}p="";for(q=0;q<m.length;q++){if(q>0){p+=" "}p+=m[q]}return p},handleVisualAid:function(B,i,C,z,w){var A,t,v,E,x,F,y,D,u;if(!B){return}if(!w){tinyMCE.dispatchCallback(z,"handle_visual_aid_callback","handleVisualAid",B,i,C,z)}E=null;switch(B.nodeName){case"TABLE":F=B.style.width;y=B.style.height;D=tinyMCE.getAttrib(B,"border");D=D==""||D=="0"?true:false;tinyMCE.setAttrib(B,"class",tinyMCE.getVisualAidClass(tinyMCE.getAttrib(B,"class"),C&&D));B.style.width=F;B.style.height=y;for(v=0;v<B.rows.length;v++){for(t=0;t<B.rows[v].cells.length;t++){u=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(B.rows[v].cells[t],"class"),C&&D);tinyMCE.setAttrib(B.rows[v].cells[t],"class",u)}}break;case"A":x=tinyMCE.getAttrib(B,"name");if(x!==""&&C){B.title=x;tinyMCE.addCSSClass(B,"mceItemAnchor")}else{if(x!==""&&!C){B.className=""}}break}if(i&&B.hasChildNodes()){for(A=0;A<B.childNodes.length;A++){tinyMCE.handleVisualAid(B.childNodes[A],i,C,z,true)}}},fixGeckoBaseHREFBug:function(e,h,l){var m,k;if(tinyMCE.isGecko){if(e==1){l=l.replace(/\ssrc=/gi," mce_tsrc=");l=l.replace(/\shref=/gi," mce_thref=");return l}else{if(!new RegExp("(src|href)=","g").test(l)){return l}tinyMCE.selectElements(h,"A,IMG,SELECT,AREA,IFRAME,BASE,INPUT,SCRIPT,EMBED,OBJECT,LINK",function(a){m=tinyMCE.getAttrib(a,"mce_tsrc");k=tinyMCE.getAttrib(a,"mce_thref");if(m!==""){try{a.src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings.base_href,m)}catch(d){}a.removeAttribute("mce_tsrc")}if(k!==""){try{a.href=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings.base_href,k)}catch(d){}a.removeAttribute("mce_thref")}return false});tinyMCE.selectNodes(h,function(a){if(a.nodeType==3||a.nodeType==8){a.nodeValue=a.nodeValue.replace(/\smce_tsrc=/gi," src=");a.nodeValue=a.nodeValue.replace(/\smce_thref=/gi," href=")}return false})}}return l},_setHTML:function(i,n){var p,q,e,o;n=tinyMCE.cleanupHTMLCode(n);try{tinyMCE.setInnerHTML(i.body,n)}catch(m){if(this.isMSIE){i.body.createTextRange().pasteHTML(n)}}if(tinyMCE.isIE&&tinyMCE.settings.fix_content_duplication){e=i.getElementsByTagName("P");for(p=0;p<e.length;p++){o=e[p];while((o=o.parentNode)!=null){if(o.nodeName=="P"){o.outerHTML=o.innerHTML}}}q=i.body.innerHTML;tinyMCE.setInnerHTML(i.body,q)}tinyMCE.cleanupAnchors(i);if(tinyMCE.getParam("convert_fonts_to_spans")){tinyMCE.convertSpansToFonts(i)}},getEditorId:function(e){var f=this.getInstanceById(e);if(!f){return null}return f.editorId},getInstanceById:function(i){var f=this.instances[i],h;if(!f){for(h in tinyMCE.instances){f=tinyMCE.instances[h];if(!tinyMCE.isInstance(f)){continue}if(f.formTargetElementId==i){return f}}}else{return f}return null},queryInstanceCommandValue:function(h,i){var f=tinyMCE.getInstanceById(h);if(f){return f.queryCommandValue(i)}return false},queryInstanceCommandState:function(h,i){var f=tinyMCE.getInstanceById(h);if(f){return f.queryCommandState(i)}return null},setWindowArg:function(f,e){this.windowArgs[f]=e},getWindowArg:function(f,d){return(typeof(this.windowArgs[f])=="undefined")?d:this.windowArgs[f]},getCSSClasses:function(i,H){var A,w,e,p,F,G,B,D,z=tinyMCE.getInstanceById(i);var E,x,C;if(!z){z=tinyMCE.selectedInstance}if(!z){return[]}if(!H){H=z.getDoc()}if(z&&z.cssClasses.length>0){return z.cssClasses}if(!H){return}F=H.styleSheets;if(F&&F.length>0){for(e=0;e<F.length;e++){B=null;try{B=tinyMCE.isIE?H.styleSheets(e).rules:F[e].cssRules}catch(y){}if(!B){return[]}for(A=0;A<B.length;A++){D=B[A].selectorText;if(D){G=D.split(",");for(w=0;w<G.length;w++){p=G[w];while(p.indexOf(" ")==0){p=p.substring(1)}if(p.indexOf(" ")!=-1||p.indexOf(":")!=-1||p.indexOf("mceItem")!=-1){continue}if(p.indexOf(tinyMCE.settings.visual_table_class)!=-1||p.indexOf("mceEditable")!=-1||p.indexOf("mceNonEditable")!=-1){continue}if(p.indexOf(".")!=-1){E=p.substring(p.indexOf(".")+1);x=true;for(C=0;C<z.cssClasses.length&&x;C++){if(z.cssClasses[C]==E){x=false}}if(x){z.cssClasses[z.cssClasses.length]=E}}}}}}}return z.cssClasses},regexpReplace:function(j,i,l,k){var m;if(j==null){return j}if(typeof(k)=="undefined"){k="g"}m=new RegExp(i,k);return j.replace(m,l)},trim:function(d){return d.replace(/^\s*|\s*$/g,"")},cleanupEventStr:function(d){d=""+d;d=d.replace("function anonymous()\n{\n","");d=d.replace("\n}","");d=d.replace(/^return true;/gi,"");return d},getControlHTML:function(l){var p,i,m,n,q,o=tinyMCE.getLang("lang_dir")=="rtl";i=tinyMCE.plugins;for(m in i){n=i[m];if(n.getControlHTML&&(q=n.getControlHTML(l))!==""){if(o){return'<span dir="rtl">'+tinyMCE.replaceVar(q,"pluginurl",n.baseURL)+"</span>"}return tinyMCE.replaceVar(q,"pluginurl",n.baseURL)}}n=tinyMCE.themes[tinyMCE.settings.theme];if(n.getControlHTML&&(q=n.getControlHTML(l))!==""){if(o){return'<span dir="rtl">'+q+"</span>"}return q}return""},evalFunc:function(f,k,j,a){a=!a?window:a;f=typeof(f)=="function"?f:a[f];if(f){return f.apply(a,Array.prototype.slice.call(j,k))}},dispatchCallback:function(f,i,h){return this.callFunc(f,i,h,0,this.dispatchCallback.arguments)},executeCallback:function(f,i,h){return this.callFunc(f,i,h,1,this.executeCallback.arguments)},execCommandCallback:function(f,i,h){return this.callFunc(f,i,h,2,this.execCommandCallback.arguments)},callFunc:function(a,p,n,m,y){var l,i,z,o,s,v;s=m==2;l=tinyMCE.getParam(p,"");if(l!==""&&(v=tinyMCE.evalFunc(l,3,y))==s&&m>0){return true}if(a!=null){for(i=0,l=a.plugins;i<l.length;i++){o=tinyMCE.plugins[l[i]];if(o[n]&&(v=tinyMCE.evalFunc(n,3,y,o))==s&&m>0){return true}}}l=tinyMCE.themes;for(z in l){o=l[z];if(o[n]&&(v=tinyMCE.evalFunc(n,3,y,o))==s&&m>0){return true}}return false},resolveDots:function(i,h){var f;if(typeof(i)=="string"){for(f=0,i=i.split(".");f<i.length;f++){h=h[i[f]]}}else{h=i}return h},xmlEncode:function(d){return d?(""+d).replace(this.xmlEncodeRe,function(a,f){switch(a){case"&":return"&amp;";case'"':return"&quot;";case"<":return"&lt;";case">":return"&gt;"}return a}):d},add:function(h,f){var i;for(i in f){if(f.hasOwnProperty(i)){h.prototype[i]=f[i]}}},extend:function(k,h){var j={},i;j.parent=k;for(i in k){if(k.hasOwnProperty(i)){j[i]=k[i]}}for(i in h){if(h.hasOwnProperty(i)){j[i]=h[i]}}return j},hideMenus:function(){var d=tinyMCE.lastSelectedMenuBtn;if(tinyMCE.lastMenu){tinyMCE.lastMenu.hide();tinyMCE.lastMenu=null}if(d){tinyMCE.switchClass(d,tinyMCE.lastMenuBtnClass);tinyMCE.lastSelectedMenuBtn=null}}};var TinyMCE=TinyMCE_Engine;var tinyMCE=new TinyMCE_Engine();var tinyMCELang={};function TinyMCE_Control(v){var o,t,s,u,x,p,q,u,w,i=v;this.undoRedoLevel=true;this.isTinyMCE_Control=true;this.enabled=true;this.settings=i;this.settings.theme=tinyMCE.getParam("theme","default");this.settings.width=tinyMCE.getParam("width",-1);this.settings.height=tinyMCE.getParam("height",-1);this.selection=new TinyMCE_Selection(this);this.undoRedo=new TinyMCE_UndoRedo(this);this.cleanup=new TinyMCE_Cleanup();this.shortcuts=[];this.hasMouseMoved=false;this.foreColor=this.backColor="#999999";this.data={};this.cssClasses=[];this.cleanup.init({valid_elements:i.valid_elements,extended_valid_elements:i.extended_valid_elements,valid_child_elements:i.valid_child_elements,entities:i.entities,entity_encoding:i.entity_encoding,debug:i.cleanup_debug,indent:i.apply_source_formatting,invalid_elements:i.invalid_elements,verify_html:i.verify_html,fix_content_duplication:i.fix_content_duplication,convert_fonts_to_spans:i.convert_fonts_to_spans});o=this.settings.theme;if(!tinyMCE.hasTheme(o)){q=tinyMCE.callbacks;s={};for(t=0;t<q.length;t++){if((u=window["TinyMCE_"+o+"_"+q[t]])){s[q[t]]=u}}tinyMCE.addTheme(o,s)}this.plugins=[];x=tinyMCE.getParam("plugins","",true,",");if(x.length>0){for(t=0;t<x.length;t++){w=x[t];if(w.charAt(0)=="-"){w=w.substring(1)}if(!tinyMCE.hasPlugin(w)){q=tinyMCE.callbacks;s={};for(p=0;p<q.length;p++){if((u=window["TinyMCE_"+w+"_"+q[p]])){s[q[p]]=u}}tinyMCE.addPlugin(w,s)}this.plugins[this.plugins.length]=w}}}TinyMCE_Control.prototype={selection:null,settings:null,cleanup:null,getData:function(e){var f=this.data[e];if(!f){f=this.data[e]={}}return f},hasPlugin:function(f){var e;for(e=0;e<this.plugins.length;e++){if(this.plugins[e]==f){return true}}return false},addPlugin:function(f,e){if(!this.hasPlugin(f)){tinyMCE.addPlugin(f,e);this.plugins[this.plugins.length]=f}},repaint:function(){var h,f,i;if(tinyMCE.isRealIE){return}try{h=this.selection;f=h.getBookmark(true);this.getBody().style.display="none";this.getDoc().execCommand("selectall",false,null);this.getSel().collapseToStart();this.getBody().style.display="block";h.moveToBookmark(f)}catch(i){}},switchSettings:function(){if(tinyMCE.configs.length>1&&tinyMCE.currentConfig!=this.settings.index){tinyMCE.settings=this.settings;tinyMCE.currentConfig=this.settings.index}},select:function(){var d=tinyMCE.selectedInstance;if(d!=this){if(d){d.execCommand("mceEndTyping")}tinyMCE.dispatchCallback(this,"select_instance_callback","selectInstance",this,d);tinyMCE.selectedInstance=this}},getBody:function(){return this.contentBody?this.contentBody:this.getDoc().body},getDoc:function(){return this.contentWindow.document},getWin:function(){return this.contentWindow},getContainerWin:function(){return this.containerWindow?this.containerWindow:window},getViewPort:function(){return tinyMCE.getViewPort(this.getWin())},getParentNode:function(f,e){return tinyMCE.getParentNode(f,e,this.getBody())},getParentElement:function(h,f,i){return tinyMCE.getParentElement(h,f,i,this.getBody())},getParentBlockElement:function(d){return tinyMCE.getParentBlockElement(d,this.getBody())},resizeToContent:function(){var i=this.getDoc(),d=i.body,h=i.documentElement;this.iframeElement.style.height=(tinyMCE.isRealIE)?d.scrollHeight:h.offsetHeight+"px"},addShortcut:function(v,n,k,w,B,A){var x=typeof(n)=="number",y=tinyMCE.isIE,d,i,m,z=this.shortcuts;if(!tinyMCE.getParam("custom_shortcuts")){return false}v=v.toLowerCase();n=y&&!x?n.toUpperCase():n;d=x?null:n.charCodeAt(0);k=k&&k.indexOf("lang_")==0?tinyMCE.getLang(k):k;i={alt:v.indexOf("alt")!=-1,ctrl:v.indexOf("ctrl")!=-1,shift:v.indexOf("shift")!=-1,charCode:d,keyCode:x?n:(y?d:null),desc:k,cmd:w,ui:B,val:A};for(m=0;m<z.length;m++){if(i.alt==z[m].alt&&i.ctrl==z[m].ctrl&&i.shift==z[m].shift&&i.charCode==z[m].charCode&&i.keyCode==z[m].keyCode){return false}}z[z.length]=i;return true},handleShortcut:function(j){var e,k,i;if(!j.altKey&&!j.ctrlKey){return false}k=this.shortcuts;for(e=0;e<k.length;e++){i=k[e];if(i.alt==j.altKey&&i.ctrl==j.ctrlKey&&(i.keyCode==j.keyCode||i.charCode==j.charCode)){if(i.cmd&&(j.type=="keydown"||(j.type=="keypress"&&!tinyMCE.isOpera))){tinyMCE.execCommand(i.cmd,i.ui,i.val)}tinyMCE.cancelEvent(j);return true}}return false},autoResetDesignMode:function(){if(!tinyMCE.isIE&&this.isHidden()&&tinyMCE.getParam("auto_reset_designmode")){eval('try { this.getDoc().designMode = "On"; this.useCSS = false; } catch(e) {}')}},isHidden:function(){var d;if(tinyMCE.isIE){return false}d=this.getSel();return(!d||!d.rangeCount||d.rangeCount==0)},isDirty:function(){return tinyMCE.trim(this.startContent)!=tinyMCE.trim(this.getBody().innerHTML)&&!this.isNotDirty},_mergeElements:function(s,n,o,q){var t,l,p,m;if(s=="removeformat"){n.className="";n.style.cssText="";o.className="";o.style.cssText="";return}t=tinyMCE.parseStyle(tinyMCE.getAttrib(n,"style"));l=tinyMCE.parseStyle(tinyMCE.getAttrib(o,"style"));p=tinyMCE.getAttrib(n,"class");p=tinyMCE.getAttrib(o,"class");if(q){for(m in t){if(typeof(t[m])=="function"){continue}l[m]=t[m]}}else{for(m in l){if(typeof(l[m])=="function"){continue}t[m]=l[m]}}tinyMCE.setAttrib(n,"style",tinyMCE.serializeStyle(t));tinyMCE.setAttrib(n,"class",tinyMCE.trim(p));o.className="";o.style.cssText="";o.removeAttribute("class");o.removeAttribute("style")},_fixRootBlocks:function(){var l,o,m,n,j,k;l=tinyMCE.getParam("forced_root_block");if(!l){return}o=this.getBody();m=o.firstChild;while(m){j=m.nextSibling;if((m.nodeType==3&&m.nodeValue.replace(/\s+/g,"")!="")||(m.nodeType==1&&!tinyMCE.blockRegExp.test(m.nodeName))){if(!k){k=this.selection.getBookmark()}if(!n){n=this.getDoc().createElement(l);n.appendChild(m.cloneNode(true));o.replaceChild(n,m)}else{n.appendChild(m.cloneNode(true));o.removeChild(m)}}else{n=null}m=j}if(k){this.selection.moveToBookmark(k)}},_fixTrailingNbsp:function(){var k=this.selection,j=k.getFocusElement(),i,e;if(j&&tinyMCE.blockRegExp.test(j.nodeName)&&j.firstChild){e=j.firstChild.nodeValue;if(e&&e.length>1&&/(^\u00a0|\u00a0$)/.test(e)){j.firstChild.nodeValue=e.replace(/(^\u00a0|\u00a0$)/,"");k.selectNode(j.firstChild,true,false,false)}}},_setUseCSS:function(d){var h=this.getDoc();try{h.execCommand("useCSS",false,!d)}catch(i){}try{h.execCommand("styleWithCSS",false,d)}catch(i){}if(!tinyMCE.getParam("table_inline_editing")){try{h.execCommand("enableInlineTableEditing",false,"false")}catch(i){}}if(!tinyMCE.getParam("object_resizing")){try{h.execCommand("enableObjectResizing",false,"false")}catch(i){}}},execCommand:function(command,user_interface,value){var i,x,z,align,img,div,doc=this.getDoc(),win=this.getWin(),focusElm=this.getFocusElement();if(!new RegExp("mceStartTyping|mceEndTyping|mceBeginUndoLevel|mceEndUndoLevel|mceAddUndoLevel","gi").test(command)){this.undoBookmark=null}if(!tinyMCE.isIE&&!this.useCSS){this._setUseCSS(false);this.useCSS=true}this.contentDocument=doc;if(!/mceStartTyping|mceEndTyping/.test(command)){if(tinyMCE.execCommandCallback(this,"execcommand_callback","execCommand",this.editorId,this.getBody(),command,user_interface,value)){return}}if(focusElm&&focusElm.nodeName=="IMG"){align=focusElm.getAttribute("align");img=command=="JustifyCenter"?focusElm.cloneNode(false):focusElm;switch(command){case"JustifyLeft":if(align=="left"){img.setAttribute("align","");img.removeAttribute("align")}else{img.setAttribute("align","left")}div=focusElm.parentNode;if(div&&div.nodeName=="DIV"&&div.childNodes.length==1&&div.parentNode){div.parentNode.replaceChild(img,div)}this.selection.selectNode(img);this.repaint();tinyMCE.triggerNodeChange();return;case"JustifyCenter":img.setAttribute("align","");img.removeAttribute("align");div=tinyMCE.getParentElement(focusElm,"div");if(div&&div.style.textAlign=="center"){if(div.nodeName=="DIV"&&div.childNodes.length==1&&div.parentNode){div.parentNode.replaceChild(img,div)}}else{div=this.getDoc().createElement("div");div.style.textAlign="center";div.appendChild(img);focusElm.parentNode.replaceChild(div,focusElm)}this.selection.selectNode(img);this.repaint();tinyMCE.triggerNodeChange();return;case"JustifyRight":if(align=="right"){img.setAttribute("align","");img.removeAttribute("align")}else{img.setAttribute("align","right")}div=focusElm.parentNode;if(div&&div.nodeName=="DIV"&&div.childNodes.length==1&&div.parentNode){div.parentNode.replaceChild(img,div)}this.selection.selectNode(img);this.repaint();tinyMCE.triggerNodeChange();return}}if(tinyMCE.settings.force_br_newlines){var alignValue="";if(doc.selection.type!="Control"){switch(command){case"JustifyLeft":alignValue="left";break;case"JustifyCenter":alignValue="center";break;case"JustifyFull":alignValue="justify";break;case"JustifyRight":alignValue="right";break}if(alignValue!==""){var rng=doc.selection.createRange();if((divElm=tinyMCE.getParentElement(rng.parentElement(),"div"))!=null){divElm.setAttribute("align",alignValue)}else{if(rng.pasteHTML&&rng.htmlText.length>0){rng.pasteHTML('<div align="'+alignValue+'">'+rng.htmlText+"</div>")}}tinyMCE.triggerNodeChange();return}}}switch(command){case"mceRepaint":this.repaint();return true;case"JustifyLeft":case"JustifyCenter":case"JustifyFull":case"JustifyRight":var el=tinyMCE.getParentNode(focusElm,function(n){return tinyMCE.getAttrib(n,"align")});if(el){el.setAttribute("align","");el.removeAttribute("align")}else{this.getDoc().execCommand(command,user_interface,value)}tinyMCE.triggerNodeChange();return true;case"unlink":if(tinyMCE.isGecko&&this.getSel().isCollapsed){focusElm=tinyMCE.getParentElement(focusElm,"A");if(focusElm){this.selection.selectNode(focusElm,false)}}this.getDoc().execCommand(command,user_interface,value);tinyMCE.isGecko&&this.getSel().collapseToEnd();tinyMCE.triggerNodeChange();return true;case"InsertUnorderedList":case"InsertOrderedList":this.getDoc().execCommand(command,user_interface,value);tinyMCE.triggerNodeChange();break;case"Strikethrough":this.getDoc().execCommand(command,user_interface,value);tinyMCE.triggerNodeChange();break;case"mceSelectNode":this.selection.selectNode(value);tinyMCE.triggerNodeChange();tinyMCE.selectedNode=value;break;case"FormatBlock":if(value==null||value==""){var elm=tinyMCE.getParentElement(this.getFocusElement(),"p,div,h1,h2,h3,h4,h5,h6,pre,address,blockquote,dt,dl,dd,samp");if(elm){this.execCommand("mceRemoveNode",false,elm)}}else{if(!this.cleanup.isValid(value)){return true}if(tinyMCE.isGecko&&new RegExp("<(div|blockquote|code|dt|dd|dl|samp)>","gi").test(value)){value=value.replace(/[^a-z]/gi,"")}if(tinyMCE.isIE&&new RegExp("blockquote|code|samp","gi").test(value)){var b=this.selection.getBookmark();this.getDoc().execCommand("FormatBlock",false,"<p>");tinyMCE.renameElement(tinyMCE.getParentBlockElement(this.getFocusElement()),value);this.selection.moveToBookmark(b)}else{this.getDoc().execCommand("FormatBlock",false,value)}}tinyMCE.triggerNodeChange();break;case"mceRemoveNode":if(!value){value=tinyMCE.getParentElement(this.getFocusElement())}if(tinyMCE.isIE){value.outerHTML=value.innerHTML}else{var rng=value.ownerDocument.createRange();rng.setStartBefore(value);rng.setEndAfter(value);rng.deleteContents();rng.insertNode(rng.createContextualFragment(value.innerHTML))}tinyMCE.triggerNodeChange();break;case"mceSelectNodeDepth":var parentNode=this.getFocusElement();for(i=0;parentNode;i++){if(parentNode.nodeName.toLowerCase()=="body"){break}if(parentNode.nodeName.toLowerCase()=="#text"){i--;parentNode=parentNode.parentNode;continue}if(i==value){this.selection.selectNode(parentNode,false);tinyMCE.triggerNodeChange();tinyMCE.selectedNode=parentNode;return}parentNode=parentNode.parentNode}break;case"mceSetStyleInfo":case"SetStyleInfo":var rng=this.getRng();var sel=this.getSel();var scmd=value.command;var sname=value.name;var svalue=value.value==null?"":value.value;var wrapper=value.wrapper?value.wrapper:"span";var parentElm=null;var invalidRe=new RegExp("^BODY|HTML$","g");var invalidParentsRe=tinyMCE.settings.merge_styles_invalid_parents!==""?new RegExp(tinyMCE.settings.merge_styles_invalid_parents,"gi"):null;if(tinyMCE.isIE){if(rng.item){parentElm=rng.item(0)}else{var pelm=rng.parentElement();var prng=doc.selection.createRange();prng.moveToElementText(pelm);if(rng.htmlText==prng.htmlText||rng.boundingWidth==0){if(invalidParentsRe==null||!invalidParentsRe.test(pelm.nodeName)){parentElm=pelm}}}}else{var felm=this.getFocusElement();if(sel.isCollapsed||(new RegExp("td|tr|tbody|table|img","gi").test(felm.nodeName)&&sel.anchorNode==felm.parentNode)){parentElm=felm}}if(parentElm&&!invalidRe.test(parentElm.nodeName)){if(scmd=="setstyle"){tinyMCE.setStyleAttrib(parentElm,sname,svalue)}if(scmd=="setattrib"){tinyMCE.setAttrib(parentElm,sname,svalue)}if(scmd=="removeformat"){parentElm.style.cssText="";tinyMCE.setAttrib(parentElm,"class","")}var ch=tinyMCE.getNodeTree(parentElm,[],1);for(z=0;z<ch.length;z++){if(ch[z]==parentElm){continue}if(scmd=="setstyle"){tinyMCE.setStyleAttrib(ch[z],sname,"")}if(scmd=="setattrib"){tinyMCE.setAttrib(ch[z],sname,"")}if(scmd=="removeformat"){ch[z].style.cssText="";tinyMCE.setAttrib(ch[z],"class","")}}}else{this._setUseCSS(false);doc.execCommand("FontName",false,"#mce_temp_font#");var elementArray=tinyMCE.getElementsByAttributeValue(this.getBody(),"font","face","#mce_temp_font#");for(x=0;x<elementArray.length;x++){elm=elementArray[x];if(elm){var spanElm=doc.createElement(wrapper);if(scmd=="setstyle"){tinyMCE.setStyleAttrib(spanElm,sname,svalue)}if(scmd=="setattrib"){tinyMCE.setAttrib(spanElm,sname,svalue)}if(scmd=="removeformat"){spanElm.style.cssText="";tinyMCE.setAttrib(spanElm,"class","")}if(elm.hasChildNodes()){for(i=0;i<elm.childNodes.length;i++){spanElm.appendChild(elm.childNodes[i].cloneNode(true))}}spanElm.setAttribute("mce_new","true");elm.parentNode.replaceChild(spanElm,elm);var ch=tinyMCE.getNodeTree(spanElm,[],1);for(z=0;z<ch.length;z++){if(ch[z]==spanElm){continue}if(scmd=="setstyle"){tinyMCE.setStyleAttrib(ch[z],sname,"")}if(scmd=="setattrib"){tinyMCE.setAttrib(ch[z],sname,"")}if(scmd=="removeformat"){ch[z].style.cssText="";tinyMCE.setAttrib(ch[z],"class","")}}}}}var nodes=doc.getElementsByTagName(wrapper);for(i=nodes.length-1;i>=0;i--){var elm=nodes[i];var isNew=tinyMCE.getAttrib(elm,"mce_new")=="true";elm.removeAttribute("mce_new");if(elm.childNodes&&elm.childNodes.length==1&&elm.childNodes[0].nodeType==1){this._mergeElements(scmd,elm,elm.childNodes[0],isNew);continue}if(elm.parentNode.childNodes.length==1&&!invalidRe.test(elm.nodeName)&&!invalidRe.test(elm.parentNode.nodeName)){if(invalidParentsRe==null||!invalidParentsRe.test(elm.parentNode.nodeName)){this._mergeElements(scmd,elm.parentNode,elm,false)}}}var nodes=doc.getElementsByTagName(wrapper);for(i=nodes.length-1;i>=0;i--){var elm=nodes[i],isEmpty=true;var tmp=doc.createElement("body");tmp.appendChild(elm.cloneNode(false));tmp.innerHTML=tmp.innerHTML.replace(new RegExp('style=""|class=""',"gi"),"");if(new RegExp("<span>","gi").test(tmp.innerHTML)){for(x=0;x<elm.childNodes.length;x++){if(elm.parentNode!=null){elm.parentNode.insertBefore(elm.childNodes[x].cloneNode(true),elm)}}elm.parentNode.removeChild(elm)}}if(scmd=="removeformat"){tinyMCE.handleVisualAid(this.getBody(),true,this.visualAid,this)}tinyMCE.triggerNodeChange();break;case"FontName":if(value==null){var s=this.getSel();if(tinyMCE.isGecko&&s.isCollapsed){var f=tinyMCE.getParentElement(this.getFocusElement(),"font");if(f!=null){this.selection.selectNode(f,false)}}this.getDoc().execCommand("RemoveFormat",false,null);if(f!=null&&tinyMCE.isGecko){var r=this.getRng().cloneRange();r.collapse(true);s.removeAllRanges();s.addRange(r)}}else{this.getDoc().execCommand("FontName",false,value)}if(tinyMCE.isGecko){window.setTimeout("tinyMCE.triggerNodeChange(false);",1)}return;case"FontSize":this.getDoc().execCommand("FontSize",false,value);if(tinyMCE.isGecko){window.setTimeout("tinyMCE.triggerNodeChange(false);",1)}return;case"forecolor":value=value==null?this.foreColor:value;value=tinyMCE.trim(value);value=value.charAt(0)!="#"?(isNaN("0x"+value)?value:"#"+value):value;this.foreColor=value;this.getDoc().execCommand("forecolor",false,value);break;case"HiliteColor":value=value==null?this.backColor:value;value=tinyMCE.trim(value);value=value.charAt(0)!="#"?(isNaN("0x"+value)?value:"#"+value):value;this.backColor=value;if(tinyMCE.isGecko||tinyMCE.isOpera){this._setUseCSS(true);this.getDoc().execCommand("hilitecolor",false,value);this._setUseCSS(false)}else{this.getDoc().execCommand("BackColor",false,value)}break;case"Cut":case"Copy":case"Paste":var cmdFailed=false;eval("try {this.getDoc().execCommand(command, user_interface, value);} catch (e) {cmdFailed = true;}");if(tinyMCE.isOpera&&cmdFailed){alert("Currently not supported by your browser, use keyboard shortcuts instead.")}if(tinyMCE.isGecko&&cmdFailed){if(confirm(tinyMCE.entityDecode(tinyMCE.getLang("lang_clipboard_msg")))){window.open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","mceExternal")}return}else{tinyMCE.triggerNodeChange()}break;case"mceSetContent":if(!value){value=""}value=tinyMCE.storeAwayURLs(value);value=tinyMCE._customCleanup(this,"insert_to_editor",value);if(this.getBody().nodeName=="BODY"){tinyMCE._setHTML(doc,value)}else{this.getBody().innerHTML=value}tinyMCE.setInnerHTML(this.getBody(),tinyMCE._cleanupHTML(this,doc,this.settings,this.getBody(),false,false,false,true));tinyMCE.convertAllRelativeURLs(this.getBody());tinyMCE._removeInternal(this.getBody());if(tinyMCE.getParam("convert_fonts_to_spans")){tinyMCE.convertSpansToFonts(doc)}tinyMCE.handleVisualAid(this.getBody(),true,this.visualAid,this);tinyMCE._setEventsEnabled(this.getBody(),false);this._addBogusBR();return true;case"mceCleanup":var b=this.selection.getBookmark();tinyMCE._setHTML(this.contentDocument,this.getBody().innerHTML);tinyMCE.setInnerHTML(this.getBody(),tinyMCE._cleanupHTML(this,this.contentDocument,this.settings,this.getBody(),this.visualAid));tinyMCE.convertAllRelativeURLs(doc.body);if(tinyMCE.getParam("convert_fonts_to_spans")){tinyMCE.convertSpansToFonts(doc)}tinyMCE.handleVisualAid(this.getBody(),true,this.visualAid,this);tinyMCE._setEventsEnabled(this.getBody(),false);this._addBogusBR();this.repaint();this.selection.moveToBookmark(b);tinyMCE.triggerNodeChange();break;case"mceReplaceContent":if(!value){value=""}this.getWin().focus();var selectedText="";if(tinyMCE.isIE){var rng=doc.selection.createRange();selectedText=rng.text}else{selectedText=this.getSel().toString()}if(selectedText.length>0){value=tinyMCE.replaceVar(value,"selection",selectedText);tinyMCE.execCommand("mceInsertContent",false,value)}this._addBogusBR();tinyMCE.triggerNodeChange();break;case"mceSetAttribute":if(typeof(value)=="object"){var targetElms=(typeof(value.targets)=="undefined")?"p,img,span,div,td,h1,h2,h3,h4,h5,h6,pre,address":value.targets;var targetNode=tinyMCE.getParentElement(this.getFocusElement(),targetElms);if(targetNode){targetNode.setAttribute(value.name,value.value);tinyMCE.triggerNodeChange()}}break;case"mceSetCSSClass":this.execCommand("mceSetStyleInfo",false,{command:"setattrib",name:"class",value:value});break;case"mceInsertRawHTML":var key="tiny_mce_marker";this.execCommand("mceBeginUndoLevel");this.execCommand("mceInsertContent",false,key);var scrollX=this.getBody().scrollLeft+this.getDoc().documentElement.scrollLeft;var scrollY=this.getBody().scrollTop+this.getDoc().documentElement.scrollTop;var html=this.getBody().innerHTML;if((pos=html.indexOf(key))!=-1){tinyMCE.setInnerHTML(this.getBody(),html.substring(0,pos)+value+html.substring(pos+key.length))}this.contentWindow.scrollTo(scrollX,scrollY);this.execCommand("mceEndUndoLevel");break;case"mceInsertContent":if(!value){value=""}var insertHTMLFailed=false;if(tinyMCE.isGecko||tinyMCE.isOpera){try{if(value.indexOf("<")==-1&&!value.match(/(&#38;|&#160;|&#60;|&#62;)/g)){var r=this.getRng();var n=this.getDoc().createTextNode(tinyMCE.entityDecode(value));var s=this.getSel();var r2=r.cloneRange();s.removeAllRanges();r.deleteContents();r.insertNode(n);r2.selectNode(n);r2.collapse(false);s.removeAllRanges();s.addRange(r2)}else{value=tinyMCE.fixGeckoBaseHREFBug(1,this.getDoc(),value);this.getDoc().execCommand("inserthtml",false,value);tinyMCE.fixGeckoBaseHREFBug(2,this.getDoc(),value)}}catch(ex){insertHTMLFailed=true}if(!insertHTMLFailed){tinyMCE.triggerNodeChange();return}}if(!tinyMCE.isIE){var isHTML=value.indexOf("<")!=-1;var sel=this.getSel();var rng=this.getRng();if(isHTML){if(tinyMCE.isSafari){var tmpRng=this.getDoc().createRange();tmpRng.setStart(this.getBody(),0);tmpRng.setEnd(this.getBody(),0);value=tmpRng.createContextualFragment(value)}else{value=rng.createContextualFragment(value)}}else{value=doc.createTextNode(tinyMCE.entityDecode(value))}if(tinyMCE.isSafari&&!isHTML){this.execCommand("InsertText",false,value.nodeValue);tinyMCE.triggerNodeChange();return true}else{if(tinyMCE.isSafari&&isHTML){rng.deleteContents();rng.insertNode(value);tinyMCE.triggerNodeChange();return true}}rng.deleteContents();if(rng.startContainer.nodeType==3){var node=rng.startContainer.splitText(rng.startOffset);node.parentNode.insertBefore(value,node)}else{rng.insertNode(value)}if(!isHTML){sel.selectAllChildren(doc.body);sel.removeAllRanges();var rng=doc.createRange();rng.selectNode(value);rng.collapse(false);sel.addRange(rng)}else{rng.collapse(false)}tinyMCE.fixGeckoBaseHREFBug(2,this.getDoc(),value)}else{this.getWin().focus();var rng=doc.selection.createRange(),tmpRng=null;var c=value.indexOf("<!--")!=-1;if(c){value=tinyMCE.uniqueTag+value}if(rng.item){rng.item(0).outerHTML=value}else{rng.pasteHTML(value)}if(c){var e=this.getDoc().getElementById("mceTMPElement");e.parentNode.removeChild(e)}}tinyMCE.execCommand("mceAddUndoLevel");tinyMCE.triggerNodeChange();break;case"mceStartTyping":if(tinyMCE.settings.custom_undo_redo&&this.undoRedo.typingUndoIndex==-1){this.undoRedo.typingUndoIndex=this.undoRedo.undoIndex;tinyMCE.typingUndoIndex=tinyMCE.undoIndex;this.execCommand("mceAddUndoLevel")}break;case"mceEndTyping":if(tinyMCE.settings.custom_undo_redo&&this.undoRedo.typingUndoIndex!=-1){this.execCommand("mceAddUndoLevel");this.undoRedo.typingUndoIndex=-1}tinyMCE.typingUndoIndex=-1;break;case"mceBeginUndoLevel":this.undoRedoLevel=false;break;case"mceEndUndoLevel":this.undoRedoLevel=true;this.execCommand("mceAddUndoLevel");break;case"mceAddUndoLevel":if(tinyMCE.settings.custom_undo_redo&&this.undoRedoLevel){if(this.undoRedo.add()){tinyMCE.triggerNodeChange(false)}}break;case"Undo":if(tinyMCE.settings.custom_undo_redo){tinyMCE.execCommand("mceEndTyping");this.undoRedo.undo();tinyMCE.triggerNodeChange()}else{this.getDoc().execCommand(command,user_interface,value)}break;case"Redo":if(tinyMCE.settings.custom_undo_redo){tinyMCE.execCommand("mceEndTyping");this.undoRedo.redo();tinyMCE.triggerNodeChange()}else{this.getDoc().execCommand(command,user_interface,value)}break;case"mceToggleVisualAid":this.visualAid=!this.visualAid;tinyMCE.handleVisualAid(this.getBody(),true,this.visualAid,this);tinyMCE.triggerNodeChange();break;case"Indent":this.getDoc().execCommand(command,user_interface,value);tinyMCE.triggerNodeChange();if(tinyMCE.isIE){var n=tinyMCE.getParentElement(this.getFocusElement(),"blockquote");do{if(n&&n.nodeName=="BLOCKQUOTE"){n.removeAttribute("dir");n.removeAttribute("style")}}while(n!=null&&(n=n.parentNode)!=null)}break;case"RemoveFormat":case"removeformat":var text=this.selection.getSelectedText();if(tinyMCE.isOpera){this.getDoc().execCommand("RemoveFormat",false,null);return}if(tinyMCE.isIE){try{var rng=doc.selection.createRange();rng.execCommand("RemoveFormat",false,null)}catch(e){}this.execCommand("mceSetStyleInfo",false,{command:"removeformat"})}else{this.getDoc().execCommand(command,user_interface,value);this.execCommand("mceSetStyleInfo",false,{command:"removeformat"})}if(text.length==0){this.execCommand("mceSetCSSClass",false,"")}tinyMCE.triggerNodeChange();break;default:this.getDoc().execCommand(command,user_interface,value);if(tinyMCE.isGecko){window.setTimeout("tinyMCE.triggerNodeChange(false);",1)}else{tinyMCE.triggerNodeChange()}}if(command!="mceAddUndoLevel"&&command!="Undo"&&command!="Redo"&&command!="mceStartTyping"&&command!="mceEndTyping"){tinyMCE.execCommand("mceAddUndoLevel")}},queryCommandValue:function(f){try{return this.getDoc().queryCommandValue(f)}catch(e){return null}},queryCommandState:function(d){return this.getDoc().queryCommandState(d)},_addBogusBR:function(){var d=this.getBody();if(tinyMCE.isGecko&&!d.hasChildNodes()){d.innerHTML='<br _moz_editor_bogus_node="TRUE" />'}},_onAdd:function(C,L,K){var H,I,D,F,y,B,A,E,G,N;var J,x,e,M;I=this.settings.theme;D=tinyMCE.themes[I];y=K?K:document;this.targetDoc=y;tinyMCE.themeURL=tinyMCE.baseURL+"/themes/"+this.settings.theme;this.settings.themeurl=tinyMCE.themeURL;if(!C){alert("Error: Could not find the target element.");return false}this.formTargetElementId=L;if(D.getEditorTemplate){F=D.getEditorTemplate(this.settings,this.editorId)}B=F.delta_width?F.delta_width:0;A=F.delta_height?F.delta_height:0;E='<span id="'+this.editorId+'_parent" class="mceEditorContainer">'+F.html;E=tinyMCE.replaceVar(E,"editor_id",this.editorId);if(!this.settings.default_document){this.settings.default_document=tinyMCE.baseURL+"/blank.htm"}this.settings.old_width=this.settings.width;this.settings.old_height=this.settings.height;if(this.settings.width==-1){this.settings.width=C.offsetWidth}if(this.settings.height==-1){this.settings.height=C.offsetHeight}if(this.settings.width==0){this.settings.width=C.style.width}if(this.settings.height==0){this.settings.height=C.style.height}if(this.settings.width==0){this.settings.width=320}if(this.settings.height==0){this.settings.height=240}this.settings.area_width=parseInt(this.settings.width);this.settings.area_height=parseInt(this.settings.height);this.settings.area_width+=B;this.settings.area_height+=A;this.settings.width_style=""+this.settings.width;this.settings.height_style=""+this.settings.height;if((""+this.settings.width).indexOf("%")!=-1){this.settings.area_width="100%"}else{this.settings.width_style+="px"}if((""+this.settings.height).indexOf("%")!=-1){this.settings.area_height="100%"}else{this.settings.height_style+="px"}if((""+C.style.width).indexOf("%")!=-1){this.settings.width=C.style.width;this.settings.area_width="100%";this.settings.width_style="100%"}if((""+C.style.height).indexOf("%")!=-1){this.settings.height=C.style.height;this.settings.area_height="100%";this.settings.height_style="100%"}E=tinyMCE.applyTemplate(E);this.settings.width=this.settings.old_width;this.settings.height=this.settings.old_height;this.visualAid=this.settings.visual;this.formTargetElementId=L;if(C.nodeName=="TEXTAREA"||C.nodeName=="INPUT"){this.startContent=C.value}else{this.startContent=C.innerHTML}if(C.nodeName!="TEXTAREA"&&C.nodeName!="INPUT"){this.oldTargetElement=C;H='<input type="hidden" id="'+L+'" name="'+L+'" />';this.oldTargetDisplay=tinyMCE.getStyle(this.oldTargetElement,"display","inline");this.oldTargetElement.style.display="none";E+="</span>";if(tinyMCE.isGecko){E=H+E}else{E+=H}if(tinyMCE.isGecko){G=C.ownerDocument.createRange();G.setStartBefore(C);N=G.createContextualFragment(E);tinyMCE.insertAfter(N,C)}else{C.insertAdjacentHTML("beforeBegin",E)}}else{E+="</span>";this.oldTargetElement=C;this.oldTargetDisplay=tinyMCE.getStyle(this.oldTargetElement,"display","inline");this.oldTargetElement.style.display="none";if(tinyMCE.isGecko){G=C.ownerDocument.createRange();G.setStartBefore(C);N=G.createContextualFragment(E);tinyMCE.insertAfter(N,C)}else{C.insertAdjacentHTML("beforeBegin",E)}}J=false;x=y.getElementById(this.editorId);if(!tinyMCE.isIE){if(x&&(x.nodeName=="SPAN"||x.nodeName=="span")){x=tinyMCE._createIFrame(x,y);J=true}this.targetElement=x;this.iframeElement=x;this.contentDocument=x.contentDocument;this.contentWindow=x.contentWindow}else{if(x&&x.nodeName=="SPAN"){x=tinyMCE._createIFrame(x,y,y.parentWindow)}else{x=y.frames[this.editorId]}this.targetElement=x;this.iframeElement=y.getElementById(this.editorId);if(tinyMCE.isOpera){this.contentDocument=this.iframeElement.contentDocument;this.contentWindow=this.iframeElement.contentWindow;J=true}else{this.contentDocument=x.window.document;this.contentWindow=x.window}this.getDoc().designMode="on"}e=this.contentDocument;if(J){E=tinyMCE.getParam("doctype")+'<html><head xmlns="http://www.w3.org/1999/xhtml"><base href="'+tinyMCE.settings.base_href+'" /><title>blank_page</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body class="mceContentBody"></body></html>';try{if(!this.isHidden()){this.getDoc().designMode="on"}e.open();e.write(E);e.close()}catch(z){this.getDoc().location.href=tinyMCE.baseURL+"/blank.htm"}}if(tinyMCE.isIE){window.setTimeout('tinyMCE.addEventHandlers(tinyMCE.instances["'+this.editorId+'"]);',1)}M=this.targetDoc.getElementById(this.editorId+"_parent");this.formElement=tinyMCE.isGecko?M.previousSibling:M.nextSibling;tinyMCE.setupContent(this.editorId,true);return true},setBaseHREF:function(l){var k,d,h,m;h=this.getDoc();m=h.getElementsByTagName("base");d=m.length>0?m[0]:null;if(!d){m=h.getElementsByTagName("head");k=m.length>0?m[0]:null;d=h.createElement("base");d.setAttribute("href",l);k.appendChild(d)}else{if(l==""||l==null){d.parentNode.removeChild(d)}else{d.setAttribute("href",l)}}},getHTML:function(j){var k,h=this.getDoc(),d=this.getBody();if(j){return d.innerHTML}k=tinyMCE._cleanupHTML(this,h,this.settings,d,false,true,false,true);if(tinyMCE.getParam("convert_fonts_to_spans")){tinyMCE.convertSpansToFonts(h)}return k},setHTML:function(d){this.execCommand("mceSetContent",false,d);this.repaint()},getFocusElement:function(){return this.selection.getFocusElement()},getSel:function(){return this.selection.getSel()},getRng:function(){return this.selection.getRng()},triggerSave:function(n,o){var e,i=[],s,q,p,t;if(!this.enabled){return}this.switchSettings();q=tinyMCE.settings;if(tinyMCE.isRealIE){e=this.iframeElement;do{if(e.style&&e.style.display=="none"){e.style.display="block";i[i.length]={elm:e,type:"style"}}if(e.style&&q.hidden_tab_class.length>0&&e.className.indexOf(q.hidden_tab_class)!=-1){e.className=q.display_tab_class;i[i.length]={elm:e,type:"class"}}}while((e=e.parentNode)!=null)}tinyMCE.settings.preformatted=false;if(typeof(n)=="undefined"){n=false}if(typeof(o)=="undefined"){o=false}tinyMCE._setHTML(this.getDoc(),this.getBody().innerHTML);if(this.settings.cleanup==false){tinyMCE.handleVisualAid(this.getBody(),true,false,this);tinyMCE._setEventsEnabled(this.getBody(),true)}tinyMCE._customCleanup(this,"submit_content_dom",this.contentWindow.document.body);t=n?this.getBody().innerHTML:tinyMCE._cleanupHTML(this,this.getDoc(),this.settings,this.getBody(),tinyMCE.visualAid,true,true);t=tinyMCE._customCleanup(this,"submit_content",t);if(!o&&tinyMCE.settings.save_callback!==""){p=tinyMCE.resolveDots(tinyMCE.settings.save_callback,window)(this.formTargetElementId,t,this.getBody())}if((typeof(p)!="undefined")&&p!=null){t=p}t=tinyMCE.regexpReplace(t,"&#40;","(","gi");t=tinyMCE.regexpReplace(t,"&#41;",")","gi");t=tinyMCE.regexpReplace(t,"&#59;",";","gi");t=tinyMCE.regexpReplace(t,"&#34;","&quot;","gi");t=tinyMCE.regexpReplace(t,"&#94;","^","gi");if(this.formElement){this.formElement.value=t}if(tinyMCE.isSafari&&this.formElement){this.formElement.innerText=t}for(s=0;s<i.length;s++){if(i[s].type=="style"){i[s].elm.style.display="none"}else{i[s].elm.className=q.hidden_tab_class}}}};tinyMCE.add(TinyMCE_Engine,{cleanupHTMLCode:function(d){d=d.replace(new RegExp("<p \\/>","gi"),"<p>&nbsp;</p>");d=d.replace(new RegExp("<p>\\s*<\\/p>","gi"),"<p>&nbsp;</p>");d=d.replace(new RegExp("<br>\\s*<\\/br>","gi"),"<br />");d=d.replace(new RegExp("<(h[1-6]|p|div|address|pre|form|table|li|ol|ul|td|b|font|em|strong|i|strike|u|span|a|ul|ol|li|blockquote)([a-z]*)([^\\\\|>]*)\\/>","gi"),"<$1$2$3></$1$2>");d=d.replace(new RegExp("\\s+></","gi"),"></");d=d.replace(new RegExp("<(img|br|hr)([^>]*)><\\/(img|br|hr)>","gi"),"<$1$2 />");if(tinyMCE.isIE){d=d.replace(new RegExp("<p><hr \\/><\\/p>","gi"),"<hr>")}if(tinyMCE.isIE){d=d.replace(/<!(\s*)\/>/g,"")}return d},parseStyle:function(k){var i=[],o,n,l,m;if(k==null){return i}o=k.split(";");tinyMCE.clearArray(i);for(n=0;n<o.length;n++){if(o[n]==""){continue}l=new RegExp("^\\s*([^:]*):\\s*(.*)\\s*$");m=o[n].replace(l,"$1||$2").split("||");if(m.length==2){i[m[0].toLowerCase()]=m[1]}}return i},compressStyle:function(p,a,i,n){var m=[],o,q;m[0]=p[a+"-top"+i];m[1]=p[a+"-left"+i];m[2]=p[a+"-right"+i];m[3]=p[a+"-bottom"+i];for(o=0;o<m.length;o++){if(m[o]==null){return}if(o&&m[o]!=m[o-1]){return}}p[n]=m[0];p[a+"-top"+i]=null;p[a+"-left"+i]=null;p[a+"-right"+i]=null;p[a+"-bottom"+i]=null},serializeStyle:function(ar){var str="",key,val,m;tinyMCE.compressStyle(ar,"border","","border");tinyMCE.compressStyle(ar,"border","-width","border-width");tinyMCE.compressStyle(ar,"border","-color","border-color");tinyMCE.compressStyle(ar,"border","-style","border-style");tinyMCE.compressStyle(ar,"padding","","padding");tinyMCE.compressStyle(ar,"margin","","margin");for(key in ar){val=ar[key];if(typeof(val)=="function"){continue}if(key.indexOf("mso-")==0){continue}if(val!=null&&val!==""){val=""+val;val=val.replace(new RegExp("url\\(\\'?([^\\']*)\\'?\\)","gi"),"url('$1')");if(val.indexOf("url(")!=-1&&tinyMCE.getParam("convert_urls")){m=new RegExp("url\\('(.*?)'\\)").exec(val);if(m.length>1){val="url('"+eval(tinyMCE.getParam("urlconverter_callback")+"(m[1], null, true);")+"')"}}if(tinyMCE.getParam("force_hex_style_colors")){val=tinyMCE.convertRGBToHex(val,true)}val=val.replace(/\"/g,"'");if(val!="url('')"){str+=key.toLowerCase()+": "+val+"; "}}}if(new RegExp("; $").test(str)){str=str.substring(0,str.length-2)}return str},convertRGBToHex:function(i,h){var j,k;if(i.toLowerCase().indexOf("rgb")!=-1){j=new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)","gi");k=i.replace(j,"$1,$2,$3,$4,$5").split(",");if(k.length==5){r=parseInt(k[1]).toString(16);g=parseInt(k[2]).toString(16);b=parseInt(k[3]).toString(16);r=r.length==1?"0"+r:r;g=g.length==1?"0"+g:g;b=b.length==1?"0"+b:b;i="#"+r+g+b;if(h){i=k[0]+i+k[4]}}}return i},convertHexToRGB:function(d){if(d.indexOf("#")!=-1){d=d.replace(new RegExp("[^0-9A-F]","gi"),"");return"rgb("+parseInt(d.substring(0,2),16)+","+parseInt(d.substring(2,4),16)+","+parseInt(d.substring(4,6),16)+")"}return d},convertSpansToFonts:function(p){var n,t,i,s,q,v,u,o=tinyMCE.getParam("font_size_style_values").replace(/\s+/,"").split(",");n=tinyMCE.selectElements(p,"span,font");for(t=0;t<n.length;t++){i=tinyMCE.trim(n[t].style.fontSize).toLowerCase();s=0;for(q=0;q<o.length;q++){if(o[q]==i){s=q+1;break}}if(s>0){tinyMCE.setAttrib(n[t],"size",s);n[t].style.fontSize=""}v=n[t].style.fontFamily;if(v!=null&&v!==""){tinyMCE.setAttrib(n[t],"face",v);n[t].style.fontFamily=""}u=n[t].style.color;if(u!=null&&u!==""){tinyMCE.setAttrib(n[t],"color",tinyMCE.convertRGBToHex(u));n[t].style.color=""}}},convertFontsToSpans:function(n){var m,s,t,o,i,p,q=tinyMCE.getParam("font_size_style_values").replace(/\s+/,"").split(",");m=tinyMCE.getParam("font_size_classes");if(m!==""){m=m.replace(/\s+/,"").split(",")}else{m=null}s=tinyMCE.selectElements(n,"span,font");for(t=0;t<s.length;t++){o=tinyMCE.getAttrib(s[t],"size");i=tinyMCE.getAttrib(s[t],"face");p=tinyMCE.getAttrib(s[t],"color");if(o!==""){o=parseInt(o);if(o>0&&o<8){if(m!=null){tinyMCE.setAttrib(s[t],"class",m[o-1])}else{s[t].style.fontSize=q[o-1]}}s[t].removeAttribute("size")}if(i!==""){s[t].style.fontFamily=i;s[t].removeAttribute("face")}if(p!==""){s[t].style.color=p;s[t].removeAttribute("color")}}},cleanupAnchors:function(k){var m,j,i,l=k.getElementsByTagName("a");for(m=l.length-1;m>=0;m--){if(tinyMCE.getAttrib(l[m],"name")!==""&&tinyMCE.getAttrib(l[m],"href")==""){j=l[m].childNodes;for(i=j.length-1;i>=0;i--){tinyMCE.insertAfter(j[i],l[m])}}}},getContent:function(d){if(typeof(d)!="undefined"){tinyMCE.getInstanceById(d).select()}if(tinyMCE.selectedInstance){return tinyMCE.selectedInstance.getHTML()}return null},_fixListElements:function(n){var u,d,i=["ol","ul"],p,s,t,v=new RegExp("^(OL|UL)$"),a;for(d=0;d<i.length;d++){u=n.getElementsByTagName(i[d]);for(p=0;p<u.length;p++){s=u[p];t=s.parentNode;if(v.test(t.nodeName)){a=tinyMCE.prevNode(s,"LI");if(!a){a=n.createElement("li");a.innerHTML="&nbsp;";a.appendChild(s);t.insertBefore(a,t.firstChild)}else{a.appendChild(s)}}}}},_fixTables:function(n){var t,q,d,o,p,i,s;t=n.getElementsByTagName("table");for(q=0;q<t.length;q++){d=t[q];if((o=tinyMCE.getParentElement(d,"p,h1,h2,h3,h4,h5,h6"))!=null){p=o.cloneNode(false);p.removeAttribute("id");s=d;while((d=d.nextSibling)){p.appendChild(d)}tinyMCE.insertAfter(p,o);tinyMCE.insertAfter(s,o)}}},_cleanupHTML:function(N,d,h,L,z,C,D,M){var B,A,F,G,H,I,J,s,E,K;if(!tinyMCE.getParam("cleanup")){return L.innerHTML}C=typeof(C)=="undefined"?false:C;s=N.cleanup;E=N.settings;A=s.settings.debug;if(A){F=new Date().getTime()}N._fixRootBlocks();if(tinyMCE.getParam("convert_fonts_to_spans")){tinyMCE.convertFontsToSpans(d)}if(tinyMCE.getParam("fix_list_elements")){tinyMCE._fixListElements(d)}if(tinyMCE.getParam("fix_table_elements")){tinyMCE._fixTables(d)}tinyMCE._customCleanup(N,C?"get_from_editor_dom":"insert_to_editor_dom",d.body);if(A){G=new Date().getTime()}s.settings.on_save=C;s.idCount=0;s.serializationId++;s.serializedNodes=[];s.sourceIndex=-1;if(E.cleanup_serializer=="xml"){B=s.serializeNodeAsXML(L,M)}else{B=s.serializeNodeAsHTML(L,M)}if(A){H=new Date().getTime()}K=tinyMCE.getParam("entity_encoding")=="numeric"?"&#160;":"&nbsp;";B=B.replace(/<\/?(body|head|html)[^>]*>/gi,"");B=B.replace(new RegExp(' (rowspan="1"|colspan="1")',"g"),"");B=B.replace(/<p><hr \/><\/p>/g,"<hr />");B=B.replace(/<p>(&nbsp;|&#160;)<\/p><hr \/><p>(&nbsp;|&#160;)<\/p>/g,"<hr />");B=B.replace(/<td>\s*<br \/>\s*<\/td>/g,"<td>"+K+"</td>");B=B.replace(/<p>\s*<br \/>\s*<\/p>/g,"<p>"+K+"</p>");B=B.replace(/<br \/>$/,"");B=B.replace(/<br \/><\/p>/g,"</p>");B=B.replace(/<p>\s*(&nbsp;|&#160;)\s*<br \/>\s*(&nbsp;|&#160;)\s*<\/p>/g,"<p>"+K+"</p>");B=B.replace(/<p>\s*(&nbsp;|&#160;)\s*<br \/>\s*<\/p>/g,"<p>"+K+"</p>");B=B.replace(/<p>\s*<br \/>\s*&nbsp;\s*<\/p>/g,"<p>"+K+"</p>");B=B.replace(new RegExp("<a>(.*?)<\\/a>","g"),"$1");B=B.replace(/<p([^>]*)>\s*<\/p>/g,"<p$1>"+K+"</p>");if(/^\s*(<br \/>|<p>&nbsp;<\/p>|<p>&#160;<\/p>|<p><\/p>)\s*$/.test(B)){B=""}if(E.preformatted){B=B.replace(/^<pre>/,"");B=B.replace(/<\/pre>$/,"");B="<pre>"+B+"</pre>"}if(tinyMCE.isGecko){B=B.replace(/<br \/>\s*<\/li>/g,"</li>");B=B.replace(/&nbsp;\s*<\/(dd|dt)>/g,"</$1>");B=B.replace(/<o:p _moz-userdefined="" \/>/g,"");B=B.replace(/<td([^>]*)>\s*<br \/>\s*<\/td>/g,"<td$1>"+K+"</td>")}if(E.force_br_newlines){B=B.replace(/<p>(&nbsp;|&#160;)<\/p>/g,"<br />")}B=tinyMCE._customCleanup(N,C?"get_from_editor":"insert_to_editor",B);if(C){B=B.replace(new RegExp(" ?(mceItem[a-zA-Z0-9]*|"+E.visual_table_class+")","g"),"");B=B.replace(new RegExp(' ?class=""',"g"),"")}if(E.remove_linebreaks&&!s.settings.indent){B=B.replace(/\n|\r/g," ")}if(A){I=new Date().getTime()}if(C&&s.settings.indent){B=s.formatHTML(B)}if(D&&(E.encoding=="xml"||E.encoding=="html")){B=s.xmlEncode(B)}if(A){J=new Date().getTime()}if(s.settings.debug){tinyMCE.debug("Cleanup in ms: Pre="+(G-F)+", Serialize: "+(H-G)+", Post: "+(I-H)+", Format: "+(J-I)+", Sum: "+(J-F)+".")}return B}});function TinyMCE_Cleanup(){this.isIE=(navigator.appName=="Microsoft Internet Explorer");this.rules=tinyMCE.clearArray([]);this.settings={indent_elements:"head,table,tbody,thead,tfoot,form,tr,ul,ol,blockquote,object",newline_before_elements:"h1,h2,h3,h4,h5,h6,pre,address,div,ul,ol,li,meta,option,area,title,link,base,script,td",newline_after_elements:"br,hr,p,pre,address,div,ul,ol,meta,option,area,link,base,script",newline_before_after_elements:"html,head,body,table,thead,tbody,tfoot,tr,form,ul,ol,blockquote,p,object,param,hr,div",indent_char:"\t",indent_levels:1,entity_encoding:"raw",valid_elements:"*[*]",entities:"",url_converter:"",invalid_elements:"",verify_html:false};this.vElements=tinyMCE.clearArray([]);this.vElementsRe="";this.closeElementsRe=/^(IMG|BR|HR|LINK|META|BASE|INPUT|AREA)$/;this.codeElementsRe=/^(SCRIPT|STYLE)$/;this.serializationId=0;this.mceAttribs={href:"mce_href",src:"mce_src",type:"mce_type"}}TinyMCE_Cleanup.prototype={init:function(n){var a,q,o,m,i,p;for(a in n){this.settings[a]=n[a]}n=this.settings;this.inRe=this._arrayToRe(n.indent_elements.split(","),"","^<(",")[^>]*");this.ouRe=this._arrayToRe(n.indent_elements.split(","),"","^<\\/(",")[^>]*");this.nlBeforeRe=this._arrayToRe(n.newline_before_elements.split(","),"gi","<(",")([^>]*)>");this.nlAfterRe=this._arrayToRe(n.newline_after_elements.split(","),"gi","<(",")([^>]*)>");this.nlBeforeAfterRe=this._arrayToRe(n.newline_before_after_elements.split(","),"gi","<(\\/?)(",")([^>]*)>");this.serializedNodes=[];this.serializationId=0;if(n.invalid_elements!==""){this.iveRe=this._arrayToRe(n.invalid_elements.toUpperCase().split(","),"g","^(",")$")}else{this.iveRe=null}p="";for(o=0;o<n.indent_levels;o++){p+=n.indent_char}this.inStr=p;if(!n.verify_html){n.valid_elements="*[*]";n.extended_valid_elements=""}this.fillStr=n.entity_encoding=="named"?"&nbsp;":"&#160;";this.idCount=0;this.xmlEncodeRe=new RegExp('[\u007F-\uFFFF<>&"]',"g")},addRuleStr:function(f){var i=this.parseRuleStr(f),h;for(h in i){if(i[h]){this.rules[h]=i[h]}}this.vElements=tinyMCE.clearArray([]);for(h in this.rules){if(this.rules[h]){this.vElements[this.vElements.length]=this.rules[h].tag}}this.vElementsRe=this._arrayToRe(this.vElements,"")},isValid:function(d){if(!this.rulesDone){this._setupRules()}if(!d){return true}d=d.replace(/[^a-z0-9]+/gi,"").toUpperCase();return !tinyMCE.getParam("cleanup")||this.vElementsRe.test(d)},addChildRemoveRuleStr:function(i){var s,t,w,v,o,p,u,q,x;if(!i){return}u=i.split(",");for(s=0;s<u.length;s++){i=u[s];w=this.split(/\[|\]/,i);if(w==null||w.length<1){o=i.toUpperCase()}else{o=w[0].toUpperCase()}p=this.split("/",o);for(t=0;t<p.length;t++){x="^(";q=this.split(/\|/,w[1]);for(v=0;v<q.length;v++){if(q[v]=="%istrict"){x+=tinyMCE.inlineStrict}else{if(q[v]=="%itrans"){x+=tinyMCE.inlineTransitional}else{if(q[v]=="%istrict_na"){x+=tinyMCE.inlineStrict.substring(2)}else{if(q[v]=="%itrans_na"){x+=tinyMCE.inlineTransitional.substring(2)}else{if(q[v]=="%btrans"){x+=tinyMCE.blockElms}else{if(q[v]=="%strict"){x+=tinyMCE.blockStrict}else{x+=(q[v].charAt(0)!="#"?q[v].toUpperCase():q[v])}}}}}}x+=(v!=q.length-1?"|":"")}x+=")$";if(this.childRules==null){this.childRules=tinyMCE.clearArray([])}this.childRules[p[t]]=new RegExp(x);if(w.length>1){this.childRules[p[t]].wrapTag=w[2]}}}},parseRuleStr:function(D){var t,z,C,p,x,i,a,E,F,s,A,y=tinyMCE.clearArray([]),B;if(D==null||D.length==0){return y}t=D.split(",");for(i=0;i<t.length;i++){D=t[i];if(D.length==0){continue}z=this.split(/\[|\]/,D);if(z==null||z.length<1){E=D.toUpperCase()}else{E=z[0].toUpperCase()}F=this.split("/",E);for(s=0;s<F.length;s++){C={};C.tag=F[s];C.forceAttribs=null;C.defaultAttribs=null;C.validAttribValues=null;a=C.tag.charAt(0);C.forceOpen=a=="+";C.removeEmpty=a=="-";C.fill=a=="#";C.tag=C.tag.replace(/\+|-|#/g,"");C.oTagName=F[0].replace(/\+|-|#/g,"").toLowerCase();C.isWild=new RegExp("\\*|\\?|\\+","g").test(C.tag);C.validRe=new RegExp(this._wildcardToRe("^"+C.tag+"$"));if(z.length>1){C.vAttribsRe="^(";p=this.split(/\|/,z[1]);for(x=0;x<p.length;x++){E=p[x];if(E.charAt(0)=="!"){p[x]=E=E.substring(1);if(!C.reqAttribsRe){C.reqAttribsRe="\\s+("+E}else{C.reqAttribsRe+="|"+E}}A=new RegExp("(=|:|<)(.*?)$").exec(E);E=E.replace(new RegExp("(=|:|<).*?$"),"");if(A&&A.length>0){if(A[0].charAt(0)==":"){if(!C.forceAttribs){C.forceAttribs=tinyMCE.clearArray([])}C.forceAttribs[E.toLowerCase()]=A[0].substring(1)}else{if(A[0].charAt(0)=="="){if(!C.defaultAttribs){C.defaultAttribs=tinyMCE.clearArray([])}B=A[0].substring(1);C.defaultAttribs[E.toLowerCase()]=B==""?"mce_empty":B}else{if(A[0].charAt(0)=="<"){if(!C.validAttribValues){C.validAttribValues=tinyMCE.clearArray([])}C.validAttribValues[E.toLowerCase()]=this._arrayToRe(this.split("?",A[0].substring(1)),"i")}}}}C.vAttribsRe+=""+E.toLowerCase()+(x!=p.length-1?"|":"");p[x]=E.toLowerCase()}if(C.reqAttribsRe){C.reqAttribsRe=new RegExp(C.reqAttribsRe+')="',"g")}C.vAttribsRe+=")$";C.vAttribsRe=this._wildcardToRe(C.vAttribsRe);C.vAttribsReIsWild=new RegExp("\\*|\\?|\\+","g").test(C.vAttribsRe);C.vAttribsRe=new RegExp(C.vAttribsRe);C.vAttribs=p.reverse()}else{C.vAttribsRe="";C.vAttribs=tinyMCE.clearArray([]);C.vAttribsReIsWild=false}y[C.tag]=C}}return y},serializeNodeAsXML:function(i){var k,e;if(!this.xmlDoc){if(this.isIE){try{this.xmlDoc=new ActiveXObject("MSXML2.DOMDocument")}catch(j){}if(!this.xmlDoc){try{this.xmlDoc=new ActiveXObject("Microsoft.XmlDom")}catch(j){}}}else{this.xmlDoc=document.implementation.createDocument("","",null)}if(!this.xmlDoc){alert("Error XML Parser could not be found.")}}if(this.xmlDoc.firstChild){this.xmlDoc.removeChild(this.xmlDoc.firstChild)}e=this.xmlDoc.createElement("html");e=this.xmlDoc.appendChild(e);this._convertToXML(i,e);if(this.isIE){return this.xmlDoc.xml}else{return new XMLSerializer().serializeToString(this.xmlDoc)}},_convertToXML:function(w,s){var i,x,t,u,n,v,l,q=false;if(tinyMCE.isRealIE&&this._isDuplicate(w)){return}i=this.xmlDoc;switch(w.nodeType){case 1:q=w.hasChildNodes();x=i.createElement(w.nodeName.toLowerCase());v=w.attributes;for(t=v.length-1;t>-1;t--){l=v[t];if(l.specified&&l.nodeValue){x.setAttribute(l.nodeName.toLowerCase(),l.nodeValue)}}if(!q&&!this.closeElementsRe.test(w.nodeName)){x.appendChild(i.createTextNode(""))}s=s.appendChild(x);break;case 3:s.appendChild(i.createTextNode(w.nodeValue));return;case 8:s.appendChild(i.createComment(w.nodeValue));return}if(q){n=w.childNodes;for(t=0,u=n.length;t<u;t++){this._convertToXML(n[t],s)}}},serializeNodeAsHTML:function(B,I){var D,H,i="",n,t,l,E,G,J,K=false,f=false,C,h,L,F;if(!this.rulesDone){this._setupRules()}if(tinyMCE.isRealIE&&this._isDuplicate(B)){return""}if(B.parentNode&&this.childRules!=null){L=this.childRules[B.parentNode.nodeName];if(typeof(L)!="undefined"&&!L.test(B.nodeName)){E=true;l=null}}switch(B.nodeType){case 1:h=B.hasChildNodes();if(E){break}F=B.nodeName;if(tinyMCE.isRealIE){if(B.nodeName.indexOf("/")!=-1){break}if(B.scopeName&&B.scopeName!="HTML"){F=B.scopeName.toUpperCase()+":"+F.toUpperCase()}}else{if(tinyMCE.isOpera&&F.indexOf(":")>0){F=F.toUpperCase()}}if(this.settings.convert_fonts_to_spans){if(this.settings.on_save&&F=="FONT"){F="SPAN"}if(!this.settings.on_save&&F=="SPAN"){F="FONT"}}if(this.vElementsRe.test(F)&&(!this.iveRe||!this.iveRe.test(F))&&!I){K=true;G=this.rules[F];if(!G){C=this.rules;for(H in C){if(C[H]&&C[H].validRe.test(F)){G=C[H];break}}}D=G.isWild?F.toLowerCase():G.oTagName;f=G.fill;if(G.removeEmpty&&!h){return""}l="<"+D;if(G.vAttribsReIsWild){C=B.attributes;for(n=C.length-1;n>-1;n--){H=C[n];if(H.specified&&G.vAttribsRe.test(H.nodeName)){l+=this._serializeAttribute(B,G,H.nodeName)}}}else{for(n=G.vAttribs.length-1;n>-1;n--){l+=this._serializeAttribute(B,G,G.vAttribs[n])}}if(!this.settings.on_save){C=this.mceAttribs;for(H in C){if(C[H]){l+=this._serializeAttribute(B,G,C[H])}}}if(G.reqAttribsRe&&!l.match(G.reqAttribsRe)){l=null}if(l!=null&&this.closeElementsRe.test(F)){return l+" />"}if(l!=null){i+=l+">"}if(this.isIE&&this.codeElementsRe.test(F)){i+=B.innerHTML}}break;case 3:if(E){break}if(B.parentNode&&this.codeElementsRe.test(B.parentNode.nodeName)){return this.isIE?"":B.nodeValue}return this.xmlEncode(B.nodeValue);case 8:if(E){break}return"<!--"+this._trimComment(B.nodeValue)+"-->"}if(h){J=B.childNodes;for(n=0,t=J.length;n<t;n++){i+=this.serializeNodeAsHTML(J[n])}}if(f&&!h){i+=this.fillStr}if(l!=null&&K){i+="</"+D+">"}return i},_serializeAttribute:function(k,n,o){var l="",j,m=this.settings.on_save;if(m&&(o.indexOf("mce_")==0||o.indexOf("_moz")==0)){return""}if(m&&this.mceAttribs[o]){l=this._getAttrib(k,this.mceAttribs[o])}if(l.length==0){l=this._getAttrib(k,o)}if(l.length==0&&n.defaultAttribs&&(j=n.defaultAttribs[o])){l=j;if(l=="mce_empty"){return" "+o+'=""'}}if(n.forceAttribs&&(j=n.forceAttribs[o])){l=j}if(m&&l.length!=0&&/^(src|href|longdesc)$/.test(o)){l=this._urlConverter(this,k,l)}if(l.length!=0&&n.validAttribValues&&n.validAttribValues[o]&&!n.validAttribValues[o].test(l)){return""}if(l.length!=0&&l=="{$uid}"){l="uid_"+(this.idCount++)}if(l.length!=0){if(o.indexOf("on")!=0){l=this.xmlEncode(l,1)}return" "+o+'="'+l+'"'}return""},formatHTML:function(n){var o=this.settings,l="",p=0,i=0,h="",q;n=n.replace(/<pre([^>]*)>(.*?)<\/pre>/gi,function(d,e,a){a=a.replace(/<br\s*\/>/gi,"\n");return"<pre"+e+">"+a+"</pre>"});n=n.replace(/\r/g,"");n="\n"+n;n=n.replace(new RegExp("\\n\\s+","gi"),"\n");n=n.replace(this.nlBeforeRe,"\n<$1$2>");n=n.replace(this.nlAfterRe,"<$1$2>\n");n=n.replace(this.nlBeforeAfterRe,"\n<$1$2$3>\n");n+="\n";while((p=n.indexOf("\n",p+1))!=-1){if((q=n.substring(i+1,p)).length!=0){if(this.ouRe.test(q)&&l.length>=o.indent_levels){l=l.substring(o.indent_levels)}h+=l+q+"\n";if(this.inRe.test(q)){l+=this.inStr}}i=p}return h},xmlEncode:function(h){var f=this,i=this.xmlEncodeRe;if(!this.entitiesDone){this._setupEntities()}switch(this.settings.entity_encoding){case"raw":return tinyMCE.xmlEncode(h);case"named":return h.replace(i,function(a){var d=f.entities[a.charCodeAt(0)];return d?"&"+d+";":a});case"numeric":return h.replace(i,function(a){return"&#"+a.charCodeAt(0)+";"})}return h},split:function(m,n){var o,i,l=[],k=n.split(m);for(o=0,i=k.length;o<i;o++){if(k[o]!==""){l[o]=k[o]}}return l},_trimComment:function(d){d=d.replace(new RegExp('\\smce_src="[^"]*"',"gi"),"");d=d.replace(new RegExp('\\smce_href="[^"]*"',"gi"),"");return d},_getAttrib:function(n,e,m){var d,o,l;if(typeof(m)=="undefined"){m=""}if(!n||n.nodeType!=1){return m}try{d=n.getAttribute(e,0)}catch(o){d=n.getAttribute(e,2)}if(tinyMCE.isRealIE&&(e.toUpperCase()==="HREF"||e.toUpperCase()==="SRC")){d=n.getAttribute(e,2)}if(e=="class"&&!d){d=n.className}if(this.isIE){if(e=="http-equiv"){d=n.httpEquiv}l=n.nodeName;if(l=="FORM"&&e=="enctype"&&d=="application/x-www-form-urlencoded"){d=""}if(l=="INPUT"&&e=="size"&&d=="20"){d=""}if(l=="INPUT"&&e=="maxlength"&&d=="2147483647"){d=""}if(e=="width"||e=="height"){d=n.getAttribute(e,2)}}if(e=="style"&&d){if(!tinyMCE.isOpera){d=n.style.cssText}d=tinyMCE.serializeStyle(tinyMCE.parseStyle(d))}if(this.settings.on_save&&e.indexOf("on")!=-1&&this.settings.on_save&&d&&d!==""){d=tinyMCE.cleanupEventStr(d)}return(d&&d!=="")?""+d:m},_urlConverter:function(c,n,v){if(!c.settings.on_save){return tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings.base_href,v)}else{if(tinyMCE.getParam("convert_urls")){if(!this.urlConverter){this.urlConverter=eval(tinyMCE.settings.urlconverter_callback)}return this.urlConverter(v,n,true)}}return v},_arrayToRe:function(o,a,i,n){var m,l;a=typeof(a)=="undefined"?"gi":a;i=typeof(i)=="undefined"?"^(":i;n=typeof(n)=="undefined"?")$":n;l=i;for(m=0;m<o.length;m++){l+=this._wildcardToRe(o[m])+(m!=o.length-1?"|":"")}l+=n;return new RegExp(l,a)},_wildcardToRe:function(d){d=d.replace(/\?/g,"(\\S?)");d=d.replace(/\+/g,"(\\S+)");d=d.replace(/\*/g,"(\\S*)");return d},_setupEntities:function(){var a,k,j,i=this.settings;if(i.entity_encoding=="named"){a=tinyMCE.clearArray([]);k=this.split(",",i.entities);for(j=0;j<k.length;j+=2){a[k[j]]=k[j+1]}this.entities=a}this.entitiesDone=true},_setupRules:function(){var d=this.settings;this.addRuleStr(d.valid_elements);this.addRuleStr(d.extended_valid_elements);this.addChildRemoveRuleStr(d.valid_child_elements);this.rulesDone=true},_isDuplicate:function(i){var k,h,j;if(!this.settings.fix_content_duplication){return false}if(tinyMCE.isRealIE&&i.nodeType==1){if(i.mce_serialized==this.serializationId){return true}i.setAttribute("mce_serialized",this.serializationId)}else{j=this.serializedNodes;for(k=0,h=j.length;k<h;k++){if(j[k]==i){return true}}j.push(i)}return false}};tinyMCE.add(TinyMCE_Engine,{createTagHTML:function(o,n,m){var f="",h=tinyMCE.xmlEncode,a;f="<"+o;if(n){for(a in n){if(typeof(n[a])!="function"&&n[a]!=null){f+=" "+h(a)+'="'+h(""+n[a])+'"'}}}f+=!m?" />":">"+m+"</"+o+">";return f},createTag:function(d,o,n,m){var h=d.createElement(o),a;if(n){for(a in n){if(typeof(n[a])!="function"&&n[a]!=null){tinyMCE.setAttrib(h,a,n[a])}}}if(m){h.innerHTML=m}return h},getElementByAttributeValue:function(a,e,k,j){return(a=this.getElementsByAttributeValue(a,e,k,j)).length==0?null:a[0]},getElementsByAttributeValue:function(a,i,p,o){var n,q=a.getElementsByTagName(i),e=[];for(n=0;n<q.length;n++){if(tinyMCE.getAttrib(q[n],p).indexOf(o)!=-1){e[e.length]=q[n]}}return e},isBlockElement:function(d){return d!=null&&d.nodeType==1&&this.blockRegExp.test(d.nodeName)},getParentBlockElement:function(f,e){return this.getParentNode(f,function(a){return tinyMCE.isBlockElement(a)},e);return null},insertAfter:function(f,e){if(e.nextSibling){e.parentNode.insertBefore(f,e.nextSibling)}else{e.parentNode.appendChild(f)}},setInnerHTML:function(i,l){var m,e,h;if(tinyMCE.isGecko){l=l.replace(/<embed([^>]*)>/gi,"<tmpembed$1>");l=l.replace(/<em([^>]*)>/gi,"<i$1>");l=l.replace(/<tmpembed([^>]*)>/gi,"<embed$1>");l=l.replace(/<strong([^>]*)>/gi,"<b$1>");l=l.replace(/<\/strong>/gi,"</b>");l=l.replace(/<\/em>/gi,"</i>")}if(tinyMCE.isRealIE){l=l.replace(/\s\/>/g,">");l=l.replace(/<p([^>]*)>\u00A0?<\/p>/gi,'<p$1 mce_keep="true">&nbsp;</p>');l=l.replace(/<p([^>]*)>\s*&nbsp;\s*<\/p>/gi,'<p$1 mce_keep="true">&nbsp;</p>');l=l.replace(/<p([^>]*)>\s+<\/p>/gi,'<p$1 mce_keep="true">&nbsp;</p>');i.innerHTML=tinyMCE.uniqueTag+l;i.firstChild.removeNode(true);e=i.getElementsByTagName("p");for(m=e.length-1;m>=0;m--){h=e[m];if(h.nodeName=="P"&&!h.hasChildNodes()&&!h.mce_keep){h.parentNode.removeChild(h)}}}else{l=this.fixGeckoBaseHREFBug(1,i,l);i.innerHTML=l;this.fixGeckoBaseHREFBug(2,i,l)}},getOuterHTML:function(d){var e;if(tinyMCE.isIE){return d.outerHTML}e=d.ownerDocument.createElement("body");e.appendChild(d.cloneNode(true));return e.innerHTML},setOuterHTML:function(h,i,d){var d=typeof(d)=="undefined"?h.ownerDocument:d,n,e,o;if(tinyMCE.isIE&&h.nodeType==1){h.outerHTML=i}else{o=d.createElement("body");o.innerHTML=i;for(n=0,e=o.childNodes;n<e.length;n++){h.parentNode.insertBefore(e[n].cloneNode(true),h)}h.parentNode.removeChild(h)}},_getElementById:function(o,d){var f,j,e,i;if(typeof(d)=="undefined"){d=document}f=d.getElementById(o);if(!f){i=d.forms;for(j=0;j<i.length;j++){for(e=0;e<i[j].elements.length;e++){if(i[j].elements[e].name==o){f=i[j].elements[e];break}}}}return f},getNodeTree:function(i,h,k,j){return this.selectNodes(i,function(a){return(!k||a.nodeType==k)&&(!j||a.nodeName==j)},h?h:[])},getParentElement:function(k,f,l,m){var n=f?new RegExp("^("+f.toUpperCase().replace(/,/g,"|")+")$"):0,o;if(l&&typeof(l)=="string"){return this.getParentElement(k,f,function(a){return tinyMCE.getAttrib(a,l)!==""})}return this.getParentNode(k,function(a){return((a.nodeType==1&&!n)||(n&&n.test(a.nodeName)))&&(!l||l(a))},m)},getParentNode:function(h,i,f){while(h){if(h==f){return null}if(i(h)){return h}h=h.parentNode}return null},getAttrib:function(j,m,k){var i;if(typeof(k)=="undefined"){k=""}if(!j||j.nodeType!=1){return k}try{i=j.getAttribute(m,0)}catch(l){i=j.getAttribute(m,2)}if(m=="class"&&!i){i=j.className}if(tinyMCE.isGecko){if(m=="src"&&j.src!=null&&j.src!==""){i=j.src}if(m=="href"&&j.href!=null&&j.href!==""){i=j.href}}else{if(tinyMCE.isIE){switch(m){case"http-equiv":i=j.httpEquiv;break;case"width":case"height":i=j.getAttribute(m,2);break}}}if(m=="style"&&!tinyMCE.isOpera){i=j.style.cssText}return(i&&i!=="")?i:k},setAttrib:function(j,k,i,h){if(typeof(i)=="number"&&i!=null){i=""+i}if(h){if(i==null){i=""}i=i.replace(/[^0-9%]/g,"")}if(k=="style"){j.style.cssText=i}if(k=="class"){j.className=i}if(i!=null&&i!==""&&i!=-1){j.setAttribute(k,i)}else{j.removeAttribute(k)}},setStyleAttrib:function(i,h,e){i.style[h]=e;if(tinyMCE.isIE&&e==null||e==""){e=tinyMCE.serializeStyle(tinyMCE.parseStyle(i.style.cssText));i.style.cssText=e;i.setAttribute("style",e)}},switchClass:function(i,h){var e;if(tinyMCE.switchClassCache[i]){e=tinyMCE.switchClassCache[i]}else{e=tinyMCE.switchClassCache[i]=document.getElementById(i)}if(e){if(tinyMCE.settings.button_tile_map&&e.className&&e.className.indexOf("mceTiledButton")==0){h="mceTiledButton "+h}e.className=h}},getAbsPosition:function(i,j){var h=0,k=0;while(i&&i!=j){h+=i.offsetLeft;k+=i.offsetTop;i=i.offsetParent}return{absLeft:h,absTop:k}},prevNode:function(e,a){var k=a.split(","),i;while((e=e.previousSibling)!=null){for(i=0;i<k.length;i++){if(e.nodeName==k[i]){return e}}}return null},nextNode:function(e,a){var k=a.split(","),i;while((e=e.nextSibling)!=null){for(i=0;i<k.length;i++){if(e.nodeName==k[i]){return e}}}return null},selectElements:function(a,n,f){var i,o=[],p,q;for(q=0,n=n.split(",");q<n.length;q++){for(i=0,p=a.getElementsByTagName(n[q]);i<p.length;i++){(!f||f(p[i]))&&o.push(p[i])}}return o},selectNodes:function(a,f,k){var i;if(!k){k=[]}if(f(a)){k[k.length]=a}if(a.hasChildNodes()){for(i=0;i<a.childNodes.length;i++){tinyMCE.selectNodes(a.childNodes[i],f,k)}}return k},addCSSClass:function(k,i,e){var j=this.removeCSSClass(k,i);return k.className=e?i+(j!==""?(" "+j):""):(j!==""?(j+" "):"")+i},removeCSSClass:function(e,f){f=e.className.replace(new RegExp("(^|\\s+)"+f+"(\\s+|$)")," ");return e.className=f!=" "?f:""},hasCSSClass:function(f,e){return new RegExp("\\b"+e+"\\b","g").test(f.className)},renameElement:function(m,e,i){var n,o,d;i=typeof(i)=="undefined"?tinyMCE.selectedInstance.getDoc():i;if(m){n=i.createElement(e);d=m.attributes;for(o=d.length-1;o>-1;o--){if(d[o].specified&&d[o].nodeValue){n.setAttribute(d[o].nodeName.toLowerCase(),d[o].nodeValue)}}d=m.childNodes;for(o=0;o<d.length;o++){n.appendChild(d[o].cloneNode(true))}m.parentNode.replaceChild(n,m)}},getViewPort:function(l){var k=l.document,m=k.compatMode=="CSS1Compat",d=k.body,j=k.documentElement;return{left:l.pageXOffset||(m?j.scrollLeft:d.scrollLeft),top:l.pageYOffset||(m?j.scrollTop:d.scrollTop),width:l.innerWidth||(m?j.clientWidth:d.clientWidth),height:l.innerHeight||(m?j.clientHeight:d.clientHeight)}},getStyle:function(h,d,i){if(!h){return false}if(tinyMCE.isGecko&&h.ownerDocument.defaultView){try{return h.ownerDocument.defaultView.getComputedStyle(h,null).getPropertyValue(d)}catch(h){return null}}d=d.replace(/-(\D)/g,function(a,e){return e.toUpperCase()});if(h.currentStyle){return h.currentStyle[d]}return false}});tinyMCE.add(TinyMCE_Engine,{parseURL:function(m){var k=[],i,l,n,o;if(m){l=m.indexOf("://");if(l!=-1){k.protocol=m.substring(0,l);n=l+3}for(i=n;i<m.length;i++){o=m.charAt(i);if(o==":"){break}if(o=="/"){break}}l=i;k.host=m.substring(n,l);k.port="";n=l;if(m.charAt(l)==":"){l=m.indexOf("/",n);k.port=m.substring(n+1,l)}n=l;l=m.indexOf("?",n);if(l==-1){l=m.indexOf("#",n)}if(l==-1){l=m.length}k.path=m.substring(n,l);n=l;if(m.charAt(l)=="?"){l=m.indexOf("#");l=(l==-1)?m.length:l;k.query=m.substring(n+1,l)}n=l;if(m.charAt(l)=="#"){l=m.length;k.anchor=m.substring(n+1,l)}}return k},serializeURL:function(e){var f="";if(e.protocol){f+=e.protocol+"://"}if(e.host){f+=e.host}if(e.port){f+=":"+e.port}if(e.path){f+=e.path}if(e.query){f+="?"+e.query}if(e.anchor){f+="#"+e.anchor}return f},convertAbsoluteURLToRelativeURL:function(q,z){var A=this.parseURL(q),s=this.parseURL(z);var v,B,i,u=0,x="",w=false;var y,t;if(s.path==""){s.path="/"}else{w=true}q=A.path.substring(0,A.path.lastIndexOf("/"));B=q.split("/");i=s.path.split("/");if(B.length>=i.length){for(v=0;v<B.length;v++){if(v>=i.length||B[v]!=i[v]){u=v+1;break}}}if(B.length<i.length){for(v=0;v<i.length;v++){if(v>=B.length||B[v]!=i[v]){u=v+1;break}}}if(u==1){return s.path}for(v=0;v<(B.length-(u-1));v++){x+="../"}for(v=u-1;v<i.length;v++){if(v!=(u-1)){x+="/"+i[v]}else{x+=i[v]}}s.protocol=null;s.host=null;s.port=null;s.path=x==""&&w?"/":x;y=A.path;if((t=y.lastIndexOf("/"))!=-1){y=y.substring(t+1)}if(y==s.path&&s.anchor!==""){s.path=""}if(s.path==""&&!s.anchor){s.path=y!==""?y:"/"}return this.serializeURL(s)},convertRelativeToAbsoluteURL:function(i,v){var A=this.parseURL(i),C,D,t,F,u=this.parseURL(v),y;var w,E,B,z,x;if(v==""||v.indexOf("%")!=-1||v.indexOf("://")!=-1||/^(mailto:|javascript:|#|\/)/.test(v)){return v}C=A.path.split("/");D=u.path.split("/");x=[];for(y=C.length-1;y>=0;y--){if(C[y].length==0){continue}x[x.length]=C[y]}C=x.reverse();t=[];F=0;for(y=D.length-1;y>=0;y--){if(D[y].length==0||D[y]=="."){continue}if(D[y]==".."){F++;continue}if(F>0){F--;continue}t[t.length]=D[y]}D=t.reverse();w=C.length-F;E=(w<=0?"":"/")+C.slice(0,w).join("/")+"/"+D.join("/");B="";z="";u.protocol=A.protocol;u.host=A.host;u.port=A.port;if(u.path.charAt(u.path.length-1)=="/"){E+="/"}u.path=E;return this.serializeURL(u)},convertURL:function(D,x,w){var v=document.location,C,u,B,A,t,y;var s=v.protocol,q=v.hostname,z=v.port;if(s=="file:"){return D}D=tinyMCE.regexpReplace(D,"(http|https):///","/");if(D.indexOf("mailto:")!=-1||D.indexOf("javascript:")!=-1||/^[ \t\r\n\+]*[#\?]/.test(D)){return D}if(!tinyMCE.isIE&&!w&&D.indexOf("://")==-1&&D.charAt(0)!="/"){return tinyMCE.settings.base_href+D}if(w&&tinyMCE.getParam("relative_urls")){y=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings.base_href,D);if(y.charAt(0)=="/"){y=tinyMCE.settings.document_base_prefix+y}B=tinyMCE.parseURL(y);t=tinyMCE.parseURL(tinyMCE.settings.document_base_url);if(B.host==t.host&&(B.port==t.port)){return tinyMCE.convertAbsoluteURLToRelativeURL(tinyMCE.settings.document_base_url,y)}}if(!tinyMCE.getParam("relative_urls")){B=tinyMCE.parseURL(D);A=tinyMCE.parseURL(tinyMCE.settings.base_href);D=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings.base_href,D);if(B.anchor&&B.path==A.path){return"#"+B.anchor}}if(tinyMCE.getParam("remove_script_host")){C="";u="";if(z!==""){u=":"+z}C=s+"//"+q+u+"/";if(D.indexOf(C)==0){D=D.substring(C.length-1)}}return D},convertAllRelativeURLs:function(i){var o,n,l,p,m,q;n=i.getElementsByTagName("img");for(o=0;o<n.length;o++){l=tinyMCE.getAttrib(n[o],"src");q=tinyMCE.getAttrib(n[o],"mce_src");if(q!==""){l=q}if(l!==""){l=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings.base_href,l);n[o].setAttribute("src",l)}}n=i.getElementsByTagName("a");for(o=0;o<n.length;o++){p=tinyMCE.getAttrib(n[o],"href");m=tinyMCE.getAttrib(n[o],"mce_href");if(m!==""){p=m}if(tinyMCE.isGecko&&p.indexOf("%")!=-1){p=p.substr(p.indexOf("%"))}if(tinyMCE.isRealIE&&p.indexOf("%")!=-1){p=p.substr(p.indexOf("%"))+"%"}if(p&&p!==""){p=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings.base_href,p);n[o].setAttribute("href",p)}}}});tinyMCE.add(TinyMCE_Engine,{clearArray:function(f){var a;for(a in f){f[a]=null}return f},explode:function(i,l){var d=l.split(i),k=[],m;for(m=0;m<d.length;m++){if(d[m]!==""){k[k.length]=d[m]}}return k}});tinyMCE.add(TinyMCE_Engine,{_setEventsEnabled:function(s,v){var n,o,p,t,q,u;var i=["onfocus","onblur","onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmousemove","onmouseout","onkeypress","onkeydown","onkeydown","onkeyup"];n=tinyMCE.settings.event_elements.split(",");for(p=0;p<n.length;p++){t=s.getElementsByTagName(n[p]);for(q=0;q<t.length;q++){u="";for(o=0;o<i.length;o++){if((u=tinyMCE.getAttrib(t[q],i[o]))!==""){u=tinyMCE.cleanupEventStr(""+u);if(!v){u="return true;"+u}else{u=u.replace(/^return true;/gi,"")}t[q].removeAttribute(i[o]);t[q].setAttribute(i[o],u)}}}}},_eventPatch:function(l){var k,o,m,n;if(typeof(tinyMCE)=="undefined"){return true}try{if(tinyMCE.selectedInstance){m=tinyMCE.selectedInstance.getWin();if(m&&m.event){n=m.event;if(!n.target){n.target=n.srcElement}TinyMCE_Engine.prototype.handleEvent(n);return}}for(k in tinyMCE.instances){o=tinyMCE.instances[k];if(!tinyMCE.isInstance(o)){continue}o.select();m=o.getWin();if(m&&m.event){n=m.event;if(!n.target){n.target=n.srcElement}TinyMCE_Engine.prototype.handleEvent(n);return}}}catch(e){}},findEvent:function(i){var h,e;if(i){return i}for(h in tinyMCE.instances){e=tinyMCE.instances[h];if(tinyMCE.isInstance(e)&&e.getWin().event){return e.getWin().event}}return null},unloadHandler:function(){tinyMCE.triggerSave(true,true)},addEventHandlers:function(d){this.setEventHandlers(d,1)},setEventHandlers:function(o,s){var e=o.getDoc(),t,q,i,p=s?tinyMCE.addEvent:tinyMCE.removeEvent;t=["keypress","keyup","keydown","click","mouseup","mousedown","controlselect","dblclick"];q=["keypress","keyup","keydown","click","mouseup","mousedown","focus","blur","dragdrop"];o.switchSettings();if(tinyMCE.isRealIE||tinyMCE.isOpera){for(i=0;i<t.length;i++){p(e,t[i],TinyMCE_Engine.prototype._eventPatch)}}else{for(i=0;i<q.length;i++){p(e,q[i],tinyMCE.handleEvent)}try{e.designMode="On"}catch(f){}}},onMouseMove:function(){var f,e;if(tinyMCE.lastHover){e=tinyMCE.lastHover;if(e.className.indexOf("mceMenu")!=-1){tinyMCE._menuButtonEvent("out",e)}else{e.className=e.className}tinyMCE.lastHover=null}if(!tinyMCE.hasMouseMoved){f=tinyMCE.selectedInstance;if(f.isFocused){f.undoBookmark=f.selection.getBookmark();tinyMCE.hasMouseMoved=true}}},cancelEvent:function(d){if(!d){return false}if(tinyMCE.isIE){d.returnValue=false;d.cancelBubble=true}else{d.preventDefault();d.stopPropagation&&d.stopPropagation()}return false},addEvent:function(j,i,k){if(i!="unload"){function h(){var a;try{tinyMCE.removeEvent(j,i,k);tinyMCE.removeEvent(window,"unload",h);j=i=k=null}catch(a){}}tinyMCE.addEvent(window,"unload",h)}if(j.attachEvent){j.attachEvent("on"+i,k)}else{j.addEventListener(i,k,false)}},removeEvent:function(i,h,f){if(i.detachEvent){i.detachEvent("on"+h,f)}else{i.removeEventListener(h,f,false)}},addSelectAccessibility:function(h,i,e){if(!i._isAccessible){i.onkeydown=tinyMCE.accessibleEventHandler;i.onblur=tinyMCE.accessibleEventHandler;i._isAccessible=true;i._win=e}return false},accessibleEventHandler:function(i){var h,e=this._win;i=tinyMCE.isIE?e.event:i;h=tinyMCE.isIE?i.srcElement:i.target;if(i.type=="blur"){if(h.oldonchange){h.onchange=h.oldonchange;h.oldonchange=null}return true}if(h.nodeName=="SELECT"&&!h.oldonchange){h.oldonchange=h.onchange;h.onchange=null}if(i.keyCode==13||i.keyCode==32){h.onchange=h.oldonchange;h.onchange();h.oldonchange=null;tinyMCE.cancelEvent(i);return false}return true},_resetIframeHeight:function(){var d;if(tinyMCE.isRealIE){d=tinyMCE.selectedInstance.iframeElement;if(d._oldHeight){d.style.height=d._oldHeight;d.height=d._oldHeight}}}});function TinyMCE_Selection(d){this.instance=d}TinyMCE_Selection.prototype={getSelectedHTML:function(){var j=this.instance,h,k=this.getRng(),e;if(!k){return null}h=document.createElement("body");if(k.cloneContents){h.appendChild(k.cloneContents())}else{if(typeof(k.item)!="undefined"||typeof(k.htmlText)!="undefined"){h.innerHTML=k.item?k.item(0).outerHTML:k.htmlText}else{h.innerHTML=k.toString()}}e=tinyMCE._cleanupHTML(j,j.contentDocument,j.settings,h,h,false,true,false);return e},getSelectedText:function(){var k=this.instance,j,l,m,d;if(tinyMCE.isIE){j=k.getDoc();if(j.selection.type=="Text"){l=j.selection.createRange();d=l.text}else{d=""}}else{m=this.getSel();if(m&&m.toString){d=m.toString()}else{d=""}}return d},getBookmark:function(D){var N=this.instance,L=this.getRng(),E=N.getDoc(),i=N.getBody();var H,G,I,M=-999999999,w=N.getViewPort();var B,F,J,s,O,C,e,P,K;G=w.left;I=w.top;if(D){return{rng:L,scrollX:G,scrollY:I}}if(tinyMCE.isRealIE){if(L.item){s=L.item(0);O=i.getElementsByTagName(s.nodeName);for(C=0;C<O.length;C++){if(s==O[C]){B=C;break}}return{tag:s.nodeName,index:B,scrollX:G,scrollY:I}}else{H=E.body.createTextRange();H.moveToElementText(N.getBody());H.collapse(true);bp=Math.abs(H.move("character",M));H=L.duplicate();H.collapse(true);B=Math.abs(H.move("character",M));H=L.duplicate();H.collapse(false);F=Math.abs(H.move("character",M))-B;return{start:B-bp,length:F,scrollX:G,scrollY:I}}}else{J=this.getSel();s=this.getFocusElement();if(!J){return null}if(s&&s.nodeName=="IMG"){return{start:-1,end:-1,index:B,scrollX:G,scrollY:I}}if(J.anchorNode==J.focusNode&&J.anchorOffset==J.focusOffset){s=this._getPosText(i,J.anchorNode,J.focusNode);if(!s){return{scrollX:G,scrollY:I}}return{start:s.start+J.anchorOffset,end:s.end+J.focusOffset,scrollX:G,scrollY:I}}else{s=this._getPosText(i,L.startContainer,L.endContainer);if(!s){return{scrollX:G,scrollY:I}}return{start:s.start+L.startOffset,end:s.end+L.endOffset,scrollX:G,scrollY:I}}}return null},moveToBookmark:function(t){var v=this.instance,z,y,w,q,p=v.getBody(),s;var i=v.getDoc(),u=v.getWin(),x=this.getSel();if(!t){return false}if(tinyMCE.isSafari&&t.rng){x.setBaseAndExtent(t.rng.startContainer,t.rng.startOffset,t.rng.endContainer,t.rng.endOffset);return true}if(tinyMCE.isRealIE){if(t.rng){try{t.rng.select()}catch(q){}return true}u.focus();if(t.tag){z=p.createControlRange();y=p.getElementsByTagName(t.tag);if(y.length>t.index){try{z.addElement(y[t.index])}catch(q){}}}else{try{if(t.start<0){return true}z=v.getSel().createRange();z.moveToElementText(v.getBody());z.collapse(true);z.moveStart("character",t.start);z.moveEnd("character",t.length)}catch(q){return true}}z.select();u.scrollTo(t.scrollX,t.scrollY);return true}if(tinyMCE.isGecko||tinyMCE.isOpera){if(!x){return false}if(t.rng){x.removeAllRanges();x.addRange(t.rng)}if(t.start!=-1&&t.end!=-1){try{s=this._getTextPos(p,t.start,t.end);z=i.createRange();z.setStart(s.startNode,s.startOffset);z.setEnd(s.endNode,s.endOffset);x.removeAllRanges();x.addRange(z);if(!tinyMCE.isOpera){u.focus()}}catch(q){}}u.scrollTo(t.scrollX,t.scrollY);return true}return false},_getPosText:function(p,m,q){var d=document.createTreeWalker(p,NodeFilter.SHOW_TEXT,null,false),l,o=0,n={};while((l=d.nextNode())!=null){if(l==m){n.start=o}if(l==q){n.end=o;return n}o+=l.nodeValue?l.nodeValue.length:0}return null},_getTextPos:function(p,o,q){var d=document.createTreeWalker(p,NodeFilter.SHOW_TEXT,null,false),l,n=0,m={};while((l=d.nextNode())!=null){n+=l.nodeValue?l.nodeValue.length:0;if(n>=o&&!m.startNode){m.startNode=l;m.startOffset=o-(n-l.nodeValue.length)}if(n>=q){m.endNode=l;m.endOffset=q-(n-l.nodeValue.length);return m}}return null},selectNode:function(s,e,o,n){var q=this.instance,t,v,u;if(!s){return}if(typeof(e)=="undefined"){e=true}if(typeof(o)=="undefined"){o=false}if(typeof(n)=="undefined"){n=true}if(q.settings.auto_resize){q.resizeToContent()}if(tinyMCE.isRealIE){v=q.getDoc().body.createTextRange();try{v.moveToElementText(s);if(e){v.collapse(n)}v.select()}catch(p){}}else{t=this.getSel();if(!t){return}if(tinyMCE.isSafari){t.setBaseAndExtent(s,0,s,s.innerText.length);if(e){if(n){t.collapseToStart()}else{t.collapseToEnd()}}this.scrollToNode(s);return}v=q.getDoc().createRange();if(o){u=tinyMCE.getNodeTree(s,[],3);if(u.length>0){v.selectNodeContents(u[0])}else{v.selectNodeContents(s)}}else{v.selectNode(s)}if(e){if(!n&&s.nodeType==3){v.setStart(s,s.nodeValue.length);v.setEnd(s,s.nodeValue.length)}else{v.collapse(n)}}t.removeAllRanges();t.addRange(v)}this.scrollToNode(s);tinyMCE.selectedElement=null;if(s.nodeType==1){tinyMCE.selectedElement=s}},scrollToNode:function(q){var p=this.instance,l=p.getWin(),s=p.getViewPort(),m=tinyMCE.getAbsPosition(q),t,n,o;if(m.absLeft<s.left||m.absLeft>s.left+s.width||m.absTop<s.top||m.absTop>s.top+(s.height-25)){l.scrollTo(m.absLeft,m.absTop-s.height+25)}if(p.settings.auto_resize){o=p.getContainerWin();t=tinyMCE.getViewPort(o);n=this.getAbsPosition(q);if(n.absLeft<t.left||n.absLeft>t.left+t.width||n.absTop<t.top||n.absTop>t.top+t.height){o.scrollTo(n.absLeft,n.absTop-t.height+25)}}},getAbsPosition:function(h){var i=tinyMCE.getAbsPosition(h),f=tinyMCE.getAbsPosition(this.instance.iframeElement);return{absLeft:f.absLeft+i.absLeft,absTop:f.absTop+i.absTop}},getSel:function(){var d=this.instance;if(tinyMCE.isRealIE){return d.getDoc().selection}return d.contentWindow.getSelection()},getRng:function(){var d=this.getSel();if(d==null){return null}if(tinyMCE.isRealIE){return d.createRange()}if(tinyMCE.isSafari&&!d.getRangeAt){return""+window.getSelection()}if(d.rangeCount>0){return d.getRangeAt(0)}return null},isCollapsed:function(){var d=this.getRng();if(d.item){return false}return d.boundingWidth==0||this.getSel().isCollapsed},collapse:function(f){var h=this.getRng(),i=this.getSel();if(h.select){h.collapse(f);h.select()}else{if(f){i.collapseToStart()}else{i.collapseToEnd()}}},getFocusElement:function(){var l=this.instance,k,i,m,j;if(tinyMCE.isRealIE){k=l.getDoc();i=k.selection.createRange();j=i.item?i.item(0):i.parentElement()}else{if(!tinyMCE.isSafari&&l.isHidden()){return l.getBody()}m=this.getSel();i=this.getRng();if(!m||!i){return null}j=i.commonAncestorContainer;if(!i.collapsed){if(i.startContainer==i.endContainer){if(i.startOffset-i.endOffset<2){if(i.startContainer.hasChildNodes()){j=i.startContainer.childNodes[i.startOffset]}}}}j=tinyMCE.getParentElement(j)}return j}};function TinyMCE_UndoRedo(d){this.instance=d;this.undoLevels=[];this.undoIndex=0;this.typingUndoIndex=-1;this.undoRedo=true}TinyMCE_UndoRedo.prototype={add:function(s){var t,l,i,o=this.instance,p,q,n;if(s){this.undoLevels[this.undoLevels.length]=s;return true}if(this.typingUndoIndex!=-1){this.undoIndex=this.typingUndoIndex;if(tinyMCE.typingUndoIndex!=-1){tinyMCE.undoIndex=tinyMCE.typingUndoIndex}}i=tinyMCE.trim(o.getBody().innerHTML);if(this.undoLevels[this.undoIndex]&&i!=this.undoLevels[this.undoIndex].content){o.isNotDirty=false;tinyMCE.dispatchCallback(o,"onchange_callback","onChange",o);l=tinyMCE.settings.custom_undo_redo_levels;if(l!=-1&&this.undoLevels.length>l){for(p=0;p<this.undoLevels.length-1;p++){this.undoLevels[p]=this.undoLevels[p+1]}this.undoLevels.length--;this.undoIndex--}t=o.undoBookmark;if(!t){t=o.selection.getBookmark()}this.undoIndex++;this.undoLevels[this.undoIndex]={content:i,bookmark:t};q=tinyMCE.undoLevels;for(p=tinyMCE.undoIndex+1;p<q.length;p++){n=q[p].undoRedo;if(n.undoIndex==n.undoLevels.length-1){n.undoIndex--}n.undoLevels.length--}tinyMCE.undoLevels[tinyMCE.undoIndex++]=o;tinyMCE.undoLevels.length=tinyMCE.undoIndex;this.undoLevels.length=this.undoIndex+1;return true}return false},undo:function(){var d=this.instance;if(this.undoIndex>0){this.undoIndex--;tinyMCE.setInnerHTML(d.getBody(),this.undoLevels[this.undoIndex].content);d.repaint();if(d.settings.custom_undo_redo_restore_selection){d.selection.moveToBookmark(this.undoLevels[this.undoIndex].bookmark)}}},redo:function(){var d=this.instance;tinyMCE.execCommand("mceEndTyping");if(this.undoIndex<(this.undoLevels.length-1)){this.undoIndex++;tinyMCE.setInnerHTML(d.getBody(),this.undoLevels[this.undoIndex].content);d.repaint();if(d.settings.custom_undo_redo_restore_selection){d.selection.moveToBookmark(this.undoLevels[this.undoIndex].bookmark)}}tinyMCE.triggerNodeChange()}};var TinyMCE_ForceParagraphs={_insertPara:function(Z,Q){var J=Z.getDoc(),I=Z.getSel(),R=Z.getBody(),W=Z.contentWindow,T=I.getRangeAt(0);var aa=J.documentElement,H="P",M,K,U,Y;var ac,S,ad,M,i,K,V,P=tinyMCE.isOpera?Z.selection.getBookmark():null;var ab,X,O,L,e,G;function N(f){var a;function d(h){return h.replace(new RegExp("[ \t\r\n]+","g"),"").toLowerCase()==""}if(f.getElementsByTagName("img").length>0){return false}if(f.getElementsByTagName("table").length>0){return false}if(f.getElementsByTagName("hr").length>0){return false}a=tinyMCE.getNodeTree(f,[],3);for(G=0;G<a.length;G++){if(!d(a[G].nodeValue)){return false}}return true}ac=J.createRange();ac.setStart(I.anchorNode,I.anchorOffset);ac.collapse(true);S=J.createRange();S.setStart(I.focusNode,I.focusOffset);S.collapse(true);ad=ac.compareBoundaryPoints(ac.START_TO_END,S)<0;M=ad?I.anchorNode:I.focusNode;i=ad?I.anchorOffset:I.focusOffset;K=ad?I.focusNode:I.anchorNode;V=ad?I.focusOffset:I.anchorOffset;M=M.nodeName=="HTML"?J.body:M;M=M.nodeName=="BODY"?M.firstChild:M;K=K.nodeName=="BODY"?K.firstChild:K;U=Z.getParentBlockElement(M);Y=Z.getParentBlockElement(K);if(U&&(U.nodeName=="CAPTION"||/absolute|relative|static/gi.test(U.style.position))){U=null}if(Y&&(Y.nodeName=="CAPTION"||/absolute|relative|static/gi.test(Y.style.position))){Y=null}if(U!=null){H=U.nodeName;if(/(TD|TABLE|TH|CAPTION)/.test(H)||(H=="DIV"&&/left|right/gi.test(U.style.cssFloat))){H="P"}}if(tinyMCE.getParentElement(U,"OL,UL",null,R)!=null){return false}if((U!=null&&U.nodeName=="TABLE")||(Y!=null&&Y.nodeName=="TABLE")){U=Y=null}ab=(U!=null&&U.nodeName==H)?U.cloneNode(false):J.createElement(H);X=(Y!=null&&Y.nodeName==H)?Y.cloneNode(false):J.createElement(H);if(/^(H[1-6])$/.test(H)){X=J.createElement("p")}O=M;L=K;node=O;do{if(node==R||node.nodeType==9||tinyMCE.isBlockElement(node)){break}O=node}while((node=node.previousSibling?node.previousSibling:node.parentNode));node=L;do{if(node==R||node.nodeType==9||tinyMCE.isBlockElement(node)){break}L=node}while((node=node.nextSibling?node.nextSibling:node.parentNode));if(O.nodeName=="TD"){O=O.firstChild}if(L.nodeName=="TD"){L=L.lastChild}if(U==null){T.deleteContents();if(!tinyMCE.isSafari){I.removeAllRanges()}if(O!=aa&&L!=aa){ac=T.cloneRange();if(O==R){ac.setStart(O,0)}else{ac.setStartBefore(O)}ab.appendChild(ac.cloneContents());if(L.parentNode.nodeName==H){L=L.parentNode}T.setEndAfter(L);if(L.nodeName!="#text"&&L.nodeName!="BODY"){ac.setEndAfter(L)}e=T.cloneContents();if(e.firstChild&&(e.firstChild.nodeName==H||e.firstChild.nodeName=="BODY")){X.innerHTML=e.firstChild.innerHTML}else{X.appendChild(e)}if(N(ab)){ab.innerHTML="&nbsp;"}if(N(X)){X.innerHTML="&nbsp;"}T.deleteContents();S.deleteContents();ac.deleteContents();if(tinyMCE.isOpera){ab.normalize();ac.insertNode(ab);X.normalize();ac.insertNode(X)}else{X.normalize();ac.insertNode(X);ab.normalize();ac.insertNode(ab)}}else{R.innerHTML="<"+H+">&nbsp;</"+H+"><"+H+">&nbsp;</"+H+">";X=R.childNodes[1]}Z.selection.moveToBookmark(P);Z.selection.selectNode(X,true,true);return true}if(O.nodeName==H){ac.setStart(O,0)}else{ac.setStartBefore(O)}ac.setEnd(M,i);ab.appendChild(ac.cloneContents());S.setEndAfter(L);S.setStart(K,V);e=S.cloneContents();if(e.firstChild&&e.firstChild.nodeName==H){X.innerHTML=e.firstChild.innerHTML}else{X.appendChild(e)}if(N(ab)){ab.innerHTML="&nbsp;"}if(N(X)){X.innerHTML="&nbsp;"}T=J.createRange();if(!O.previousSibling&&O.parentNode.nodeName.toUpperCase()==H){T.setStartBefore(O.parentNode)}else{if(ac.startContainer.nodeName.toUpperCase()==H&&ac.startOffset==0){T.setStartBefore(ac.startContainer)}else{T.setStart(ac.startContainer,ac.startOffset)}}if(!L.nextSibling&&L.parentNode.nodeName.toUpperCase()==H){T.setEndAfter(L.parentNode)}else{T.setEnd(S.endContainer,S.endOffset)}T.deleteContents();if(tinyMCE.isOpera){T.insertNode(ab);T.insertNode(X)}else{T.insertNode(X);T.insertNode(ab)}X.normalize();ab.normalize();Z.selection.moveToBookmark(P);Z.selection.selectNode(X,true,true);return true},_handleBackSpace:function(k){var l=k.getRng(),j=l.startContainer,i,m=false;if(j&&j.nextSibling&&j.nextSibling.nodeName=="BR"&&j.parentNode.nodeName!="BODY"){i=j.nodeValue;if(i!=null&&l.startOffset==i.length){j.nextSibling.parentNode.removeChild(j.nextSibling)}}if(k.settings.auto_resize){k.resizeToContent()}return m}};function TinyMCE_Layer(f,e){this.id=f;this.blockerElement=null;this.events=false;this.element=null;this.blockMode=typeof(e)!="undefined"?e:true;this.doc=document}TinyMCE_Layer.prototype={moveRelativeTo:function(e,x){var q=this.getAbsPosition(e),u=this.getElement(),p,s;var h=parseInt(e.offsetWidth),v=parseInt(e.offsetHeight);var t=parseInt(u.offsetWidth),w=parseInt(u.offsetHeight);switch(x){case"tl":p=q.absLeft;s=q.absTop;break;case"tr":p=q.absLeft+h;s=q.absTop;break;case"bl":p=q.absLeft;s=q.absTop+v;break;case"br":p=q.absLeft+h;s=q.absTop+v;break;case"cc":p=q.absLeft+(h/2)-(t/2);s=q.absTop+(v/2)-(w/2);break}this.moveTo(p,s)},moveBy:function(e,h){var i=this.getElement();this.moveTo(parseInt(i.style.left)+e,parseInt(i.style.top)+h)},moveTo:function(e,h){var i=this.getElement();i.style.left=e+"px";i.style.top=h+"px";this.updateBlocker()},resizeBy:function(e,i){var h=this.getElement();this.resizeTo(parseInt(h.style.width)+e,parseInt(h.style.height)+i)},resizeTo:function(e,i){var h=this.getElement();if(e!=null){h.style.width=e+"px"}if(i!=null){h.style.height=i+"px"}this.updateBlocker()},show:function(){var d=this.getElement();if(d){d.style.display="block";this.updateBlocker()}},hide:function(){var d=this.getElement();if(d){d.style.display="none";this.updateBlocker()}},isVisible:function(){return this.getElement().style.display=="block"},getElement:function(){if(!this.element){this.element=this.doc.getElementById(this.id)}return this.element},setBlockMode:function(d){this.blockMode=d},updateBlocker:function(){var l,o,e,h,n,m;o=this.getBlocker();if(o){if(this.blockMode){l=this.getElement();e=this.parseInt(l.style.left);h=this.parseInt(l.style.top);n=this.parseInt(l.offsetWidth);m=this.parseInt(l.offsetHeight);o.style.left=e+"px";o.style.top=h+"px";o.style.width=n+"px";o.style.height=m+"px";o.style.display=l.style.display}else{o.style.display="none"}}},getBlocker:function(){var f,d;if(!this.blockerElement&&this.blockMode){f=this.doc;d=f.getElementById(this.id+"_blocker");if(!d){d=f.createElement("iframe");d.setAttribute("id",this.id+"_blocker");d.style.cssText="display: none; position: absolute; left: 0; top: 0";d.src="javascript:false;";d.frameBorder="0";d.scrolling="no";f.body.appendChild(d)}this.blockerElement=d}return this.blockerElement},getAbsPosition:function(f){var e={absLeft:0,absTop:0};while(f){e.absLeft+=f.offsetLeft;e.absTop+=f.offsetTop;f=f.offsetParent}return e},create:function(e,h,n,d){var m=this.doc,o=m.createElement(e);o.setAttribute("id",this.id);if(h){o.className=h}if(!n){n=m.body}if(d){o.innerHTML=d}n.appendChild(o);return this.element=o},exists:function(){return this.doc.getElementById(this.id)!=null},parseInt:function(d){if(d==null||d==""){return 0}return parseInt(d)},remove:function(){var f=this.getElement(),e=this.getBlocker();if(f){f.parentNode.removeChild(f)}if(e){e.parentNode.removeChild(e)}}};function TinyMCE_Menu(){var d;if(typeof(tinyMCE.menuCounter)=="undefined"){tinyMCE.menuCounter=0}d="mc_menu_"+tinyMCE.menuCounter++;TinyMCE_Layer.call(this,d,true);this.id=d;this.items=[];this.needsUpdate=true}TinyMCE_Menu.prototype=tinyMCE.extend(TinyMCE_Layer.prototype,{init:function(e){var f;this.settings={separator_class:"mceMenuSeparator",title_class:"mceMenuTitle",disabled_class:"mceMenuDisabled",menu_class:"mceMenu",drop_menu:true};for(f in e){this.settings[f]=e[f]}this.create("div",this.settings.menu_class)},clear:function(){this.items=[]},addTitle:function(d){this.add({type:"title",text:d})},addDisabled:function(d){this.add({type:"disabled",text:d})},addSeparator:function(){this.add({type:"separator"})},addItem:function(e,f){this.add({text:e,js:f})},add:function(d){this.items[this.items.length]=d;this.needsUpdate=true},update:function(){var h=this.getElement(),i="",n,o,e=this.items,m=this.settings;if(this.settings.drop_menu){i+='<span class="mceMenuLine"></span>'}i+='<table border="0" cellpadding="0" cellspacing="0">';for(n=0;n<e.length;n++){o=tinyMCE.xmlEncode(e[n].text);c=e[n].class_name?' class="'+e[n].class_name+'"':"";switch(e[n].type){case"separator":i+='<tr class="'+m.separator_class+'"><td>';break;case"title":i+='<tr class="'+m.title_class+'"><td><span'+c+">"+o+"</span>";break;case"disabled":i+='<tr class="'+m.disabled_class+'"><td><span'+c+">"+o+"</span>";break;default:i+='<tr><td><a href="'+tinyMCE.xmlEncode(e[n].js)+'" onmousedown="'+tinyMCE.xmlEncode(e[n].js)+';return tinyMCE.cancelEvent(event);" onclick="return tinyMCE.cancelEvent(event);" onmouseup="return tinyMCE.cancelEvent(event);"><span'+c+">"+o+"</span></a>"}i+="</td></tr>"}i+="</table>";h.innerHTML=i;this.needsUpdate=false;this.updateBlocker()},show:function(){var e,f;if(tinyMCE.lastMenu==this){return}if(this.needsUpdate){this.update()}if(tinyMCE.lastMenu&&tinyMCE.lastMenu!=this){tinyMCE.lastMenu.hide()}TinyMCE_Layer.prototype.show.call(this);if(!tinyMCE.isOpera){}tinyMCE.lastMenu=this}});tinyMCE.add(TinyMCE_Engine,{debug:function(){var k="",i,a,j=tinyMCE.log.length;for(a=0,i=this.debug.arguments;a<i.length;a++){k+=i[a];if(a<i.length-1){k+=", "}}if(j<1000){tinyMCE.log[j]="[debug] "+k}}});