code:
function talker(a) {
var pattern = /(\w)(\w*)/; // a letter, and then one, none or more letters
for (i = 0 ; i < a.length ; i ++ ) {
var parts = a[i].match(pattern); // just a temp variable to store the fragments in.
var firstLetter = parts[1].toUpperCase();
var restOfWord = parts[2].toLowerCase();
a[i] = firstLetter + restOfWord; // re-assign it back to the array and move on
}
document.form1.text1.value = a.join(' '); // join it back together
}
Should work well
Just save in a file called 'talker.
name.js' and put it with the other talkers.