function Edit(){
    event.preventDefault(); 
    var frm = document.getElementById('form');
    var data = new FormData(frm);
    var xhttp = new XMLHttpRequest();
    xhttp.onreadystatechange = function () {
        if (this.readyState == 4) {
            var msg = xhttp.responseText;
            if (msg == 'success') {
                $.confirm({
                  title: 'Actualizado',
                  content: 'Con Exito!',
                  theme: 'modern',
                  buttons: {
                      OK: function () {
                          location.href ="listado_mecanico.php";  
                      },
                  }

              });                
            } else {
                $.alert({
                    title: 'Erro al Actualizar!',
                   content: 'Verificar',
                    theme: 'modern'
                });
            }

        }
    };
    xhttp.open("POST", "data/edit_mecanico.php", true);
    xhttp.send(data); 
 };
