function rectIntersects(a, b) {
    return a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom;
}
Returns true iff the two specified rectangles intersect. In no event are
either of the rectangles modified.

@param {DOMRect} a The first rectangle being tested for intersection
@param {DOMRect} b The second rectangle being tested for intersection
@returns {boolean} returns true iff the two specified rectangles intersect.