<!--
if (window != top) top.location.href = location.href;

var isMSN = (window.navigator.userAgent.toLowerCase().indexOf("msn") != -1);

var checkExit = true;
function exitTraffic (vURL)
{
	if (window.name!='exitWin' && checkExit)
		open (vURL, 'exitWin');
}

var winGame = null;
var winGuide = null;
var winEMail = null;
var winReferral = null;
var winProfile = null;
var winBonus = null;

function popUpWindow (vPopUpWin, vPage, vName, vWidth, vHeight, vRoom)
{
	var vCheckSize = (vRoom > 0);
	var openNewWin = true;
	if (vPopUpWin) {
		if (!vPopUpWin.closed) openNewWin = false;
	}
	if (openNewWin || vPopUpWin==winProfile) {
		var xX=0, vY=0, vRatio=1.0, vBanner=0;
		if (window.screen) {
			if (vCheckSize) {
				vBanner = 70;
				if (screen.width <= 640) {
					vRatio = 0.67;
					vBanner = 60;
				}
				else if (screen.width <= 800) {
					vRatio = 0.8;
					vBanner = 62;
				}
			}
			if (vRatio < 1.0) {
				vWidth = Math.round (vWidth * vRatio);
				vHeight = Math.round (vHeight * vRatio);
			}
			vX = Math.round ((window.screen.availWidth - vWidth) / 2);
			vY = Math.round ((window.screen.availHeight - vHeight - 25 - vBanner) / 2);
			if (vX < 0) vX = 0;
			if (vY<0 || vRatio<1.0) vY = 0;
		}
		if (vCheckSize) vHeight += vBanner;
		if (vRoom > 0)
			vPage = vPage + '?Ratio=' + vRatio + "&Room=" + vRoom + "&BannerHeight=" + vBanner + "&";
		else if (vRoom == -1)
			vPage = vPage + "?";
		else
			vPage = vPage + "&";
		vPage = vPage + "ts=" + new Date().getTime();
		vWinSet = 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbar=0,resizable=0';
		if (isMSN) vHeight += 26;
		vPopUpWin = open (vPage, vName, vWinSet+
			',width='+vWidth+',height='+vHeight+',innerWidth='+vWidth+',innerHeight='+vHeight+
			',left='+vX+',top='+vY+',screenX='+vX+',screenY='+vY);
	}
	if (vPopUpWin == null)
		alert ("You may have a pop-up blocker installed. Please change\n" +
			   "your browser settings to allow pop-ups from HeyBingo.com.");
	else
		vPopUpWin.focus();
	return vPopUpWin;
}

function popUpGameWindow (vRoom)
{
	checkExit = false;
	winGame = popUpWindow (winGame, 'gamefiles/gamewin.php', 'GamePage', 950, 550, vRoom);
}

function popUpGuidelines (vDir)
{
	winGuide = popUpWindow (winGuide, vDir + 'guidelines.php', 'GuidePage', 525, 525, -1);
}

function popUpEMailNotes (vDir)
{
	winEMail = popUpWindow (winEMail, vDir + 'emailnotes.php', 'EMailPage', 525, 525, -1);
}

function popUpReferralRules (vDir)
{
	winReferral = popUpWindow (winReferral, vDir + 'referralrules.php', 'ReferralPage', 525, 500, -1);
}

function popUpProfile (vName)
{
	winProfile = popUpWindow (winProfile, 'userprofile.php?user='+vName, 'ProfilePage', 470, 468, -2);
}

function popUpBonusInfo (vDir)
{
	winBonus = popUpWindow (winBonus, vDir + 'bonusrules.php', 'BonusPage', 500, 505, -1);
}

function includeSWF (vSWF, vWidth, vHeight, vBGColor, vFlashVer, vFlashVars)
{
	var vStr = "";
	vStr += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + vFlashVer + '" width="' + vWidth + '" height="' + vHeight + '" hspace="0" vspace="0" align="top">';
	vStr += '<param name=movie value="' + vSWF + '"/>';
	vStr += '<param name=quality value="high"/>';
	vStr += '<param name=menu value="false"/>';
	vStr += '<param name=bgcolor value="' + vBGColor + '"/>';
	vStr += '<param name=scale value="noborder"/>';
	vStr += '<param name=SeamlessTabbing value="false"/>';
	vStr += '<param name=FlashVars value="' + vFlashVars + '"/>';
	vStr += '<embed src="' + vSWF + '" width="' + vWidth + '" height="' + vHeight + '" hspace="0" vspace="0" quality="high" menu="false" bgcolor="' + vBGColor + '" scale="noborder" FlashVars="' + vFlashVars + '" align="top" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>';
	vStr += '</object>';
	document.write (vStr);
}
//-->
