Code:
HEAD:
<script language="javascript">
function U(F, Coords)
{
var Z = document.getElementById("MyZoom");
Z.src = F ;
Z.style.display = '';
var C = Coords;
var Top = C.substr(C.indexOf(",")+1, C.length);
var Right = Top.substr(Top.indexOf(",")+1, Top.length);
var Left = C.substring(0, C.indexOf(","));
var Top = Top.substring(0, Top.indexOf(","));
var Right = Right.substring(0, Right.indexOf(","));
var Bottom = C.substr(C.lastIndexOf(",")+1, C.length);
Z.style.left = Right;
Z.style.top = Bottom;
}
</script>
BODY:
<img style="position: absolute; left: 0px; top: 0px; width: 300px; height: 225px; border: 1px solid black; display: none" id= "MyZoom" src="" height="128" width="128" />
<img src="Mosaic.jpg" border=0 width=280 usemap="#Map">
<map name="Map">
<area onmouseover="U(this.href, this.coords);" shape="rect" coords="0,0,17,13" href="A.jpg" target="_blank">
<area onmouseover="U(this.href, this.coords);" shape="rect" coords="17,0,35,13" href="B.jpg" target="_blank">
<area onmouseover="U(this.href, this.coords);" shape="rect" coords="35,0,53,13" href="C.JPG" target="_blank">
....
</map>
I know this has got to be simple, how do you get the popped up image to disappear when it leaves the main image or if you click outside the main image?
Would it be something with
onmouseout?