This code is to be added to a "coordinates" element in the digitizer. There still are numerous bugs, but this code proves that something along those lines can be done
Since a (probably older) version of the proj4js library is automatically delivered and loaded with MapBender, one can directrly make use of it.
The window element is used to carry the content of variables from one event to another.