maximizeWindowOld function

Maximize the current window.