function getType(a){if(typeof a=="undefined"){return"undefined"}if(a===null){return"null"}switch(a.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(a.nodeType)!="undefined"){return"HTML "+a.nodeName.toUpperCase()+" Element"}if(a.toString){if(a.toString().match("Event")){return"Event"}}return"Object"}}function print_r(a,d,k,l){if(!l){l=""}if(!k){k=(l?l:(d?"&nbsp;&nbsp;&nbsp;&nbsp;":"\t"))}var f=(d?"<br />":"")+"\n";var m="";var j={"null":true,Array:true,Object:true,"undefined":true};var i=getType(a);var h="";if(i=="Array"){m+=i+":"+f+l+"("+f;var o=l+")"+f;l+=k;for(var n=0;n<a.length;++n){var e=getType(a[n]);m+=l+n+" => "+(j[e]?"":" ("+getType(a[n])+")")+" ";if((e=="Array")||(e=="Object")){m+=print_r(a[n],d,k,l)}else{m+=a[n]+f}}m+=o}else{if(i=="Object"){m+=i+":"+f+l+"("+f;var o=l+")"+f;l+=k;for(n in a){var e=getType(a[n]);m+=l+n+" => "+(j[e]?"":" ("+getType(a[n])+")")+" ";if((e=="Array")||(e=="Object")){m+=print_r(a[n],d,k,l)}else{m+=a[n]+f}}m+=o}else{m+=a}}return m}function TinyMCE_Engine(){var a;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=[];a=navigator.userAgent;this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.isMSIE5=this.isMSIE&&(a.indexOf("MSIE 5")!=-1);this.isMSIE5_0=this.isMSIE&&(a.indexOf("MSIE 5.0")!=-1);this.isMSIE7=this.isMSIE&&(a.indexOf("MSIE 7")!=-1);this.isGecko=a.indexOf("Gecko")!=-1;this.isSafari=a.indexOf("Safari")!=-1;this.isOpera=window.opera&&opera.buildNumber?true:false;this.isMac=a.indexOf("Mac")!=-1;this.isNS7=a.indexOf("Netscape/7")!=-1;this.isNS71=a.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(k){var m,f,t="",n,l,q,o,j,d,a=[],u;if(this.isMSIE5_0){return}this.settings=k;if(typeof(document.execCommand)=="undefined"){return}if(!tinyMCE.baseURL){u=document.getElementsByTagName("head")[0];if(u){for(n=0,f=u.getElementsByTagName("script");n<f.length;n++){a.push(f[n])}}for(n=0,f=document.getElementsByTagName("script");n<f.length;n++){a.push(f[n])}f=document.getElementsByTagName("base");for(n=0;n<f.length;n++){if(f[n].href){t=f[n].href}}for(n=0;n<a.length;n++){if(a[n].src&&(a[n].src.indexOf("tiny_mce.js")!=-1||a[n].src.indexOf("tiny_mce_dev.js")!=-1||a[n].src.indexOf("tiny_mce_src.js")!=-1||a[n].src.indexOf("tiny_mce_gzip")!=-1)){d=a[n].src;tinyMCE.srcMode=(d.indexOf("_src")!=-1||d.indexOf("_dev")!=-1)?"_src":"";tinyMCE.gzipMode=d.indexOf("_gzip")!=-1;d=d.substring(0,d.lastIndexOf("/"));if(k.exec_mode=="src"||k.exec_mode=="normal"){tinyMCE.srcMode=k.exec_mode=="src"?"_src":""}if(t!==""&&d.indexOf("://")==-1){tinyMCE.baseURL=t+d}else{tinyMCE.baseURL=d}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}t=tinyMCE.settings.document_base_url;o=document.location.href;j=o.indexOf("://");if(j>0&&document.location.protocol!="file:"){j=o.indexOf("/",j+3);o=o.substring(0,j);if(t.indexOf("://")==-1){t=o+t}tinyMCE.settings.document_base_url=t;tinyMCE.settings.document_base_prefix=o}if(t.indexOf("?")!=-1){t=t.substring(0,t.indexOf("?"))}this.settings.base_href=t.substring(0,t.lastIndexOf("/"))+"/";m=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/"+m;if(!tinyMCE.isIE||tinyMCE.isOpera){this.settings.force_br_newlines=false}if(tinyMCE.getParam("popups_css",false)){l=tinyMCE.getParam("popups_css","");if(l.indexOf("://")==-1&&l.charAt(0)!="/"){this.settings.popups_css=this.documentBasePath+"/"+l}else{this.settings.popups_css=l}}else{this.settings.popups_css=tinyMCE.baseURL+"/themes/"+m+"/css/editor_popup.css"}if(tinyMCE.getParam("editor_css",false)){l=tinyMCE.getParam("editor_css","");if(l.indexOf("://")==-1&&l.charAt(0)!="/"){this.settings.editor_css=this.documentBasePath+"/"+l}else{this.settings.editor_css=l}}else{if(this.settings.editor_css!==""){this.settings.editor_css=tinyMCE.baseURL+"/themes/"+m+"/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);j=tinyMCE.getParam("plugins","",true,",");if(j.length>0){for(n=0;n<j.length;n++){if(j[n].charAt(0)!="-"){this.loadScript(tinyMCE.baseURL+"/plugins/"+j[n]+"/editor_plugin"+tinyMCE.srcMode+".js")}}}if(tinyMCE.getParam("entity_encoding")=="named"){k.cleanup_entities=[];q=tinyMCE.getParam("entities","",true,",");for(n=0;n<q.length;n+=2){k.cleanup_entities["c"+q[n]]=q[n+1]}}k.index=this.configs.length;this.configs[this.configs.length]=k;this.loadNextScript();if(this.isIE&&!this.isOpera){try{document.execCommand("BackgroundImageCache",false,true)}catch(s){}}this.xmlEncodeRe=new RegExp('[<>&"]',"g")},_addUnloadEvents:function(){var a=tinyMCE.settings.add_unload_trigger;if(tinyMCE.isIE){if(a){tinyMCE.addEvent(window,"unload",TinyMCE_Engine.prototype.unloadHandler);tinyMCE.addEvent(window.document,"beforeunload",TinyMCE_Engine.prototype.unloadHandler)}}else{if(a){tinyMCE.addEvent(window,"unload",function(){tinyMCE.triggerSave(true,true)})}}},_def:function(f,d,e){var a=tinyMCE.getParam(f,d);a=e?a.replace(/\s+/g,""):a;this.settings[f]=a},hasPlugin:function(a){return typeof(this.plugins[a])!="undefined"&&this.plugins[a]!=null},addPlugin:function(e,a){var d=this.plugins[e];a.baseURL=d?d.baseURL:tinyMCE.baseURL+"/plugins/"+e;this.plugins[e]=a;this.loadNextScript()},setPluginBaseURL:function(e,a){var d=this.plugins[e];if(d){d.baseURL=a}else{this.plugins[e]={baseURL:a}}},loadPlugin:function(d,a){a=a.indexOf(".js")!=-1?a.substring(0,a.lastIndexOf("/")):a;a=a.charAt(a.length-1)=="/"?a.substring(0,a.length-1):a;this.plugins[d]={baseURL:a};this.loadScript(a+"/editor_plugin"+(tinyMCE.srcMode?"_src":"")+".js")},hasTheme:function(a){return typeof(this.themes[a])!="undefined"&&this.themes[a]!=null},addTheme:function(d,a){this.themes[d]=a;this.loadNextScript()},addMenu:function(d,a){this.menus[d]=a},hasMenu:function(a){return typeof(this.plugins[a])!="undefined"&&this.plugins[a]!=null},loadScript:function(a){var d;for(d=0;d<this.loadedFiles.length;d++){if(this.loadedFiles[d]==a){return}}if(tinyMCE.settings.strict_loading_mode){this.pendingFiles[this.pendingFiles.length]=a}else{document.write('<script language="javascript" type="text/javascript" src="'+a+'" charset="utf8"><\/script>')}this.loadedFiles[this.loadedFiles.length]=a},loadNextScript:function(){var e=document,a;if(!tinyMCE.settings.strict_loading_mode){return}if(this.loadingIndex<this.pendingFiles.length){a=e.createElementNS("http://www.w3.org/1999/xhtml","script");a.setAttribute("language","javascript");a.setAttribute("type","text/javascript");a.setAttribute("src",this.pendingFiles[this.loadingIndex++]);a.charset="utf-8";e.getElementsByTagName("head")[0].appendChild(a)}else{this.loadingIndex=-1}},loadCSS:function(e){var f=e.replace(/\s+/,"").split(",");var j=0,m=0,l=false;var k=0,h=0,d,a;for(k=0,m=f.length;k<m;k++){if(f[k]!=null&&f[k]!="null"&&f[k].length>0){for(h=0,j=this.loadedFiles.length;h<j;h++){if(this.loadedFiles[h]==f[k]){l=true;break}}if(!l){if(tinyMCE.settings.strict_loading_mode){d=document.getElementsByTagName("head");a=document.createElement("link");a.setAttribute("href",f[k]);a.setAttribute("rel","stylesheet");a.setAttribute("type","text/css");d[0].appendChild(a)}else{document.write('<link href="'+f[k]+'" rel="stylesheet" type="text/css" />')}this.loadedFiles[this.loadedFiles.length]=f[k]}}}},importCSS:function(j,h){var f=h.replace(/\s+/,"").split(",");var i,k,d,a,e;for(a=0,i=f.length;a<i;a++){e=f[a];if(e!=null&&e!="null"&&e.length>0){if(e.indexOf("://")==-1&&e.charAt(0)!="/"){e=this.documentBasePath+"/"+e}if(typeof(j.createStyleSheet)=="undefined"){k=j.createElement("link");k.rel="stylesheet";k.href=e;if((d=j.getElementsByTagName("head"))!=null&&d.length>0){d[0].appendChild(k)}}else{j.createStyleSheet(e)}}}},confirmAdd:function(f,d){var h=tinyMCE.isIE?event.srcElement:f.target;var a=h.name?h.name:h.id;tinyMCE.settings=d;if(tinyMCE.settings.convert_on_click||(!h.getAttribute("mce_noask")&&confirm(tinyMCELang.lang_edit_confirm))){tinyMCE.addMCEControl(h,a)}h.setAttribute("mce_noask","true")},updateContent:function(a){var d,h,e,f;d=document.getElementById(a);for(h in tinyMCE.instances){e=tinyMCE.instances[h];if(!tinyMCE.isInstance(e)){continue}e.switchSettings();if(e.formElement==d){f=e.getDoc();tinyMCE._setHTML(f,e.formElement.value);if(!tinyMCE.isIE){f.body.innerHTML=tinyMCE._cleanupHTML(e,f,this.settings,f.body,e.visualAid)}}}},addMCEControl:function(f,a,d){var h="mce_editor_"+tinyMCE.idCounter++;var e=new TinyMCE_Control(tinyMCE.settings);e.editorId=h;this.instances[h]=e;e._onAdd(f,a,d)},removeInstance:function(e){var d=[],f,a;for(f in tinyMCE.instances){a=tinyMCE.instances[f];if(tinyMCE.isInstance(a)&&e!=a){d[f]=a}}tinyMCE.instances=d;f=[];d=tinyMCE.undoLevels;for(a=0;a<d.length;a++){if(d[a]!=e){f.push(d[a])}}tinyMCE.undoLevels=f;tinyMCE.undoIndex=f.length;tinyMCE.dispatchCallback(e,"remove_instance_callback","removeInstance",e);return e},removeMCEControl:function(j){var i=tinyMCE.getInstanceById(j),e,d,f,a,k;if(i){i.switchSettings();j=i.editorId;e=tinyMCE.getContent(j);this.removeInstance(i);tinyMCE.selectedElement=null;tinyMCE.selectedInstance=null;tinyMCE.selectedElement=null;tinyMCE.selectedInstance=null;for(k in tinyMCE.instances){if(!tinyMCE.isInstance(tinyMCE.instances[k])){continue}tinyMCE.selectedInstance=tinyMCE.instances[k];break}d=document.getElementById(j+"_parent");f=i.oldTargetElement;a=f.nodeName.toLowerCase();if(a=="textarea"||a=="input"){d.parentNode.removeChild(d);f.style.display="inline";f.value=e}else{f.innerHTML=e;f.style.display="block";d.parentNode.insertBefore(f,d);d.parentNode.removeChild(d)}}},triggerSave:function(d,a){var e,f;if(typeof(d)=="undefined"){d=false}if(typeof(a)=="undefined"){a=false}for(f in tinyMCE.instances){e=tinyMCE.instances[f];if(!tinyMCE.isInstance(e)){continue}e.triggerSave(d,a)}},resetForm:function(f){var d,e,h,a=document.forms[f];for(h in tinyMCE.instances){e=tinyMCE.instances[h];if(!tinyMCE.isInstance(e)){continue}e.switchSettings();for(d=0;d<a.elements.length;d++){if(e.formTargetElementId==a.elements[d].name){e.getBody().innerHTML=e.startContent}}}},execInstanceCommand:function(i,h,j,f,a){var e=tinyMCE.getInstanceById(i),d;if(e){d=e.selection.getRng();if(typeof(a)=="undefined"){a=true}if(a&&(!d||!d.item)){e.contentWindow.focus()}e.autoResetDesignMode();this.selectedElement=e.getFocusElement();e.select();tinyMCE.execCommand(h,j,f);if(tinyMCE.isIE&&window.event!=null){tinyMCE.cancelEvent(window.event)}}},execCommand:function(j,l,f){var d=tinyMCE.selectedInstance,k,a,i;l=l?l:false;f=f?f:null;if(d){d.switchSettings()}switch(j){case"Undo":if(this.getParam("custom_undo_redo_global")){if(this.undoIndex>0){tinyMCE.nextUndoRedoAction="Undo";d=this.undoLevels[--this.undoIndex];d.select();if(!tinyMCE.nextUndoRedoInstanceId){d.execCommand("Undo")}}}else{d.execCommand("Undo")}return true;case"Redo":if(this.getParam("custom_undo_redo_global")){if(this.undoIndex<=this.undoLevels.length-1){tinyMCE.nextUndoRedoAction="Redo";d=this.undoLevels[this.undoIndex++];d.select();if(!tinyMCE.nextUndoRedoInstanceId){d.execCommand("Redo")}}}else{d.execCommand("Redo")}return true;case"mceFocus":d=tinyMCE.getInstanceById(f);if(d){d.getWin().focus()}return;case"mceAddControl":case"mceAddEditor":tinyMCE.addMCEControl(tinyMCE._getElementById(f),f);return;case"mceAddFrameControl":tinyMCE.addMCEControl(tinyMCE._getElementById(f.element,f.document),f.element,f.document);return;case"mceRemoveControl":case"mceRemoveEditor":tinyMCE.removeMCEControl(f);return;case"mceToggleEditor":d=tinyMCE.getInstanceById(f);if(d){a=document.getElementById(d.editorId+"_parent");i=d.oldTargetElement;if(typeof(d.enabled)=="undefined"){d.enabled=true}d.enabled=!d.enabled;if(!d.enabled){a.style.display="none";if(i.nodeName=="TEXTAREA"||i.nodeName=="INPUT"){i.value=d.getHTML()}else{i.innerHTML=d.getHTML()}i.style.display=d.oldTargetDisplay;tinyMCE.dispatchCallback(d,"hide_instance_callback","hideInstance",d)}else{a.style.display="block";i.style.display="none";if(i.nodeName=="TEXTAREA"||i.nodeName=="INPUT"){d.setHTML(i.value)}else{d.setHTML(i.innerHTML)}d.useCSS=false;tinyMCE.dispatchCallback(d,"show_instance_callback","showInstance",d)}}else{tinyMCE.addMCEControl(tinyMCE._getElementById(f),f)}return;case"mceResetDesignMode":if(tinyMCE.isGecko){for(k in tinyMCE.instances){if(!tinyMCE.isInstance(tinyMCE.instances[k])){continue}try{tinyMCE.instances[k].getDoc().designMode="off";tinyMCE.instances[k].getDoc().designMode="on";tinyMCE.instances[k].useCSS=false}catch(h){}}}return}if(d){d.execCommand(j,l,f)}else{if(tinyMCE.settings.focus_alert){alert(tinyMCELang.lang_focus_alert)}}},_createIFrame:function(k,j,i){var d,l=k.getAttribute("id");var h,a;if(typeof(j)=="undefined"){j=document}if(typeof(i)=="undefined"){i=window}d=j.createElement("iframe");h=""+tinyMCE.settings.area_width;a=""+tinyMCE.settings.area_height;if(h.indexOf("%")==-1){h=parseInt(h);h=(isNaN(h)||h<0)?300:h;h=h+"px"}if(a.indexOf("%")==-1){a=parseInt(a);a=(isNaN(a)||a<0)?240:a;a=a+"px"}d.setAttribute("id",l);d.setAttribute("name",l);d.setAttribute("class","mceEditorIframe");d.setAttribute("border","0");d.setAttribute("frameBorder","0");d.setAttribute("marginWidth","0");d.setAttribute("marginHeight","0");d.setAttribute("leftMargin","0");d.setAttribute("topMargin","0");d.setAttribute("width",h);d.setAttribute("height",a);d.setAttribute("allowtransparency","true");d.className="mceEditorIframe";if(tinyMCE.settings.auto_resize){d.setAttribute("scrolling","no")}if(tinyMCE.isRealIE){d.setAttribute("src",this.settings.default_document)}d.style.width=h;d.style.height=a;if(tinyMCE.settings.strict_loading_mode){d.style.marginBottom="-4px"}if(tinyMCE.isRealIE){k.outerHTML=d.outerHTML}else{k.parentNode.replaceChild(d,k)}if(tinyMCE.isRealIE){try{i.frames[l]}catch(f){return false}return i.frames[l]}else{return d}},setupContent:function(m){var d=tinyMCE.instances[m],a,n=d.getDoc(),l=n.getElementsByTagName("head").item(0);var j=d.startContent,o,f;if(tinyMCE.settings.strict_loading_mode){j=j.replace(/&lt;/g,"<");j=j.replace(/&gt;/g,">");j=j.replace(/&quot;/g,'"');j=j.replace(/&amp;/g,"&")}tinyMCE.selectedInstance=d;d.switchSettings();if(!tinyMCE.isIE&&tinyMCE.getParam("setupcontent_reload",false)&&n.title!="blank_page"){try{n.location.href=tinyMCE.baseURL+"/blank.htm"}catch(k){}window.setTimeout("tinyMCE.setupContent('"+m+"');",1000);return}if(!l||!n.body){window.setTimeout("tinyMCE.setupContent('"+m+"');",10);return}tinyMCE.importCSS(d.getDoc(),tinyMCE.baseURL+"/themes/"+d.settings.theme+"/css/editor_content.css");if(typeof(d.settings.content_css)==="object"){for(iI=0;iI<d.settings.content_css.length;iI++){tinyMCE.importCSS(d.getDoc(),d.settings.content_css[iI])}}else{tinyMCE.importCSS(d.getDoc(),d.settings.content_css)}tinyMCE.dispatchCallback(d,"init_instance_callback","initInstance",d);if(tinyMCE.getParam("custom_undo_redo_keyboard_shortcuts")){d.addShortcut("ctrl","z","lang_undo_desc","Undo");d.addShortcut("ctrl","y","lang_redo_desc","Redo")}for(a=1;a<=6;a++){d.addShortcut("ctrl",""+a,"","FormatBlock",false,"<h"+a+">")}d.addShortcut("ctrl","7","","FormatBlock",false,"<p>");d.addShortcut("ctrl","8","","FormatBlock",false,"<div>");d.addShortcut("ctrl","9","","FormatBlock",false,"<address>");if(tinyMCE.isGecko){d.addShortcut("ctrl","b","lang_bold_desc","Bold");d.addShortcut("ctrl","i","lang_italic_desc","Italic");d.addShortcut("ctrl","u","lang_underline_desc","Underline")}if(tinyMCE.getParam("convert_fonts_to_spans")){d.getBody().setAttribute("id","mceSpanFonts")}if(tinyMCE.settings.nowrap){n.body.style.whiteSpace="nowrap"}n.body.dir=this.settings.directionality;n.editorId=m;if(!tinyMCE.isIE){n.documentElement.editorId=m}d.setBaseHREF(tinyMCE.settings.base_href);if(tinyMCE.settings.convert_newlines_to_brs){j=tinyMCE.regexpReplace(j,"\r\n","<br />","gi");j=tinyMCE.regexpReplace(j,"\r","<br />","gi");j=tinyMCE.regexpReplace(j,"\n","<br />","gi")}j=tinyMCE.storeAwayURLs(j);j=tinyMCE._customCleanup(d,"insert_to_editor",j);if(tinyMCE.isIE){window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["'+m+'"].getDoc(), "'+m+'");}catch(e){}',500);if(tinyMCE.settings.force_br_newlines){n.styleSheets[0].addRule("p","margin: 0;")}f=d.getBody();f.editorId=m}j=tinyMCE.cleanupHTMLCode(j);if(!tinyMCE.isIE){o=d.getDoc().createElement("body");n=d.getDoc();o.innerHTML=j;if(tinyMCE.settings.cleanup_on_startup){tinyMCE.setInnerHTML(d.getBody(),tinyMCE._cleanupHTML(d,n,this.settings,o))}else{tinyMCE.setInnerHTML(d.getBody(),j)}tinyMCE.convertAllRelativeURLs(d.getBody())}else{if(tinyMCE.settings.cleanup_on_startup){tinyMCE._setHTML(d.getDoc(),j);try{tinyMCE.setInnerHTML(d.getBody(),tinyMCE._cleanupHTML(d,d.contentDocument,this.settings,d.getBody()))}catch(h){}}else{tinyMCE._setHTML(d.getDoc(),j)}}tinyMCE.handleVisualAid(d.getBody(),true,tinyMCE.settings.visual,d);tinyMCE.dispatchCallback(d,"setupcontent_callback","setupContent",m,d.getBody(),d.getDoc());if(!tinyMCE.isIE){tinyMCE.addEventHandlers(d)}if(tinyMCE.isIE){tinyMCE.addEvent(d.getBody(),"blur",TinyMCE_Engine.prototype._eventPatch);tinyMCE.addEvent(d.getBody(),"beforedeactivate",TinyMCE_Engine.prototype._eventPatch);if(!tinyMCE.isOpera){tinyMCE.addEvent(n.body,"mousemove",TinyMCE_Engine.prototype.onMouseMove);tinyMCE.addEvent(n.body,"beforepaste",TinyMCE_Engine.prototype._eventPatch);tinyMCE.addEvent(n.body,"drop",TinyMCE_Engine.prototype._eventPatch)}}d.select();tinyMCE.selectedElement=d.contentWindow.document.body;tinyMCE._customCleanup(d,"insert_to_editor_dom",d.getBody());tinyMCE._customCleanup(d,"setup_content_dom",d.getBody());tinyMCE._setEventsEnabled(d.getBody(),false);tinyMCE.cleanupAnchors(d.getDoc());if(tinyMCE.getParam("convert_fonts_to_spans")){tinyMCE.convertSpansToFonts(d.getDoc())}d.startContent=tinyMCE.trim(d.getBody().innerHTML);d.undoRedo.add({content:d.startContent});if(tinyMCE.isGecko){tinyMCE.selectNodes(d.getBody(),function(e){if(e.nodeType==3||e.nodeType==8){e.nodeValue=e.nodeValue.replace(new RegExp('\\s(mce_src|mce_href)="[^"]*"',"gi"),"")}return false})}if(tinyMCE.isGecko){d.getBody().spellcheck=tinyMCE.getParam("gecko_spellcheck")}tinyMCE._removeInternal(d.getBody());d.select();tinyMCE.triggerNodeChange(false,true)},storeAwayURLs:function(a){if(!a.match(/(mce_src|mce_href)/gi,a)){a=a.replace(new RegExp('src\\s*=\\s*"([^ >"]*)"',"gi"),'src="$1" mce_src="$1"');a=a.replace(new RegExp('href\\s*=\\s*"([^ >"]*)"',"gi"),'href="$1" mce_href="$1"')}return a},_removeInternal:function(a){if(tinyMCE.isGecko){tinyMCE.selectNodes(a,function(d){if(d.nodeType==3||d.nodeType==8){d.nodeValue=d.nodeValue.replace(new RegExp('\\s(mce_src|mce_href)="[^"]*"',"gi"),"")}return false})}},removeTinyMCEFormElements:function(d){var e,a;if(!tinyMCE.getParam("hide_selects_on_submit")){return}if(typeof(d)=="undefined"||d==null){return}if(d.nodeName!="FORM"){if(d.form){d=d.form}else{d=tinyMCE.getParentElement(d,"form")}}if(d==null){return}for(e=0;e<d.elements.length;e++){a=d.elements[e].name?d.elements[e].name:d.elements[e].id;if(a.indexOf("mce_editor_")==0){d.elements[e].disabled=true}}},handleEvent:function(l){var h=tinyMCE.selectedInstance,f,m,s;if(typeof(tinyMCE)=="undefined"){return true}if(tinyMCE.executeCallback(tinyMCE.selectedInstance,"handle_event_callback","handleEvent",l)){return false}switch(l.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 t=tinyMCE.selectedInstance.iframeElement;if(t.style.height.indexOf("%")!=-1){t._oldHeight=t.style.height;t.style.height=t.clientHeight}}window.setTimeout("tinyMCE.selectedInstance.setBaseHREF(tinyMCE.settings.base_href);tinyMCE._resetIframeHeight();",1);return;case"submit":tinyMCE.formSubmit(tinyMCE.isMSIE?window.event.srcElement:l.target);return;case"reset":var j=tinyMCE.isIE?window.event.srcElement:l.target;for(f=0;f<document.forms.length;f++){if(document.forms[f]==j){window.setTimeout("tinyMCE.resetForm("+f+");",10)}}return;case"keypress":if(h&&h.handleShortcut(l)){return false}if(l.target.editorId){tinyMCE.instances[l.target.editorId].select()}else{if(l.target.ownerDocument.editorId){tinyMCE.instances[l.target.ownerDocument.editorId].select()}}if(tinyMCE.selectedInstance){tinyMCE.selectedInstance.switchSettings()}if((tinyMCE.isGecko||tinyMCE.isOpera||tinyMCE.isSafari)&&tinyMCE.settings.force_p_newlines&&l.keyCode==13&&!l.shiftKey){if(TinyMCE_ForceParagraphs._insertPara(tinyMCE.selectedInstance,l)){tinyMCE.execCommand("mceAddUndoLevel");return tinyMCE.cancelEvent(l)}}if((tinyMCE.isGecko&&!tinyMCE.isSafari)&&tinyMCE.settings.force_p_newlines&&(l.keyCode==8||l.keyCode==46)&&!l.shiftKey){if(TinyMCE_ForceParagraphs._handleBackSpace(tinyMCE.selectedInstance,l.type)){tinyMCE.execCommand("mceAddUndoLevel");return tinyMCE.cancelEvent(l)}}if(tinyMCE.isIE&&tinyMCE.settings.force_br_newlines&&l.keyCode==13){if(l.target.editorId){tinyMCE.instances[l.target.editorId].select()}if(tinyMCE.selectedInstance){var d=tinyMCE.selectedInstance.getDoc().selection;var a=d.createRange();if(tinyMCE.getParentElement(a.parentElement(),"li")!=null){return false}l.returnValue=false;l.cancelBubble=true;a.pasteHTML("<br />");a.collapse(false);a.select();tinyMCE.execCommand("mceAddUndoLevel");tinyMCE.triggerNodeChange(false);return false}}if(l.keyCode==8||l.keyCode==46){tinyMCE.selectedElement=l.target;tinyMCE.linkElement=tinyMCE.getParentElement(l.target,"a");tinyMCE.imgElement=tinyMCE.getParentElement(l.target,"img");tinyMCE.triggerNodeChange(false)}return false;case"keyup":case"keydown":tinyMCE.hideMenus();tinyMCE.hasMouseMoved=false;if(h&&h.handleShortcut(l)){return false}h._fixRootBlocks();if(h.settings.remove_trailing_nbsp){h._fixTrailingNbsp()}if(l.target.editorId){tinyMCE.instances[l.target.editorId].select()}if(tinyMCE.selectedInstance){tinyMCE.selectedInstance.switchSettings()}h=tinyMCE.selectedInstance;if(tinyMCE.isGecko&&tinyMCE.settings.force_p_newlines&&(l.keyCode==8||l.keyCode==46)&&!l.shiftKey){if(TinyMCE_ForceParagraphs._handleBackSpace(tinyMCE.selectedInstance,l.type)){tinyMCE.execCommand("mceAddUndoLevel");l.preventDefault();return false}}tinyMCE.selectedElement=null;tinyMCE.selectedNode=null;m=tinyMCE.selectedInstance.getFocusElement();tinyMCE.linkElement=tinyMCE.getParentElement(m,"a");tinyMCE.imgElement=tinyMCE.getParentElement(m,"img");tinyMCE.selectedElement=m;if(tinyMCE.isGecko&&l.type=="keyup"&&l.keyCode==9){tinyMCE.handleVisualAid(tinyMCE.selectedInstance.getBody(),true,tinyMCE.settings.visual,tinyMCE.selectedInstance)}if(tinyMCE.isIE&&l.type=="keydown"&&l.keyCode==13){tinyMCE.enterKeyElement=tinyMCE.selectedInstance.getFocusElement()}if(tinyMCE.isIE&&l.type=="keyup"&&l.keyCode==13){m=tinyMCE.enterKeyElement;if(m){var q=new RegExp("^HR|IMG|BR$","g");var n=new RegExp("^H[1-6]$","g");if(!m.hasChildNodes()&&!q.test(m.nodeName)){if(n.test(m.nodeName)){m.innerHTML="&nbsp;&nbsp;"}else{m.innerHTML="&nbsp;"}}}}s=tinyMCE.posKeyCodes;var k=false;for(f=0;f<s.length;f++){if(s[f]==l.keyCode){k=true;break}}if(tinyMCE.isIE&&tinyMCE.settings.custom_undo_redo){s=[8,46];for(f=0;f<s.length;f++){if(s[f]==l.keyCode){if(l.type=="keyup"){tinyMCE.triggerNodeChange(false)}}}}if(l.keyCode==17){return true}if(tinyMCE.isGecko){if(!k&&l.type=="keyup"&&!l.ctrlKey||(l.ctrlKey&&(l.keyCode==86||l.keyCode==88))){tinyMCE.execCommand("mceStartTyping")}}else{if(!k&&l.type=="keyup"){tinyMCE.execCommand("mceStartTyping")}}if(l.type=="keydown"&&(k||l.ctrlKey)&&h){h.undoBookmark=h.selection.getBookmark()}if(l.type=="keyup"&&(k||l.ctrlKey)){tinyMCE.execCommand("mceEndTyping")}if(k&&l.type=="keyup"){tinyMCE.triggerNodeChange(false)}if(tinyMCE.isIE&&l.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 p=tinyMCE.getParentElement(l.target,"html");for(var o in tinyMCE.instances){if(!tinyMCE.isInstance(tinyMCE.instances[o])){continue}h=tinyMCE.instances[o];h.autoResetDesignMode();if(h.getBody().parentNode==p){h.select();tinyMCE.selectedElement=l.target;tinyMCE.linkElement=tinyMCE.getParentElement(tinyMCE.selectedElement,"a");tinyMCE.imgElement=tinyMCE.getParentElement(tinyMCE.selectedElement,"img");break}}if(!tinyMCE.selectedInstance.undoRedo.undoLevels[0].bookmark&&(l.type=="mouseup"||l.type=="dblclick")){tinyMCE.selectedInstance.undoRedo.undoLevels[0].bookmark=tinyMCE.selectedInstance.selection.getBookmark()}if(l.type!="focus"){tinyMCE.selectedNode=null}tinyMCE.triggerNodeChange(false);tinyMCE.execCommand("mceEndTyping");if(l.type=="mouseup"){tinyMCE.execCommand("mceAddUndoLevel")}if(!tinyMCE.selectedInstance&&l.target.editorId){tinyMCE.instances[l.target.editorId].select()}return false}},getButtonHTML:function(a,d,j,f,n,e){var k="",i,o,l="";f="tinyMCE.execInstanceCommand('{$editor_id}','"+f+"'";if(typeof(n)!="undefined"&&n!=null){f+=","+n}if(typeof(e)!="undefined"&&e!=null){f+=",'"+e+"'"}f+=");";if(tinyMCE.isRealIE){l='onmouseover="tinyMCE.lastHover = this;"'}if(tinyMCE.getParam("button_tile_map")&&(!tinyMCE.isIE||tinyMCE.isOpera)&&(i=this.buttonMap[a])!=null&&(tinyMCE.getParam("language")=="en"||j.indexOf("$lang")==-1)){o=0-(i*20)==0?"0":0-(i*20);k+='<a id="{$editor_id}_'+a+'" href="javascript:'+f+'" onclick="'+f+'return false;" onmousedown="return false;" '+l+' class="mceTiledButton mceButtonNormal" target="_self">';k+='<img src="{$themeurl}/images/spacer.gif" style="background-position: '+o+'px 0" alt="{$'+d+'}" title="{$'+d+'}" />';k+="</a>"}else{k+='<a id="{$editor_id}_'+a+'" href="javascript:'+f+'" onclick="'+f+'return false;" onmousedown="return false;" '+l+' class="mceButtonNormal" target="_self">';k+='<img src="'+j+'" alt="{$'+d+'}" title="{$'+d+'}" />';k+="</a>"}return k},getMenuButtonHTML:function(a,d,j,o,i,l,e){var k="",f,n;o="tinyMCE.execInstanceCommand('{$editor_id}','"+o+"');";i="tinyMCE.execInstanceCommand('{$editor_id}','"+i+"'";if(typeof(l)!="undefined"&&l!=null){i+=","+l}if(typeof(e)!="undefined"&&e!=null){i+=",'"+e+"'"}i+=");";if(tinyMCE.getParam("button_tile_map")&&(!tinyMCE.isIE||tinyMCE.isOpera)&&(f=tinyMCE.buttonMap[a])!=null&&(tinyMCE.getParam("language")=="en"||j.indexOf("$lang")==-1)){n=0-(f*20)==0?"0":0-(f*20);if(tinyMCE.isRealIE){k+='<span id="{$editor_id}_'+a+'" class="mceMenuButton" onmouseover="tinyMCE._menuButtonEvent(\'over\',this);tinyMCE.lastHover = this;" onmouseout="tinyMCE._menuButtonEvent(\'out\',this);">'}else{k+='<span id="{$editor_id}_'+a+'" class="mceMenuButton">'}k+='<a href="javascript:'+i+'" onclick="'+i+'return false;" onmousedown="return false;" class="mceTiledButton mceMenuButtonNormal" target="_self">';k+='<img src="{$themeurl}/images/spacer.gif" style="width: 20px; height: 20px; background-position: '+n+'px 0" title="{$'+d+'}" /></a>';k+='<a href="javascript:'+o+'" onclick="'+o+'return false;" onmousedown="return false;"><img src="{$themeurl}/images/button_menu.gif" title="{$'+d+'}" class="mceMenuButton" />';k+="</a></span>"}else{if(tinyMCE.isRealIE){k+='<span id="{$editor_id}_'+a+'" dir="ltr" class="mceMenuButton" onmouseover="tinyMCE._menuButtonEvent(\'over\',this);tinyMCE.lastHover = this;" onmouseout="tinyMCE._menuButtonEvent(\'out\',this);">'}else{k+='<span id="{$editor_id}_'+a+'" dir="ltr" class="mceMenuButton">'}k+='<a href="javascript:'+i+'" onclick="'+i+'return false;" onmousedown="return false;" class="mceMenuButtonNormal" target="_self">';k+='<img src="'+j+'" title="{$'+d+'}" /></a>';k+='<a href="javascript:'+o+'" onclick="'+o+'return false;" onmousedown="return false;"><img src="{$themeurl}/images/button_menu.gif" title="{$'+d+'}" class="mceMenuButton" />';k+="</a></span>"}return k},_menuButtonEvent:function(a,d){if(d.className=="mceMenuButtonFocus"){return}if(a=="over"){d.className=d.className+" mceMenuHover"}else{d.className=d.className.replace(/\s.*$/,"")}},addButtonMap:function(d){var f,e=d.replace(/\s+/,"").split(",");for(f=0;f<e.length;f++){this.buttonMap[e[f]]=f}},formSubmit:function(e,h){var i,d,a=false;if(e.form){e=e.form}if(true){for(i in tinyMCE.instances){d=tinyMCE.instances[i];if(!tinyMCE.isInstance(d)){continue}if(d.formElement){if(e==d.formElement.form){a=true;d.isNotDirty=true}}}}else{a=true}if(a){tinyMCE.removeTinyMCEFormElements(e);tinyMCE.triggerSave()}if(e.mceOldSubmit&&h){e.mceOldSubmit()}},submitPatch:function(){tinyMCE.formSubmit(this,true)},onLoad:function(){var d,n,t,p,j,a,o,l,m,s;var k,h,u,f;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(t=0;t<tinyMCE.configs.length;t++){tinyMCE.settings=tinyMCE.configs[t];k=tinyMCE.getParam("editor_selector");h=tinyMCE.getParam("editor_deselector");u=[];if(document.forms&&tinyMCE.settings.add_form_submit_trigger&&!tinyMCE.submitTriggers){for(n=0;n<document.forms.length;n++){f=document.forms[n];tinyMCE.addEvent(f,"submit",TinyMCE_Engine.prototype.handleEvent);tinyMCE.addEvent(f,"reset",TinyMCE_Engine.prototype.handleEvent);tinyMCE.submitTriggers=true;if(tinyMCE.settings.submit_patch){try{f.mceOldSubmit=f.submit;f.submit=TinyMCE_Engine.prototype.submitPatch}catch(q){}}}}p=tinyMCE.settings.mode;switch(p){case"exact":a=tinyMCE.getParam("elements","",true,",");for(n=0;n<a.length;n++){o=tinyMCE._getElementById(a[n]);j=o?o.getAttribute(tinyMCE.settings.textarea_trigger):"";if(new RegExp("\\b"+h+"\\b").test(tinyMCE.getAttrib(o,"class"))){continue}if(j=="false"){continue}if((tinyMCE.settings.ask||tinyMCE.settings.convert_on_click)&&o){u[u.length]=o;continue}if(o){tinyMCE.addMCEControl(o,a[n])}}break;case"specific_textareas":case"textareas":a=document.getElementsByTagName("textarea");for(n=0;n<a.length;n++){s=a.item(n);j=s.getAttribute(tinyMCE.settings.textarea_trigger);if(k!==""&&!new RegExp("\\b"+k+"\\b").test(tinyMCE.getAttrib(s,"class"))){continue}if(k!==""){j=k!==""?"true":""}if(new RegExp("\\b"+h+"\\b").test(tinyMCE.getAttrib(s,"class"))){continue}if((p=="specific_textareas"&&j=="true")||(p=="textareas"&&j!="false")){u[u.length]=s}}break}for(n=0;n<u.length;n++){o=u[n];m=o.name?o.name:o.id;if(tinyMCE.settings.ask||tinyMCE.settings.convert_on_click){if(tinyMCE.isGecko){l=tinyMCE.settings;tinyMCE.addEvent(o,"focus",function(i){window.setTimeout(function(){TinyMCE_Engine.prototype.confirmAdd(i,l)},10)});if(o.nodeName!="TEXTAREA"&&o.nodeName!="INPUT"){tinyMCE.addEvent(o,"click",function(i){window.setTimeout(function(){TinyMCE_Engine.prototype.confirmAdd(i,l)},10)})}}else{l=tinyMCE.settings;tinyMCE.addEvent(o,"focus",function(){TinyMCE_Engine.prototype.confirmAdd(null,l)});tinyMCE.addEvent(o,"click",function(){TinyMCE_Engine.prototype.confirmAdd(null,l)})}}else{tinyMCE.addMCEControl(o,m)}}if(tinyMCE.settings.auto_focus){window.setTimeout(function(){var e=tinyMCE.getInstanceById(tinyMCE.settings.auto_focus);e.selection.selectNode(e.getBody(),true,true);e.contentWindow.focus()},100)}tinyMCE.dispatchCallback(null,"oninit","onInit")}},isInstance:function(a){return a!=null&&typeof(a)=="object"&&a.isTinyMCE_Control},getParam:function(e,a,k,d){var f,h,j=(typeof(this.settings[e])=="undefined")?a:this.settings[e];if(j=="true"||j=="false"){return(j=="true")}if(k){j=tinyMCE.regexpReplace(j,"[ \t\r\n]","")}if(typeof(d)!="undefined"&&d!=null){j=j.split(d);h=[];for(f=0;f<j.length;f++){if(j[f]&&j[f]!==""){h[h.length]=j[f]}}j=h}return j},getLang:function(f,a,e,h){var d=(typeof(tinyMCELang[f])=="undefined")?a:tinyMCELang[f],i;if(e){d=tinyMCE.entityDecode(d)}if(h){for(i in h){d=this.replaceVar(d,i,h[i])}}return d},entityDecode:function(a){var d=document.createElement("div");d.innerHTML=a;return !d.firstChild?a:d.firstChild.nodeValue},addToLang:function(e,d){var a;for(a in d){if(typeof(d[a])=="function"){continue}tinyMCELang[(a.indexOf("lang_")==-1?"lang_":"")+(e!==""?(e+"_"):"")+a]=d[a]}this.loadNextScript()},triggerNodeChange:function(m,j){var h,d,a,e=-1,l=-1,i,f=false,k;if(tinyMCE.selectedInstance){d=tinyMCE.selectedInstance;h=(typeof(j)!="undefined"&&j)?tinyMCE.selectedElement:d.getFocusElement();a=d.editorId;k=d.selection.getSelectedText();if(tinyMCE.settings.auto_resize){d.resizeToContent()}if(j&&tinyMCE.isGecko&&d.isHidden()){h=d.getBody()}d.switchSettings();if(tinyMCE.selectedElement){f=(tinyMCE.selectedElement.nodeName.toLowerCase()=="img")||(k&&k.length>0)}if(tinyMCE.settings.custom_undo_redo){e=d.undoRedo.undoIndex;l=d.undoRedo.undoLevels.length}tinyMCE.dispatchCallback(d,"handle_node_change_callback","handleNodeChange",a,h,e,l,d.visualAid,f,j)}if(this.selectedInstance&&(typeof(m)=="undefined"||m)){this.selectedInstance.contentWindow.focus()}},_customCleanup:function(k,h,j){var f,a,e,d;d=tinyMCE.settings.cleanup_callback;if(d!=""){j=tinyMCE.resolveDots(tinyMCE.settings.cleanup_callback,window)(h,j,k)}a=tinyMCE.themes[tinyMCE.settings.theme];if(a&&a.cleanup){j=a.cleanup(h,j,k)}f=k.plugins;for(e=0;e<f.length;e++){a=tinyMCE.plugins[f[e]];if(a&&a.cleanup){j=a.cleanup(h,j,k)}}return j},setContent:function(a){if(tinyMCE.selectedInstance){tinyMCE.selectedInstance.execCommand("mceSetContent",false,a);tinyMCE.selectedInstance.repaint()}},importThemeLanguagePack:function(a){if(typeof(a)=="undefined"){a=tinyMCE.settings.theme}tinyMCE.loadScript(tinyMCE.baseURL+"/themes/"+a+"/langs/"+tinyMCE.settings.language+".js")},importPluginLanguagePack:function(d){var a=tinyMCE.baseURL+"/plugins/"+d;if(this.plugins[d]){a=this.plugins[d].baseURL}tinyMCE.loadScript(a+"/langs/"+tinyMCE.settings.language+".js")},applyTemplate:function(d,a){return d.replace(new RegExp("\\{\\$([a-z0-9_]+)\\}","gi"),function(e,f){if(f.indexOf("lang_")==0&&tinyMCELang[f]){return tinyMCELang[f]}if(a&&a[f]){return a[f]}if(tinyMCE.settings[f]){return tinyMCE.settings[f]}if(e=="themeurl"){return tinyMCE.themeURL}return e})},replaceVar:function(d,e,a){return d.replace(new RegExp("{\\$"+e+"}","g"),a)},openWindow:function(t,o){var j,h,u,q,p,f,l,d,a,k,s,i;o=!o?{}:o;o.mce_template_file=t.file;o.mce_width=t.width;o.mce_height=t.height;tinyMCE.windowArgs=o;j=t.html;if(!(h=parseInt(t.width))){h=320}if(!(u=parseInt(t.height))){u=200}if(tinyMCE.isIE){u+=40}else{u+=20}q=parseInt(screen.width/2)-(h/2);p=parseInt(screen.height/2)-(u/2);f=(o&&o.resizable)?o.resizable:"no";l=(o&&o.scrollbars)?o.scrollbars:"no";if(t.file.charAt(0)!="/"&&t.file.indexOf("://")==-1){d=tinyMCE.baseURL+"/themes/"+tinyMCE.getParam("theme")+"/"+t.file}else{d=t.file}for(a in o){if(typeof(o[a])=="function"){continue}d=tinyMCE.replaceVar(d,a,escape(o[a]))}if(j){j=tinyMCE.replaceVar(j,"css",this.settings.popups_css);j=tinyMCE.applyTemplate(j,o);k=window.open("","mcePopup"+new Date().getTime(),"top="+p+",left="+q+",scrollbars="+l+",dialog=yes,minimizable="+f+",modal=yes,width="+h+",height="+u+",resizable="+f);if(k==null){alert(tinyMCELang.lang_popup_blocked);return}k.document.write(j);k.document.close();k.resizeTo(h,u);k.focus()}else{if((tinyMCE.isRealIE)&&f!="yes"&&tinyMCE.settings.dialog_type=="modal"){u+=10;i="resizable:"+f+";scroll:"+l+";status:yes;center:yes;help:no;dialogWidth:"+h+"px;dialogHeight:"+u+"px;";window.showModalDialog(d,window,i)}else{s=(f=="yes")?"no":"yes";if(tinyMCE.isGecko&&tinyMCE.isMac){s="no"}if(t.close_previous!="no"){try{tinyMCE.lastWindow.close()}catch(n){}}k=window.open(d,"mcePopup"+new Date().getTime(),"top="+p+",left="+q+",scrollbars="+l+",dialog="+s+",minimizable="+f+",modal="+s+",width="+h+",height="+u+",resizable="+f);if(k==null){alert(tinyMCELang.lang_popup_blocked);return}if(t.close_previous!="no"){tinyMCE.lastWindow=k}try{k.resizeTo(h,u)}catch(m){}if(tinyMCE.isGecko){if(k.document.defaultView.statusbar.visible){k.resizeBy(0,tinyMCE.isMac?10:24)}}k.focus()}}},closeWindow:function(a){a.close()},getVisualAidClass:function(h,f){var d,j,a,e,k=tinyMCE.settings.visual_table_class;if(typeof(f)=="undefined"){f=tinyMCE.settings.visual}j=[];a=h.split(" ");for(d=0;d<a.length;d++){if(a[d]==k){a[d]=""}if(a[d]!==""){j[j.length]=a[d]}}if(f){j[j.length]=k}e="";for(d=0;d<j.length;d++){if(d>0){e+=" "}e+=j[d]}return e},handleVisualAid:function(f,q,e,j,m){var h,p,n,a,l,s,k,d,o;if(!f){return}if(!m){tinyMCE.dispatchCallback(j,"handle_visual_aid_callback","handleVisualAid",f,q,e,j)}a=null;switch(f.nodeName){case"TABLE":s=f.style.width;k=f.style.height;d=tinyMCE.getAttrib(f,"border");d=d==""||d=="0"?true:false;tinyMCE.setAttrib(f,"class",tinyMCE.getVisualAidClass(tinyMCE.getAttrib(f,"class"),e&&d));f.style.width=s;f.style.height=k;for(n=0;n<f.rows.length;n++){for(p=0;p<f.rows[n].cells.length;p++){o=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(f.rows[n].cells[p],"class"),e&&d);tinyMCE.setAttrib(f.rows[n].cells[p],"class",o)}}break;case"A":l=tinyMCE.getAttrib(f,"name");if(l!==""&&e){f.title=l;tinyMCE.addCSSClass(f,"mceItemAnchor")}else{if(l!==""&&!e){f.className=""}}break}if(q&&f.hasChildNodes()){for(h=0;h<f.childNodes.length;h++){tinyMCE.handleVisualAid(f.childNodes[h],q,e,j,true)}}},fixGeckoBaseHREFBug:function(a,j,f){var d,i;if(tinyMCE.isGecko){if(a==1){f=f.replace(/\ssrc=/gi," mce_tsrc=");f=f.replace(/\shref=/gi," mce_thref=");return f}else{if(!new RegExp("(src|href)=","g").test(f)){return f}tinyMCE.selectElements(j,"A,IMG,SELECT,AREA,IFRAME,BASE,INPUT,SCRIPT,EMBED,OBJECT,LINK",function(k){d=tinyMCE.getAttrib(k,"mce_tsrc");i=tinyMCE.getAttrib(k,"mce_thref");if(d!==""){try{k.src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings.base_href,d)}catch(h){}k.removeAttribute("mce_tsrc")}if(i!==""){try{k.href=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings.base_href,i)}catch(h){}k.removeAttribute("mce_thref")}return false});tinyMCE.selectNodes(j,function(e){if(e.nodeType==3||e.nodeType==8){e.nodeValue=e.nodeValue.replace(/\smce_tsrc=/gi," src=");e.nodeValue=e.nodeValue.replace(/\smce_thref=/gi," href=")}return false})}}return f},_setHTML:function(l,j){var f,d,a,h;j=tinyMCE.cleanupHTMLCode(j);try{tinyMCE.setInnerHTML(l.body,j)}catch(k){if(this.isMSIE){l.body.createTextRange().pasteHTML(j)}}if(tinyMCE.isIE&&tinyMCE.settings.fix_content_duplication){a=l.getElementsByTagName("P");for(f=0;f<a.length;f++){h=a[f];while((h=h.parentNode)!=null){if(h.nodeName=="P"){h.outerHTML=h.innerHTML}}}d=l.body.innerHTML;tinyMCE.setInnerHTML(l.body,d)}tinyMCE.cleanupAnchors(l);if(tinyMCE.getParam("convert_fonts_to_spans")){tinyMCE.convertSpansToFonts(l)}},getEditorId:function(a){var d=this.getInstanceById(a);if(!d){return null}return d.editorId},getInstanceById:function(d){var a=this.instances[d],e;if(!a){for(e in tinyMCE.instances){a=tinyMCE.instances[e];if(!tinyMCE.isInstance(a)){continue}if(a.formTargetElementId==d){return a}}}else{return a}return null},queryInstanceCommandValue:function(e,d){var a=tinyMCE.getInstanceById(e);if(a){return a.queryCommandValue(d)}return false},queryInstanceCommandState:function(e,d){var a=tinyMCE.getInstanceById(e);if(a){return a.queryCommandState(d)}return null},setWindowArg:function(d,a){this.windowArgs[d]=a},getWindowArg:function(e,a){return(typeof(this.windowArgs[e])=="undefined")?a:this.windowArgs[e]},getCSSClasses:function(o,s){var h,m,q,n,u,t,f,a,j=tinyMCE.getInstanceById(o);var v,l,d;if(!j){j=tinyMCE.selectedInstance}if(!j){return[]}if(!s){s=j.getDoc()}if(j&&j.cssClasses.length>0){return j.cssClasses}if(!s){return}u=s.styleSheets;if(u&&u.length>0){for(q=0;q<u.length;q++){f=null;try{f=tinyMCE.isIE?s.styleSheets(q).rules:u[q].cssRules}catch(k){}if(!f){return[]}for(h=0;h<f.length;h++){a=f[h].selectorText;if(a){t=a.split(",");for(m=0;m<t.length;m++){n=t[m];while(n.indexOf(" ")==0){n=n.substring(1)}if(n.indexOf(" ")!=-1||n.indexOf(":")!=-1||n.indexOf("mceItem")!=-1){continue}if(n.indexOf(tinyMCE.settings.visual_table_class)!=-1||n.indexOf("mceEditable")!=-1||n.indexOf("mceNonEditable")!=-1){continue}if(n.indexOf(".")!=-1){v=n.substring(n.indexOf(".")+1);l=true;for(d=0;d<j.cssClasses.length&&l;d++){if(j.cssClasses[d]==v){l=false}}if(l){j.cssClasses[j.cssClasses.length]=v}}}}}}}return j.cssClasses},regexpReplace:function(h,a,e,f){var d;if(h==null){return h}if(typeof(f)=="undefined"){f="g"}d=new RegExp(a,f);return h.replace(d,e)},trim:function(a){return a.replace(/^\s*|\s*$/g,"")},cleanupEventStr:function(a){a=""+a;a=a.replace("function anonymous()\n{\n","");a=a.replace("\n}","");a=a.replace(/^return true;/gi,"");return a},getControlHTML:function(k){var e,a,j,h,d,f=tinyMCE.getLang("lang_dir")=="rtl";a=tinyMCE.plugins;for(j in a){h=a[j];if(h.getControlHTML&&(d=h.getControlHTML(k))!==""){if(f){return'<span dir="rtl">'+tinyMCE.replaceVar(d,"pluginurl",h.baseURL)+"</span>"}return tinyMCE.replaceVar(d,"pluginurl",h.baseURL)}}h=tinyMCE.themes[tinyMCE.settings.theme];if(h.getControlHTML&&(d=h.getControlHTML(k))!==""){if(f){return'<span dir="rtl">'+d+"</span>"}return d}return""},evalFunc:function(h,d,e,i){i=!i?window:i;h=typeof(h)=="function"?h:i[h];if(h){return h.apply(i,Array.prototype.slice.call(e,d))}},dispatchCallback:function(a,d,e){return this.callFunc(a,d,e,0,this.dispatchCallback.arguments)},executeCallback:function(a,d,e){return this.callFunc(a,d,e,1,this.executeCallback.arguments)},execCommandCallback:function(a,d,e){return this.callFunc(a,d,e,2,this.execCommandCallback.arguments)},callFunc:function(q,d,f,h,u){var j,k,t,e,x,w;x=h==2;j=tinyMCE.getParam(d,"");if(j!==""&&(w=tinyMCE.evalFunc(j,3,u))==x&&h>0){return true}if(q!=null){for(k=0,j=q.plugins;k<j.length;k++){e=tinyMCE.plugins[j[k]];if(e[f]&&(w=tinyMCE.evalFunc(f,3,u,e))==x&&h>0){return true}}}j=tinyMCE.themes;for(t in j){e=j[t];if(e[f]&&(w=tinyMCE.evalFunc(f,3,u,e))==x&&h>0){return true}}return false},resolveDots:function(d,e){var a;if(typeof(d)=="string"){for(a=0,d=d.split(".");a<d.length;a++){e=e[d[a]]}}else{e=d}return e},xmlEncode:function(a){return a?(""+a).replace(this.xmlEncodeRe,function(e,d){switch(e){case"&":return"&amp;";case'"':return"&quot;";case"<":return"&lt;";case">":return"&gt;"}return e}):a},add:function(e,a){var d;for(d in a){if(a.hasOwnProperty(d)){e.prototype[d]=a[d]}}},extend:function(d,a){var e={},f;e.parent=d;for(f in d){if(d.hasOwnProperty(f)){e[f]=d[f]}}for(f in a){if(a.hasOwnProperty(f)){e[f]=a[f]}}return e},hideMenus:function(){var a=tinyMCE.lastSelectedMenuBtn;if(tinyMCE.lastMenu){tinyMCE.lastMenu.hide();tinyMCE.lastMenu=null}if(a){tinyMCE.switchClass(a,tinyMCE.lastMenuBtnClass);tinyMCE.lastSelectedMenuBtn=null}}};var TinyMCE=TinyMCE_Engine;var tinyMCE=new TinyMCE_Engine();var tinyMCELang={};function TinyMCE_Control(e){var m,h,j,f,a,l,k,f,d,n=e;this.undoRedoLevel=true;this.isTinyMCE_Control=true;this.enabled=true;this.settings=n;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:n.valid_elements,extended_valid_elements:n.extended_valid_elements,valid_child_elements:n.valid_child_elements,entities:n.entities,entity_encoding:n.entity_encoding,debug:n.cleanup_debug,indent:n.apply_source_formatting,invalid_elements:n.invalid_elements,verify_html:n.verify_html,fix_content_duplication:n.fix_content_duplication,convert_fonts_to_spans:n.convert_fonts_to_spans});m=this.settings.theme;if(!tinyMCE.hasTheme(m)){k=tinyMCE.callbacks;j={};for(h=0;h<k.length;h++){if((f=window["TinyMCE_"+m+"_"+k[h]])){j[k[h]]=f}}tinyMCE.addTheme(m,j)}this.plugins=[];a=tinyMCE.getParam("plugins","",true,",");if(a.length>0){for(h=0;h<a.length;h++){d=a[h];if(d.charAt(0)=="-"){d=d.substring(1)}if(!tinyMCE.hasPlugin(d)){k=tinyMCE.callbacks;j={};for(l=0;l<k.length;l++){if((f=window["TinyMCE_"+d+"_"+k[l]])){j[k[l]]=f}}tinyMCE.addPlugin(d,j)}this.plugins[this.plugins.length]=d}}}TinyMCE_Control.prototype={selection:null,settings:null,cleanup:null,getData:function(a){var d=this.data[a];if(!d){d=this.data[a]={}}return d},hasPlugin:function(d){var a;for(a=0;a<this.plugins.length;a++){if(this.plugins[a]==d){return true}}return false},addPlugin:function(d,a){if(!this.hasPlugin(d)){tinyMCE.addPlugin(d,a);this.plugins[this.plugins.length]=d}},repaint:function(){var e,a,d;if(tinyMCE.isRealIE){return}try{e=this.selection;a=e.getBookmark(true);this.getBody().style.display="none";this.getDoc().execCommand("selectall",false,null);this.getSel().collapseToStart();this.getBody().style.display="block";e.moveToBookmark(a)}catch(d){}},switchSettings:function(){if(tinyMCE.configs.length>1&&tinyMCE.currentConfig!=this.settings.index){tinyMCE.settings=this.settings;tinyMCE.currentConfig=this.settings.index}},select:function(){var a=tinyMCE.selectedInstance;if(a!=this){if(a){a.execCommand("mceEndTyping")}tinyMCE.dispatchCallback(this,"select_instance_callback","selectInstance",this,a);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(d,a){return tinyMCE.getParentNode(d,a,this.getBody())},getParentElement:function(e,a,d){return tinyMCE.getParentElement(e,a,d,this.getBody())},getParentBlockElement:function(a){return tinyMCE.getParentBlockElement(a,this.getBody())},resizeToContent:function(){var e=this.getDoc(),a=e.body,f=e.documentElement;this.iframeElement.style.height=(tinyMCE.isRealIE)?a.scrollHeight:f.offsetHeight+"px"},addShortcut:function(h,j,o,f,s,t){var e=typeof(j)=="number",a=tinyMCE.isIE,q,p,l,u=this.shortcuts;if(!tinyMCE.getParam("custom_shortcuts")){return false}h=h.toLowerCase();j=a&&!e?j.toUpperCase():j;q=e?null:j.charCodeAt(0);o=o&&o.indexOf("lang_")==0?tinyMCE.getLang(o):o;p={alt:h.indexOf("alt")!=-1,ctrl:h.indexOf("ctrl")!=-1,shift:h.indexOf("shift")!=-1,charCode:q,keyCode:e?j:(a?q:null),desc:o,cmd:f,ui:s,val:t};for(l=0;l<u.length;l++){if(p.alt==u[l].alt&&p.ctrl==u[l].ctrl&&p.shift==u[l].shift&&p.charCode==u[l].charCode&&p.keyCode==u[l].keyCode){return false}}u[u.length]=p;return true},handleShortcut:function(f){var a,d,h;if(!f.altKey&&!f.ctrlKey){return false}d=this.shortcuts;for(a=0;a<d.length;a++){h=d[a];if(h.alt==f.altKey&&h.ctrl==f.ctrlKey&&(h.keyCode==f.keyCode||h.charCode==f.charCode)){if(h.cmd&&(f.type=="keydown"||(f.type=="keypress"&&!tinyMCE.isOpera))){tinyMCE.execCommand(h.cmd,h.ui,h.val)}tinyMCE.cancelEvent(f);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 a;if(tinyMCE.isIE){return false}a=this.getSel();return(!a||!a.rangeCount||a.rangeCount==0)},isDirty:function(){return tinyMCE.trim(this.startContent)!=tinyMCE.trim(this.getBody().innerHTML)&&!this.isNotDirty},_mergeElements:function(e,j,i,f){var d,a,h,k;if(e=="removeformat"){j.className="";j.style.cssText="";i.className="";i.style.cssText="";return}d=tinyMCE.parseStyle(tinyMCE.getAttrib(j,"style"));a=tinyMCE.parseStyle(tinyMCE.getAttrib(i,"style"));h=tinyMCE.getAttrib(j,"class");h=tinyMCE.getAttrib(i,"class");if(f){for(k in d){if(typeof(d[k])=="function"){continue}a[k]=d[k]}}else{for(k in a){if(typeof(a[k])=="function"){continue}d[k]=a[k]}}tinyMCE.setAttrib(j,"style",tinyMCE.serializeStyle(d));tinyMCE.setAttrib(j,"class",tinyMCE.trim(h));i.className="";i.style.cssText="";i.removeAttribute("class");i.removeAttribute("style")},_fixRootBlocks:function(){var h,d,f,e,a,i;h=tinyMCE.getParam("forced_root_block");if(!h){return}d=this.getBody();f=d.firstChild;while(f){a=f.nextSibling;if((f.nodeType==3&&f.nodeValue.replace(/\s+/g,"")!="")||(f.nodeType==1&&!tinyMCE.blockRegExp.test(f.nodeName))){if(!i){i=this.selection.getBookmark()}if(!e){e=this.getDoc().createElement(h);e.appendChild(f.cloneNode(true));d.replaceChild(e,f)}else{e.appendChild(f.cloneNode(true));d.removeChild(f)}}else{e=null}f=a}if(i){this.selection.moveToBookmark(i)}},_fixTrailingNbsp:function(){var d=this.selection,f=d.getFocusElement(),h,a;if(f&&tinyMCE.blockRegExp.test(f.nodeName)&&f.firstChild){a=f.firstChild.nodeValue;if(a&&a.length>1&&/(^\u00a0|\u00a0$)/.test(a)){f.firstChild.nodeValue=a.replace(/(^\u00a0|\u00a0$)/,"");d.selectNode(f.firstChild,true,false,false)}}},_setUseCSS:function(a){var f=this.getDoc();try{f.execCommand("useCSS",false,!a)}catch(e){}try{f.execCommand("styleWithCSS",false,a)}catch(e){}if(!tinyMCE.getParam("table_inline_editing")){try{f.execCommand("enableInlineTableEditing",false,"false")}catch(e){}}if(!tinyMCE.getParam("object_resizing")){try{f.execCommand("enableObjectResizing",false,"false")}catch(e){}}},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(d){try{return this.getDoc().queryCommandValue(d)}catch(a){return null}},queryCommandState:function(a){return this.getDoc().queryCommandState(a)},_addBogusBR:function(){var a=this.getBody();if(tinyMCE.isGecko&&!a.hasChildNodes()){a.innerHTML='<br _moz_editor_bogus_node="TRUE" />'}},_onAdd:function(p,f,h){var k,j,o,m,u,q,s,n,l,a;var i,v,w,d;j=this.settings.theme;o=tinyMCE.themes[j];u=h?h:document;this.targetDoc=u;tinyMCE.themeURL=tinyMCE.baseURL+"/themes/"+this.settings.theme;this.settings.themeurl=tinyMCE.themeURL;if(!p){alert("Error: Could not find the target element.");return false}this.formTargetElementId=f;if(o.getEditorTemplate){m=o.getEditorTemplate(this.settings,this.editorId)}q=m.delta_width?m.delta_width:0;s=m.delta_height?m.delta_height:0;n='<span id="'+this.editorId+'_parent" class="mceEditorContainer">'+m.html;n=tinyMCE.replaceVar(n,"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=p.offsetWidth}if(this.settings.height==-1){this.settings.height=p.offsetHeight}if(this.settings.width==0){this.settings.width=p.style.width}if(this.settings.height==0){this.settings.height=p.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+=q;this.settings.area_height+=s;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((""+p.style.width).indexOf("%")!=-1){this.settings.width=p.style.width;this.settings.area_width="100%";this.settings.width_style="100%"}if((""+p.style.height).indexOf("%")!=-1){this.settings.height=p.style.height;this.settings.area_height="100%";this.settings.height_style="100%"}n=tinyMCE.applyTemplate(n);this.settings.width=this.settings.old_width;this.settings.height=this.settings.old_height;this.visualAid=this.settings.visual;this.formTargetElementId=f;if(p.nodeName=="TEXTAREA"||p.nodeName=="INPUT"){this.startContent=p.value}else{this.startContent=p.innerHTML}if(p.nodeName!="TEXTAREA"&&p.nodeName!="INPUT"){this.oldTargetElement=p;k='<input type="hidden" id="'+f+'" name="'+f+'" />';this.oldTargetDisplay=tinyMCE.getStyle(this.oldTargetElement,"display","inline");this.oldTargetElement.style.display="none";n+="</span>";if(tinyMCE.isGecko){n=k+n}else{n+=k}if(tinyMCE.isGecko){l=p.ownerDocument.createRange();l.setStartBefore(p);a=l.createContextualFragment(n);tinyMCE.insertAfter(a,p)}else{p.insertAdjacentHTML("beforeBegin",n)}}else{n+="</span>";this.oldTargetElement=p;this.oldTargetDisplay=tinyMCE.getStyle(this.oldTargetElement,"display","inline");this.oldTargetElement.style.display="none";if(tinyMCE.isGecko){l=p.ownerDocument.createRange();l.setStartBefore(p);a=l.createContextualFragment(n);tinyMCE.insertAfter(a,p)}else{p.insertAdjacentHTML("beforeBegin",n)}}i=false;v=u.getElementById(this.editorId);if(!tinyMCE.isIE){if(v&&(v.nodeName=="SPAN"||v.nodeName=="span")){v=tinyMCE._createIFrame(v,u);i=true}this.targetElement=v;this.iframeElement=v;this.contentDocument=v.contentDocument;this.contentWindow=v.contentWindow}else{if(v&&v.nodeName=="SPAN"){v=tinyMCE._createIFrame(v,u,u.parentWindow)}else{v=u.frames[this.editorId]}this.targetElement=v;this.iframeElement=u.getElementById(this.editorId);if(tinyMCE.isOpera){this.contentDocument=this.iframeElement.contentDocument;this.contentWindow=this.iframeElement.contentWindow;i=true}else{this.contentDocument=v.window.document;this.contentWindow=v.window}this.getDoc().designMode="on"}w=this.contentDocument;if(i){n=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"}w.open();w.write(n);w.close()}catch(t){this.getDoc().location.href=tinyMCE.baseURL+"/blank.htm"}}if(tinyMCE.isIE){window.setTimeout('tinyMCE.addEventHandlers(tinyMCE.instances["'+this.editorId+'"]);',1)}d=this.targetDoc.getElementById(this.editorId+"_parent");this.formElement=tinyMCE.isGecko?d.previousSibling:d.nextSibling;tinyMCE.setupContent(this.editorId,true);return true},setBaseHREF:function(f){var i,a,j,e;j=this.getDoc();e=j.getElementsByTagName("base");a=e.length>0?e[0]:null;if(!a){e=j.getElementsByTagName("head");i=e.length>0?e[0]:null;a=j.createElement("base");a.setAttribute("href",f);i.appendChild(a)}else{if(f==""||f==null){a.parentNode.removeChild(a)}else{a.setAttribute("href",f)}}},getHTML:function(f){var e,i=this.getDoc(),a=this.getBody();if(f){return a.innerHTML}e=tinyMCE._cleanupHTML(this,i,this.settings,a,false,true,false,true);if(tinyMCE.getParam("convert_fonts_to_spans")){tinyMCE.convertSpansToFonts(i)}return e},setHTML:function(a){this.execCommand("mceSetContent",false,a);this.repaint()},getFocusElement:function(){return this.selection.getFocusElement()},getSel:function(){return this.selection.getSel()},getRng:function(){return this.selection.getRng()},triggerSave:function(l,k){var m,a=[],f,h,j,d;if(!this.enabled){return}this.switchSettings();h=tinyMCE.settings;if(tinyMCE.isRealIE){m=this.iframeElement;do{if(m.style&&m.style.display=="none"){m.style.display="block";a[a.length]={elm:m,type:"style"}}if(m.style&&h.hidden_tab_class.length>0&&m.className.indexOf(h.hidden_tab_class)!=-1){m.className=h.display_tab_class;a[a.length]={elm:m,type:"class"}}}while((m=m.parentNode)!=null)}tinyMCE.settings.preformatted=false;if(typeof(l)=="undefined"){l=false}if(typeof(k)=="undefined"){k=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);d=l?this.getBody().innerHTML:tinyMCE._cleanupHTML(this,this.getDoc(),this.settings,this.getBody(),tinyMCE.visualAid,true,true);d=tinyMCE._customCleanup(this,"submit_content",d);if(!k&&tinyMCE.settings.save_callback!==""){j=tinyMCE.resolveDots(tinyMCE.settings.save_callback,window)(this.formTargetElementId,d,this.getBody())}if((typeof(j)!="undefined")&&j!=null){d=j}d=tinyMCE.regexpReplace(d,"&#40;","(","gi");d=tinyMCE.regexpReplace(d,"&#41;",")","gi");d=tinyMCE.regexpReplace(d,"&#59;",";","gi");d=tinyMCE.regexpReplace(d,"&#34;","&quot;","gi");d=tinyMCE.regexpReplace(d,"&#94;","^","gi");if(this.formElement){this.formElement.value=d}if(tinyMCE.isSafari&&this.formElement){this.formElement.innerText=d}for(f=0;f<a.length;f++){if(a[f].type=="style"){a[f].elm.style.display="none"}else{a[f].elm.className=h.hidden_tab_class}}}};tinyMCE.add(TinyMCE_Engine,{cleanupHTMLCode:function(a){a=a.replace(new RegExp("<p \\/>","gi"),"<p>&nbsp;</p>");a=a.replace(new RegExp("<p>\\s*<\\/p>","gi"),"<p>&nbsp;</p>");a=a.replace(new RegExp("<br>\\s*<\\/br>","gi"),"<br />");a=a.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>");a=a.replace(new RegExp("\\s+></","gi"),"></");a=a.replace(new RegExp("<(img|br|hr)([^>]*)><\\/(img|br|hr)>","gi"),"<$1$2 />");if(tinyMCE.isIE){a=a.replace(new RegExp("<p><hr \\/><\\/p>","gi"),"<hr>")}if(tinyMCE.isIE){a=a.replace(/<!(\s*)\/>/g,"")}return a},parseStyle:function(j){var a=[],d,e,h,f;if(j==null){return a}d=j.split(";");tinyMCE.clearArray(a);for(e=0;e<d.length;e++){if(d[e]==""){continue}h=new RegExp("^\\s*([^:]*):\\s*(.*)\\s*$");f=d[e].replace(h,"$1||$2").split("||");if(f.length==2){a[f[0].toLowerCase()]=f[1]}}return a},compressStyle:function(e,l,k,h){var j=[],f,d;j[0]=e[l+"-top"+k];j[1]=e[l+"-left"+k];j[2]=e[l+"-right"+k];j[3]=e[l+"-bottom"+k];for(f=0;f<j.length;f++){if(j[f]==null){return}if(f&&j[f]!=j[f-1]){return}}e[h]=j[0];e[l+"-top"+k]=null;e[l+"-left"+k]=null;e[l+"-right"+k]=null;e[l+"-bottom"+k]=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(f,a){var e,d;if(f.toLowerCase().indexOf("rgb")!=-1){e=new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)","gi");d=f.replace(e,"$1,$2,$3,$4,$5").split(",");if(d.length==5){r=parseInt(d[1]).toString(16);g=parseInt(d[2]).toString(16);b=parseInt(d[3]).toString(16);r=r.length==1?"0"+r:r;g=g.length==1?"0"+g:g;b=b.length==1?"0"+b:b;f="#"+r+g+b;if(a){f=d[0]+f+d[4]}}}return f},convertHexToRGB:function(a){if(a.indexOf("#")!=-1){a=a.replace(new RegExp("[^0-9A-F]","gi"),"");return"rgb("+parseInt(a.substring(0,2),16)+","+parseInt(a.substring(2,4),16)+","+parseInt(a.substring(4,6),16)+")"}return a},convertSpansToFonts:function(j){var l,e,m,f,h,a,d,k=tinyMCE.getParam("font_size_style_values").replace(/\s+/,"").split(",");l=tinyMCE.selectElements(j,"span,font");for(e=0;e<l.length;e++){m=tinyMCE.trim(l[e].style.fontSize).toLowerCase();f=0;for(h=0;h<k.length;h++){if(k[h]==m){f=h+1;break}}if(f>0){tinyMCE.setAttrib(l[e],"size",f);l[e].style.fontSize=""}a=l[e].style.fontFamily;if(a!=null&&a!==""){tinyMCE.setAttrib(l[e],"face",a);l[e].style.fontFamily=""}d=l[e].style.color;if(d!=null&&d!==""){tinyMCE.setAttrib(l[e],"color",tinyMCE.convertRGBToHex(d));l[e].style.color=""}}},convertFontsToSpans:function(k){var l,e,d,j,a,h,f=tinyMCE.getParam("font_size_style_values").replace(/\s+/,"").split(",");l=tinyMCE.getParam("font_size_classes");if(l!==""){l=l.replace(/\s+/,"").split(",")}else{l=null}e=tinyMCE.selectElements(k,"span,font");for(d=0;d<e.length;d++){j=tinyMCE.getAttrib(e[d],"size");a=tinyMCE.getAttrib(e[d],"face");h=tinyMCE.getAttrib(e[d],"color");if(j!==""){j=parseInt(j);if(j>0&&j<8){if(l!=null){tinyMCE.setAttrib(e[d],"class",l[j-1])}else{e[d].style.fontSize=f[j-1]}}e[d].removeAttribute("size")}if(a!==""){e[d].style.fontFamily=a;e[d].removeAttribute("face")}if(h!==""){e[d].style.color=h;e[d].removeAttribute("color")}}},cleanupAnchors:function(f){var d,h,a,e=f.getElementsByTagName("a");for(d=e.length-1;d>=0;d--){if(tinyMCE.getAttrib(e[d],"name")!==""&&tinyMCE.getAttrib(e[d],"href")==""){h=e[d].childNodes;for(a=h.length-1;a>=0;a--){tinyMCE.insertAfter(h[a],e[d])}}}},getContent:function(a){if(typeof(a)!="undefined"){tinyMCE.getInstanceById(a).select()}if(tinyMCE.selectedInstance){return tinyMCE.selectedInstance.getHTML()}return null},_fixListElements:function(l){var f,o,m=["ol","ul"],k,j,h,e=new RegExp("^(OL|UL)$"),q;for(o=0;o<m.length;o++){f=l.getElementsByTagName(m[o]);for(k=0;k<f.length;k++){j=f[k];h=j.parentNode;if(e.test(h.nodeName)){q=tinyMCE.prevNode(j,"LI");if(!q){q=l.createElement("li");q.innerHTML="&nbsp;";q.appendChild(j);h.insertBefore(q,h.firstChild)}else{q.appendChild(j)}}}}},_fixTables:function(l){var e,h,m,k,j,a,f;e=l.getElementsByTagName("table");for(h=0;h<e.length;h++){m=e[h];if((k=tinyMCE.getParentElement(m,"p,h1,h2,h3,h4,h5,h6"))!=null){j=k.cloneNode(false);j.removeAttribute("id");f=m;while((m=m.nextSibling)){j.appendChild(m)}tinyMCE.insertAfter(j,k);tinyMCE.insertAfter(f,k)}}},_cleanupHTML:function(a,y,x,f,v,q,p,e){var t,u,n,m,l,k,j,w,o,i;if(!tinyMCE.getParam("cleanup")){return f.innerHTML}q=typeof(q)=="undefined"?false:q;w=a.cleanup;o=a.settings;u=w.settings.debug;if(u){n=new Date().getTime()}a._fixRootBlocks();if(tinyMCE.getParam("convert_fonts_to_spans")){tinyMCE.convertFontsToSpans(y)}if(tinyMCE.getParam("fix_list_elements")){tinyMCE._fixListElements(y)}if(tinyMCE.getParam("fix_table_elements")){tinyMCE._fixTables(y)}tinyMCE._customCleanup(a,q?"get_from_editor_dom":"insert_to_editor_dom",y.body);if(u){m=new Date().getTime()}w.settings.on_save=q;w.idCount=0;w.serializationId++;w.serializedNodes=[];w.sourceIndex=-1;if(o.cleanup_serializer=="xml"){t=w.serializeNodeAsXML(f,e)}else{t=w.serializeNodeAsHTML(f,e)}if(u){l=new Date().getTime()}i=tinyMCE.getParam("entity_encoding")=="numeric"?"&#160;":"&nbsp;";t=t.replace(/<\/?(body|head|html)[^>]*>/gi,"");t=t.replace(new RegExp(' (rowspan="1"|colspan="1")',"g"),"");t=t.replace(/<p><hr \/><\/p>/g,"<hr />");t=t.replace(/<p>(&nbsp;|&#160;)<\/p><hr \/><p>(&nbsp;|&#160;)<\/p>/g,"<hr />");t=t.replace(/<td>\s*<br \/>\s*<\/td>/g,"<td>"+i+"</td>");t=t.replace(/<p>\s*<br \/>\s*<\/p>/g,"<p>"+i+"</p>");t=t.replace(/<br \/>$/,"");t=t.replace(/<br \/><\/p>/g,"</p>");t=t.replace(/<p>\s*(&nbsp;|&#160;)\s*<br \/>\s*(&nbsp;|&#160;)\s*<\/p>/g,"<p>"+i+"</p>");t=t.replace(/<p>\s*(&nbsp;|&#160;)\s*<br \/>\s*<\/p>/g,"<p>"+i+"</p>");t=t.replace(/<p>\s*<br \/>\s*&nbsp;\s*<\/p>/g,"<p>"+i+"</p>");t=t.replace(new RegExp("<a>(.*?)<\\/a>","g"),"$1");t=t.replace(/<p([^>]*)>\s*<\/p>/g,"<p$1>"+i+"</p>");if(/^\s*(<br \/>|<p>&nbsp;<\/p>|<p>&#160;<\/p>|<p><\/p>)\s*$/.test(t)){t=""}if(o.preformatted){t=t.replace(/^<pre>/,"");t=t.replace(/<\/pre>$/,"");t="<pre>"+t+"</pre>"}if(tinyMCE.isGecko){t=t.replace(/<br \/>\s*<\/li>/g,"</li>");t=t.replace(/&nbsp;\s*<\/(dd|dt)>/g,"</$1>");t=t.replace(/<o:p _moz-userdefined="" \/>/g,"");t=t.replace(/<td([^>]*)>\s*<br \/>\s*<\/td>/g,"<td$1>"+i+"</td>")}if(o.force_br_newlines){t=t.replace(/<p>(&nbsp;|&#160;)<\/p>/g,"<br />")}t=tinyMCE._customCleanup(a,q?"get_from_editor":"insert_to_editor",t);if(q){t=t.replace(new RegExp(" ?(mceItem[a-zA-Z0-9]*|"+o.visual_table_class+")","g"),"");t=t.replace(new RegExp(' ?class=""',"g"),"")}if(o.remove_linebreaks&&!w.settings.indent){t=t.replace(/\n|\r/g," ")}if(u){k=new Date().getTime()}if(q&&w.settings.indent){t=w.formatHTML(t)}if(p&&(o.encoding=="xml"||o.encoding=="html")){t=w.xmlEncode(t)}if(u){j=new Date().getTime()}if(w.settings.debug){tinyMCE.debug("Cleanup in ms: Pre="+(m-n)+", Serialize: "+(l-m)+", Post: "+(k-l)+", Format: "+(j-k)+", Sum: "+(j-n)+".")}return t}});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(h){var l,d,f,j,k,e;for(l in h){this.settings[l]=h[l]}h=this.settings;this.inRe=this._arrayToRe(h.indent_elements.split(","),"","^<(",")[^>]*");this.ouRe=this._arrayToRe(h.indent_elements.split(","),"","^<\\/(",")[^>]*");this.nlBeforeRe=this._arrayToRe(h.newline_before_elements.split(","),"gi","<(",")([^>]*)>");this.nlAfterRe=this._arrayToRe(h.newline_after_elements.split(","),"gi","<(",")([^>]*)>");this.nlBeforeAfterRe=this._arrayToRe(h.newline_before_after_elements.split(","),"gi","<(\\/?)(",")([^>]*)>");this.serializedNodes=[];this.serializationId=0;if(h.invalid_elements!==""){this.iveRe=this._arrayToRe(h.invalid_elements.toUpperCase().split(","),"g","^(",")$")}else{this.iveRe=null}e="";for(f=0;f<h.indent_levels;f++){e+=h.indent_char}this.inStr=e;if(!h.verify_html){h.valid_elements="*[*]";h.extended_valid_elements=""}this.fillStr=h.entity_encoding=="named"?"&nbsp;":"&#160;";this.idCount=0;this.xmlEncodeRe=new RegExp('[\u007F-\uFFFF<>&"]',"g")},addRuleStr:function(a){var d=this.parseRuleStr(a),e;for(e in d){if(d[e]){this.rules[e]=d[e]}}this.vElements=tinyMCE.clearArray([]);for(e in this.rules){if(this.rules[e]){this.vElements[this.vElements.length]=this.rules[e].tag}}this.vElementsRe=this._arrayToRe(this.vElements,"")},isValid:function(a){if(!this.rulesDone){this._setupRules()}if(!a){return true}a=a.replace(/[^a-z0-9]+/gi,"").toUpperCase();return !tinyMCE.getParam("cleanup")||this.vElementsRe.test(a)},addChildRemoveRuleStr:function(n){var j,h,d,e,m,l,f,k,a;if(!n){return}f=n.split(",");for(j=0;j<f.length;j++){n=f[j];d=this.split(/\[|\]/,n);if(d==null||d.length<1){m=n.toUpperCase()}else{m=d[0].toUpperCase()}l=this.split("/",m);for(h=0;h<l.length;h++){a="^(";k=this.split(/\|/,d[1]);for(e=0;e<k.length;e++){if(k[e]=="%istrict"){a+=tinyMCE.inlineStrict}else{if(k[e]=="%itrans"){a+=tinyMCE.inlineTransitional}else{if(k[e]=="%istrict_na"){a+=tinyMCE.inlineStrict.substring(2)}else{if(k[e]=="%itrans_na"){a+=tinyMCE.inlineTransitional.substring(2)}else{if(k[e]=="%btrans"){a+=tinyMCE.blockElms}else{if(k[e]=="%strict"){a+=tinyMCE.blockStrict}else{a+=(k[e].charAt(0)!="#"?k[e].toUpperCase():k[e])}}}}}}a+=(e!=k.length-1?"|":"")}a+=")$";if(this.childRules==null){this.childRules=tinyMCE.clearArray([])}this.childRules[l[h]]=new RegExp(a);if(d.length>1){this.childRules[l[h]].wrapTag=d[2]}}}},parseRuleStr:function(w){var l,h,d,n,k,o,q,v,u,m,f,j=tinyMCE.clearArray([]),e;if(w==null||w.length==0){return j}l=w.split(",");for(o=0;o<l.length;o++){w=l[o];if(w.length==0){continue}h=this.split(/\[|\]/,w);if(h==null||h.length<1){v=w.toUpperCase()}else{v=h[0].toUpperCase()}u=this.split("/",v);for(m=0;m<u.length;m++){d={};d.tag=u[m];d.forceAttribs=null;d.defaultAttribs=null;d.validAttribValues=null;q=d.tag.charAt(0);d.forceOpen=q=="+";d.removeEmpty=q=="-";d.fill=q=="#";d.tag=d.tag.replace(/\+|-|#/g,"");d.oTagName=u[0].replace(/\+|-|#/g,"").toLowerCase();d.isWild=new RegExp("\\*|\\?|\\+","g").test(d.tag);d.validRe=new RegExp(this._wildcardToRe("^"+d.tag+"$"));if(h.length>1){d.vAttribsRe="^(";n=this.split(/\|/,h[1]);for(k=0;k<n.length;k++){v=n[k];if(v.charAt(0)=="!"){n[k]=v=v.substring(1);if(!d.reqAttribsRe){d.reqAttribsRe="\\s+("+v}else{d.reqAttribsRe+="|"+v}}f=new RegExp("(=|:|<)(.*?)$").exec(v);v=v.replace(new RegExp("(=|:|<).*?$"),"");if(f&&f.length>0){if(f[0].charAt(0)==":"){if(!d.forceAttribs){d.forceAttribs=tinyMCE.clearArray([])}d.forceAttribs[v.toLowerCase()]=f[0].substring(1)}else{if(f[0].charAt(0)=="="){if(!d.defaultAttribs){d.defaultAttribs=tinyMCE.clearArray([])}e=f[0].substring(1);d.defaultAttribs[v.toLowerCase()]=e==""?"mce_empty":e}else{if(f[0].charAt(0)=="<"){if(!d.validAttribValues){d.validAttribValues=tinyMCE.clearArray([])}d.validAttribValues[v.toLowerCase()]=this._arrayToRe(this.split("?",f[0].substring(1)),"i")}}}}d.vAttribsRe+=""+v.toLowerCase()+(k!=n.length-1?"|":"");n[k]=v.toLowerCase()}if(d.reqAttribsRe){d.reqAttribsRe=new RegExp(d.reqAttribsRe+')="',"g")}d.vAttribsRe+=")$";d.vAttribsRe=this._wildcardToRe(d.vAttribsRe);d.vAttribsReIsWild=new RegExp("\\*|\\?|\\+","g").test(d.vAttribsRe);d.vAttribsRe=new RegExp(d.vAttribsRe);d.vAttribs=n.reverse()}else{d.vAttribsRe="";d.vAttribs=tinyMCE.clearArray([]);d.vAttribsReIsWild=false}j[d.tag]=d}}return j},serializeNodeAsXML:function(h){var d,a;if(!this.xmlDoc){if(this.isIE){try{this.xmlDoc=new ActiveXObject("MSXML2.DOMDocument")}catch(f){}if(!this.xmlDoc){try{this.xmlDoc=new ActiveXObject("Microsoft.XmlDom")}catch(f){}}}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)}a=this.xmlDoc.createElement("html");a=this.xmlDoc.appendChild(a);this._convertToXML(h,a);if(this.isIE){return this.xmlDoc.xml}else{return new XMLSerializer().serializeToString(this.xmlDoc)}},_convertToXML:function(d,j){var p,a,h,f,m,e,o,k=false;if(tinyMCE.isRealIE&&this._isDuplicate(d)){return}p=this.xmlDoc;switch(d.nodeType){case 1:k=d.hasChildNodes();a=p.createElement(d.nodeName.toLowerCase());e=d.attributes;for(h=e.length-1;h>-1;h--){o=e[h];if(o.specified&&o.nodeValue){a.setAttribute(o.nodeName.toLowerCase(),o.nodeValue)}}if(!k&&!this.closeElementsRe.test(d.nodeName)){a.appendChild(p.createTextNode(""))}j=j.appendChild(a);break;case 3:j.appendChild(p.createTextNode(d.nodeValue));return;case 8:j.appendChild(p.createComment(d.nodeValue));return}if(k){m=d.childNodes;for(h=0,f=m.length;h<f;h++){this._convertToXML(m[h],j)}}},serializeNodeAsHTML:function(j,w){var d,x,o="",m,k,A,z,a,v,u=false,q=false,e,p,s,y;if(!this.rulesDone){this._setupRules()}if(tinyMCE.isRealIE&&this._isDuplicate(j)){return""}if(j.parentNode&&this.childRules!=null){s=this.childRules[j.parentNode.nodeName];if(typeof(s)!="undefined"&&!s.test(j.nodeName)){z=true;A=null}}switch(j.nodeType){case 1:p=j.hasChildNodes();if(z){break}y=j.nodeName;if(tinyMCE.isRealIE){if(j.nodeName.indexOf("/")!=-1){break}if(j.scopeName&&j.scopeName!="HTML"){y=j.scopeName.toUpperCase()+":"+y.toUpperCase()}}else{if(tinyMCE.isOpera&&y.indexOf(":")>0){y=y.toUpperCase()}}if(this.settings.convert_fonts_to_spans){if(this.settings.on_save&&y=="FONT"){y="SPAN"}if(!this.settings.on_save&&y=="SPAN"){y="FONT"}}if(this.vElementsRe.test(y)&&(!this.iveRe||!this.iveRe.test(y))&&!w){u=true;a=this.rules[y];if(!a){e=this.rules;for(x in e){if(e[x]&&e[x].validRe.test(y)){a=e[x];break}}}d=a.isWild?y.toLowerCase():a.oTagName;q=a.fill;if(a.removeEmpty&&!p){return""}A="<"+d;if(a.vAttribsReIsWild){e=j.attributes;for(m=e.length-1;m>-1;m--){x=e[m];if(x.specified&&a.vAttribsRe.test(x.nodeName)){A+=this._serializeAttribute(j,a,x.nodeName)}}}else{for(m=a.vAttribs.length-1;m>-1;m--){A+=this._serializeAttribute(j,a,a.vAttribs[m])}}if(!this.settings.on_save){e=this.mceAttribs;for(x in e){if(e[x]){A+=this._serializeAttribute(j,a,e[x])}}}if(a.reqAttribsRe&&!A.match(a.reqAttribsRe)){A=null}if(A!=null&&this.closeElementsRe.test(y)){return A+" />"}if(A!=null){o+=A+">"}if(this.isIE&&this.codeElementsRe.test(y)){o+=j.innerHTML}}break;case 3:if(z){break}if(j.parentNode&&this.codeElementsRe.test(j.parentNode.nodeName)){return this.isIE?"":j.nodeValue}return this.xmlEncode(j.nodeValue);case 8:if(z){break}return"<!--"+this._trimComment(j.nodeValue)+"-->"}if(p){v=j.childNodes;for(m=0,k=v.length;m<k;m++){o+=this.serializeNodeAsHTML(v[m])}}if(q&&!p){o+=this.fillStr}if(A!=null&&u){o+="</"+d+">"}return o},_serializeAttribute:function(i,e,d){var h="",a,f=this.settings.on_save;if(f&&(d.indexOf("mce_")==0||d.indexOf("_moz")==0)){return""}if(f&&this.mceAttribs[d]){h=this._getAttrib(i,this.mceAttribs[d])}if(h.length==0){h=this._getAttrib(i,d)}if(h.length==0&&e.defaultAttribs&&(a=e.defaultAttribs[d])){h=a;if(h=="mce_empty"){return" "+d+'=""'}}if(e.forceAttribs&&(a=e.forceAttribs[d])){h=a}if(f&&h.length!=0&&/^(src|href|longdesc)$/.test(d)){h=this._urlConverter(this,i,h)}if(h.length!=0&&e.validAttribValues&&e.validAttribValues[d]&&!e.validAttribValues[d].test(h)){return""}if(h.length!=0&&h=="{$uid}"){h="uid_"+(this.idCount++)}if(h.length!=0){if(d.indexOf("on")!=0){h=this.xmlEncode(h,1)}return" "+d+'="'+h+'"'}return""},formatHTML:function(j){var f=this.settings,k="",e=0,a=0,m="",d;j=j.replace(/<pre([^>]*)>(.*?)<\/pre>/gi,function(i,h,l){l=l.replace(/<br\s*\/>/gi,"\n");return"<pre"+h+">"+l+"</pre>"});j=j.replace(/\r/g,"");j="\n"+j;j=j.replace(new RegExp("\\n\\s+","gi"),"\n");j=j.replace(this.nlBeforeRe,"\n<$1$2>");j=j.replace(this.nlAfterRe,"<$1$2>\n");j=j.replace(this.nlBeforeAfterRe,"\n<$1$2$3>\n");j+="\n";while((e=j.indexOf("\n",e+1))!=-1){if((d=j.substring(a+1,e)).length!=0){if(this.ouRe.test(d)&&k.length>=f.indent_levels){k=k.substring(f.indent_levels)}m+=k+d+"\n";if(this.inRe.test(d)){k+=this.inStr}}a=e}return m},xmlEncode:function(e){var a=this,d=this.xmlEncodeRe;if(!this.entitiesDone){this._setupEntities()}switch(this.settings.entity_encoding){case"raw":return tinyMCE.xmlEncode(e);case"named":return e.replace(d,function(h){var f=a.entities[h.charCodeAt(0)];return f?"&"+f+";":h});case"numeric":return e.replace(d,function(f){return"&#"+f.charCodeAt(0)+";"})}return e},split:function(f,e){var d,a,h=[],j=e.split(f);for(d=0,a=j.length;d<a;d++){if(j[d]!==""){h[d]=j[d]}}return h},_trimComment:function(a){a=a.replace(new RegExp('\\smce_src="[^"]*"',"gi"),"");a=a.replace(new RegExp('\\smce_href="[^"]*"',"gi"),"");return a},_getAttrib:function(h,k,i){var a,f,j;if(typeof(i)=="undefined"){i=""}if(!h||h.nodeType!=1){return i}try{a=h.getAttribute(k,0)}catch(f){a=h.getAttribute(k,2)}if(tinyMCE.isRealIE&&(k.toUpperCase()==="HREF"||k.toUpperCase()==="SRC")){a=h.getAttribute(k,2)}if(k=="class"&&!a){a=h.className}if(this.isIE){if(k=="http-equiv"){a=h.httpEquiv}j=h.nodeName;if(j=="FORM"&&k=="enctype"&&a=="application/x-www-form-urlencoded"){a=""}if(j=="INPUT"&&k=="size"&&a=="20"){a=""}if(j=="INPUT"&&k=="maxlength"&&a=="2147483647"){a=""}if(k=="width"||k=="height"){a=h.getAttribute(k,2)}}if(k=="style"&&a){if(!tinyMCE.isOpera){a=h.style.cssText}a=tinyMCE.serializeStyle(tinyMCE.parseStyle(a))}if(this.settings.on_save&&k.indexOf("on")!=-1&&this.settings.on_save&&a&&a!==""){a=tinyMCE.cleanupEventStr(a)}return(a&&a!=="")?""+a:i},_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(d,k,j,e){var f,h;k=typeof(k)=="undefined"?"gi":k;j=typeof(j)=="undefined"?"^(":j;e=typeof(e)=="undefined"?")$":e;h=j;for(f=0;f<d.length;f++){h+=this._wildcardToRe(d[f])+(f!=d.length-1?"|":"")}h+=e;return new RegExp(h,k)},_wildcardToRe:function(a){a=a.replace(/\?/g,"(\\S?)");a=a.replace(/\+/g,"(\\S+)");a=a.replace(/\*/g,"(\\S*)");return a},_setupEntities:function(){var h,d,e,f=this.settings;if(f.entity_encoding=="named"){h=tinyMCE.clearArray([]);d=this.split(",",f.entities);for(e=0;e<d.length;e+=2){h[d[e]]=d[e+1]}this.entities=h}this.entitiesDone=true},_setupRules:function(){var a=this.settings;this.addRuleStr(a.valid_elements);this.addRuleStr(a.extended_valid_elements);this.addChildRemoveRuleStr(a.valid_child_elements);this.rulesDone=true},_isDuplicate:function(f){var d,a,e;if(!this.settings.fix_content_duplication){return false}if(tinyMCE.isRealIE&&f.nodeType==1){if(f.mce_serialized==this.serializationId){return true}f.setAttribute("mce_serialized",this.serializationId)}else{e=this.serializedNodes;for(d=0,a=e.length;d<a;d++){if(e[d]==f){return true}}e.push(f)}return false}};tinyMCE.add(TinyMCE_Engine,{createTagHTML:function(d,e,i){var k="",j=tinyMCE.xmlEncode,l;k="<"+d;if(e){for(l in e){if(typeof(e[l])!="function"&&e[l]!=null){k+=" "+j(l)+'="'+j(""+e[l])+'"'}}}k+=!i?" />":">"+i+"</"+d+">";return k},createTag:function(k,e,f,i){var j=k.createElement(e),l;if(f){for(l in f){if(typeof(f[l])!="function"&&f[l]!=null){tinyMCE.setAttrib(j,l,f[l])}}}if(i){j.innerHTML=i}return j},getElementByAttributeValue:function(i,h,d,f){return(i=this.getElementsByAttributeValue(i,h,d,f)).length==0?null:i[0]},getElementsByAttributeValue:function(m,k,f,h){var j,d=m.getElementsByTagName(k),l=[];for(j=0;j<d.length;j++){if(tinyMCE.getAttrib(d[j],f).indexOf(h)!=-1){l[l.length]=d[j]}}return l},isBlockElement:function(a){return a!=null&&a.nodeType==1&&this.blockRegExp.test(a.nodeName)},getParentBlockElement:function(d,a){return this.getParentNode(d,function(e){return tinyMCE.isBlockElement(e)},a);return null},insertAfter:function(d,a){if(a.nextSibling){a.parentNode.insertBefore(d,a.nextSibling)}else{a.parentNode.appendChild(d)}},setInnerHTML:function(j,f){var d,a,k;if(tinyMCE.isGecko){f=f.replace(/<embed([^>]*)>/gi,"<tmpembed$1>");f=f.replace(/<em([^>]*)>/gi,"<i$1>");f=f.replace(/<tmpembed([^>]*)>/gi,"<embed$1>");f=f.replace(/<strong([^>]*)>/gi,"<b$1>");f=f.replace(/<\/strong>/gi,"</b>");f=f.replace(/<\/em>/gi,"</i>")}if(tinyMCE.isRealIE){f=f.replace(/\s\/>/g,">");f=f.replace(/<p([^>]*)>\u00A0?<\/p>/gi,'<p$1 mce_keep="true">&nbsp;</p>');f=f.replace(/<p([^>]*)>\s*&nbsp;\s*<\/p>/gi,'<p$1 mce_keep="true">&nbsp;</p>');f=f.replace(/<p([^>]*)>\s+<\/p>/gi,'<p$1 mce_keep="true">&nbsp;</p>');j.innerHTML=tinyMCE.uniqueTag+f;j.firstChild.removeNode(true);a=j.getElementsByTagName("p");for(d=a.length-1;d>=0;d--){k=a[d];if(k.nodeName=="P"&&!k.hasChildNodes()&&!k.mce_keep){k.parentNode.removeChild(k)}}}else{f=this.fixGeckoBaseHREFBug(1,j,f);j.innerHTML=f;this.fixGeckoBaseHREFBug(2,j,f)}},getOuterHTML:function(a){var f;if(tinyMCE.isIE){return a.outerHTML}f=a.ownerDocument.createElement("body");f.appendChild(a.cloneNode(true));return f.innerHTML},setOuterHTML:function(l,k,m){var m=typeof(m)=="undefined"?l.ownerDocument:m,j,a,f;if(tinyMCE.isIE&&l.nodeType==1){l.outerHTML=k}else{f=m.createElement("body");f.innerHTML=k;for(j=0,a=f.childNodes;j<a.length;j++){l.parentNode.insertBefore(a[j].cloneNode(true),l)}l.parentNode.removeChild(l)}},_getElementById:function(n,m){var l,h,a,k;if(typeof(m)=="undefined"){m=document}l=m.getElementById(n);if(!l){k=m.forms;for(h=0;h<k.length;h++){for(a=0;a<k[h].elements.length;a++){if(k[h].elements[a].name==n){l=k[h].elements[a];break}}}}return l},getNodeTree:function(f,a,d,e){return this.selectNodes(f,function(h){return(!d||h.nodeType==d)&&(!e||h.nodeName==e)},a?a:[])},getParentElement:function(j,a,i,h){var e=a?new RegExp("^("+a.toUpperCase().replace(/,/g,"|")+")$"):0,d;if(i&&typeof(i)=="string"){return this.getParentElement(j,a,function(f){return tinyMCE.getAttrib(f,i)!==""})}return this.getParentNode(j,function(f){return((f.nodeType==1&&!e)||(e&&e.test(f.nodeName)))&&(!i||i(f))},h)},getParentNode:function(e,d,a){while(e){if(e==a){return null}if(d(e)){return e}e=e.parentNode}return null},getAttrib:function(h,d,f){var a;if(typeof(f)=="undefined"){f=""}if(!h||h.nodeType!=1){return f}try{a=h.getAttribute(d,0)}catch(e){a=h.getAttribute(d,2)}if(d=="class"&&!a){a=h.className}if(tinyMCE.isGecko){if(d=="src"&&h.src!=null&&h.src!==""){a=h.src}if(d=="href"&&h.href!=null&&h.href!==""){a=h.href}}else{if(tinyMCE.isIE){switch(d){case"http-equiv":a=h.httpEquiv;break;case"width":case"height":a=h.getAttribute(d,2);break}}}if(d=="style"&&!tinyMCE.isOpera){a=h.style.cssText}return(a&&a!=="")?a:f},setAttrib:function(e,d,f,a){if(typeof(f)=="number"&&f!=null){f=""+f}if(a){if(f==null){f=""}f=f.replace(/[^0-9%]/g,"")}if(d=="style"){e.style.cssText=f}if(d=="class"){e.className=f}if(f!=null&&f!==""&&f!=-1){e.setAttribute(d,f)}else{e.removeAttribute(d)}},setStyleAttrib:function(d,f,a){d.style[f]=a;if(tinyMCE.isIE&&a==null||a==""){a=tinyMCE.serializeStyle(tinyMCE.parseStyle(d.style.cssText));d.style.cssText=a;d.setAttribute("style",a)}},switchClass:function(d,f){var a;if(tinyMCE.switchClassCache[d]){a=tinyMCE.switchClassCache[d]}else{a=tinyMCE.switchClassCache[d]=document.getElementById(d)}if(a){if(tinyMCE.settings.button_tile_map&&a.className&&a.className.indexOf("mceTiledButton")==0){f="mceTiledButton "+f}a.className=f}},getAbsPosition:function(f,e){var a=0,d=0;while(f&&f!=e){a+=f.offsetLeft;d+=f.offsetTop;f=f.offsetParent}return{absLeft:a,absTop:d}},prevNode:function(h,j){var d=j.split(","),f;while((h=h.previousSibling)!=null){for(f=0;f<d.length;f++){if(h.nodeName==d[f]){return h}}}return null},nextNode:function(h,j){var d=j.split(","),f;while((h=h.nextSibling)!=null){for(f=0;f<d.length;f++){if(h.nodeName==d[f]){return h}}}return null},selectElements:function(m,j,l){var k,h=[],e,d;for(d=0,j=j.split(",");d<j.length;d++){for(k=0,e=m.getElementsByTagName(j[d]);k<e.length;k++){(!l||l(e[k]))&&h.push(e[k])}}return h},selectNodes:function(j,h,d){var e;if(!d){d=[]}if(h(j)){d[d.length]=j}if(j.hasChildNodes()){for(e=0;e<j.childNodes.length;e++){tinyMCE.selectNodes(j.childNodes[e],h,d)}}return d},addCSSClass:function(d,h,a){var f=this.removeCSSClass(d,h);return d.className=a?h+(f!==""?(" "+f):""):(f!==""?(f+" "):"")+h},removeCSSClass:function(a,d){d=a.className.replace(new RegExp("(^|\\s+)"+d+"(\\s+|$)")," ");return a.className=d!=" "?d:""},hasCSSClass:function(d,a){return new RegExp("\\b"+a+"\\b","g").test(d.className)},renameElement:function(j,l,k){var h,f,a;k=typeof(k)=="undefined"?tinyMCE.selectedInstance.getDoc():k;if(j){h=k.createElement(l);a=j.attributes;for(f=a.length-1;f>-1;f--){if(a[f].specified&&a[f].nodeValue){h.setAttribute(a[f].nodeName.toLowerCase(),a[f].nodeValue)}}a=j.childNodes;for(f=0;f<a.length;f++){h.appendChild(a[f].cloneNode(true))}j.parentNode.replaceChild(h,j)}},getViewPort:function(f){var h=f.document,e=h.compatMode=="CSS1Compat",a=h.body,i=h.documentElement;return{left:f.pageXOffset||(e?i.scrollLeft:a.scrollLeft),top:f.pageYOffset||(e?i.scrollTop:a.scrollTop),width:f.innerWidth||(e?i.clientWidth:a.clientWidth),height:f.innerHeight||(e?i.clientHeight:a.clientHeight)}},getStyle:function(f,a,e){if(!f){return false}if(tinyMCE.isGecko&&f.ownerDocument.defaultView){try{return f.ownerDocument.defaultView.getComputedStyle(f,null).getPropertyValue(a)}catch(f){return null}}a=a.replace(/-(\D)/g,function(h,d){return d.toUpperCase()});if(f.currentStyle){return f.currentStyle[a]}return false}});tinyMCE.add(TinyMCE_Engine,{parseURL:function(f){var j=[],a,h,e,d;if(f){h=f.indexOf("://");if(h!=-1){j.protocol=f.substring(0,h);e=h+3}for(a=e;a<f.length;a++){d=f.charAt(a);if(d==":"){break}if(d=="/"){break}}h=a;j.host=f.substring(e,h);j.port="";e=h;if(f.charAt(h)==":"){h=f.indexOf("/",e);j.port=f.substring(e+1,h)}e=h;h=f.indexOf("?",e);if(h==-1){h=f.indexOf("#",e)}if(h==-1){h=f.length}j.path=f.substring(e,h);e=h;if(f.charAt(h)=="?"){h=f.indexOf("#");h=(h==-1)?f.length:h;j.query=f.substring(e+1,h)}e=h;if(f.charAt(h)=="#"){h=f.length;j.anchor=f.substring(e+1,h)}}return j},serializeURL:function(a){var d="";if(a.protocol){d+=a.protocol+"://"}if(a.host){d+=a.host}if(a.port){d+=":"+a.port}if(a.path){d+=a.path}if(a.query){d+="?"+a.query}if(a.anchor){d+="#"+a.anchor}return d},convertAbsoluteURLToRelativeURL:function(o,e){var d=this.parseURL(o),n=this.parseURL(e);var k,a,p,l=0,h="",j=false;var f,m;if(n.path==""){n.path="/"}else{j=true}o=d.path.substring(0,d.path.lastIndexOf("/"));a=o.split("/");p=n.path.split("/");if(a.length>=p.length){for(k=0;k<a.length;k++){if(k>=p.length||a[k]!=p[k]){l=k+1;break}}}if(a.length<p.length){for(k=0;k<p.length;k++){if(k>=a.length||a[k]!=p[k]){l=k+1;break}}}if(l==1){return n.path}for(k=0;k<(a.length-(l-1));k++){h+="../"}for(k=l-1;k<p.length;k++){if(k!=(l-1)){h+="/"+p[k]}else{h+=p[k]}}n.protocol=null;n.host=null;n.port=null;n.path=h==""&&j?"/":h;f=d.path;if((m=f.lastIndexOf("/"))!=-1){f=f.substring(m+1)}if(f==n.path&&n.anchor!==""){n.path=""}if(n.path==""&&!n.anchor){n.path=f!==""?f:"/"}return this.serializeURL(n)},convertRelativeToAbsoluteURL:function(q,n){var h=this.parseURL(q),e,d,p,s,o=this.parseURL(n),k;var m,a,f,j,l;if(n==""||n.indexOf("%")!=-1||n.indexOf("://")!=-1||/^(mailto:|javascript:|#|\/)/.test(n)){return n}e=h.path.split("/");d=o.path.split("/");l=[];for(k=e.length-1;k>=0;k--){if(e[k].length==0){continue}l[l.length]=e[k]}e=l.reverse();p=[];s=0;for(k=d.length-1;k>=0;k--){if(d[k].length==0||d[k]=="."){continue}if(d[k]==".."){s++;continue}if(s>0){s--;continue}p[p.length]=d[k]}d=p.reverse();m=e.length-s;a=(m<=0?"":"/")+e.slice(0,m).join("/")+"/"+d.join("/");f="";j="";o.protocol=h.protocol;o.host=h.host;o.port=h.port;if(o.path.charAt(o.path.length-1)=="/"){a+="/"}o.path=a;return this.serializeURL(o)},convertURL:function(a,j,k){var l=document.location,d,m,e,f,n,i;var o=l.protocol,p=l.hostname,h=l.port;if(o=="file:"){return a}a=tinyMCE.regexpReplace(a,"(http|https):///","/");if(a.indexOf("mailto:")!=-1||a.indexOf("javascript:")!=-1||/^[ \t\r\n\+]*[#\?]/.test(a)){return a}if(!tinyMCE.isIE&&!k&&a.indexOf("://")==-1&&a.charAt(0)!="/"){return tinyMCE.settings.base_href+a}if(k&&tinyMCE.getParam("relative_urls")){i=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings.base_href,a);if(i.charAt(0)=="/"){i=tinyMCE.settings.document_base_prefix+i}e=tinyMCE.parseURL(i);n=tinyMCE.parseURL(tinyMCE.settings.document_base_url);if(e.host==n.host&&(e.port==n.port)){return tinyMCE.convertAbsoluteURLToRelativeURL(tinyMCE.settings.document_base_url,i)}}if(!tinyMCE.getParam("relative_urls")){e=tinyMCE.parseURL(a);f=tinyMCE.parseURL(tinyMCE.settings.base_href);a=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings.base_href,a);if(e.anchor&&e.path==f.path){return"#"+e.anchor}}if(tinyMCE.getParam("remove_script_host")){d="";m="";if(h!==""){m=":"+h}d=o+"//"+p+m+"/";if(a.indexOf(d)==0){a=a.substring(d.length-1)}}return a},convertAllRelativeURLs:function(a){var f,h,k,e,j,d;h=a.getElementsByTagName("img");for(f=0;f<h.length;f++){k=tinyMCE.getAttrib(h[f],"src");d=tinyMCE.getAttrib(h[f],"mce_src");if(d!==""){k=d}if(k!==""){k=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings.base_href,k);h[f].setAttribute("src",k)}}h=a.getElementsByTagName("a");for(f=0;f<h.length;f++){e=tinyMCE.getAttrib(h[f],"href");j=tinyMCE.getAttrib(h[f],"mce_href");if(j!==""){e=j}if(tinyMCE.isGecko&&e.indexOf("%")!=-1){e=e.substr(e.indexOf("%"))}if(tinyMCE.isRealIE&&e.indexOf("%")!=-1){e=e.substr(e.indexOf("%"))+"%"}if(e&&e!==""){e=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings.base_href,e);h[f].setAttribute("href",e)}}}});tinyMCE.add(TinyMCE_Engine,{clearArray:function(d){var e;for(e in d){d[e]=null}return d},explode:function(j,f){var a=f.split(j),h=[],e;for(e=0;e<a.length;e++){if(a[e]!==""){h[h.length]=a[e]}}return h}});tinyMCE.add(TinyMCE_Engine,{_setEventsEnabled:function(f,a){var l,k,j,e,h,d;var m=["onfocus","onblur","onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmousemove","onmouseout","onkeypress","onkeydown","onkeydown","onkeyup"];l=tinyMCE.settings.event_elements.split(",");for(j=0;j<l.length;j++){e=f.getElementsByTagName(l[j]);for(h=0;h<e.length;h++){d="";for(k=0;k<m.length;k++){if((d=tinyMCE.getAttrib(e[h],m[k]))!==""){d=tinyMCE.cleanupEventStr(""+d);if(!a){d="return true;"+d}else{d=d.replace(/^return true;/gi,"")}e[h].removeAttribute(m[k]);e[h].setAttribute(m[k],d)}}}}},_eventPatch:function(i){var j,d,h,f;if(typeof(tinyMCE)=="undefined"){return true}try{if(tinyMCE.selectedInstance){h=tinyMCE.selectedInstance.getWin();if(h&&h.event){f=h.event;if(!f.target){f.target=f.srcElement}TinyMCE_Engine.prototype.handleEvent(f);return}}for(j in tinyMCE.instances){d=tinyMCE.instances[j];if(!tinyMCE.isInstance(d)){continue}d.select();h=d.getWin();if(h&&h.event){f=h.event;if(!f.target){f.target=f.srcElement}TinyMCE_Engine.prototype.handleEvent(f);return}}}catch(a){}},findEvent:function(d){var f,a;if(d){return d}for(f in tinyMCE.instances){a=tinyMCE.instances[f];if(tinyMCE.isInstance(a)&&a.getWin().event){return a.getWin().event}}return null},unloadHandler:function(){tinyMCE.triggerSave(true,true)},addEventHandlers:function(a){this.setEventHandlers(a,1)},setEventHandlers:function(k,d){var m=k.getDoc(),n,h,a,j=d?tinyMCE.addEvent:tinyMCE.removeEvent;n=["keypress","keyup","keydown","click","mouseup","mousedown","controlselect","dblclick"];h=["keypress","keyup","keydown","click","mouseup","mousedown","focus","blur","dragdrop"];k.switchSettings();if(tinyMCE.isRealIE||tinyMCE.isOpera){for(a=0;a<n.length;a++){j(m,n[a],TinyMCE_Engine.prototype._eventPatch)}}else{for(a=0;a<h.length;a++){j(m,h[a],tinyMCE.handleEvent)}try{m.designMode="On"}catch(l){}}},onMouseMove:function(){var d,a;if(tinyMCE.lastHover){a=tinyMCE.lastHover;if(a.className.indexOf("mceMenu")!=-1){tinyMCE._menuButtonEvent("out",a)}else{a.className=a.className}tinyMCE.lastHover=null}if(!tinyMCE.hasMouseMoved){d=tinyMCE.selectedInstance;if(d.isFocused){d.undoBookmark=d.selection.getBookmark();tinyMCE.hasMouseMoved=true}}},cancelEvent:function(a){if(!a){return false}if(tinyMCE.isIE){a.returnValue=false;a.cancelBubble=true}else{a.preventDefault();a.stopPropagation&&a.stopPropagation()}return false},addEvent:function(e,f,d){if(f!="unload"){function a(){var h;try{tinyMCE.removeEvent(e,f,d);tinyMCE.removeEvent(window,"unload",a);e=f=d=null}catch(h){}}tinyMCE.addEvent(window,"unload",a)}if(e.attachEvent){e.attachEvent("on"+f,d)}else{e.addEventListener(f,d,false)}},removeEvent:function(d,e,a){if(d.detachEvent){d.detachEvent("on"+e,a)}else{d.removeEventListener(e,a,false)}},addSelectAccessibility:function(f,d,a){if(!d._isAccessible){d.onkeydown=tinyMCE.accessibleEventHandler;d.onblur=tinyMCE.accessibleEventHandler;d._isAccessible=true;d._win=a}return false},accessibleEventHandler:function(d){var f,a=this._win;d=tinyMCE.isIE?a.event:d;f=tinyMCE.isIE?d.srcElement:d.target;if(d.type=="blur"){if(f.oldonchange){f.onchange=f.oldonchange;f.oldonchange=null}return true}if(f.nodeName=="SELECT"&&!f.oldonchange){f.oldonchange=f.onchange;f.onchange=null}if(d.keyCode==13||d.keyCode==32){f.onchange=f.oldonchange;f.onchange();f.oldonchange=null;tinyMCE.cancelEvent(d);return false}return true},_resetIframeHeight:function(){var a;if(tinyMCE.isRealIE){a=tinyMCE.selectedInstance.iframeElement;if(a._oldHeight){a.style.height=a._oldHeight;a.height=a._oldHeight}}}});function TinyMCE_Selection(a){this.instance=a}TinyMCE_Selection.prototype={getSelectedHTML:function(){var f=this.instance,i,d=this.getRng(),a;if(!d){return null}i=document.createElement("body");if(d.cloneContents){i.appendChild(d.cloneContents())}else{if(typeof(d.item)!="undefined"||typeof(d.htmlText)!="undefined"){i.innerHTML=d.item?d.item(0).outerHTML:d.htmlText}else{i.innerHTML=d.toString()}}a=tinyMCE._cleanupHTML(f,f.contentDocument,f.settings,i,i,false,true,false);return a},getSelectedText:function(){var h=this.instance,i,f,e,a;if(tinyMCE.isIE){i=h.getDoc();if(i.selection.type=="Text"){f=i.selection.createRange();a=f.text}else{a=""}}else{e=this.getSel();if(e&&e.toString){a=e.toString()}else{a=""}}return a},getBookmark:function(q){var f=this.instance,j=this.getRng(),A=f.getDoc(),y=f.getBody();var n,o,m,h=-999999999,v=f.getViewPort();var u,p,l,x,d,t,z,a,k;o=v.left;m=v.top;if(q){return{rng:j,scrollX:o,scrollY:m}}if(tinyMCE.isRealIE){if(j.item){x=j.item(0);d=y.getElementsByTagName(x.nodeName);for(t=0;t<d.length;t++){if(x==d[t]){u=t;break}}return{tag:x.nodeName,index:u,scrollX:o,scrollY:m}}else{n=A.body.createTextRange();n.moveToElementText(f.getBody());n.collapse(true);bp=Math.abs(n.move("character",h));n=j.duplicate();n.collapse(true);u=Math.abs(n.move("character",h));n=j.duplicate();n.collapse(false);p=Math.abs(n.move("character",h))-u;return{start:u-bp,length:p,scrollX:o,scrollY:m}}}else{l=this.getSel();x=this.getFocusElement();if(!l){return null}if(x&&x.nodeName=="IMG"){return{start:-1,end:-1,index:u,scrollX:o,scrollY:m}}if(l.anchorNode==l.focusNode&&l.anchorOffset==l.focusOffset){x=this._getPosText(y,l.anchorNode,l.focusNode);if(!x){return{scrollX:o,scrollY:m}}return{start:x.start+l.anchorOffset,end:x.end+l.focusOffset,scrollX:o,scrollY:m}}else{x=this._getPosText(y,j.startContainer,j.endContainer);if(!x){return{scrollX:o,scrollY:m}}return{start:x.start+j.startOffset,end:x.end+j.endOffset,scrollX:o,scrollY:m}}}return null},moveToBookmark:function(k){var h=this.instance,a,d,f,m,n=h.getBody(),l;var o=h.getDoc(),j=h.getWin(),e=this.getSel();if(!k){return false}if(tinyMCE.isSafari&&k.rng){e.setBaseAndExtent(k.rng.startContainer,k.rng.startOffset,k.rng.endContainer,k.rng.endOffset);return true}if(tinyMCE.isRealIE){if(k.rng){try{k.rng.select()}catch(m){}return true}j.focus();if(k.tag){a=n.createControlRange();d=n.getElementsByTagName(k.tag);if(d.length>k.index){try{a.addElement(d[k.index])}catch(m){}}}else{try{if(k.start<0){return true}a=h.getSel().createRange();a.moveToElementText(h.getBody());a.collapse(true);a.moveStart("character",k.start);a.moveEnd("character",k.length)}catch(m){return true}}a.select();j.scrollTo(k.scrollX,k.scrollY);return true}if(tinyMCE.isGecko||tinyMCE.isOpera){if(!e){return false}if(k.rng){e.removeAllRanges();e.addRange(k.rng)}if(k.start!=-1&&k.end!=-1){try{l=this._getTextPos(n,k.start,k.end);a=o.createRange();a.setStart(l.startNode,l.startOffset);a.setEnd(l.endNode,l.endOffset);e.removeAllRanges();e.addRange(a);if(!tinyMCE.isOpera){j.focus()}}catch(m){}}j.scrollTo(k.scrollX,k.scrollY);return true}return false},_getPosText:function(f,j,e){var a=document.createTreeWalker(f,NodeFilter.SHOW_TEXT,null,false),k,h=0,i={};while((k=a.nextNode())!=null){if(k==j){i.start=h}if(k==e){i.end=h;return i}h+=k.nodeValue?k.nodeValue.length:0}return null},_getTextPos:function(f,h,e){var a=document.createTreeWalker(f,NodeFilter.SHOW_TEXT,null,false),k,i=0,j={};while((k=a.nextNode())!=null){i+=k.nodeValue?k.nodeValue.length:0;if(i>=h&&!j.startNode){j.startNode=k;j.startOffset=h-(i-k.nodeValue.length)}if(i>=e){j.endNode=k;j.endOffset=e-(i-k.nodeValue.length);return j}}return null},selectNode:function(h,m,k,l){var i=this.instance,f,a,d;if(!h){return}if(typeof(m)=="undefined"){m=true}if(typeof(k)=="undefined"){k=false}if(typeof(l)=="undefined"){l=true}if(i.settings.auto_resize){i.resizeToContent()}if(tinyMCE.isRealIE){a=i.getDoc().body.createTextRange();try{a.moveToElementText(h);if(m){a.collapse(l)}a.select()}catch(j){}}else{f=this.getSel();if(!f){return}if(tinyMCE.isSafari){f.setBaseAndExtent(h,0,h,h.innerText.length);if(m){if(l){f.collapseToStart()}else{f.collapseToEnd()}}this.scrollToNode(h);return}a=i.getDoc().createRange();if(k){d=tinyMCE.getNodeTree(h,[],3);if(d.length>0){a.selectNodeContents(d[0])}else{a.selectNodeContents(h)}}else{a.selectNode(h)}if(m){if(!l&&h.nodeType==3){a.setStart(h,h.nodeValue.length);a.setEnd(h,h.nodeValue.length)}else{a.collapse(l)}}f.removeAllRanges();f.addRange(a)}this.scrollToNode(h);tinyMCE.selectedElement=null;if(h.nodeType==1){tinyMCE.selectedElement=h}},scrollToNode:function(f){var h=this.instance,a=h.getWin(),e=h.getViewPort(),k=tinyMCE.getAbsPosition(f),d,j,i;if(k.absLeft<e.left||k.absLeft>e.left+e.width||k.absTop<e.top||k.absTop>e.top+(e.height-25)){a.scrollTo(k.absLeft,k.absTop-e.height+25)}if(h.settings.auto_resize){i=h.getContainerWin();d=tinyMCE.getViewPort(i);j=this.getAbsPosition(f);if(j.absLeft<d.left||j.absLeft>d.left+d.width||j.absTop<d.top||j.absTop>d.top+d.height){i.scrollTo(j.absLeft,j.absTop-d.height+25)}}},getAbsPosition:function(e){var d=tinyMCE.getAbsPosition(e),a=tinyMCE.getAbsPosition(this.instance.iframeElement);return{absLeft:a.absLeft+d.absLeft,absTop:a.absTop+d.absTop}},getSel:function(){var a=this.instance;if(tinyMCE.isRealIE){return a.getDoc().selection}return a.contentWindow.getSelection()},getRng:function(){var a=this.getSel();if(a==null){return null}if(tinyMCE.isRealIE){return a.createRange()}if(tinyMCE.isSafari&&!a.getRangeAt){return""+window.getSelection()}if(a.rangeCount>0){return a.getRangeAt(0)}return null},isCollapsed:function(){var a=this.getRng();if(a.item){return false}return a.boundingWidth==0||this.getSel().isCollapsed},collapse:function(a){var e=this.getRng(),d=this.getSel();if(e.select){e.collapse(a);e.select()}else{if(a){d.collapseToStart()}else{d.collapseToEnd()}}},getFocusElement:function(){var e=this.instance,f,a,d,h;if(tinyMCE.isRealIE){f=e.getDoc();a=f.selection.createRange();h=a.item?a.item(0):a.parentElement()}else{if(!tinyMCE.isSafari&&e.isHidden()){return e.getBody()}d=this.getSel();a=this.getRng();if(!d||!a){return null}h=a.commonAncestorContainer;if(!a.collapsed){if(a.startContainer==a.endContainer){if(a.startOffset-a.endOffset<2){if(a.startContainer.hasChildNodes()){h=a.startContainer.childNodes[a.startOffset]}}}}h=tinyMCE.getParentElement(h)}return h}};function TinyMCE_UndoRedo(a){this.instance=a;this.undoLevels=[];this.undoIndex=0;this.typingUndoIndex=-1;this.undoRedo=true}TinyMCE_UndoRedo.prototype={add:function(e){var d,a,m,j=this.instance,h,f,k;if(e){this.undoLevels[this.undoLevels.length]=e;return true}if(this.typingUndoIndex!=-1){this.undoIndex=this.typingUndoIndex;if(tinyMCE.typingUndoIndex!=-1){tinyMCE.undoIndex=tinyMCE.typingUndoIndex}}m=tinyMCE.trim(j.getBody().innerHTML);if(this.undoLevels[this.undoIndex]&&m!=this.undoLevels[this.undoIndex].content){j.isNotDirty=false;tinyMCE.dispatchCallback(j,"onchange_callback","onChange",j);a=tinyMCE.settings.custom_undo_redo_levels;if(a!=-1&&this.undoLevels.length>a){for(h=0;h<this.undoLevels.length-1;h++){this.undoLevels[h]=this.undoLevels[h+1]}this.undoLevels.length--;this.undoIndex--}d=j.undoBookmark;if(!d){d=j.selection.getBookmark()}this.undoIndex++;this.undoLevels[this.undoIndex]={content:m,bookmark:d};f=tinyMCE.undoLevels;for(h=tinyMCE.undoIndex+1;h<f.length;h++){k=f[h].undoRedo;if(k.undoIndex==k.undoLevels.length-1){k.undoIndex--}k.undoLevels.length--}tinyMCE.undoLevels[tinyMCE.undoIndex++]=j;tinyMCE.undoLevels.length=tinyMCE.undoIndex;this.undoLevels.length=this.undoIndex+1;return true}return false},undo:function(){var a=this.instance;if(this.undoIndex>0){this.undoIndex--;tinyMCE.setInnerHTML(a.getBody(),this.undoLevels[this.undoIndex].content);a.repaint();if(a.settings.custom_undo_redo_restore_selection){a.selection.moveToBookmark(this.undoLevels[this.undoIndex].bookmark)}}},redo:function(){var a=this.instance;tinyMCE.execCommand("mceEndTyping");if(this.undoIndex<(this.undoLevels.length-1)){this.undoIndex++;tinyMCE.setInnerHTML(a.getBody(),this.undoLevels[this.undoIndex].content);a.repaint();if(a.settings.custom_undo_redo_restore_selection){a.selection.moveToBookmark(this.undoLevels[this.undoIndex].bookmark)}}tinyMCE.triggerNodeChange()}};var TinyMCE_ForceParagraphs={_insertPara:function(j,B){var F=j.getDoc(),v=j.getSel(),q=j.getBody(),m=j.contentWindow,p=v.getRangeAt(0);var h=F.documentElement,w="P",E,u,o,k;var d,A,a,E,y,u,n,C=tinyMCE.isOpera?j.selection.getBookmark():null;var f,l,D,t,z,x;function s(e){var i;function G(H){return H.replace(new RegExp("[ \t\r\n]+","g"),"").toLowerCase()==""}if(e.getElementsByTagName("img").length>0){return false}if(e.getElementsByTagName("table").length>0){return false}if(e.getElementsByTagName("hr").length>0){return false}i=tinyMCE.getNodeTree(e,[],3);for(x=0;x<i.length;x++){if(!G(i[x].nodeValue)){return false}}return true}d=F.createRange();d.setStart(v.anchorNode,v.anchorOffset);d.collapse(true);A=F.createRange();A.setStart(v.focusNode,v.focusOffset);A.collapse(true);a=d.compareBoundaryPoints(d.START_TO_END,A)<0;E=a?v.anchorNode:v.focusNode;y=a?v.anchorOffset:v.focusOffset;u=a?v.focusNode:v.anchorNode;n=a?v.focusOffset:v.anchorOffset;E=E.nodeName=="HTML"?F.body:E;E=E.nodeName=="BODY"?E.firstChild:E;u=u.nodeName=="BODY"?u.firstChild:u;o=j.getParentBlockElement(E);k=j.getParentBlockElement(u);if(o&&(o.nodeName=="CAPTION"||/absolute|relative|static/gi.test(o.style.position))){o=null}if(k&&(k.nodeName=="CAPTION"||/absolute|relative|static/gi.test(k.style.position))){k=null}if(o!=null){w=o.nodeName;if(/(TD|TABLE|TH|CAPTION)/.test(w)||(w=="DIV"&&/left|right/gi.test(o.style.cssFloat))){w="P"}}if(tinyMCE.getParentElement(o,"OL,UL",null,q)!=null){return false}if((o!=null&&o.nodeName=="TABLE")||(k!=null&&k.nodeName=="TABLE")){o=k=null}f=(o!=null&&o.nodeName==w)?o.cloneNode(false):F.createElement(w);l=(k!=null&&k.nodeName==w)?k.cloneNode(false):F.createElement(w);if(/^(H[1-6])$/.test(w)){l=F.createElement("p")}D=E;t=u;node=D;do{if(node==q||node.nodeType==9||tinyMCE.isBlockElement(node)){break}D=node}while((node=node.previousSibling?node.previousSibling:node.parentNode));node=t;do{if(node==q||node.nodeType==9||tinyMCE.isBlockElement(node)){break}t=node}while((node=node.nextSibling?node.nextSibling:node.parentNode));if(D.nodeName=="TD"){D=D.firstChild}if(t.nodeName=="TD"){t=t.lastChild}if(o==null){p.deleteContents();if(!tinyMCE.isSafari){v.removeAllRanges()}if(D!=h&&t!=h){d=p.cloneRange();if(D==q){d.setStart(D,0)}else{d.setStartBefore(D)}f.appendChild(d.cloneContents());if(t.parentNode.nodeName==w){t=t.parentNode}p.setEndAfter(t);if(t.nodeName!="#text"&&t.nodeName!="BODY"){d.setEndAfter(t)}z=p.cloneContents();if(z.firstChild&&(z.firstChild.nodeName==w||z.firstChild.nodeName=="BODY")){l.innerHTML=z.firstChild.innerHTML}else{l.appendChild(z)}if(s(f)){f.innerHTML="&nbsp;"}if(s(l)){l.innerHTML="&nbsp;"}p.deleteContents();A.deleteContents();d.deleteContents();if(tinyMCE.isOpera){f.normalize();d.insertNode(f);l.normalize();d.insertNode(l)}else{l.normalize();d.insertNode(l);f.normalize();d.insertNode(f)}}else{q.innerHTML="<"+w+">&nbsp;</"+w+"><"+w+">&nbsp;</"+w+">";l=q.childNodes[1]}j.selection.moveToBookmark(C);j.selection.selectNode(l,true,true);return true}if(D.nodeName==w){d.setStart(D,0)}else{d.setStartBefore(D)}d.setEnd(E,y);f.appendChild(d.cloneContents());A.setEndAfter(t);A.setStart(u,n);z=A.cloneContents();if(z.firstChild&&z.firstChild.nodeName==w){l.innerHTML=z.firstChild.innerHTML}else{l.appendChild(z)}if(s(f)){f.innerHTML="&nbsp;"}if(s(l)){l.innerHTML="&nbsp;"}p=F.createRange();if(!D.previousSibling&&D.parentNode.nodeName.toUpperCase()==w){p.setStartBefore(D.parentNode)}else{if(d.startContainer.nodeName.toUpperCase()==w&&d.startOffset==0){p.setStartBefore(d.startContainer)}else{p.setStart(d.startContainer,d.startOffset)}}if(!t.nextSibling&&t.parentNode.nodeName.toUpperCase()==w){p.setEndAfter(t.parentNode)}else{p.setEnd(A.endContainer,A.endOffset)}p.deleteContents();if(tinyMCE.isOpera){p.insertNode(f);p.insertNode(l)}else{p.insertNode(l);p.insertNode(f)}l.normalize();f.normalize();j.selection.moveToBookmark(C);j.selection.selectNode(l,true,true);return true},_handleBackSpace:function(f){var e=f.getRng(),h=e.startContainer,a,d=false;if(h&&h.nextSibling&&h.nextSibling.nodeName=="BR"&&h.parentNode.nodeName!="BODY"){a=h.nodeValue;if(a!=null&&e.startOffset==a.length){h.nextSibling.parentNode.removeChild(h.nextSibling)}}if(f.settings.auto_resize){f.resizeToContent()}return d}};function TinyMCE_Layer(d,a){this.id=d;this.blockerElement=null;this.events=false;this.element=null;this.blockMode=typeof(a)!="undefined"?a:true;this.doc=document}TinyMCE_Layer.prototype={moveRelativeTo:function(o,a){var l=this.getAbsPosition(o),i=this.getElement(),m,k;var n=parseInt(o.offsetWidth),f=parseInt(o.offsetHeight);var j=parseInt(i.offsetWidth),d=parseInt(i.offsetHeight);switch(a){case"tl":m=l.absLeft;k=l.absTop;break;case"tr":m=l.absLeft+n;k=l.absTop;break;case"bl":m=l.absLeft;k=l.absTop+f;break;case"br":m=l.absLeft+n;k=l.absTop+f;break;case"cc":m=l.absLeft+(n/2)-(j/2);k=l.absTop+(f/2)-(d/2);break}this.moveTo(m,k)},moveBy:function(a,f){var d=this.getElement();this.moveTo(parseInt(d.style.left)+a,parseInt(d.style.top)+f)},moveTo:function(a,f){var d=this.getElement();d.style.left=a+"px";d.style.top=f+"px";this.updateBlocker()},resizeBy:function(a,d){var f=this.getElement();this.resizeTo(parseInt(f.style.width)+a,parseInt(f.style.height)+d)},resizeTo:function(a,d){var f=this.getElement();if(a!=null){f.style.width=a+"px"}if(d!=null){f.style.height=d+"px"}this.updateBlocker()},show:function(){var a=this.getElement();if(a){a.style.display="block";this.updateBlocker()}},hide:function(){var a=this.getElement();if(a){a.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(a){this.blockMode=a},updateBlocker:function(){var j,d,a,k,f,i;d=this.getBlocker();if(d){if(this.blockMode){j=this.getElement();a=this.parseInt(j.style.left);k=this.parseInt(j.style.top);f=this.parseInt(j.offsetWidth);i=this.parseInt(j.offsetHeight);d.style.left=a+"px";d.style.top=k+"px";d.style.width=f+"px";d.style.height=i+"px";d.style.display=j.style.display}else{d.style.display="none"}}},getBlocker:function(){var e,a;if(!this.blockerElement&&this.blockMode){e=this.doc;a=e.getElementById(this.id+"_blocker");if(!a){a=e.createElement("iframe");a.setAttribute("id",this.id+"_blocker");a.style.cssText="display: none; position: absolute; left: 0; top: 0";a.src="javascript:false;";a.frameBorder="0";a.scrolling="no";e.body.appendChild(a)}this.blockerElement=a}return this.blockerElement},getAbsPosition:function(d){var a={absLeft:0,absTop:0};while(d){a.absLeft+=d.offsetLeft;a.absTop+=d.offsetTop;d=d.offsetParent}return a},create:function(l,k,i,a){var j=this.doc,f=j.createElement(l);f.setAttribute("id",this.id);if(k){f.className=k}if(!i){i=j.body}if(a){f.innerHTML=a}i.appendChild(f);return this.element=f},exists:function(){return this.doc.getElementById(this.id)!=null},parseInt:function(a){if(a==null||a==""){return 0}return parseInt(a)},remove:function(){var d=this.getElement(),a=this.getBlocker();if(d){d.parentNode.removeChild(d)}if(a){a.parentNode.removeChild(a)}}};function TinyMCE_Menu(){var a;if(typeof(tinyMCE.menuCounter)=="undefined"){tinyMCE.menuCounter=0}a="mc_menu_"+tinyMCE.menuCounter++;TinyMCE_Layer.call(this,a,true);this.id=a;this.items=[];this.needsUpdate=true}TinyMCE_Menu.prototype=tinyMCE.extend(TinyMCE_Layer.prototype,{init:function(a){var d;this.settings={separator_class:"mceMenuSeparator",title_class:"mceMenuTitle",disabled_class:"mceMenuDisabled",menu_class:"mceMenu",drop_menu:true};for(d in a){this.settings[d]=a[d]}this.create("div",this.settings.menu_class)},clear:function(){this.items=[]},addTitle:function(a){this.add({type:"title",text:a})},addDisabled:function(a){this.add({type:"disabled",text:a})},addSeparator:function(){this.add({type:"separator"})},addItem:function(a,d){this.add({text:a,js:d})},add:function(a){this.items[this.items.length]=a;this.needsUpdate=true},update:function(){var l=this.getElement(),k="",f,d,a=this.items,j=this.settings;if(this.settings.drop_menu){k+='<span class="mceMenuLine"></span>'}k+='<table border="0" cellpadding="0" cellspacing="0">';for(f=0;f<a.length;f++){d=tinyMCE.xmlEncode(a[f].text);c=a[f].class_name?' class="'+a[f].class_name+'"':"";switch(a[f].type){case"separator":k+='<tr class="'+j.separator_class+'"><td>';break;case"title":k+='<tr class="'+j.title_class+'"><td><span'+c+">"+d+"</span>";break;case"disabled":k+='<tr class="'+j.disabled_class+'"><td><span'+c+">"+d+"</span>";break;default:k+='<tr><td><a href="'+tinyMCE.xmlEncode(a[f].js)+'" onmousedown="'+tinyMCE.xmlEncode(a[f].js)+';return tinyMCE.cancelEvent(event);" onclick="return tinyMCE.cancelEvent(event);" onmouseup="return tinyMCE.cancelEvent(event);"><span'+c+">"+d+"</span></a>"}k+="</td></tr>"}k+="</table>";l.innerHTML=k;this.needsUpdate=false;this.updateBlocker()},show:function(){var a,d;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 d="",f,h,e=tinyMCE.log.length;for(h=0,f=this.debug.arguments;h<f.length;h++){d+=f[h];if(h<f.length-1){d+=", "}}if(e<1000){tinyMCE.log[e]="[debug] "+d}}});