var win = null;
gameWindow=function(page,name,w,h,features,id)
{
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	if (winl < 0) winl = 0;
	if (wint < 0) wint = 0;
	var settings = 'height=' + h + ',';
	settings += 'width=' + w + ',';
	settings += 'top=' + wint + ',';
	settings += 'left=' + winl + ',';
	settings += features;
	win = window.open('/showgame/'+id,name,settings);
	win.window.focus();
}

newWindow=function(page,name,w,h,features,id)
{
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	if (winl < 0) winl = 0;
	if (wint < 0) wint = 0;
	var settings = 'height=' + h + ',';
	settings += 'width=' + w + ',';
	settings += 'top=' + wint + ',';
	settings += 'left=' + winl + ',';
	//settings += 'scrollbars=';
	settings += features;
	win = window.open(page,name,settings);
	win.window.focus();
}



$(document).ready(function(){
	/*
		Makes CURVEY CORNERS WORK FOR HEIGHT DIFFERENCE AS BG IMAGE
	*/

	//For Restaurants Page
	$('.blockheight a img').each(function() {
		$(this).parent('a').height($(this).height());
		$(this).hide();
	});
	
	//Food and drink
	$('.foodheight img').each(function() {
		$(this).parent('.foodheight').height($(this).height());
		$(this).hide();
	});	
	
	
	//Homepage
	$('.homeheight dd').each(function() {
		var imgHeight = $(this).children('a').children('img').height();
		if(imgHeight == 0 || imgHeight == null)imgHeight = 110;
		$(this).children('a').height(imgHeight);
	});	
	$('.homeheight dd a img').hide();


});
