Dialog start position isn't perfectly in the middle of the screen. (needed when want to get max width of Dialog for specific resolution).
Should be (DialogMask.width/2) - (dialog.width/2) and is something else I guess.
When 1024x768 and dialog html.windowWidth property set to 1000 - then in application it changes to 980px.
For best results, use the Firefox browser..