﻿function verticalAlign(lmt, container) {

	if(lmt && container) {
		var containerHeight;
		if (container.innerWidth) {
			containerHeight = container.innerHeight;
		}else{
			containerHeight = container.clientHeight;
		}
	
		var lmtHeight;
		if (lmt.innerWidth)	{
			lmtHeight = lmt.innerHeight;
		}else{
			lmtHeight = lmt.offsetHeight;
		}
	
		var y = Math.ceil((containerHeight - lmtHeight) / 2);
		if(y < 0)	{
			y = 0;
		}
	
		lmt.style.position = "relative";
		lmt.style.top = y + "px";
		
		lmt.style.visibility = 'visible';
	}
}

