function OpenWindow(mypage,myname,w,h,features) {
  if(screen.width){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}


var expDays = 0; 
var popSource = 0;
var page = "https://www.pickamortgage.com/PopUpForm.asp"; 
var windowprops = "width=780,height=620,location=0,toolbar=0,menubar=0,scrollbars=0,resizable=1";
var exit=true;
var WasSubmit2=false;
var WasSubmit=false;

function checkCount() {
	if (exit && !WasSubmit && !WasSubmit2 )
		if(!((popSource>=1000 && popSource<=2000) || (popSource>=4000 && popSource<=8000) || (popSource>=102000 && popSource<=102999) || (popSource>=202000 && popSource<=202999)))
			window.open(page, "", windowprops);
}