	function resetHeight( obj ) { 
		if ( ( typeof obj == 'object' ) && ( obj.style.height != 0 ) ) {
			
			var pageHeight = document.documentElement.clientHeight;
			if ( pageHeight == 0 ) { pageHeight = window.innerHeight; }
			if ( pageHeight == 0 ) { pageHeight = document.body.clientHeight; }
			if ( obj.style.height < pageHeight ) {
				obj.style.height = pageHeight; 
			}
			
		}
	}

	function addLoadEvent( func ) {
	  var oldonload = window.onload;
	  if( typeof window.onload != 'function' ) {
		window.onload = func;
	  } else {
		window.onload = function() {
		  if (oldonload) {
			oldonload();
		  }
		  func();
		}
	  }
	  var oldonresize = window.onresize;
	  if( typeof window.onresize != 'function' ) {
		window.onresize = func;
	  } else {
		window.onresize = function() {
		  if (oldonresize) {
			oldonresize();
		  }
		  func();
		}
	  }
	}
	
	addLoadEvent( function() {
		resetHeight( document.getElementById('site') );
	});
