<%
iFileCount = 0
iGoodFileCount = 0
iFileStart = ((iPageNo - 1) * PHOTOSPERSCREEN) + 1
For Each Elem In objNodeList
iFileCount = iFileCount + 1
if (iFileCount >= iFileStart) and (iFileCount < iFileStart + PHOTOSPERSCREEN) then
iGoodFileCount = iGoodFileCount + 1
SET caption = Elem.getElementsByTagName("CAPTION")(0)
SET fileName = Elem.getElementsByTagName("FILE")(0)
%>
<%=caption.text%>
<%
if iGoodFileCount = PHOTOSPERSCREEN then exit for
end if
Next
%>