This can also be done several ways. I would suggest expanding the array's items to include the descriptions:
Code:
var dynimages=new Array()
dynimages[0]=["photo1.jpg", "", "I'm a description"]
dynimages[1]=["photo2.jpg", "", "description too"]
dynimages[2]=["photo3.jpg", "", "third description"]
Then change modifyimage to use these (previous additions included here, new ones red):
Code:
function modifyimage(loadarea, imgindex){
if (document.getElementById){
document.getElementById(loadarea+'cap').innerHTML=dynimages[imgindex][2]? dynimages[imgindex][2] : '';
for (var i_tem = 0; i_tem < dynimages.length; i_tem++)
document.getElementById('tv'+i_tem).className='tvlink';
document.getElementById('tv'+imgindex).className='tvlink_active';
var imgobj=document.getElementById(loadarea)
if (imgobj.fil . . .
Now this gets just a little tricky. The larger images are appearing in an element with the id of 'loadarea' which is set in the calls, ex:
Code:
onMouseover="modifyimage('dynloadarea', 0)"
With that call, 'loadarea' becomes the id dynloadarea. The changes to the script will make it also look for another element with (in this case) the id of dynloadareacap. So you need to put one (and only one) on your page where you want the descriptions to appear:
Code:
<div id="dynloadarea" style="width:140px;height:225px"></div>
<div id="dynloadareacap" style="width:140px;height:30px;text-align:center;"></div>
Bookmarks