As you don’t seem to be able to use the document object model (DOM) to determine the relationship of DIV2 compared with DIV1, you will need to instead compare the mouse xy position with that of DIV1.
There are some horrible cross-browser problems relating to the mouse position, but fortunately someone else has worked out how to properly obtain the mouse position for you.
He also takes you through how to find the position of an element, which you would use for getting the xy coords of DIV1.