//function getRealStyle(id,styleName) {
//var element = document.getElementById(id);
//var realStyle = null;
//if (element.currentStyle)
// realStyle = element.currentStyle[styleName];
//else if (window.getComputedStyle)
// realStyle = window.getComputedStyle(element,null)[styleName];
//return realStyle;
//}

<!-- gives viewport dimension according tu user screen -->

// THIS FUNCTION RESIZES
// THE VIEWPORT SO THAT
// THE FULLPAGE IS USED,
// AND THE CONTENT IS SCROLLABLE
// WITH HEADER FOOTERS DISPLAYED AT ALL TIME

function sizeContent(id,styleName,myObj,offSet,breed) {

//var element = document.getElementById(id);
//var realStyle = null;
//if (element.currentStyle)
 realStyle = document.getElementById(id).offsetHeight;
//else if (window.getComputedStyle)
// realStyle = window.getComputedStyle(element,null)[styleName];
 myObject = document.getElementById(myObj);
// alert(realStyle);


// THIS BIT DETECTS THE AVAILABLE SCREEN SPACE
// IT ORIGINATES FROM http://www.quirksmode.org/viewport/compatibility.html

var x,y;
if (self.innerHeight) // all except Explorer
{
	x = self.innerWidth;
	y = self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight)
	// Explorer 6 Strict Mode
{
	x = document.documentElement.clientWidth;
	y = document.documentElement.clientHeight;
}
else if (document.body) // other Explorers
{
	x = document.body.clientWidth;
	y = document.body.clientHeight;
}
// THIS IS THE ACTUAL RESIZING OF THE VIEWPORT
viewportHeight = y - offSet - realStyle;
//alert(viewportHeight);
myObject.style.height = viewportHeight + "px";
return 'resized';
}



<!-- gives viewport dimension according tu user screen -->

// THIS FUNCTION RESIZES
// THE VIEWPORT SO THAT
// THE FULLPAGE IS USED,
// AND THE CONTENT IS SCROLLABLE
// WITH HEADER FOOTERS DISPLAYED AT ALL TIME

function sizeViewport(myObj,mySize) {
myObject = document.getElementById(myObj);

// THIS BIT DETECTS THE AVAILABLE SCREEN SPACE
// IT ORIGINATES FROM http://www.quirksmode.org/viewport/compatibility.html

var x,y;
if (self.innerHeight) // all except Explorer
{
	x = self.innerWidth;
	y = self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight)
	// Explorer 6 Strict Mode
{
	x = document.documentElement.clientWidth;
	y = document.documentElement.clientHeight;
}
else if (document.body) // other Explorers
{
	x = document.body.clientWidth;
	y = document.body.clientHeight;
}
// THIS IS THE ACTUAL RESIZING OF THE VIEWPORT
viewportHeight = y - mySize;
//alert(viewportHeight);
myObject.style.height = viewportHeight + "px";
return 'resized';
}