var flashGames = [];

var winObj = false;
var nl = "\n";

function showPromo(id, width, height)
{
	window.focus();

	try {
		winObj.close();
		winObj = false;
	}
	catch (e)
	{
		winObj = false;
	}

	if ( !winObj )
	{
		winObj = window.open('about:blank', '', 'height=1,width=1,channelmode=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=1,toolbar=0', 'true');
		winObj.document.charset = 'UTF-8';
	}
	else
	{
		winObj.document.close();
	}

    if (id == 0)
    {
        pr = getHtmlPromo( );
    }
    else
    {
        pr = flashGames[id];
    }

	winObj.document.write( ''+
		'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'+nl+
		'<html xmlns="http://www.w3.org/1999/xhtml">'+nl+
		'<head>'+nl+
		'	<title></title>'+nl+
		'	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'+nl+
		'	<link rel="icon" href="/favicon.ico" type="image/x-icon" />'+nl+
		''+nl+
		'<style>'+nl+
		'	body {'+nl+
		'		background:#ECF6FB;'+nl+
		'		padding:10px;'+nl+
		'		text-align:center;'+nl+
		'	}'+nl+
		'	textarea {'+nl+
		'		padding:0;'+nl+
		'	}'+nl+
		'</style>'+nl+
		'</head>'+nl+
		'<body>'+nl+
		'<div id="alacontent">'+nl+
		pr+nl+
		'</div>'+nl+
		'</body>'+nl+
		'</html>'+
		'');

	winObj.resizeTo( width + 40, height + 20 );

	winObj.focus();

}


