
/**
 * Override vrt_setClientHeight (VerticalRolloverTabs component)
 * 
 * In all non-IE browsers, vrt_setClientHeight copies visible tab's contents
 * to a DIV set to visibility: hidden.  This duplicates all child IDs,
 * breaking all JS dependent on those IDs.  This override fixes that,
 * while preserving the desired functionality.
 */
if (typeof vrt_setClientHeight == 'function') {
	function vrt_setClientHeight(contentDiv, parentDiv) {
		/* sanity checks */
		if (!contentDiv || !parentDiv || typeof vrt_getDefaultHeight != 'function' || typeof vrt_getChildNodes != 'function') {
			return false; 
		}
		/* okay, proceed */
		if (typeof document.documentElement.clientHeight == 'number') {
			/* DOM-compliant browser */
		    var tabContentHeight = contentDiv.clientHeight;
		    var defaultHeight= vrt_getDefaultHeight(parentDiv);
			if (tabContentHeight > defaultHeight) {
				parentDiv.style.height = tabContentHeight + 40 + "px";
			} else if (tabContentHeight < defaultHeight) {
				parentDiv.style.height = defaultHeight + "px";
			}
		} else {
			/* Netscape 6 or earlier, or other non-DOM-compliant browser...whatever that could be */
			var hiddenDiv = vrt_getChildNodes(parentDiv);
			hiddenDiv[0].innerHTML = contentDiv.innerHTML;
			hiddenDiv[0].className= parentDiv.className.split("_parent")[0] + "_hidden";
		}
	}
} /* close function */

