function getRealTop(el) {
	yPos = el.offsetTop;
	tempEl = el.offsetParent;
	while (tempEl != null) {
		yPos += tempEl.offsetTop;
		tempEl = tempEl.offsetParent;
	}
	return yPos;
}

function stretch(padding){
   var moz=document.getElementById&&!document.all?1:0
   var content=document.getElementById("content");
   var contentPadding = padding;
   // get browser size
   var windowHeight = moz?window.innerHeight:document.body.offsetHeight;
   // get div size
   var contentTop = parseInt(getRealTop(content));
   var contentNewHeight = windowHeight-contentTop-contentPadding;
   var contentHeight = content.offsetHeight;
   //alert(windowHeight + ";" + contentHeight + ";" + contentTop + ";" + contentNewHeight);
   if(contentHeight<contentNewHeight)
	   content.style.height=contentNewHeight +"px";
 }
 
  function stretchHome(){
 	stretch(0);
 }
 
  function stretchSub(){
 	stretch(31);
 }
