function openWindow(thisUrl, w, h) {
	screenwidth = screen.availWidth;
	screenheight = screen.availHeight;
	thisWidth = w || 500;
	thisHeight = h || 600;
	thisLeft = ((screenwidth - thisWidth)/2);
	thisTop = ((screenheight - thisHeight)/2);
	optionString = ('width=' + thisWidth + ',height=' + thisHeight + ',top=' + thisTop + ',left=' + thisLeft + ',status=yes,menubar=yes,resizable=yes,scrollbars=yes,toolbar=yes');
	window.open(thisUrl,'',optionString);
}

function openGameWindow(thisUrl, w, h) {
	screenwidth = screen.availWidth;
	screenheight = screen.availHeight;
	thisWidth = w || 500;
	thisHeight = h || 600;
	thisLeft = ((screenwidth - thisWidth)/2);
	thisTop = ((screenheight - thisHeight)/2);
	optionString = ('width=' + thisWidth + ',height=' + thisHeight + ',top=' + thisTop + ',left=' + thisLeft + ',status=no,menubar=no,resizable=no,scrollbars=no,toolbar=no');
	window.open(thisUrl,'',optionString);
}

function pegTransition() {
	document.body.className = 'peg';	
	var footer = document.getElementById('footer');
	footer.className = 'peg';
	var links = footer.getElementsByTagName('a');
	for (var i=0; i < links.length; i++) {
		links[i].className = 'peg';
	}
	document.getElementById('footerLogo').src = "images/logo_gbgr.png";
}

function showPromoRules() {
	document.getElementById("promoRules").style.display = 'block';
}

function showPromoRulesAlt() {
	document.getElementById("promoRulesAlt").style.display = 'block';
}