
var theater = null;
function openCenteredWindow(page) {
	var w = 980;
	var h = 580;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	if (winl < 0) {
		winl = 0;
	}
	if (wint < 0) {
		wint = 0;
	}
	var windowprops = "height=" + h + ",width=" + w + ",top=" + wint + ",left=" + winl + ",location=no," + "scrollbars=no,menubars=no,toolbars=no,resizable=no,status=yes";
	theater = window.open(page, "Theater", windowprops);
	if (!theater.opener) {
		theater.opener = self;
	}
	if (window.focus) {
		theater.focus();
	}
}

// use goPage to go to the specified page in the same browser (e.g. from homepage Flash)
function goPage(page) {
	document.location.href = page;
}
// use goBuy() and goClose() from the Flash theater page
function goBuy() {
	window.opener.location.href = "product.htm";
	window.close();
}
function goClose() {
	window.close();
}

