var cont = document.NOMEFORM.NOMECAMPO.value;

poi sulla stringa cont puoi applicare i metodi delle stringhe:
http://www.devguru.com/technologies/...ipt_index.html

http://www.devguru.com/technologies/...ef/string.html

Ciao
Michele