/*############################################################################# FILE: balanceHeight.js Copyright © 2005 Navitaire Inc. All rights reserved. This source code is (i) proprietary to and a trade secret of Navitaire Inc. and (ii) protected by copyright law and international treaties. Unauthorized disclosure, reproduction, distribution or alteration of this source code, or any portion of it, may result in severe civil and criminal penalties and will be prosecuted to the maximum extent possible under the law. www.navitaire.com DESCRIPTION: Contains balanceHeight javascript. #############################################################################*/ // balanceHeight // // idLeft: the id of the left content div // idRight: the id of the right content div // idContainer: the id of the containing div // // This function will set the height of the // container div to the height of the left // div if it is greater than the right div. // // This allows both the left and right divs // to remain dynamic (no absolute height set), // while fixing the CSS bug that causes the footer // to not float beneath the left content if // it is longer than the right. // function balanceHeight(idContainer, idLeft, idRight) { if (document.getElementById) { // var Left = document.getElementById(idLeft); // var Right = document.getElementById(idRight); if (Left == undefined && Right == undefined) { return; } var Left = 530; var Right = 530; hLeft = Left == undefined ? 0 : Left.clientHeight; hRight = Right == undefined ? 0 : Right.clientHeight; if (hLeft > hRight) { document.getElementById(idContainer).style.height = hLeft + "px"; } else if( document.getElementById(idContainer).style.height == ( hLeft + "px" ) ) { document.getElementById(idContainer).style.height = hRight + "px"; } } }