scusa ma le textarea dove sono?
cambia
if(f.elements[k].type=='textarea'){
in
if(f.elements[k].type=='text'){
ciao