#NEWLINE# def isIn( element , x , y ) : #NEWLINE# #INDENT# '\n    Given an element and an absolute x and y, return True if the\n    (x,y) coordinate is within the element. Otherwise, return False.\n    ' #NEWLINE# top = DOM . getAbsoluteTop ( element ) #NEWLINE# height = DOM . getIntAttribute ( element , 'offsetHeight' ) #NEWLINE# if ( ( y >= top ) and ( y <= ( top + height ) ) ) : #NEWLINE# #INDENT# left = DOM . getAbsoluteLeft ( element ) #NEWLINE# width = DOM . getIntAttribute ( element , 'offsetWidth' ) #NEWLINE# if ( ( x >= left ) and ( x <= ( left + width ) ) ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# #UNINDENT# return False