Quote Originally Posted by ChrisBro View Post
but it is xara code so have no idea really what it does:
This code simply assigns the topmost div in the exported web page to the JS variable. This is necessary for strict standards following browsers (i.e. Firefox) to access the object from the JS code.
can I remove it or is it needed?
Well, it certainly is needed in the Xtreme generated page. But I really have no idea how this relates to the resulting page you get in such circumstances.
Also I see no reason for this particular code to introduce any problems if inserted correctly and no variable name conflict is possible.

Sorry for I have missed this thread earlier and now I don't quite understand what happens here. But it generally looks bad, or actually wrong.
I know you know that Xtreme generated HTML is not supposed to be used as a snippet of any kind. So it's probably just me assuming that you trying to do so. Do you?