function encrypt_password_shortcut(b){var g,e,a,f;var g=b;var d=new RegExp("[-{}]","g");var c=Cookie.read("igloojs").replace(d,"").toUpperCase();if(g!=""){e=convertCP2UTF8(convertChar2CP(g));a=new Crypt.Aes({output:"hex",hexcase:1});f=a.encrypt(c,e);return f}return""}function encrypt_password(e,f,b,a){if($(f)){$(f).disabled=false;$(f).removeClass("ig-button_disabled")}var d=$(e);if(d){var c=function(){var l=new RegExp("[-{}]","g");var j=Cookie.read("igloojs").replace(l,"").toUpperCase();var h,k,i,g;if($("pass_unencrypted")){h=$("pass_unencrypted").value;if(h!=""){k=convertCP2UTF8(convertChar2CP(h));i=new Crypt.Aes({output:"hex",hexcase:1});g=i.encrypt(j,k);$("pass_encrypted").value=g}}if($("confirmpass_unencrypted")){h=$("confirmpass_unencrypted").value;if(h!=""){k=convertCP2UTF8(convertChar2CP(h));i=new Crypt.Aes({output:"hex",hexcase:1});g=i.encrypt(j,k);$("confirmpass_encrypted").value=g}}if($("curpass_unencrypted_1")){h=$("curpass_unencrypted_1").value;if(h!=""){k=convertCP2UTF8(convertChar2CP(h));i=new Crypt.Aes({output:"hex",hexcase:1});g=i.encrypt(j,k);$("curpass_encrypted_1").value=g}}if($("curpass_unencrypted_2")){h=$("curpass_unencrypted_2").value;if(h!=""){k=convertCP2UTF8(convertChar2CP(h));i=new Crypt.Aes({output:"hex",hexcase:1});g=i.encrypt(j,k);$("curpass_encrypted_2").value=g}}};if(a){d.addEvent("onvalidformsubmit",function(g){c();this.submit()})}else{d.addEvent("submit",function(g){g.stop();c();this.submit()})}if(b){$(f).addEvent("click",function(){d.fireEvent("submit")})}}if($("ig-form-noscripterror")){$("ig-form-noscripterror").dispose()}if($("default")){$("default").focus();$("default").select()}}window.addEvent("domready",function(){if(Igloo&&Igloo.asset_encrypt_password){$each(Igloo.asset_encrypt_password,function(c,b){var a=false;if(c.submit_bypass){a=true}var d=false;if(c.with_validation){d=true}encrypt_password(c.form_id,c.button_id,a,d)})}});window.addEvent("bootstrap4finished",function(){if(window.dependents.encrypt_password){window.dependents.encrypt_password.each(function(b){var a=JSON.decode(b.dataobj);var d=false;if(a.encrypt_password.submit_bypass){d=true}var c=false;if(a.encrypt_password.with_validation){c=true}encrypt_password(a.encrypt_password.form_id,a.encrypt_password.button_id,d,c)})}});function dec2hex(a){return(a+0).toString(16).toUpperCase()}function dec2hex2(a){var b=new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");return b[(a>>4)&15]+b[a&15]}function convertCP2UTF8(c){var a="";c=c.replace(/^\s+/,"");if(c.length==0){return""}c=c.replace(/\s+/g," ");var e=c.split(" ");for(var d=0;d0){a+=""}if(b<=127){a+=dec2hex2(b)}else{if(b<=2047){a+=dec2hex2(192|((b>>6)&31))+""+dec2hex2(128|(b&63))}else{if(b<=65535){a+=dec2hex2(224|((b>>12)&15))+""+dec2hex2(128|((b>>6)&63))+""+dec2hex2(128|(b&63))}else{if(b<=1114111){a+=dec2hex2(240|((b>>18)&7))+""+dec2hex2(128|((b>>12)&63))+""+dec2hex2(128|((b>>6)&63))+""+dec2hex2(128|(b&63))}else{a+="!erreur "+dec2hex(b)+"!"}}}}}return(a)}function convertChar2CP(d){var c=0;var g=0;var f="";for(var e=0;e65535){f+="Error "+dec2hex(a)+"!"}if(c!=0){if(56320<=a&&a<=57343){f+=dec2hex(65536+((c-55296)<<10)+(a-56320))+" ";c=0;continue}else{f+="!erreur "+dec2hex(c)+"!";c=0}}if(55296<=a&&a<=56319){c=a}else{f+=dec2hex(a)+" "}}f=f.substring(0,f.length-1);return f};