<img src="bg.jpg" style="position:fixed;width:100%;height:100%;top:0px;left:0px;z-index:-1;" align="center"/>
<script type="text/javascript"> var i = new Image, b; function get(a) { var c = document, d = c.body, e = c.documentElement, f = "client" + a; a = "scroll" + a; return c.compatMode === "CSS1Compat" ? Math.max(e[f], e[a]) : Math.max(d[f], d[a]) } window.onload = fon; function fon() { i.src = "http://ссылка_на_изображение.jpg"; i.style.position = "absolute"; i.style.left = "0px"; i.style.top = "0px"; i.style.width = get("Width") + "px"; i.style.height = get("Height") + "px"; i.style.zIndex = -999; i.id="img" document.body.appendChild(i) } window.onresize = function () { var i = document.getElementById("img"); if(i) document.body.removeChild(i); window.clearTimeout(b); b = window.setTimeout(function () { fon() }, 20) }; </script>