This won't help with your current problem, but might I suggest this change... instead of
Code:
For Each file in Files
IF LEFT(rsArtikal.Fields.Item("Slika").Value, LEN(rsArtikal.Fields.Item("Slika").Value)-4) = LEFT(file.NAME,LEN(file.Name)-4) THEN%>
<a class="linkp" target="openNew" href="pictures\big<%=file.Name%>">Open additional picture</a>
<%
END IF
Next
try...
Code:
recordName = LEFT(rsArtikal.Fields.Item("Slika").Value, LEN(rsArtikal.Fields.Item("Slika").Value)-4)
For Each file in Files
IF LEFT(recordName = LEFT(file.NAME,LEN(file.Name)-4) THEN%>
<a class="linkp" target="openNew" href="pictures\big<%=file.Name%>">Open additional picture</a>
<%
END IF
Next
or something close to that (haven't checked the syntax). Basically take that first left bit out of the file loop....