function resizeApplyWindowAction()
{
  var screenWidth = 0;
  var screenHeight = 0;
  var windowWidth = 550;
  var windowHeight = 760;
  var leftPos = 0;
  var topPos = 0;

  // only resize the window if launched in a pop up
  if(window.name != null &&  window.name != "")
  {
    // get the actual screen size
    if (parseInt(navigator.appVersion)>3)
    {
        screenWidth = screen.width;
        screenHeight = screen.height
    }
    else if (navigator.appName == "Netscape" && parseInt(navigator.appVersion)==3 && navigator.javaEnabled() )
    {
       var jToolkit = java.awt.Toolkit.getDefaultToolkit();
       var jScreenSize = jToolkit.getScreenSize();
       screenWidth = jScreenSize.width;
       screenHeight = jScreenSize.height;
    }

    // work out 95% of the screen size
    if(screenWidth != 0)
    {
      windowWidth = screenWidth * 0.95;
    }

    if(screenHeight != 0)
    {
      windowHeight = screenHeight * 0.95;
    }

    // make sure the window doesn't get smaller than 760 x 550
    if (windowWidth < 760)
    {
      windowWidth = 760;
    }

    if (windowHeight < 550)
    {
      windowHeight = 550;
    }

    // check that the window size is less then total available size
    if(screenWidth != 0 && windowWidth < screenWidth)
    {
      leftPos = ((screenWidth - windowWidth) / 2);
    }

    if(screenHeight != 0 && windowHeight < screenHeight)
    {
      topPos = ((screenHeight - windowHeight) / 2);
    }

    // make sure that the window does not appear off screen
    if(topPos < 0)
    {
      topPos = 0;
    }

    if(leftPos < 0)
    {
      leftPos = 0;
    }

    // resize the window and centre it
    self.moveTo(leftPos,topPos)
    self.resizeTo(windowWidth,windowHeight)
  }
}

function resizeApplyWindow()
{
  setTimeout('this.resizeApplyWindowAction();',250);
}