/**
 * Forces browser to correctly re-render an element
 *
 * fix_height() corrects overflow problems occuring when a child of an element
 * is floating (ie. have their CSS `float` property set to something
 * other than 'none') and end up having a calculated height greater than
 * that of the containing element.
 *
 * Date Created: 2005-02-22
 *
 * @author   Peter-Paul Koch (taken from his site, www.quirksmode.org)
 * @author   Sean McCann (modifications to the original code)
 * @version  1.0
 *
 * @param string element_id   The `id` attribute of the element needing to be resized
 *
 * Changelog
 * - 2005-07-27:  Generalized names used in this function (McCann)
 */
function fix_height(element_id)
{
	var container;
	var y_offset;

	container = document.getElementById(element_id);
	container.style.height = 'auto';

	y_offset = container.offsetHeight;
	container.style.height = y_offset + "px";
	return true;
}

/**
 * Gets the scrolling offset for the height of a page
 * @author   Peter-Paul Koch (taken from his site, www.quirksmode.org)
 * @author   Sean McCann (modifications to the original code)
 */
function getPageYOffset()
{
	// pageYOffset is the standard property used to get
	// the scrolling offset for a page's height.  However,
	// IE uses its own properties.

	if (self.pageYOffset) // all except Explorer
	{
		return self.pageYOffset;
	}
	else if (document.documentElement && document.documentElement.scrollTop)
		// Explorer 6 Strict
	{
		return document.documentElement.scrollTop;
	}
	else if (document.body) // all other Explorers
	{
		return document.body.scrollTop;
	}
	else return false;

}


