def isPointInsideRect(x, y, rect):
    """
    This function determines if the point x, y is within the rectangle rect.
    Returns TRUE if it is and FALSE if it is not.
    """
    if ((x > rect.left) and
        (x < rect.right) and
        (y > rect.top) and
        (y < rect.bottom)):
        return True
    else:
        return False