You can hook to the window resize event and reposition the window every time with the center()
(using my previous example):
windowResizeTimeout = window.setTimeout(
I've also update my example to include the function -- http://dojo.telerik.com/@joneff/IrAto
Note how the window is not immediately re-positioned, but there is a little delay. That's deliberate and the idea is not to perform excess calculations should the window be resized within the next 100 milliseconds ( or 0.1 seconds). You can customize the delay by changing 100 to a more suitable value.