
function enviar_form() {
  if(unclick(10000)){
    subWinNew('/cpan/lucomailer_10/formulario_wait.html', 'popup_form', 590, 360, 10, 10);
    window.setTimeout("submitForm()",1000);
  }
};

var enabled = true;

function submitForm() {
  var formObj = document.forms['formulario'];
  formObj.submit();
}


function subWinNew(loc, nom, ancho, alto, posx, posy) {
  var options="toolbar=0,status=0,menubar=0,scrollbars=yes,resizable=0,location=0,directories=0,width=" + ancho + ",height=" + alto;

  win = window.open(loc, nom, options);
  win.focus();
  win.moveTo(posx, posy);
};


  function unclick(tdis){
    var sended = readCookie('opinion_oirs');
    if(sended == 'yes'){
      alert('Usted ya ha enviado este formulario exitosamente.');
      return false;
    }else{
      if (enabled) {
        enabled = false;
        setTimeout('enabled = true;',tdis);
        return true;
      }else{
        return false;
      };
    };
};

