Conflicting Javascripts - JS Experts Please

Hi, i’ve got 2 scripts that work perfectly fine independently but when you merge them together Mac IE 5.2.3 does not like. Something about the Toggle Object changing the height of the layout and interacting with the Center Object does not mesh well together for Mac IE 5.2.3. onResize everything is fine so I’m thinking if there is a clever way to utilize the setContent(); function after onClick or something that would probably do the trick. But let me know if you notice anything that stands out. Thanks.


/*--------------------------------------------------
	Center Object
--------------------------------------------------*/
<!--
function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}
function setContent() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentElement = document.getElementById('content');
			//var contentHeight = contentElement.offsetHeight;
			var contentHeight =
				document.getElementById('header').offsetHeight +
				document.getElementById('info').offsetHeight +
				document.getElementById('footer').offsetHeight; 
			if (windowHeight - contentHeight > 0) {
				contentElement.style.position = 'relative';
				contentElement.style.top = ((windowHeight / 2) - (contentHeight / 2)) + 'px';
			
			//rules for IE Mac
				
			if(navigator.appVersion.indexOf("MSIE") != -1){var IE = true}else{ var IE = false;}
			if(navigator.appVersion.toLowerCase().indexOf("mac") != -1){var Mac = true}else{ var Mac = false;}
			
			if(Mac && IE) {
				//get the height of header
				var headH = document.getElementById('header').offsetHeight;
				//set position of INFO based on that height
				document.getElementById('info').style.position = 'absolute';
				document.getElementById('info').style.top = headH +'px';
			
				//get the height of INFO
				var infoH = document.getElementById('info').offsetHeight;
				//set position of Footer based on that height
				document.getElementById('footer').style.position = 'absolute';
				document.getElementById('footer').style.top = (infoH + headH)  +'px';
			}
			}
			else {
				contentElement.style.position = 'static';
			}
		}
	}
}
/*--------------------------------------------------
	Toggle Object
--------------------------------------------------*/
<!--
init = function () {
	var table = document.getElementsByTagName("table");
	for (var i=0; i<20; i++) {
		var caption = table*.getElementsByTagName("caption");
		caption[0].thead = table*.getElementsByTagName("thead");
		caption[0].tbody = table*.getElementsByTagName("tbody");
		// hide thead and tbody
		caption[0].thead[0].style.display = 'table-header-group';
		caption[0].tbody[0].style.display = 'table-header-group';
		caption[0].onclick = function () {
			this.thead[0].style.display = this.thead[0].style.display == 'none' ? '' : 'none';
			this.tbody[0].style.display = this.tbody[0].style.display == 'none' ? '' : 'none';
			setContent();
		} 
	}
}
window.onload = function() {
	init();
	setContent();
}
window.onresize = function() {
	setContent();
}
//-->