function encrypt_pass(password){
    if((typeof(password)=="undefined")||(password=="")){
      return "";
     }    var  pos=0;
    var pwlen=0;
    var fcasc=0;
    var tempasc=0;
    var ccasc=0;
    var ecasc=0;
    var retpw="";
    var  convertchar;
    pwlen=password.length;    fcasc=parseInt(password.charCodeAt(0));    ecasc=parseInt(password.charCodeAt(password.length-1));    for(pos=0 ;pos< pwlen;pos++){
      ccasc=parseInt(password.charCodeAt(pos));
      tempasc=(ccasc*pwlen+(fcasc+ecasc)*(pos+1)) % 123;
      while (tempasc<33){
        tempasc=(tempasc*2+33)/2 ;
        tempasc=parseInt(tempasc);
      }
      retpw=retpw+String.fromCharCode(tempasc);
    }
    return retpw ;
  }