I don't think you should assign to window.onresize.
Instead, use
<body resize="resize()" load="..." unload="...">
or actually register a handler for the resize event. This allows the
browser to dispatch multiple handlers.
Directly assigning to the window.onresize property risks trashing the
previous content of that property.
When you call map.new GMap2, the API will register map.checkResize() as
the onresize handler. It will update a variety of internal variables to
adjust for the new window size. You might need to delay changing the
map center until this is done.