	// find the complete window height
	function getWindowHeight() {

		var windowHeight = 0;
		if (typeof(window.innerHeight) == 'number') {
	
			windowHeight = window.innerHeight;
		
		} else {
	
			if (document.documentElement && document.documentElement.clientHeight) {
				windowHeight = document.documentElement.clientHeight;
			} else {
		
				if (document.body && document.body.clientHeight) {
					windowHeight = document.body.clientHeight;
				}
			}
		}
	
		return windowHeight;
	
	}	  
  
  function horizPlace() {
 
  	var containerSize = 560;
  	
 	if (document.getElementById) {
 		// if required, place vertical middle
 		
 		var windowHeight = getWindowHeight();
 		var container = document.getElementById('container');
 		
 		if(windowHeight > containerSize) {
			
			container.style.position = 'relative';
			container.style.top = (windowHeight - containerSize) / 2;
			
		} else {
		
			container.style.position = 'relative';
			container.style.top = 0;
		
		}
	
	}
 		
  }
  
  // add the event listeners
if (window.addEventListener) {

  window.addEventListener("load", horizPlace, false)
  
} else if (window.attachEvent) {

  window.attachEvent("onload", horizPlace)

} else {

  window.onload = horizPlace

}
  