You can code the handler setup like this:
<area id="nose" shape="rect" coords="280,240,330,275" onmouseover="zoom.call(this)"/>
Then this
in your handler will refer to the element. Now, I'll offer the caveat that I'm not 100% sure what happens when you've got a handler in an <area>
tag, largely because I haven't seen an <area>
tag in like a decade or so. I think it should give you the image tag, but that could be wrong.
edit — yes, it's wrong - you get the <area>
tag, not the <img>
. So you'll have to get that element's parent (the map), and then find the image that's using it (that is, the <img>
whose "usemap" attribute refers to the map's name).
edit again — except it doesn't matter because you want the area's "id" durr. Sorry for not reading correctly.