<!-- fireMyPopup Function - No Need To Edit -->
function fireMyPopup() {
var scrolledX, scrolledY;
if( self.pageYOffset ) {
  scrolledX = self.pageXOffset;
  scrolledY = self.pageYOffset;
} else if( document.documentElement && document.documentElement.scrollTop ) {
  scrolledX = document.documentElement.scrollLeft;
  scrolledY = document.documentElement.scrollTop;
} else if( document.body ) {
  scrolledX = document.body.scrollLeft;
  scrolledY = document.body.scrollTop;
}

<!-- Determines Center of Screen - No Need To Edit -->
var centerX, centerY;
if( self.innerHeight ) {
  centerX = self.innerWidth;
  centerY = self.innerHeight;
} else if( document.documentElement && document.documentElement.clientHeight ) {
  centerX = document.documentElement.clientWidth;
  centerY = document.documentElement.clientHeight;
} else if( document.body ) {
  centerX = document.body.clientWidth;
  centerY = document.body.clientHeight;
}

<!-- EDIT THE HEIGHT AND WIDTH TO FIT YOUR POPUP DIV'S HEIGHT AND WIDTH -->

<!-- Adjust to fit the exact width of your POPUP DIV Width - Mine was 620px wide -->
var leftOffset = scrolledX + (centerX - 620) / 2;

<!-- Adjust to fit the exact width of your POPUP DIV Height - Mine was 350px tall -->
var topOffset = scrolledY + (centerY - 350) / 2;

<!-- Only Edit if the name of your DIV is not going to be - mypopup - change if necessary -->
document.getElementById("mypopup").style.top = topOffset + "px";
document.getElementById("mypopup").style.left = leftOffset + "px";
document.getElementById("mypopup").style.display = "block";
}

<!-- RUNS fireMyPopup Funtion when page loads -->
window.onload=function(){
 fireMyPopup();
 }
