function ranpassword(ps_len,xml)
strstring = "abcdefghijklmnopqrstuvwxyzABCEDFGHIJKLMNOPQRSTUVWXYZ1234567890"
randomize timer
dim i,a
ranpassword=""
password_length = 16
if ps_len<>"" and ps_len<>"0" then
password_length=clng(ps_len)
end if
for i=1 to password_length
a=int(rnd*(len(strstring)))+1
ranpassword=ranpassword+mid(strstring,a,1)
next
end function