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