var createWin = "";</p><p>function CloseWindow()<br /> {<br /> if(document.getElementById('bgDiv')!=null)<br /> {<br /> document.getElementById('bgDiv').parentNode.removeChild(document.getElementById('bgDiv'));<br /> }<br /> }</p><p> function CreateDiv()<br /> {<br /> CloseWindow();<br /> var sWidth,sHeight;<br />// sWidth = document.documentElement.scrollWidth;<br />// sHeight = document.documentElement.scrollTop + ;<br /> sWidth = document.body.scrollLeft + window.screen.Width;<br /> sHeight = window.screen.Height + document.documentElement.scrollTop;<br /> var bgobj = document.createElement("div");<br /> bgobj.setAttribute('id','bgDiv');<br /> bgobj.style.position = "absolute";<br /> bgobj.style.top = "0";<br />// bgobj.style.pixelTop = document.body.scrollTop;<br /> bgobj.style.background = "#666";<br /> bgobj.style.filter = "alpha(opacity = 30)";<br /> bgobj.style.opacity = "0.3";<br /> bgobj.style.left = "0";<br /> bgobj.style.width = sWidth + "px";<br /> bgobj.style.height = sHeight + "px";<br /> bgobj.style.zIndex = "2";<br /> bgobj.style.background = "#91bbff";<br /> document.body.appendChild(bgobj);<br />// window.document.getElementById('bgDiv').parentNode.scroll = "yes"; </p><p> }