function myPopupRelocate() {
 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;
 }

 var leftOffset = scrolledX + 5;
 var topOffset = scrolledY + 5;

leftOffset = 5;
topOffset = 5;

 document.getElementById("mypopup56").style.top = topOffset + "px";
 document.getElementById("mypopup56").style.left = leftOffset + "px";

 if(window.innerHeight) {
  document.getElementById("mypopup56").style.height = window.innerHeight - 10 + "px";
  document.getElementById("w117frame").style.height = window.innerHeight - 60 + "px";
 }
 else if(document.body.clientHeight) {
  document.getElementById("mypopup56").style.height = document.body.clientHeight - 10 + "px";
  document.getElementById("w117frame").style.height = document.body.clientHeight - 50 + "px";
 }

 if(window.innerWidth) { //checking for browsers that support window.innerWidth
  document.getElementById("mypopup56").style.width = window.innerWidth - 30 + "px"
 }
 else if(document.body.clientWidth) { //checking for browsers that support document.body.clientWidth
  document.getElementById("mypopup56").style.width = document.body.clientWidth - 10 + "px"
 }

}

function fireMyPopup() {
 myPopupRelocate();
 document.getElementById("mypopup56").style.display = "block";
 document.body.onscroll = myPopupRelocate;
 window.onscroll = myPopupRelocate;
}

fireMyPopup();

