Is there a good way to create random passwords

Is there a good way to create random passwords

I'm trying to create random passwords for users, but there is no random function.
 
Yes I can use input.var = zoho.currenttime.toLong()00; to generate something similar based on time, but try running this serveral times rapidly to choose characters in a list and you'll get similar numbers.
Just as a test I tried:
 
 random1 = (zoho.currenttime.toLong()  %  1000);
    random2 = (zoho.currenttime.toLong()  %  1000);
    random3 = (zoho.currenttime.toLong()  %  1000);
    random4 = (zoho.currenttime.toLong()  %  1000);
    random5= (zoho.currenttime.toLong()  %  1000);
    info random1 + " " + random2 + " " +random3 + " " + random4 + " " + random5;





which produced 299,299,299,299,299,300
I can't used this to generate characters.
 
As an alternative I figured I'd put a thousand random passwords in a table (this doesn't nead to be truely secure) and use the 3 digit value to choose buy record (row) number, but I can't find a rowno() function.
 
I could build yet another function but there should be a better way.
 
Any ideas?