Rotate a layout by 90 degree

Version 1

    This seems to be a common application to rotate a layout.  Here is a script to help you do it.