function badWords(sText) {
//'alcune parole poco consone, potete aggiungerne quante ne volete
words = new Array("cretino","stupido","imbecille","porcapalett a");
stringa = sText;
RE = new RegExp(".","gi")
for (var k=0; k<words.length;k++) {
stringa = stringa.replace(words[k], words[k].replace(RE, "\*"))
}
return stringa ;
}

ciao