// This should really be named swfpopup.js, but we're not sure how to modify the Gaia framework to have that js include in each html template.

// Allow popups in safari.
function openWindow(pageUrl) {
	var winName = Math.round(9999*Math.random()) + new Date().getTime();
	var winNew = window.open(pageUrl,winName);

	if(!winNew)
		getSwf(swfId).openWindowFromSwf(pageUrl);
	else
		winNew.focus();
}

var swfId = "flashcontent";
function getSwf(id) {
	if (navigator.appName.indexOf("Microsoft") != -1)
		return window[id];
	else
		return document[id];
}

