@FangJan 16.2006 — #<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <title>stretch background image</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript"> // <a href="http://www.quirksmode.org/viewport/compatibility.html">http://www.quirksmode.org/viewport/compatibility.html</a> function documentSize() { var x,y; var test1 = document.body.scrollHeight; var test2 = document.body.offsetHeight if (test1 > test2) // all but Explorer Mac { x = document.body.scrollWidth; y = document.body.scrollHeight; } else // Explorer Mac; //would also work in Explorer 6 Strict, Mozilla and Safari { x = document.body.offsetWidth; y = document.body.offsetHeight; } // resize background document.getElementById('bgImg').style.width=x+'px'; document.getElementById('bgImg').style.height=y+'px'; }