function nobotan() {
  var elements = this.elements;
  for (var i = 0; i < elements.length; i++) {
    var e = elements[i];
    if (e.type == 'submit') {
      e.disabled = true;
      setTimeout(function() {
        e.disabled = false;
      }, 1000);
    }
  }
}
window.onload = function() {
  for (var i = 0; i < document.forms.length; ++i) {
    document.forms[i].onsubmit = nobotan;
  }
}
