I have had success using html maps and areas. The way I have done it in the past is to simply write the map tags, then inside that, put the area tags.
<map id="pm0102" name="pm0102"> <area name="area" id="pa01021" shape="poly" alt="Sun" onclick="alert('bla')"/></map>
<map id="pm0102" name="pm0102"></map>
I need to create an area for it. So I first write (inside a function that I call)
map1 = document.getElementById("pm0101")
map1.areas = '<area name="area" id="pa01011"/>'
I may need to have multiple areas.