window.size = function()
{
	var w = 0;
	var h = 0;

	//IE
	if(!window.innerWidth)
	{
		//strict mode
		if(!(document.documentElement.clientWidth == 0))
		{
			w = document.documentElement.clientWidth;
			h = document.documentElement.clientHeight;
		}
		//quirks mode
		else
		{
			w = document.body.clientWidth;
			h = document.body.clientHeight;
		}
	}
	//w3c
	else
	{
		w = window.innerWidth;
		h = window.innerHeight;
	}
	return {width:w,height:h};
}

function getStyleValue(el,styleProp)
{
	var x = document.getElementById(el);
	var y = null;
	
	if (null != x.currentStyle)
	{
	    styleProp = styleProp.replace(/\-(\w)/g, function (strMatch, p1) {
			                return p1.toUpperCase(); });

	    y = x.currentStyle[styleProp];
    }
	else if (window.getComputedStyle)
	{
	    y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
    }
		
	return y;
}
function setsize( )
{
   var size = window.size();
   var object = document.getElementById( 'content' );
   
   var objHeight = object.scrollHeight;
   
   var headersize = parseInt(getStyleValue('header',"height"));
   var footersize = parseInt(getStyleValue('footer',"height"));
   
   if( objHeight < size.height - headersize - footersize - 18 )
   {
        object.style.height = ( size.height - headersize - footersize - 18 )+ "px";
   }



}

