
function getWindowHeight() {
    var windowHeight = 0;
    if (typeof(window.innerHeight) == 'number') {
	windowHeight = window.innerHeight;
    }
    else {
	if (document.documentElement && document.documentElement.clientHeight) {
	    windowHeight = document.documentElement.clientHeight + 30;
	}
	else {
	    if (document.body && document.body.clientHeight) {
		windowHeight = document.body.clientHeight + 30;
	    }
	}
    }
    return windowHeight;
}

function get_element(name)
{
    if (document.getElementById)
	return document.getElementById(name);
    else
	return document.all[name];
}
function setContent() {
    if (document.getElementById || document.all) {
	var windowHeight = getWindowHeight();
	if (windowHeight > 0) {
	    var scrolled = get_element('scroll');
	    var bottom   = get_element("bottom");
	    var bottomHeight = 85; // bottom.offsetHeight;
	    scrolled.style.height = windowHeight-bottomHeight +"px";
	    scrolled.style.overflow = "auto";
	    bottom.style.position = "absolute";	    bottom.style.top = windowHeight - bottomHeight+"px";
	    bottom.style.height = "30px";
	    if (scrolled.focus)
		scrolled.focus();
	    if (document.all){
 	        document.all.tags("body")[0].style.overflow = "hidden";
                   }
	    else {
	        document.getElementsByTagName("html")[0].style.overflow = "hidden";
	        document.getElementsByTagName("body")[0].style.overflow = "hidden";
            }
	}
    }
}

is_ns6 = navigator.userAgent.search(/Netscape6/)!=-1;

if (!is_ns6)
   document.write('<!--[if IE]>');
document.write('<script language="JavaScript">');
document.write('window.onload = setContent;\n')
document.write('window.onresize =  setContent;\n')
document.write('window.setTimeout("setContent()",1000);\n');
document.write('</script>');
if (!is_ns6)
   document.write('<![endif]-->');
// window.onload = setContent;
// window.onload = setContent  
