Thanks for the response.
It is clear to me that I actually work with cookies, and that I need to "manage the cookies", but what that I want is not to create new cookie, but instead work with the document cookie and just (it seems for me that this is really a "just" - a simple task) create what you called cookies local to the thread to be local to the window.
Can I do this at all ?