/**
 * @author Abdellah
 */
function abRefreshCaptcha(langId) {
	var captchaInput = $$(".captcha");
	$each($$(".captcha_regenerator"), function(el, i) {
		el.addEvent("click", function(e){
			e.stop();
			new Request.HTML({
				url: el.getParent("form").action,
				data: "captcha_refresh=true",
				onSuccess: function(html){
					$("doCaptcha").set("text", "");
					$("doCaptcha").adopt(html);
					abRefreshCaptcha();
					el.removeClass("working");
				},
				onRequest: function(){
					el.addClass("working");
				}
			}).send();
		});
	})
}
