
function popUp(htmlName,windowType, popUpId) {
	var newWindow = null;
	switch (windowType.toUpperCase()) {
		case "FORCEGETUPPOPUP":
			newWindow = window.open("/global/getUpPopUp.html",'getUpPopUp','scrollbars=no,resizeable=yes,menubar=no,left=1,top=1,width=400,height=300');
			newWindow.focus();
			break;
		case "TEASERPOPUP":
			newWindow = window.open("/tv/popup.html",'teaserPopUp','scrollbars=no,resizeable=yes,menubar=no,left=1,top=1,width=450,height=550');
			newWindow.focus();
			break;
		case "GETUPPOPUP":
			currentDate = new Date();
			currentTime = currentDate.getTime();
			if (getCookie("getUpPopUpTimer") < currentTime) {
				newWindow = window.open("/global/getUpPopUp.html",'getUpPopUp','scrollbars=no,resizeable=yes,menubar=no,left=1,top=1,width=400,height=300');
				newWindow.focus();
				setCookie('getUpPopUpTimer',htmlName);
			}
			break;
		case "EDUCATIONALPOPUP":
			if ( popUpId == 0 || popUpId == undefined ) {
				popid = getQueryString("popid");
			}
			else {
				popid = popUpId;
			}

			if (popid == "none") popid = 108;

			// modified by Jrodgers May17,2004
			parent.location="/framesets/grownUps.html?&popid=" + popid;
			//newWindow = window.open("/grownups/popup.php?popid=" + popid + "&",'edPopUp','scrollbars=yes,resizeable=yes,menubar=no,left=1,top=1,width=400,height=400');
			//newWindow.focus();
			break;

		case "BOOMBOX":
			newWindow = window.open("/play/boomBox",'boomBox','scrollbars=no,resizeable=no,menubar=no,left=1,top=1,width=550,height=400');
			newWindow.focus();
			break;
		case "SEEYOULATERPOPUP":
			var htmlName = 'global/seeYouLater.html?theURL=' + htmlName +"&";
			htmlName = htmlName.replace("http:","HTTP");

			var w = 360;
			var h = 310;
			LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
			TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
			settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,resizeable=no,menubar=no';

			var popUpWindow = window.open('/' + htmlName,'nm',settings);
			if (popUpWindow.opener == null) { 
				popUpWindow.opener = self;
			}
			break;
		default:
			alert("Invalid parameters!");
			break;
			
	}
}
