function PopupWindow(url, handleName, height, width, appearance) {
	// If "appearance" hasn't been defined, use the default one below...
	if (typeof(appearance) == "undefined") {
		appearance = "scrollbars=yes,status=no,toolbar=no,menubar=no";
		}

	// Pop up a window...
	var win = window.open(url, handleName, "width=" + width + ",height=" + height + "," + appearance);
	win.window.focus();
	}

 
function openEmailPage() {
	emailWin=window.open('https://healthteamnovascotia.ca/emailpage.asp?referralUrl='+window.location.href, 'mailer', /* for Production server */ 'location=no,scrollbars=no,resizable=no,menubar=no,directories=no,width=384,height=404');
	emailWin.focus();
	}

function SendTheEmail(email, subscribe){
	var mailaction="https://healthteamnovascotia.ca/sendemailnewsletter.asp";
	if (subscribe == 1) {
		mailaction+="?address=HealthTeam@gov.ns.ca&subject=" + escape("Subscribe to Newsletter") + "&message=" + escape("Subscribe " + email) + "&replyto=" + escape(email);
		}
	else {
		mailaction+="?address=HealthTeam@gov.ns.ca&subject=" + escape("Unsubscribe to Newsletter") + "&message=" + escape("Unsubscribe " + email) + "&replyto=" + escape(email);
		}

	//Open the popup window
  //alert(mailaction);
  var emailwin=window.open(mailaction, "sendmail_win", "top=100,left=100,height=100,width=267,scrollbars=0,menubar=0,locationbar=0,statusbar=0,resizable=0");
  
	//Hide the window
  //emailwin.blur();
  //Set focus to the web page
  window.focus();
	}
 
 
