var popcap_isIE					= document.all != null; 
var popcap_isFlash				= false;
var popcap_upsellURL			= "http://games.aol.com";  //AOL-specific default Upsell url
var popcap_debug				= false;
var popcap_external_ads			= false;
var popcap_internal_ads			= true;
var popcap_score_report			= false;
var popcap_score_broadcast		= 3;
var popcap_cheats				= false;
var popcap_params				= new Array();
var popcap_paramvals			= new Array();

function PopcapDebug(str)
{
	try
	{
		var textbox = document.getElementById('PopcapDebugBox');
		if (textbox!=null)
			textbox.value += str + '\n';
	}
	catch(e)
	{
	}
}

function ReceiveNotification(method,param) 
{ 
	PopcapDebug(method + ' ' + param);

	var game;
	game  = document.getElementById('GameObject');

	if (popcap_score_report)
	{
		try
		{
			PopcapScoreReceiveNotification(method,param);
		}
		catch(e)
		{
		}
	}

	if (method=="pc_launchinstaller") 
	{
		window.open(popcap_upsellURL);		
	}	
	else if (method=='pc_gameloaded')
	{
		if (popcap_external_ads || popcap_score_report)
			game.PopcapNotify('pc_sendgamebreaks','1');
	}
	else if (method=='pc_gamebreak')
	{		
		if (popcap_external_ads)
			PopcapAdGameBreak(method,param);
	}		
}