function Activation(b){this.DebugMode=false;this.RootUrl="http://www.filigranes.be/";this.ReturnUrl="http://www.filigranes.be/fr";this.divID=b;var h=document.getElementsByTagName("head")[0];if(h){var a=h.getElementsByTagName("script");var d=h.getElementsByTagName("link");var g=false;for(var f=0;f<a.length;f++){var c=a[f];if(c.src.indexOf("common.js")>0){g=true;break}}if(g==false){var e=document.createElement("script");e.type="text/javascript";e.src=this.RootUrl+"js/methods/common.js";h.appendChild(e)}}this.param=GetParam("param")}Activation.prototype.Activate=function(){if(document.getElementById(this.divID)){divLoading=document.createElement("div");divLoading.className="ImageLoading";document.getElementById(this.divID).appendChild(divLoading);span=document.createElement("span");span.appendChild(document.createTextNode("Activation en cours ! Veuillez patienter quelques instants !"));document.getElementById(this.divID).appendChild(span)}activationTmp=this;ActivateUser(activationTmp)};ActivateUser=function(a){params=a.param;new Ajax.Request(a.RootUrl+"Filigranaute/activate.ashx",{method:"POST",onSuccess:function(b){OnActivateUserSucceed(b,a)},onFailure:function(b){OnActivateUserFailed(b,a)},postBody:params})};OnActivateUserSucceed=function(e,c){if(document.getElementById(c.divID).hasChildNodes()){while(document.getElementById(c.divID).childNodes.length>=1){document.getElementById(c.divID).removeChild(document.getElementById(c.divID).firstChild)}}if(e.responseText){nom_var=GetCookie("MediaLogID");var d=e.responseText;var a=d.indexOf("MediaLog=");var b=d.indexOf("&ID");d=d.substr(a+9,b-9);duree=10;date_expire=new Date();date_expire.setMinutes(date_expire.getMinutes()+10);if(c.DebugMode==false){SetCookie("MediaLogID",d,date_expire,null,"filigranes.be",null,false)}else{SetCookie("MediaLogID",d,date_expire)}}window.location=c.ReturnUrl};OnActivateUserFailed=function(b,a){if(document.getElementById(a.divID).hasChildNodes()){while(document.getElementById(a.divID).childNodes.length>=1){document.getElementById(a.divID).removeChild(document.getElementById(a.divID).firstChild)}}if(b.responseText){document.getElementById(a.divID).appendChild(document.createTextNode(b.responseText))}else{document.getElementById(a.divID).appendChild(document.createTextNode("Une erreur est survenue"))}};