Zolaerla
This is a flaw or bug in IE7. I have run across the same problem, and spent three hours nailing it down. Here it is as far as I can tell:
IE7 improperly fires off a 'Browser Resized' event when the first dynamically generated content region is made visible. What I mean by 'the first', is the first one that appears throws this event. I say 'dynamically generated content REGION', because it doesn't happen to inline content, only content generated by javascript. To make things worse, I haven't been able to make a simplified test case for this so I don't know if my explanation is 100% accurate, but I *HAVE* found a work around.
Work Around: In my case, I do everything through an onload event. In the onload event, BEFORE everything else, I simply created a new floating content region with nothing in it. It looks like:
newobject = document.createElement('DIV');
if (newobject) {
newobject.id = 'blankregion';
newobject.style.position = 'absolute';
newobject.style.visibility = 'visible';
newobject.style.display = 'block';
newobject.innerHTML = ' ';
document.body.appendChild(newobject);
}
This simply creates a blank floating out there on your page, BUT it seems to prevent the onresize events from being fired off over and over. It worked for me, I hope it helps you guys out too.