How to detect screen resolution using JavaScrript

To see the source code, right-click on the page and select View Source.

Tip: when writing any function in JavaScript Editor, use Code Templates to do the job with just few key-strokes.