CKEDITOR.dialog.add("radio",function(b){return{title:b.lang.checkboxAndRadio.radioTitle,minWidth:350,minHeight:140,onShow:function(){var d=this;delete d.radioButton;var a=d.getParentEditor().getSelection().getSelectedElement();if(a&&a.getName()=="input"&&a.getAttribute("type")=="radio"){d.radioButton=a;d.setupContent(a)}},onOk:function(){var a,f=this.radioButton,e=!f;if(e){a=this.getParentEditor();f=a.document.createElement("input");f.setAttribute("type","radio")}if(e){a.insertElement(f)}this.commitContent({element:f})},contents:[{id:"info",label:b.lang.checkboxAndRadio.radioTitle,title:b.lang.checkboxAndRadio.radioTitle,elements:[{id:"name",type:"text",label:b.lang.common.name,"default":"",accessKey:"N",setup:function(a){this.setValue(a.data("cke-saved-name")||a.getAttribute("name")||"")},commit:function(a){var d=a.element;if(this.getValue()){d.data("cke-saved-name",this.getValue())}else{d.data("cke-saved-name",false);d.removeAttribute("name")}}},{id:"value",type:"text",label:b.lang.checkboxAndRadio.value,"default":"",accessKey:"V",setup:function(a){this.setValue(a.getAttribute("value")||"")},commit:function(a){var d=a.element;if(this.getValue()){d.setAttribute("value",this.getValue())}else{d.removeAttribute("value")}}},{id:"checked",type:"checkbox",label:b.lang.checkboxAndRadio.selected,"default":"",accessKey:"S",value:"checked",setup:function(a){this.setValue(a.getAttribute("checked"))},commit:function(a){var j=a.element;if(!(CKEDITOR.env.ie||CKEDITOR.env.opera)){if(this.getValue()){j.setAttribute("checked","checked")}else{j.removeAttribute("checked")}}else{var i=j.getAttribute("checked"),h=!!this.getValue();if(i!=h){var g=CKEDITOR.dom.element.createFromHtml('<input type="radio"'+(h?' checked="checked"':"")+"></input>",b.document);j.copyAttributes(g,{type:1,checked:1});g.replace(j);b.getSelection().selectElement(g);a.element=g}}}}]}]}});