Forum Moderators: not2easy
Search on Google for “resolution dependent layout” (first result should be The Man in Blue’s article,) he has a good script to get entire layouts to change, so if you pick that apart you should have no problems achieving what you want.
If you have any problems, it’s best you speak to the bright ones over at the JavaScript forum [webmasterworld.com].