Javascript function which will return a 100% truly random number.
To generate a 4 digit number you would call the function rand_num(999, 9999).
To generate a 6 digit number you would call the function rand_num(99999, 999999), etc.