var container = { 
    id   :"container",  // the id of the box
    top  :50          // vertically centered (percentage)
 };
 
 function deadCentreFeature(){ 
 
    if (document.getElementById(container.id)) { 
 
       var elm = document.getElementById(container.id); 
       cHeight = elm.offsetHeight; 
 
       if (self.innerHeight) { 
         wHeight = self.innerHeight; 
       } else if (document.documentElement && 
                  document.documentElement.clientHeight) { 
          wHeight = document.documentElement.clientHeight; 
       } else if (document.body) { 
          wHeight = document.body.clientHeight; 
       } 
 
    elm.style.marginTop = wHeight - cHeight >= 0 ? 
      Math.round((wHeight-cHeight) * (container.top/100)) + "px" : 0; 
    } 
 }  
 
window.onload = function() { 
  deadCentreFeature(); 
} 
 
window.onresize = function() { 
  deadCentreFeature(); 
}

