

// funcions per habilitar/deshabilitar botons, cursor hourglass, etc...
  function cursor_wait() {
    document.body.style.cursor = 'wait';
  }
  function cursor_clear() {
    document.body.style.cursor = 'default';
  }
  function canviTexte(elementId,valor) {
    document.getElementById(elementId).value = valor;
  }
  function inhabilitarBoto(elementId) {
    document.getElementById(elementId).disabled = true;
  }
  function habilitarBoto(elementId) {
    document.getElementById(elementId).disabled = false;
  }
  function preSubmit(elementId) {
    canviTexte(elementId,"Procesando petición...");
    inhabilitarBoto(elementId);
    cursor_wait();
  }