Well, I though this would be trivial, but in fact it's less obvious than
I supposed. Here's my attempt at cycling through the open document
windows, but there's no way that I can see to control with script the
direction you're cycling through the tabs.
app.documents.nextItem(app.activeDocument).windows[0].bringToFront();