Updated findxy to find the current cursor position without using the doc...

...ument size

A fix for the firefox issue mentioned in #1