function valign(obj) {
	var obj = document.getElementById(obj);
	if (obj && obj.parentNode) {
		var objectHeight = parseInt(obj.offsetHeight);
		var parentHeight = parseInt(obj.parentNode.offsetHeight);
		if (parentHeight > objectHeight) {
			obj.style.top = parseInt((parentHeight - objectHeight) / 2) + 'px';
		} else {
			obj.style.top = 0 + 'px';
		}
	}
}
