tinyMCEPopup.requireLangPack();var AnchorDialog={init:function(f){var h,g,e=document.forms[0];this.editor=f;g=f.dom.getParent(f.selection.getNode(),"A");v=f.dom.getAttrib(g,"name");if(v){this.action="update";e.anchorName.value=v}e.insert.value=f.getLang(g?"update":"insert")},update:function(){var e=this.editor,f,d=document.forms[0].anchorName.value;tinyMCEPopup.restoreSelection();if(this.action!="update"){e.selection.collapse(1)}f=e.dom.getParent(e.selection.getNode(),"A");if(f){f.name=d}else{e.execCommand("mceInsertContent",0,e.dom.createHTML("a",{name:d,"class":"mceItemAnchor"},""))}tinyMCEPopup.close()}};tinyMCEPopup.onInit.add(AnchorDialog.init,AnchorDialog);