dt = document.title;	
lastspace = dt.lastIndexOf(" ") + 1;
title=dt.substring(lastspace);
a='<img src="images/';
b= "ttl_" + title;
b= b.toLowerCase();
c='.gif" />';
imgtag= a + b + c ;
window.status=dt;
window.onresize = findWindowDim;
window.onload = start;


function findWindowDim(){
/* offsetHeight = height of body element in ie 6 and mozilla with a doctype declaration */
var footer = document.getElementById('footer');
var lftbrder = document.getElementById('lftbrder');
var rghtbrder = document.getElementById('rghtbrder');
if (window.innerWidth)
{
	theViewPort = window.innerHeight;
	var containerHeight = document.getElementById('container').offsetHeight;
	var content = document.getElementById('content').offsetHeight;
	var contentHeight = content + 296;

		if (contentHeight < theViewPort)
		{
			document.getElementById('container').style.height = theViewPort + "px";
			footer.style.top = theViewPort - 37 + "px";
			lftbrder.style.height = document.getElementById('container').style.height;

			rghtbrder.style.height = document.getElementById('container').style.height;
		}
		else if (contentHeight > theViewPort)
		{
			document.getElementById('container').style.height = contentHeight + 10 + "px";
			footer.style.top = contentHeight - 27 + "px";
			lftbrder.style.height = document.getElementById('container').style.height;
			rghtbrder.style.height = document.getElementById('container').style.height;

		}
}
else if (document.documentElement && document.documentElement.offsetHeight)
{
	theViewPort = document.documentElement.clientHeight;
/*	alert("Height of browser window = " + theViewPort);*/

	var containerHeight = document.getElementById('container').offsetHeight;
/*	alert("Height of container is: = " + containerHeight);*/
	var content = document.getElementById('content').offsetHeight;
	var contentHeight = content + 296;
/*	alert("Height of content from top of browser = " +contentHeight);*/

	if (contentHeight < theViewPort)
	{
		document.getElementById('container').style.height = theViewPort + "px";
		footer.style.top = theViewPort -37 + "px";
		lftbrder.style.height = document.getElementById('container').style.height;
		rghtbrder.style.height = document.getElementById('container').style.height;

	}
	else if (contentHeight > theViewPort)
	{
		document.getElementById('container').style.height = contentHeight + 10 + "px";
		footer.style.top = contentHeight - 27 + "px";
		lftbrder.style.height = document.getElementById('container').style.height;
		rghtbrder.style.height = document.getElementById('container').style.height;

	}
}
else if (document.body)
{
	theViewPort = document.body.clientHeight;
/*	alert("Height of browser window = " + theViewPort);*/
	var containerHeight = document.getElementById('container').offsetHeight;
/*	alert("Height of container is: = " + containerHeight);*/
	var content = document.getElementById('content').offsetHeight;
	var contentHeight = content + 296;
/*	alert("Height of content from top of browser = " +contentHeight);*/

	if (contentHeight < theViewPort)
	{
		document.getElementById('container').style.height = contentHeight + 10 + "px";
		footer.style.top = contentHeight -27 + "px";
		lftbrder.style.height = document.getElementById('container').style.height;
		rghtbrder.style.height = document.getElementById('container').style.height;

	}
	else if (contentHeight > theViewPort)
	{
		document.getElementById('container').style.height = contentHeight + 10 + "px";
		footer.style.top = contentHeight - 27 + "px";
		lftbrder.style.height = document.getElementById('container').style.height;
		rghtbrder.style.height = document.getElementById('container').style.height;

	}
}
}
function mseover(n, m)
{
n.src=m
}
function mseout(n, m)
{
n.src=m
}
function start() {
        // get the reference for the body
var myheader = document.getElementById('header');
var myimage = document.createElement("img");
myimage.setAttribute("src", "images/logo_banner.gif");
myimage.setAttribute("id", "printbanner");

myheader.appendChild(myimage);



findWindowDim();
       
    }






