var popWin = null    
var winCount = 0
var winName = "popWin"

function openPopWin(winURL, winWidth, winHeight, winFeatures){
  winCount = winCount + 1

var date = new Date();
var hours = date.getHours();
var minutes = date.getMinutes();
var seconds = date.getSeconds();

  winName = "popWin"+ hours + minutes + seconds +"_"+ winCount
  //closePopWin()

{
    if (document.all)
        var xMax = screen.width, yMax = screen.height;
    else
        if (document.layers)
            var xMax = window.outerWidth, yMax = window.outerHeight;
        else
            var xMax = 640, yMax=480;
    		var xOffset =3.8*((xMax - 200)/6), yOffset =((yMax - 200)/3-80);
}
    
  if (openPopWin.arguments.length == 4) 
    winFeatures = "," + winFeatures
  else
     winFeatures = "" 
  //popWin = window.open(winURL, winName, "width=" + winWidth + ",height=" + winHeight + winFeatures+",screenX="+xOffset+",screenY="+yOffset+",top="+yOffset+",left="+xOffset)
  popWin = window.open(winURL, winName, "width=" + winWidth + ",height=" + winHeight + winFeatures)
  }