A simple cross-browser function to return the information needed to determine the currently displayed area of the webpage by returning the current scroll-offset as well as the width and height of the browser display area.

A simple function to easily find the key for an Array value in Javascript, or return -1 if the value has not been found in the target Array. The function extends the existing Array object so can easily be called on any Array.

If you want to dynamically move an element on a webpage to the "top" position, this function lets you find the current top z-index on the fly. Extremely important if you need to overlay content on a page with changing content!