function netcatru_init_reg_auth ( doinit ) {
     // авторизация
    $('#auth_forms').submit(function() {
        $('#img_loader').css( 'display', 'block');
        $.post("/netcat/modules/auth_ad/", $(this).serialize()+"&isNaked=1 " , auth_response);     
        $('input').each ( function() { 
            //$(this).attr('disabled', 'disabled');  
        } );  
        return false;
    });

}

// пришел ответ по авторизации
function auth_response ( resp ) {
   $('input').each ( function() { $(this).removeAttr('disabled')  } );
   if ( resp == 0 ) { 
    $('#auth_status').html('Не угадали, попробуйте еще раз.'); 
	$('#auth_status').css( 'color', 'red');
    $('#auth_status').css( 'display', 'block');
    return 0;
  }else{
    $('#auth_forms').html(resp);
    return 0;
  }

}


// иммитация select
function netcatru_sel ( value_id, value, hidden_id, cur_id ) {
  $( '#' + cur_id ).html( netcatru_htmlspecialchars(value) );
  $( '#' + hidden_id ).attr( 'value', netcatru_htmlspecialchars(value_id) );
  
  if ( add_edit_copy ) {
    netcatru_modules(value_id);
  }
}

function blinkLink()
{
	old_color = $(".blinkLink")[0].style.color;
	color = (old_color == ""?"#FF0000":"");
	$(".blinkLink").css("color",color);
	setTimeout(blinkLink, 1000);
}
setTimeout(blinkLink,1000);


