Code:
<html>
<head>
<style>
#img_container
{
position:absolute;
display:media;
background:#fff;
}
</style>
<script>
var largeImages = new Array("Sorted/CaBirds/CedarWaxwings9-19-14EdwardsCmarillo/IMGP5281.JPG" , "Sorted/CaBirds/CedarWaxwings9-19-14EdwardsCmarillo/IMGP5282.JPG", "Sorted/CaBirds/CedarWaxwings9-19-14EdwardsCmarillo/IMGP5283.JPG", "Sorted/CaBirds/CedarWaxwings9-19-14EdwardsCmarillo/IMGP5284.JPG");
// In the show() function,
// obj is the ID of the div element that contains the large image element,
// obj1 is the small image element,
// obj2 is the ID of the large image element that's in the large image div element.
// img is the position of the large image in the largeImages array.
// left_pos and top_pos are the left and top position adjustments for the large image div element.
function show(obj,obj1,obj2,img,left_pos,top_pos)
{
document.getElementById(obj).style.display="block";
document.getElementById(obj2).src=largeImages[img];
var x_coords=findPosX(obj1);
var y_coords=findPosY(obj1);
document.getElementById(obj).style.left=x_coords+left_pos;
document.getElementById(obj).style.top=y_coords+top_pos;
}
function hide(id)
{
document.getElementById(id).style.display="none";
}
function findPosX(obj)
{
var curleft = 0;
if (document.getElementById || document.all)
{
while (obj.offsetParent)
{
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}
else if (document.layers)
curleft += obj.x;
return curleft;
}
function findPosY(obj)
{
var curtop = 0;
if (document.getElementById || document.all)
{
while (obj.offsetParent)
{
curtop += obj.offsetTop
obj = obj.offsetParent;
}
}
else if (document.layers)
curtop += obj.y;
return curtop;
}
</script>
</head>
<body bgcolor="black">
<table border="10" bordercolor="01fcef"><tr><td><center>
<table width="700" height="400" border="5" bordercolor="96dcfb"><tr><td>
</tr></td></table>
<div>
<img id="img1" height="100" width="150" src="Sorted/CaBirds/CedarWaxwings9-19-14EdwardsCmarillo/IMGP5281.JPG" onmouseover="show('img_container',this,'large_img',0,0,0);">
<img id="img2" height="100" width="150" src="Sorted/CaBirds/CedarWaxwings9-19-14EdwardsCmarillo/IMGP5282.JPG" onmouseover="show('img_container',this,'large_img',1,0,0);">
<img id="img3" height="100" width="150" src="Sorted/CaBirds/CedarWaxwings9-19-14EdwardsCmarillo/IMGP5283.JPG" onmouseover="show('img_container',this,'large_img',2,0,0);">
<img id="img4" height="100" width="150" src="Sorted/CaBirds/CedarWaxwings9-19-14EdwardsCmarillo/IMGP5284.JPG" onmouseover="show('img_container',this,'large_img',3,0,0);">
<img id="img1" height="100" width="150" src="Sorted/CaBirds/CedarWaxwings9-19-14EdwardsCmarillo/IMGP5285.JPG" onmouseover="show('img_container',this,'large_img',0,0,0);">
<img id="img2" height="100" width="150" src="Sorted/CaBirds/CedarWaxwings9-19-14EdwardsCmarillo/IMGP5286.JPG" onmouseover="show('img_container',this,'large_img',1,0,0);">
<img id="img3" height="100" width="150" src="Sorted/CaBirds/CedarWaxwings9-19-14EdwardsCmarillo/IMGP5287.JPG" onmouseover="show('img_container',this,'large_img',2,0,0);">
<img id="img4" height="100" width="150" src="Sorted/CaBirds/CedarWaxwings9-19-14EdwardsCmarillo/IMGP5288.JPG" onmouseover="show('img_container',this,'large_img',3,0,0);">
</div>
<div id="img_container" onmouseout="hide(this.id);"><img id="large_img" src="" height="400" width="700" valign="top"/></div>
</tr></td></table>
</body>
</html>
Bookmarks