// JavaScript Document
//var winSize;
function correctDivHeight(intBlock, extBlock)
{
var ext = document.getElementById(extBlock);
var intr = document.getElementById(intBlock);
if(ext==null || intr==null) return;
var extBottom = ext.offsetTop + ext.offsetHeight;
intr.style.height = -10 +(extBottom - intr.offsetTop) + "px";

// relative position: getAbsY(document.getElementById('TheId'))

}


// <div id="content">...</div>
// <div id="footer">...</div>
function setFooter(contentId, footerId) 
{
	if (document.getElementById) //check for new browsers
	{
		var windowHeight=getWindowHeight() -17; //.Height;
		if (windowHeight>0) 
		{
			var contentHeight= document.getElementById(contentId).offsetHeight;
			var footerElement= document.getElementById(footerId);
			var footerHeight=footerElement.offsetHeight;
			if (windowHeight-(contentHeight+footerHeight)>=0) 
			{
							footerElement.style.position='relative';
							footerElement.style.top=(windowHeight-(contentHeight+footerHeight))+'px';
			}
			else {     footerElement.style.position='static';}
		}
	}
}
function getWindowHeight() 
{
  var myWidth = 0, myHeight = 0; 
  if( typeof( window.innerWidth ) == 'number' ) 
  {//Non-IE    
    myHeight = window.innerHeight; myWidth = window.innerWidth;
  } 
  else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
  {//IE 6+ in 'standards compliant mode'    
    myHeight = document.documentElement.clientHeight; myWidth = document.documentElement.clientWidth;
  } 
  else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
  {//IE 4 compatible   
    myHeight = document.body.clientHeight; myWidth = document.body.clientWidth;
  }
  //window.alert( 'Width = ' + myWidth );
 // window.alert( 'Height = ' + myHeight );
 // winSize.Height = myHeight; winSize.Width = myWidth; return winSize;
 return myHeight;
}

