onload=init;
function init(){
  commElm = document.getElementById("comm");
};
//----------------------
function changePassword(){
  var f=document.fp;
  if (!validate.stringLen(f.password3Edit, "Password",  4)) return false;
  if (!validate.stringLen(f.password1Edit, "Password",  4)) return false;
  if (f.password1Edit.value.trim()!=f.password2Edit.value.trim()){
    alert("Passwords do not match.");
    f.password1Edit.select();
    f.password1Edit.focus();
    return false;
  }
  commElm.src= "index.cfm?action=accountSave&directive=password&old="+
               f.password3Edit.value+
               "&new="+
               f.password1Edit.value;
};
//----------------------
function changeScreenName(){
  commElm.src= "index.cfm?action=accountSave&directive=screenname&new="+
               document.fn.screenname.value;
};
//----------------------
function changeEmail(){
  var f=document.fe;
  if(!validate.string(f.emailEdit, "Email Address")) return false;
  commElm.src= "index.cfm?action=accountSave&directive=email"+
               "&new="         + f.emailEdit.value+
               "&hideEmail="   + (f.hideEmailCB.checked?0:1)+
               "&sendNotices=" + (f.sendNoticesCB.checked?1:0);
};
//----------------------
function changeSignature(){
  var searchfor=/\r\n|\r|\n/g;
  var temp=document.fs.signature.value.replace(searchfor, "|^|");
  //alert(temp);
  commElm.src= "index.cfm?action=accountSave&directive=signature&new="+
               temp;
};
