javascript version of php_mt_rand();