var popUpWin=0;
var arrPopups = new Array();

function messageWindow(title, msg)
{
  var width="300", height="125";
  var left = (screen.width/2) - width/2;
  var top = (screen.height/2) - height/2;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  var msgWindow = window.open("","msgWindow", styleStr);
  var head = '<head><title>'+title+'</title><link href="/inc/styles.css" rel="stylesheet" type="text/css"></head>';
  var body = '<body><center>'+msg+'<br><p><form><input type="button" value="   Ok   " onClick="self.close()"></form></body>';
  msgWindow.document.write(head + body);
}

function popUpWindow(URLStr, left, top, width, height, scrollbar)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  if (!scrollbar) scrollbar = 'scrollbar=no';
  else scrollbar = 'scrollbars';
  if (!left) left = (screen.width/2) - width/2;
  if (!top) top = (screen.height/2) - height/2;
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,'+scrollbar+',resizable=no,copyhistory=no,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
