Client Window Size
Use this snippet to obtain the width and height of the visitor's client window. This is a much better method than getting the resolution as this is the actual size of the window displaying the Web page.
Read more here
edit: Programming/Javascript/auto___client_window_size.wikieditish...