// JavaScript Document - Prevnar (Consumer) - Pop-up Functions

function open_the_window() {
	/* var str = "height=" + 480 + ", innerHeight=" + 480 + ", width=" + 640 + ", innerWidth=" + 640;
	var contextWindow = window.open('/consumer/pneumo/pneumo_iq.asp', 'PneumoIQ', str + ', resizable=0, scrollbars=0, toolbar=0, status=0');
	
	contextWindow.focus();*/
	popWin('pneumoiq');
}

// call sample - <a href="javascript:void(0);" onclick="popWin('name')">
function popWin(popID) {
	if(popID == "pi") {
		var popDoc = "/pi_pop.aspx";
		var str = "height=" + 480 + ", innerHeight=" + 480 + ", width=" + 640 + ", innerWidth=" + 640;
	} else if(popID == "hcp") {
		var popDoc = "/hcp_pop.aspx";
		var str = "height=" + 220 + ", innerHeight=" + 240 + ", width=" + 280 + ", innerWidth=" + 280;
	} else if(popID == "usconsumer") {
		var popDoc = "/country_notice_pop.aspx";
		var str = "height=" + 275 + ", innerHeight=" + 275 + ", width=" + 420 + ", innerWidth=" + 420;
	} else if(popID == "pneumoiq") {
		var popDoc = "/pneumo/pneumo_iq.aspx";
		var str = "height=" + 480 + ", innerHeight=" + 480 + ", width=" + 640 + ", innerWidth=" + 640;
	}
	var contextWindow = window.open(popDoc, popID, str + ', resizable=0, scrollbars=0, toolbar=0, status=0');
	
	contextWindow.focus();
	return false;
}


function closeMe() {
	self.close();
}

//function focusMe(){
	//self.focus();
	//var timer = setTimeout('self.focus();', 200);
	//alert("focussed");
//}


function hcpPop()  {
	var contextWindow = window.open('http://www.wyeth.com/vaccines', '_blank', 'toolbar=yes, location=yes, directories=yes, resizable=yes, scrollbars=yes');
	var timer = setTimeout('closeMe();', 200);
	
	contextWindow.focus();
	return false;
}

function passthruPop( href ){
	// used to pop open pass thru in a separate window instead of letting browser handle in a tab, etc.
	// separate wrapper from NBW call in case ever need to interject something different here
	openNBW( href );
	return false;
}

function openNBW( href ){
	// used to open a new browser window (NBW). If not handled this way, it is up to browser to determine
	// if should be handled in a tab, etc.
	window.open( href, '_blank', 'toolbar=yes,location=yes,directories=yes,resizable=yes,scrollbars=yes' );
	return false;
}
