<!--
// Unobtrusive Vertical centering script
// By Kay Maatkamp : http://www.kaydies.com

var container = { 
	id   :"container", // the id of the (container) box
	top  :50,          // vertically centered (percentage)
	left :50           // horizontally centered (percentage)
	};
   
function deadCentreFeature() { 

	if (document.getElementById(container.id)) { 

		var elm = document.getElementById(container.id); 
		cWidth  = elm.offsetWidth; 
		cHeight = elm.offsetHeight; 

		if (self.innerHeight) { 
			wWidth  = self.innerWidth; 
			wHeight = self.innerHeight; 
		} else if (document.documentElement && 
				document.documentElement.clientHeight) { 
			wWidth  = document.documentElement.clientWidth; 
			wHeight = document.documentElement.clientHeight; 
		} else if (document.body) { 
			wWidth  = document.body.clientWidth; 
			wHeight = document.body.clientHeight; 
		} 

		cmLeft = wWidth  - cWidth  >= 0 ? 
		-Math.round((cWidth / (100/container.left)))  +"px" : 0; 

		cmTop  = wHeight - cHeight >= 0 ? 
		-Math.round((cHeight / (100/container.top ))) +"px" : 0; 

		elm.style.margin = cmTop + " 0 0 " + cmLeft; 
		elm.style.left   = cmLeft != 0 ? container.left + "%" : 0; 
		elm.style.top    = cmTop  != 0 ? container.top  + "%" : 0; 
	} 
}  

window.onload = function() { 
	deadCentreFeature(); 
} 
window.onresize = function() { 
	deadCentreFeature(); 
}

//-->
