By JavaScriptSource Staff on Aug 29, 2005
When a layer is inside another layer, it’s style.left and positions can both be ‘0’ but the layer itself can be 500 pixels away from the actual margin. These functions will return the true offset.

The JavaScript Source: Snippets: getPosition

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Command-s). The script is yours!!!