function popUpWindow(URLStr, left, top, width, height, scroll, resize, winID)
{
	var winVar = this[winID];
	if(winVar) {
		if(!winVar.closed) winVar.close();
	}
	winVar = open(URLStr, winID, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=' + (scroll ? "yes" : "no") + ',resizable=' + (resize ? "yes" : "no") + ',copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

var debugSite;
function launchSite()
{
	var width =  screen.availWidth - 10;
	var height =  screen.availHeight - 29;
	var left = 0;
	var top = 0;
	var sitePage = "launch.html";
	if (debugSite) {
		sitePage = "launch_debug.html";
	}
	popUpWindow(sitePage, left, top, width, height, false, true, "siteWin");
}

function launchTerms()
{
	var width =  420;
	var height =  500;
	var left = Math.floor((screen.availWidth / 2) - (width / 2));
	var top = Math.floor((screen.availHeight / 2) - (height / 2));
	popUpWindow("terms.html", left, top, width, height, true, false, "termsWin");
}

function launchPrivacy()
{
	var width =  420;
	var height =  500;
	var left = Math.floor((screen.availWidth / 2) - (width / 2));
	var top = Math.floor((screen.availHeight / 2) - (height / 2));
	popUpWindow("privacy.html", left, top, width, height, true, false, "termsWin");
}
