function dosubmit() { //submition password not encrypted } function dosubmitencrypted() { //Password encrypted var pwd=document.getElementById("formpassword").value; if(pwd!=""){ var pwdmd5=hex_md5(pwd); document.getElementById("formpasswordcrypted").value=pwdmd5; //replace the not crypted password by a string of same length var chaine="crypted password crypted password crypted password crypted password crypted password"; try{document.getElementById("formpassword").value=chaine.substr(0,document.getElementById("formpassword").value.length);}catch(err){} } }