﻿/*
=============================================================================
DESCRIPTION
Script to manage the sizing and location of the page footer.
It also ensures the page background fits the browser window.

Note: The usage of the iframe has been removed but the footer
still requires positioning.

HISTORY
Version    Date        By                    Modification
2009.1.0   2009-08-07  John Blair            Created
=============================================================================
*/

function resizeFooter() {
/*
//	=============================================================================
//	DESCRIPTION
//	Resize the footer for IE and Firefox.
//  Note: This method is being called from content html files and
//        should not be renamed.
//  This function is no longer used, but leave empty for backwards compatibility.
//	PARAMETERS
//
//	RETURN VALUE
//
//	HISTORY
//	Version    Date        By               Modification
//  2009.1.0   2009-08-07  John Blair       Created
//  2009.1.1   2009-09-30  John Blair       Handle being called before page loaded
//                                          to accommodate spry widgets.
//	=============================================================================
*/  
 
}


function debugPage() {
  var w = window.open("", "", "", "");
  w.document.open();
  
  var browserWindowHeight = typeof window.innerHeight != 'undefined' ? window.innerHeight : document.documentElement.clientHeight;
  w.document.write("<br/>+ browserWindow.Height:" + browserWindowHeight);

  var jqueryBrowserWindowHeight = $(window).height();
  w.document.write("<br/>+ jqueryBrowserWindowHeight:" + jqueryBrowserWindowHeight);
  
  var divBodyHeight = document.getElementById("body").offsetHeight;
  w.document.write("<br/> + divBodyHeight:" + divBodyHeight);
  
  var jquerydivBodyHeight = $("#body").height();
  w.document.write("<br/> + jquerydivBodyHeight:" + jquerydivBodyHeight);


  var divFooterHeight = document.getElementById("footer").offsetHeight;
  w.document.write("<br/> +divFooterHeight:" + divFooterHeight);
  w.document.write("<br/> + jquery divFooterHeight:" + $("#footer").height() );

  
  //Internal Body Parts
  w.document.write("<br/>   divPageHeader.Height:" + document.getElementById("divPageHeader").offsetHeight);
  w.document.write("<br/>   divPageHeaderSubMenu.Height:" + document.getElementById("divPageHeaderSubMenu").offsetHeight);
  w.document.write("<br/>   divBodyContent.Height:" + document.getElementById("divBodyContent").offsetHeight);
  w.document.write("<br/>   divLeftColumn.Height:" + document.getElementById("divLeftColumn").offsetHeight);
  w.document.write("<br/>   divMiddleColumn.Height:" + document.getElementById("divMiddleColumn").offsetHeight);
  
  w.document.write("<br/>divFooterClassName:" + document.getElementById("footer").className);

  if (browserWindowHeight < divBodyHeight + divFooterHeight) {
    w.document.write("<br/>browserWindowHeight < divBodyHeight + divFooterHeight so expect footerInline class");
  }
  else {
    w.document.write("<br/>browserWindowHeight >= divBodyHeight + divFooterHeight so expect footer class ");
  }
  w.document.close();
}



