Rad, may a suggest this slightly modified version of your CreateWindow script. It disposes of all DHTML and retains attributes across F5 refreshes.

code:
Function IECreateWindow($title,$left,$top,$width,$height, optional $html)
$ie = createobject("internetexplorer.application")
$ie.addressbar = 0
$ie.menubar = 0
$ie.toolbar = 0
$ie.statusbar = 0
$ie.top = $top
$ie.left = $left
$ie.width = $width
$ie.height = $height
$ie.navigate("about:blank")
while $ie.busy and $ie.readystate <> 4 and @error = 0 loop
if $html
$ie.document.write('$html')
else
$ie.document.write('<html><head><title>$title</title>
</head><body scroll=no bgcolor="threedface" border="1px solid #cccccc">')
endif
$IECreateWindow = $ie
$ie.Visible = 1
while setfocus("$title") <> 0 loop
EndFunction