Description: Defines HTML code for showing a waiting animation and onClick code for insering into buttons. The JavaScript showing function is given out where the PHP function is called.
Parameter:
htmlName: Base name for the defines and naming of the JavaScript function and DIVs.
waitText: Text to show while the animation runs.
width: Width for the animation image or unscaled if not set.