var closeParentWindow = function ()
{
var currentWin = window;
while (top != currentWin) {
var
prentExt = currentWin.parent.Ext;
var
fElement =
prentExt.get(currentWin.frameElement);
var windowElement =
fElement.up(‘div.x-window‘);
if
(windowElement) {
var winId =
windowElement.id;
var extWin =
prentExt.getCmp(winId);
extWin.close();
return
true;
} else {
currentWin = currentWin.parent;
}
}
return
false;
}