+\r
+ onLoad : function()\r
+ {\r
+ var dialog = this;\r
+\r
+ var styles = dialog.getContentElement( 'advanced', 'advStyles' );\r
+\r
+ if ( styles )\r
+ {\r
+ styles.on( 'change', function( evt )\r
+ {\r
+ // Synchronize width value.\r
+ var width = this.getStyle( 'width', '' ),\r
+ txtWidth = dialog.getContentElement( 'info', 'txtWidth' ),\r
+ cmbWidthType = dialog.getContentElement( 'info', 'cmbWidthType' ),\r
+ isPx = 1;\r
+\r
+ if ( width )\r
+ {\r
+ isPx = ( width.length < 3 || width.substr( width.length - 1 ) != '%' );\r
+ width = parseInt( width, 10 );\r
+ }\r
+\r
+ txtWidth && txtWidth.setValue( width, true );\r
+ cmbWidthType && cmbWidthType.setValue( isPx ? 'pixels' : 'percents', true );\r
+\r
+ // Synchronize height value.\r
+ var height = this.getStyle( 'height', '' ),\r
+ txtHeight = dialog.getContentElement( 'info', 'txtHeight' );\r
+\r
+ height && ( height = parseInt( height, 10 ) );\r
+ txtHeight && txtHeight.setValue( height, true );\r
+ });\r
+ }\r
+ },\r
+\r