// open widget full screen
function openFlashPopup(flash, stage) {
	var feedWidth = screen.availWidth - 50
	var feedHeight = screen.availHeight - 70
	var w = feedWidth/3, h = feedHeight/3, cw = w/2, ch = h/2;

	if (window.screen) {
		cw = Math.floor((screen.availWidth / 2) - (feedWidth / 2));
		ch = Math.floor((screen.availHeight / 2) - (feedHeight /2));
	}
	
	// remove & from the widget name and replace with #38;
	if (flash.indexOf("&") != -1) {
		flash = flash.replace("&", "InsertAmp")
	}
	open('/FreeActivities/flashPopup.jsp?stage=' + stage + '&flashFile=' + flash, '', 'width=' + feedWidth + ',height=' + feedHeight + ',scrollbars=no,toolbar=no,location=0,directories=0,status=0,menuBar=0,resizable=yess,top='+ch+',left='+cw)
}