DELTASPIKE-289 windowId detection code with JavaScript and intermediate page

partly ported over from MyFaces CODI, partly rewritten.
Passing the windowId via hidden input field