(function(){var e={scrolling:{"true":"yes","false":"no"},frameborder:{"true":"1","false":"0"}};function d(h){var a=this;var c=a instanceof CKEDITOR.ui.dialog.checkbox;if(h.hasAttribute(a.id)){var b=h.getAttribute(a.id);if(c){a.setValue(e[a.id]["true"]==b.toLowerCase())}else{a.setValue(b)}}}function f(j){var a=this;var i=a.getValue()==="",c=a instanceof CKEDITOR.ui.dialog.checkbox,b=a.getValue();if(i){j.removeAttribute(a.att||a.id)}else{if(c){j.setAttribute(a.id,e[a.id][b])}else{j.setAttribute(a.att||a.id,b)}}}CKEDITOR.dialog.add("iframe",function(h){var c=h.lang.iframe,b=h.lang.common,a=h.plugins.dialogadvtab;return{title:c.title,minWidth:350,minHeight:260,onShow:function(){var g=this;g.fakeImage=g.iframeNode=null;var l=g.getSelectedElement();if(l&&l.data("cke-real-element-type")&&l.data("cke-real-element-type")=="iframe"){g.fakeImage=l;var k=h.restoreRealElement(l);g.iframeNode=k;g.setupContent(k)}},onOk:function(){var g=this;var p;if(!g.fakeImage){p=new CKEDITOR.dom.element("iframe")}else{p=g.iframeNode}var o={},n={};g.commitContent(p,o,n);var m=h.createFakeElement(p,"cke_iframe","iframe",true);m.setAttributes(n);m.setStyles(o);if(g.fakeImage){m.replace(g.fakeImage);h.getSelection().selectElement(m)}else{h.insertElement(m)}},contents:[{id:"info",label:b.generalTab,accessKey:"I",elements:[{type:"vbox",padding:0,children:[{id:"src",type:"text",label:b.url,required:true,validate:CKEDITOR.dialog.validate.notEmpty(c.noUrl),setup:d,commit:f}]},{type:"hbox",children:[{id:"width",type:"text",style:"width:100%",labelLayout:"vertical",label:b.width,validate:CKEDITOR.dialog.validate.htmlLength(b.invalidHtmlLength.replace("%1",b.width)),setup:d,commit:f},{id:"height",type:"text",style:"width:100%",labelLayout:"vertical",label:b.height,validate:CKEDITOR.dialog.validate.htmlLength(b.invalidHtmlLength.replace("%1",b.height)),setup:d,commit:f},{id:"align",type:"select","default":"",items:[[b.notSet,""],[b.alignLeft,"left"],[b.alignRight,"right"],[b.alignTop,"top"],[b.alignMiddle,"middle"],[b.alignBottom,"bottom"]],style:"width:100%",labelLayout:"vertical",label:b.align,setup:function(l,k){d.apply(this,arguments);if(k){var g=k.getAttribute("align");this.setValue(g&&g.toLowerCase()||"")}},commit:function(l,k,g){f.apply(this,arguments);if(this.getValue()){g.align=this.getValue()}}}]},{type:"hbox",widths:["50%","50%"],children:[{id:"scrolling",type:"checkbox",label:c.scrolling,setup:d,commit:f},{id:"frameborder",type:"checkbox",label:c.border,setup:d,commit:f}]},{type:"hbox",widths:["50%","50%"],children:[{id:"name",type:"text",label:b.name,setup:d,commit:f},{id:"title",type:"text",label:b.advisoryTitle,setup:d,commit:f}]},{id:"longdesc",type:"text",label:b.longDescr,setup:d,commit:f}]},a&&a.createAdvancedTab(h,{id:1,classes:1,styles:1})]}})})();