function registUser()
{
    
    var name = $('#nombre').val();      var apell = $('#apellido').val();
    var ali1 = $('#alias_1').val();    var ali2 = $('#alias_2').val();
    var dmn = $('#dominio').val();      var tpsr = $('#tip_user').val();
    var stts = $('#estatus').val();     var pass = $('#password').val();
    
    var chmz = document.getElementById("chMZ").checked;
    var chlz = document.getElementById("chLZ").checked; 
    var chvz = document.getElementById("chVZ").checked;
    var chmx = document.getElementById("chMX").checked;
    var lgr = $('#lugar').val();

    var usuario = ali1 + "." + ali2;
    var email = usuario + dmn;

    $.ajaxSetup({
        headers: {
          'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        }
    });

    $.ajax({
        type: 'GET',
        url: 'RegUser',
        data: {
            'name': name, 'lgr': lgr, 'apellido':apell, 'dmn':dmn, 'tpsr':tpsr, 'stts':stts, 'pass':pass, 'chmz':chmz, 'chlz':chlz, 'chvz':chvz, 'chmx':chmx, 'usuario':usuario, 'email':email,
        },
        success:function(result){
                $('#result').html(result);
        },error:function (xhr, ajaxOptions, thrownError){
            if(xhr.status==404) {
                alert(thrownError);
            }
        }
    });

}