<%
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=1 to len(x)
jpg=jpg & ""
next
jpg_counter=jpg
%>