﻿/* 02/02/2009 18.30
*/
window.addEvent("domready",function(){
	$('manda').setProperty('disabled', 'true');
            var fx=new Fx.Style($("console-container-plugin-capctha"), "background-color", {duration:2000});
            $("password3").addEvent("change",function(){
            	$('manda').setProperty('disabled', 'true');
            if ( $('password3').value.length > 0 ){
              
              $("console-container-plugin-capctha").empty().addClass("ajax-loading");
                var url="index.php?option=com_auser&amp;task=chkCaptcha&amp;format=raw&amp;password3="+this.getValue();
                var a=new Ajax(url,{
                    method:"get",
                    onComplete: function(response){
                        var resp=Json.evaluate(response);
                        $("console-container-plugin-capctha").removeClass("ajax-loading").setHTML(resp.html);
                        if (resp.msg==='false'){
                         $("password3").value='';
                         $("password3").focus();
                           $('manda').setProperty('disabled', 'true');
                        }else{
                        	$('manda').removeProperty('disabled'); 
                        }
                        $("console-container-plugin-capctha").setHTML(resp.html);
                        	
              
                    }
                }).request();
              } //la if  
            });
        });
