// modified version of Rails' confirm before deletion
function confirmBeforePost() {
  if (confirm("Are you sure?")) { 
    var f = document.createElement('form'); 
    this.parentNode.appendChild(f);
    f.method = "POST";
    f.action = this.href;
    f.submit();
  };
  return false;
}
