::ShowWindow( hwnd, SW_RESTORE );
if ( ::IsIconic( hwnd ) ) { ::ShowWindow( hwnd, SW_RESTORE ); }
activateWindow( nsIDOMWindowInternal *win ) {    // Try to get native window handle.    HWND hwnd = hwndForDOMWindow( win );    if ( hwnd ) {        // Restore the window in case it is minimized.        ::ShowWindow( hwnd, SW_RESTORE );        // Use the OS call, if possible.        ::SetForegroundWindow( hwnd );    } else {        // Use internal method.        win->Focus();    }}