This allows you to check if two rectangles overlap, where true is returned if they do.
isRectOverlap( x1, y1, width1, height1, x2, y2, width2, height2, isCentred = false )
The first 4 parameters are for the first rectangle, and the second 4 are for the second rectangle.
The 'isCentred' parameter states if the locations refer to the top-left corner (when isCentred is false), or the middle of the rectangle (when isCentred is true).
// draws 'COLLISION!' to the screen
// if the mouse moves over a certain section of the page
c = getControls()
mx = c.getMouseX()
my = c.getMouseY()
if isRectOverlap( 100, 100, 200, 200, mx, my, 10, 10, true )
fillText( "COLLISION!", 100, 100 )