
function verticalAlign() {

	boxObj = document.getElementById(centeredBox);
	
	if (self.innerHeight){ // all except Explorer
		bodyHeight = self.innerHeight;
		boxHeight = boxObj.offsetHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight){ // Explorer 6 Strict Mode
		bodyHeight = document.documentElement.offsetHeight;
		boxHeight = boxObj.clientHeight;
	}
	else if (document.body){ // other Explorers
		bodyHeight = document.body.clientHeight;
		boxHeight = boxObj.clientHeight;
	}

	m = Math.round((bodyHeight - boxHeight) * 0.5);
	
	if(m > 0){
		boxObj.style.marginTop = m + "px";
	} else {
		boxObj.style.marginTop = 0 + "px";
	}
	
	return true;
}
window.onload = verticalAlign;
window.onresize = verticalAlign;
