Hi, the third flag image (Australia) should double in size with the mouseover event and reduce to the original size with the mouseout event. On the mouseover event it does double in size, however after the mouseout event the image disappears. Thank you for your help in advance.
My code:
[CODE]<script type=”text/javascript”>
var myImages = new Array(“usa.gif”,”canada.gif”,”jamaica.gif”,”mexico.gif”,”australia.gif”);
function changeImg(that)
{
var newImgNumber = Math.round(Math.random() * 4);
while (that.src.indexOf(myImages[newImgNumber]) != -1)
{
newImgNumber = Math.round(Math.random() * 4);
}
that.src = myImages[newImgNumber];
return false;
}
[COLOR=”#FF0000″]function largeImg(that)
{
that.width = 2 * that.width;
that.height = 2 * that.height;
}
function originalImg(that)
{
that.width = “275px”;
that.height = “175px”;
}[/COLOR]
</script>
</head>
<body>
<img name=”img0″ src=”usa.gif” border=”0″ onclick=”return changeImg(this)” />
<img name=”img1″ src=”mexico.gif” border=”0″ onclick=”return changeImg(this)” />
[COLOR=”#FF0000″]<img id=”img2″ src=”australia.gif” border=”0″ width=”275″ height=”175″ onmouseover=”return largeImg(this)” onmouseout=”return originalImg(this)” />[/COLOR]
</body>