  var ThisWindowWidth = 0, ThisWindowHeight = 0, ThisDocumentHeight = 0, ThisDocumentWidth;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    ThisWindowWidth = window.innerWidth;
    ThisWindowHeight = window.innerHeight;
    ThisDocumentHeight = window.innerHeight;
    ThisDocumentWidth = window.innerWidth;
  } else {
    if( document.documentElement &&
        ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
      //IE 6+ in 'standards compliant mode'
      ThisWindowWidth = document.documentElement.clientWidth;
      ThisWindowHeight = document.documentElement.clientHeight;
    } else {
      if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        ThisWindowWidth = document.body.clientWidth;
        ThisWindowHeight = document.body.clientHeight;
      }
    }
    ThisDocumentWidth = ThisWindowWidth;
    ThisDocumentHeight = ThisWindowHeight;
  }
  if (document.getElementById) {
	if (parseInt(document.getElementById('bottomelement')) > 0) {
		if (ThisWindowHeight < parseInt(document.getElementById('bottomelement').style.top)) {
			ThisDocumentHeight = parseInt(document.getElementById('bottomelement').style.top);
		}
	}
  }

