
/* Use this one for FAQ's */
function popup(targetURL) {
  var height = 335;
  var width = 520;
  var windowName = "popup"
  var returnVal = false;
  var windowParams = "";

  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen)
	{
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;

    var xc = (aw - width) / 2;
    var yc = (ah - height) / 2;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
		str = str + "," + windowParams + ",resizable";
  }
	newWin = window.open(targetURL, windowName, str, returnVal);
	return returnVal;
}

/* Use this one if you need to control the size of the window*/
function popupVariableSize(targetURL, width, height, windowName) {
  var returnVal = false;
  var windowParams = "scrollbars";

  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen)
	{
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;

    var xc = (aw - width) / 2;
    var yc = (ah - height) / 2;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
		str = str + "," + windowParams + ",resizable";
  }
	newWin = window.open(targetURL, windowName, str, returnVal);
	return returnVal;
}
