Mose move error with setViewPort function

I have a ‘2U’ layout. There is a tabbar in a cell ‘b’. Now I am opening a dhtmlxwindow from one of tabs.
But that window is modal for that tab page only. I want it to be positioned in center of the screen and to be modal for the full
screen. I could achieve that by using setViewPort function as shown below.
viewportObj that is passed to the setViewpost is the div id which contains layout.

  [i]  dhxWins = new dhtmlXWindows();
    dhxWins.enableAutoViewport(false);
    dhxWins.setViewport(0,0, viewportObj.clientWidth, viewportObj.clientHeight, viewportObj)
popupWin2 = dhxWins.createWindow(id, x, y, width, height);
popupWin2.attachURL(url, false);
popupWin2.setText(text);[/i]

Window opens fine except when I move my mouse over the window I get following error.

Line: 620 in dhtmlxwindow.js
Error: Object required
win.onmousemove = function(e) {
e = e || event;
var targetObj = e.target || e.srcElement; // Line 620
if ((!this._allowResize) || (this._allowResizeGlobal == false)) {
targetObj.style.cursor = “”;
this.canStartResize = false;
this.style.cursor = “”;
return false
}
;

Can you please help me get rid of it?
Please let me know if there is any other way to achieve this.
Note : I don’t want to open the window from the page where layout is declared because of some other problems.

Please attach the complete demo with the problem to the post