%
application.lock
set f_object=server.createobject("scripting.filesystemobject")
f_path=server.mappath("counter.txt")
set file1=f_object.opentextfile(f_path)
application("counter")=file1.readline
file1.close
application("counter")=application("counter")+1
counter=application("counter")
set file1=f_object.createtextfile(f_path)
file1.writeline counter
file1.close
application.unlock
x=CStr(counter)
for i=2 to len(x)-4
gif=""
next
gif_counter=gif
%>