function adjustLayout()
{
    var h = 215;
    var f = 60;
    
    var ch = xClientHeight();
    var m = Math.max(xHeight("railLeft"), Math.max(xHeight("content"), Math.max(xHeight("contentFull"), xHeight("rail"))));
    var lb = xHeight("loginBar");
    var th = h + m + lb;
    
    if ((th + f) <= ch)
        xTop("footerBar", ch - f);
    else
        xTop("footerBar", th + f);
        
    xShow("footerBar");
}

window.onload = function()
{
	adjustLayout();
	xAddEventListener(window, "resize", adjustLayout, false);
}