You can ask Mac OS X to handle this for you :
In "System Preferences" > under "Keyboard & Mouse", there's a shortcut for "Move focus to next window in active application" under "Keyboard Navigation". And more goodness, (I have set it to Cmd-<), if I press Cmd-Shift-< I get the previous window, like the application manager does for Cmd-Tab.
HTH
