/*
 PopUpWindow.js
*/
  function PopUpWindow(url, name, width, height)
  {
    this.url = url;
    this.name = name;
    this.width = width;
    this.height = height;
    this.toolbar = 'no';
    this.location = 'no';
    this.directories = 'no';
    this.status = 'no';
    this.menubar = 'no';
    this.scrollbars = 'yes';
    this.resizable = 'yes';
  }
  
  PopUpWindow.prototype.pop = function()
  {
    var popupWin;
    var widgets = 
     "toolbar=" + this.toolbar + "," +
     "location=" + this.location + "," +
     "directories=" + this.directories + "," +
     "status=" + this.status + "," +
     "menubar=" + this.menubar + "," +
     "scrollbars=" + this.scrollbars + "," +
     "resizable=" + this.resizable + "," +
     "width=" + this.width + "," +
     "height=" + this.height;
    popupWin = window.open(this.url, this.name, widgets);

    if(popupWin.opener != null)
    {
      if(popupWin.opener.top != null)
      {
        if((popupWin.opener.top.name == null) ||
           (popupWin.opener.top.name == ""))
        {
          popupWin.opener.top.name= "opener";
        }
      }
    }
    popupWin.focus();
  }
  
  PopUpWindow.popOnce = function(url, name, width, height)
  {
    var p = new PopUpWindow(url, name, width, height);
    p.pop();
    return false;
  }

