Rotate Page Script InDesign CS2

Any one know of a script that will rotate an entire page, all layers and guides, and maintain relative positioning?
For instance when creating a multiple page document and it’s decided that the second half needs to be rotated after created. Otherwise its a tedious process of rotating then repositioning by number and running the risk or error.

More information is needed. First, are you changing the page orientation or just rotating what is on the pages? Next you are want to rotate them relative to what? The top left, center, or what?

Thanks for asking Jerome,
I’m guessing the best way would be to reference upper left position of all page element bounding boxes to be rotated 180 degrees clockwise to then be referenced to lower right position with a negative offset as the upper left. Does that make sense? I may have the time to try some things this week, I’m by no means a proficient scriptwriter, but maybe I can piece together some decent logic anyway.