function loginCheck(D,I){if(!D.hasError()){var J=D.getSpecificChildren("user")[0];var C=new HashTable();C.put("username",J.getNickname());C.put("usernamemodif",encode64(new String(J.getUid())));var B=D.getSpecificChildren("note")[0].getSpecificChildren("detail")[0];var G=0;var A=0;try{G=parseInt(B.getValues("nbmsgs"));if(G=="null"||G==null||G==""||isNaN(G)==true){G=0}}catch(F){CW_logger.log(CW_logger.LEVEL_ERROR,"loginCheck can't retrieve the medianbcomment value, error:"+F)}try{A=parseInt(B.getValues("nbalerts"));if(A=="null"||A==null||A==""||isNaN(A)==true){A=0}}catch(F){CW_logger.log(CW_logger.LEVEL_ERROR,"loginCheck can't retrieve the medianbvote value, error:"+F)}var H=G+A;if(H==NaN||isNaN(H)==true||H=="null"||H==null||H==""){H="No tens"}C.put("nbvisitprofil",B.getValues("user_nbvisualisation"));C.put("nbcommentprofil",B.getValues("user_nbcomment"));C.put("nbvisitmedia",B.getValues("media_nbvisualisation"));C.put("nbcommentmedia",B.getValues("media_nbcomment"));C.put("nbnotemedia",B.getValues("media_nbvote"));C.put("valueNum1",H);C.put("nbPoint",J.getValues("user.points.club"));var E=J.getAvatar();if(E!=null&&E!=""&&E!="null"){C.put("valueText2",J.getAvatar())}else{C.put("valueText2","img/member/member_SmallPreview.gif")}CW_comwebAjax.loadHtml("html/login/registered.html","registerContainer",C);refreshUserStat()}}var timmerRefreshUserStat=null;function refreshUserStat(){try{window.clearTimeout(timmerRefreshUserStat)}catch(A){}if(CW_config.hasConnectedUser){timmerRefreshUserStat=window.setTimeout('CW_Action_User.displayUserStat("displayUserStatCallBack")',1000*60*5)}}function displayUserStatCallBack(B,A){loginCheck(B,A);refreshUserStat()}function logout(){var A=new Array();A.push("action=user.logout");CW_comwebAjax.sendRequest("/comweb/user","logoutCallback",null,"login",A)}function registerLoad(){CW_comwebAjax.loadHtml("html/login/register.html","registerContainer")}function inscription1Load(){CW_AjaxPage_Manager.displayPage("inscription")}function inscription1Check(E){if(!E.hasError()){var C=E.getSpecificChildren("session")[0];var H=E.getSpecificChildren("user")[0];var B=H.getUsername();var F=CW_config.serviceId;CW_comwebAjax.loadHtml("html/inscription/inscription2.html","masterPage");CW_util.setSelectDateContent("selectYearInscription2","selectMonthInscription2","selectDayInscription2");CW_util.setCountryListContent("inscription1","user.country");var D=document.forms.inscription1;CW_util.getFormElement(D,"burl").value=CW_config.webappUri;CW_util.getFormElement(D,"subm").value=CW_internationalization.getValue("inscription.mail.subject");CW_util.getFormElement(D,"smail").value=CW_internationalization.getValue("inscription.mail.sender");CW_util.getFormElement(D,"lang.uid").value=CW_internationalization.getUid();CW_util.getFormElement(D,"user.username").value=B;var A=document.getElementById("captchaImage");var G="/comweb/CaptchaService?captcha.width=200&captcha.height=100&captcha.background=FFFFFF&captcha.color=000000&user.login="+B+"&site.uid="+F;A.setAttribute("src",G)}}function inscription2Check(A){if(!A.hasError()){var B=new HashTable();B.put("valueText1",CW_Action_User.inscription1_mail);CW_comwebAjax.loadHtml("html/inscription/inscription3.html","masterPage",B)}}function inscription4Load(){CW_comwebAjax.loadHtml("html/inscription/inscription4.html","masterPage");addHistoryFunction("inscription4Load","Inscription4")}function validFormInscriptionState3(){inscription4Load()}function showProfilDetail(){CW_comwebAjax.loadHtml("html/inscription/inscriptionProfilDetail.html","profilDetailContainer");document.getElementById("profilDetailContainer").style.display="block"};

