function statsWin(val){centeredWindow(val, 'stats', 800, 600);}
function releaseWin(val){centeredWindow(val, 'press', 538, 560);}
function playerWin(val){centeredWindow(val, 'roster', 550, 560);}

function centeredWindow(newURL, newLoc, newWidth, newHeight) {
  newXCoord = (screen.width) ? (screen.width-newWidth)/2 : 0;
  newYCoord = (screen.height) ? (screen.height-newHeight)/2 : 0;
  this.pop_window(newURL, newLoc, newWidth, newHeight, newXCoord, newYCoord);
}
function pop_window(newURL, newLoc, newWidth, newHeight, xCoord, yCoord) {
  var options =  "toolbar=no,";
      options += "location=no,";
      options += "dependent=yes,";
      options += "alwaysRaised=yes,";
      options += "status=yes,";
      options += "scrollbars=yes,";
      options += "menubar=yes,";
      options += "copyhistory=0,";
      options += "resizable=yes,";
      options += "height=" + newHeight + ",";
      options += "width=" + newWidth + ",";
      options += "left=" + xCoord + ",";
      options += "top=" + yCoord + ",";
      options += "screenX=" + xCoord + ",";
      options += "screenY=" + yCoord;
  win = window.open(newURL,newLoc,options);
}
