function saythanks(){this.init()}saythanks.prototype.init=function(){if("function"==typeof document.getElementsByClassName)var a=document.getElementsByClassName("thank_you_button_link"),b=document.getElementsByClassName("withdraw_thank_you_button_link");else var a=document.querySelectorAll(".thank_you_button_link"),b=document.querySelectorAll(".withdraw_thank_you_button_link");for(i=0;i<a.length;i++){var c=a[i];c.instanceRef=this,c.onclick=function(){return this.instanceRef.handleThankClick(this),!1}}for(i=0;i<b.length;i++){var c=b[i];c.instanceRef=this,c.onclick=function(){return this.instanceRef.handleThankClick(this),!1}}},saythanks.prototype.handleThankClick=function(a){var b=document.getElementById("thanks_loading").innerHTML,c=a.parentNode;c.className="thank_you_loading",c.innerHTML=b;var d="undefined"!=typeof XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");d.onreadystatechange=function(){var a=this.DONE||4;if(d.readyState==a)if(200==d.status){if(data=JSON.parse(d.responseText),c.className="thank_you_"+data.result,c.innerHTML=data.response,""==data.thanker){var b=document.getElementById("thanker_"+data.id+"_"+data.member);if(1==b.parentElement.getElementsByTagName("a").length)b.parentElement.parentElement.removeChild(b.parentElement);else{var e=b.previousSibling;null!=e&&"thanker_separator"==e.className&&e.parentElement.removeChild(e);var f=b.nextSibling;null!=f&&"thanker_separator"==f.className&&f.parentElement.removeChild(f),b.parentElement.removeChild(b)}}else""!=data.thanker&&(thankerList=document.getElementById("thanker_list_"+data.id),null==thankerList?(thankerList=document.getElementById("thank_you_placeholder_"+data.id).parentElement,null!=thankerList&&(thankerList.innerHTML+=data.list)):thankerList.innerHTML+=data.thanker);null!=data.refresh&&(msgPost=document.getElementById("msg_"+data.id),msgPost.innerHTML=data.refresh),saythanks.prototype.init()}else{var g=document.getElementById("thanks_error").innerHTML;c.className="thank_you_error",c.innerHTML=g}},d.open("GET",a.href+";ajax=1;xml=1",!0),d.setRequestHeader("X-Requested-With","XMLHttpRequest"),d.send(null)};