// ******************* FREEPAGES / HOMEPAGES BOTTOM BANNER PLACEMENT SCRIPT *******************//
// For use on Rootsweb FreePages/HomePages Servers.  Change 'userContentFP' to 'userContentHP' //
// for use on HomePages Servers. Works for pages using Absolute Positioning by loading the     //
// page, measuring the browser window height and scrolling back up from 5 Mega pixels below    //
// the window until it finds the bottom of the page. Adds the height and depth and writes a    //
// height value to the userContent div. Cross Browser compatible - see below.                  //
//      ###### To Use - Place this script in the <head> section of your page.    #####         //
// Use only <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> at top of page.    //
// ****************************** Compiled by G.B.CARLSON - 2008 ******************************//

function getScrollDepth() {

var winDraft = 0;
var adjustFP = 38; //banner adjustment

   window.scrollTo(0,5000000);

if(typeof self.pageYOffset!='undefined') //W3C compliant browsers
   winDraft = self.pageYOffset;

if (window.innerHeight)  // W3C compliant browsers - FireFox, Opera, Safari(win), Netscape
   winHeight = window.innerHeight-adjustFP;
else
if(document.body && typeof(document.body.scrollTop)!='undefined') //IE 5.01 to 7 & clones
   winDraft=document.body.scrollTop;

if (document.body)  //Internet Explorer 5.01 to 7 & clones
   winHeight = document.body.clientHeight-adjustFP;

   window.scrollTo(0,0);

   return (winHeight + winDraft);
}
window.onload = function() {
document.getElementById('userContentFP').style.height = (getScrollDepth() + 20)
}
