  // Script copyright BMG Multimedia

  function ReloadParentNClose(){
    ReloadParent();
    window.close();
  }

  function ReloadParent(){
    if(window.opener && !window.opener.closed)
      window.opener.document.location.reload();
  }

  function OpenNewWindow(winPath, winName, winWidth, winHeight, Scrollable){
    myWindow = window.open(winPath, winName, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars='+Scrollable+'0,resizable=0,width='+winWidth+',height='+winHeight+',screenX='+(screen.width - winWidth) / 2+',screenY='+(screen.height - winHeight) / 2+',top='+(screen.height - winHeight) / 2+',left='+(screen.width - winWidth ) / 2+'');
    myWindow.opener = self;
    myWindow.focus();
  }

  function OpenNewWindow2(winPath, winName, winWidth, winHeight, Scrollable){
    myWindow = window.open(winPath, winName, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars='+Scrollable+'0,resizable=1,width='+winWidth+',height='+winHeight+',screenX='+(screen.width - winWidth) / 2+',screenY='+(screen.height - winHeight) / 2+',top='+(screen.height - winHeight) / 2+',left='+(screen.width - winWidth ) / 2+'');
    myWindow.opener = self;
    myWindow.focus();
  }

  function ResizeWindow(newWidth, newHeight){
    window.resizeTo(newWidth, newHeight);
    window.moveTo((screen.availWidth - newWidth) / 2, (screen.availHeight - newHeight) / 2);
  }
