Pure javascript mouse coordinate detection