var MemRegPopUp;
var MemRegQwInterval;

function PopUpUrlCommon(Url) {
  CloseMemberRegistrationPopUp()
  var W=480, H=780, L, T=30;
  if (H>(screen.height-100)) {
    H = screen.height-100
  }
  if (W>(screen.width-60)) {
      W = screen.width-60
  }
  L=(screen.width-W)*0.5
  MemRegPopUp = window.open(Url,"MemberQuestionnaire","toolbar=0,location=0,directories=0,menubar=0,status=1,scrollbars=1,resizable=1,width="+W+",height="+H+",top ="+T);
}

function PopUpUrl(Url) {
  PopUpUrlCommon(Url)
  if(MemRegPopUp)MemRegPopUp.focus();
}

function CloseMemberRegistrationPopUp() {
  window.clearInterval(MemRegQwInterval);
}