How to display a message while Ajax is running?

I need to give the operator a warning while Ajax is running. It happens that otherwise, the operator does not know if he pressed the button that Ajax executes well and press it again and again. I need a change of state of the button to be displayed. I send my code for someone to help me.
Thank you very much


  NSB.ShowProgress("Aguarde, enviando imagen...")

  req = Ajax("http://"+ccServidor+"/ScanDocManager/upload_imagen4.php", "POST", "file=" + fileName + "&content=" + fileContent + "&usu=" + cod_usu, Enviar_Imagen )

End Function

Function Enviar_Imagen()

NSB.ShowProgress(False)

If req.readyState <> 4 Then Exit Function 'ignore progress reports
If req.status = 200 Then 'success
  TextResponse.value=req.responseText
Else 'failure
  msg = "Error: Status = " & req2.status
  If TypeName(req.statusText)="string" Then msg = msg & " " & req.statusText
  If TypeName(req.err)="string" Then msg = msg & " " & req.error
  TextResponse.value=msg
End If

End Function