sub navimgclick(moveto) for each child in gallery.children if replace(child.firstchild.firstchild.firstchild.firstchild.firstchild.src,"_gal","") = showimg.src then if moveto="next" then if child.firstchild.firstchild.firstchild.firstchild.firstchild.src = gallery.lastchild.firstchild.firstchild.firstchild.firstchild.firstchild.src then getPic gallery.firstchild.firstchild.firstchild.firstchild.firstchild.firstchild.src else getPic child.nextsibling.firstchild.firstchild.firstchild.firstchild.firstchild.src end if else if child.firstchild.firstchild.firstchild.firstchild.firstchild.src = gallery.firstchild.firstchild.firstchild.firstchild.firstchild.firstchild.src then getPic gallery.lastchild.firstchild.firstchild.firstchild.firstchild.firstchild.src else getPic child.previoussibling.firstchild.firstchild.firstchild.firstchild.firstchild.src end if end if exit for end if next end sub sub getpic_zoom(obj) navbtns.style.visibility = "hidden" loadimg.src = replace(replace(document.getelementbyid(obj).firstchild.src,"_zoom",""),"_zoom","") end sub sub getPic(imgpath) navbtns.style.visibility = "visible" loadimg.src = replace(imgpath,"_gal","") imgtext.innertext = "" for each child in gallery.children if child.firstchild.firstchild.firstchild.firstchild.firstchild.src = imgpath then if child.firstchild.firstchild.firstchild.firstchild.firstchild.alt <> "" then imgtext.innertext = "- " & child.firstchild.firstchild.firstchild.firstchild.firstchild.alt end if exit for end if next end sub function imageLoaded(imgsrc) showimg.src = imgsrc.src blackbox.style.display="block" showimg.style.top = (blackbox.offsetheight-580)/2 navbox.style.width = showimg.offsetwidth navbox.style.top = (blackbox.offsetheight-580)/2 + 528 navbtns.style.left = (navbox.offsetwidth-52)/2 showimg.style.left = (blackbox.offsetwidth-showimg.offsetwidth)/2 navbox.style.left = showimg.style.left end function sub blackboxclick() blackbox.style.display = "none" showimg.src = "pics/common/whitespot.png" end sub sub hideshow(obj) if obj.children(0).style.visibility = "visible" then obj.children(0).style.visibility = "hidden" obj.children(1).style.display = "none" else obj.children(0).style.visibility = "visible" obj.children(1).style.display = "block" end if end sub