function addFeedback() {

// document.getElementById('Add').disabled=true;
//    document.getElementById('Add').value="Uploading, please wait...";
//    document.getElementById('edit-attachment_file').disabled=true;
//    document.getElementById('Submit').disabled=true;

}

function resetAddFeedback() {
//    document.getElementById('Add').disabled=false;
//    document.getElementById('Add').value="Add";
//    document.getElementById('Submit').disabled=false;

}


// custom validation for file uploads via submission as the feedback stuff needs to be reset

//e : onSubmit event
function filedeliveryValidation(e) {


  // Kill if we're in the midst of a file upload.
  // We test for a given line in the iframehandler function
  // set by function redirectFormButton() in drupal.js.
  
  if (window.iframeHandler) {
    var func = window.iframeHandler.toString();
    if(func.indexOf('button.form.action = action') > 0) {

      return;
    }
  }
  /** 
   * This is an alternate approach, but hard-coded to the 
   * 'fileop' id, so dropped in favour of the above.
   */
  if (document.getElementById('fileop') && (document.getElementById('fileop').onclick != null)) {

    return;
  }

  if(wf.formValidation(e)) {	// call the default error management.
    // basic wForms Validation Ok... can do other stuff here
    // if validation not ok, use return wf.utilities.XBrowserPreventEventDefault(e);
    return true;
  } else {
    resetAddFeedback();
    return wf.utilities.XBrowserPreventEventDefault(e);  // will prevent the form from being submitted.
  }
}

