var AdvHRDialog={init:function(f){var i=f.dom,j=document.forms[0],h=f.selection.getNode(),g;g=i.getAttrib(h,"width");j.width.value=g?parseInt(g):(i.getStyle("width")||"");j.size.value=i.getAttrib(h,"size")||parseInt(i.getStyle("height"))||"";j.noshade.checked=!!i.getAttrib(h,"noshade")||!!i.getStyle("border-width");selectByValue(j,"width2",g.indexOf("%")!=-1?"%":"px")},update:function(){var f=tinyMCEPopup.editor,h,g=document.forms[0],e="";h="<hr";if(g.size.value){h+=' size="'+g.size.value+'"';e+=" height:"+g.size.value+"px;"}if(g.width.value){h+=' width="'+g.width.value+(g.width2.value=="%"?"%":"")+'"';e+=" width:"+g.width.value+(g.width2.value=="%"?"%":"px")+";"}if(g.noshade.checked){h+=' noshade="noshade"';e+=" border-width: 1px; border-style: solid; border-color: #CCCCCC; color: #ffffff;"}if(f.settings.inline_styles){h+=' style="'+tinymce.trim(e)+'"'}h+=" />";f.execCommand("mceInsertContent",false,h);tinyMCEPopup.close()}};tinyMCEPopup.requireLangPack();tinyMCEPopup.onInit.add(AdvHRDialog.init,AdvHRDialog);