I'd create several arrays with :
- consonant and vowels for the first letter
- consonant only
- vowels only
- several consonants to follow other consonants (h, etc.)
- several vowels to follow other vowels (to get "ae" etc.)
Then i'd use a random iteration value between 5 and 10 (rnd(6) +5 with floor) to count the letters and use it as the number of iterations of a loop. Then you generate random numbers that pick a letter each time in one of your arrays and check if the last generated letter is a consonant or a vowel. Dunno if it's the best way but with some exceptions you might be able to get cool names.