// Set height to size of window
function MaxHeight(element) {
	if(window.navigator.userAgent.indexOf("MSIE 7.0") > -1)
		windowHeight = document.documentElement.clientHeight;
	else if(browser == 'ie')
		windowHeight = document.body.clientHeight;
	else 
	   	windowHeight = window.innerHeight;	
	if(element.offsetHeight < windowHeight)
		element.style.height = windowHeight + 'px';
}


// Corrects site center in IE
if(browser == 'ie') {
	window.onload = function() {
		CenterIE();
	}
	window.onresize = function() {
		CenterIE();
	}
}

function CenterIE() {
	if((document.body.clientWidth)%2)
		document.getElementById('site').style.marginLeft = '1px';
}


// Centers absolute positioned object
function Center(element) {
	elem = document.getElementById(element);
	if (browser == 'ie') {
		windowWidth = document.body.clientWidth;
	}
	else {
	   	windowWidth = window.innerWidth;	
	}
	elem.style.left = (windowWidth/2 - elem.offsetWidth/2) + 'px';
}



