var passwordFlow = null;

FlowInit = function () {
	passwordFlow = new Flow("password", "passwordFlow");
	passwordFlow.flow_form = function (resp) {
		if ($(".js_Captcha").length) {
			if (resp.data.builtin.regcaptcha.captchaAnswered == true) {
				$(".js_Captcha").hide();
			} else {
				var img = $('<img>');
				img.css({'height' : '40px', 'width' : '165px', 'margin-top' : '10px', 'margin-bottom' : '10px'});
				var d = new Date();
				img.attr("src", getCxroot()+"/"+resp.data.builtin.regcaptcha.src+"?"+Date.parse(d));
				img.css('visibility','visible');
				$(".js_Captcha img").replaceWith(img);
			}
		}
	};
};
