
//ÎÁÍÎÂËÅÍÈÅ ÊÀÏ×È
function f(){
alert(1)
}
$(document).ready(function(){

function ajaxCaptcha(){
 $.ajax({
  type: "POST",
  url: "modules/capcha/update.php",
  data: "w=100",
  ajaxStart:function(){alert(1)},
  success: function(html){
  $("#captcha").html(html);
}
 })

}

function updateCaptcha(loadScreen){
   $("#captcha").fadeOut('slow');
   setTimeout("ajaxCaptcha()",500);
   $("#captcha").fadeIn('slow');
}


// bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });





function checkpass(pass){

var strength=0;
if(pass.search(/[a-z]+/)!=-1)
  strength++;
if(pass.search(/[A-Z]+/)!=-1)
  strength++;
if(pass.search(/[0-9]+/)!=-1)
  strength++;
if(pass.length>10)
  strength++;


switch(strength){

                 case 1:
                           width='25%';
                           background='red';
                           notice='25/100';
                 break;
                       case 2:
                           width='50%';
                           background='yellow';
                           notice='50/100';
                 break;
                       case 3:
                           width='75%';
                           background='blue';
                           notice='75/100';
                 break;
                 case 4:
                           width='100%';
                           background='green';
                           notice='100';
                 break;

}


$('#checkpass_cont').html('<div style="height:20px; width:'+width+'; margin:0; background:'+background+'"></div>');
$('#status').animate({
    width: width,
  }, 1200 );
$('#status').css({"background-color":background});


$('#ind').html(notice);
}

function validateLogin(login){
//alert(login);
  $.post("./modules/register/register.module.php",{check_login:login},function(result){
  //alert(result);
  if(result=='isset'){
      $('#check').html('<span style="color:red">Ëîã³í âæå çàéíÿòèé</span>');
      $('#check').addClass('error');
   }
   else{
      $('#check').html('<span style="color:#228B22">Ëîã³í â³ëüíèé</span>');
      $('#check').addClass('error');
   }
});

}








});




