function maxInt(n1, n2)
{
  if (n1 >= n2)
    return n1
  else
    return n2
}
function ShowPopup(sUrl, nWidth, nHeight)
{
	var win

  var nLeft   = maxInt(parseInt((screen.width - nWidth) / 2), 0)
  var nTop    = maxInt(parseInt((screen.height - nHeight) / 2), 0)

  if (navigator.appName.indexOf("Microsoft") >= 0)
    var sPos = "left=" + nLeft + ",top=" + nTop
  else
    var sPos = "screenX=" + nLeft + ",screenY=" + nTop

  win = window.open(sUrl, "", "location=no,status=no,scrollbars=no,"+sPos+",width="+nWidth+",height="+nHeight+",resizable=no");

	win.focus()

  return false
}