/****************************************/
/* Utility Functions for GameGutter.com */
/*                                      */
/*    Copyright 2004 GameGutter.com     */
/****************************************/

function gg_openCenteredWindow(url, name, height, width) {
  var left = Math.floor( (screen.width - width) / 2);
  var top = Math.floor( (screen.height - height) / 2);
  var params = 'top=' + top + ',left=' + left + ',width=' + width + ',height=' + height + ',scrollbars=no,toolbars=no';
  var win = window.open(url, name, params);
  if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
  return win;
}

function gg_play(id) {
  var win = gg_openCenteredWindow('http://www.gamegutter.com/play.php?g_id=' + id, "play", 610, 730);
}

function gg_review(id) {
  var win = gg_openCenteredWindow('http://www.gamegutter.com/review.php?g_id=' + id, "review", 250, 370);
}

function gg_rate(id) {
  var win = gg_openCenteredWindow('http://www.gamegutter.com/rate.php?g_id=' + id, "rate", 250, 370);
}
