Help.

Hi all,

I wrote some javascript function to simulate window functionality( moveable,
resizeable, ...) using DIV tags .... The problem is each time I refresh the
page using these windows IE uses more and more memory.

I seems that object instanciated by "new" operator are not freed by IE each
time the page is refreshed.

Below is an example to show this problem. Could you please help me to solve
this memory comsumption please.

Thank you


<html>
<head>
</head>

<body onload="setTimeout('window.location.reload()', 1000);" bgcolor="#FFFFFF">
<script language="JavaScript1.2">

BEWindow.nCount = 0
//************************************************************************
//
// The BEWindow function
//
//*************************************************************************
function BEWindow(nLeft, nTop, nWidth, nHeight)
{
BEWindow.nCount++;
this.szWindowName = "BEWindow" + BEWindow.nCount;
this.nLeft = nLeft;
this.nTop = nTop;
this.nWidth = nWidth;
this.nHeight = nHeight;

this.CreateWindow = BEWindow_CreateWindow;
}

//*************************************************************************
//
// Window Object
//
//*************************************************************************
function BEWindow_CreateWindow()
{
var szHtmlSource = "<div id='" + this.szWindowName + "' style=\"" + "left:"
+ this.nLeft + "px; top:" + this.nTop + "px; width:" + this.nWidth + "px;
nHeight:" + this.nHeight + "px; position:absolute; border:solid; background:'#FFAA00'"
+ "\">" + this.szWindowName + "</div>";
document.write(szHtmlSource);
}


Win1 = new BEWindow(200, 10, 300, 100);
Win1.CreateWindow();

Win2 = new BEWindow(200, 200, 300, 100);
Win2.CreateWindow();

Win3 = new BEWindow(200, 400, 300, 100);
Win3.CreateWindow();

Win4 = new BEWindow(200, 600, 300, 100);
Win4.CreateWindow();

Win5 = new BEWindow(510, 10, 300, 100);
Win5.CreateWindow();

Win6 = new BEWindow(510, 200, 300, 100);
Win6.CreateWindow();

Win7 = new BEWindow(510, 400, 300, 100);
Win7.CreateWindow();

Win8 = new BEWindow(510, 600, 300, 100);
Win8.CreateWindow();

</script>

</body>
</html>