tinyMCEPopup.requireLangPack();var PasteWordDialog={init:function(){var h=tinyMCEPopup.editor,l=document.getElementById("iframecontainer"),i,j,g,k="";l.innerHTML='<iframe id="iframe" src="javascript:\'\';" frameBorder="0" style="border: 1px solid gray"></iframe>';i=document.getElementById("iframe");j=i.contentWindow.document;g=[h.baseURI.toAbsolute("themes/"+h.settings.theme+"/skins/"+h.settings.skin+"/content.css")];g=g.concat(tinymce.explode(h.settings.content_css)||[]);tinymce.each(g,function(a){k+='<link href="'+h.documentBaseURI.toAbsolute(""+a)+'" rel="stylesheet" type="text/css" />'});j.open();j.write("<html><head>"+k+'</head><body class="mceContentBody" spellcheck="false"></body></html>');j.close();j.designMode="on";this.resize();window.setTimeout(function(){i.contentWindow.focus()},10)},insert:function(){var b=document.getElementById("iframe").contentWindow.document.body.innerHTML;tinyMCEPopup.editor.execCommand("mceInsertClipboardContent",false,{content:b,wordContent:true});tinyMCEPopup.close()},resize:function(){var d=tinyMCEPopup.dom.getViewPort(window),c;c=document.getElementById("iframe");if(c){c.style.width=(d.w-20)+"px";c.style.height=(d.h-90)+"px"}}};tinyMCEPopup.onInit.add(PasteWordDialog.init,PasteWordDialog);