var helpWindow = -1;
var helpcommand = "";
var helpcommand1 = "";
var browserControls = "";

// help button handler
function launchHelp(htmlPage)
{
//additional vatiable for ChangeStyle focus events
helpcall=true;
  // the help window is a pop up
  // if the help window does not already exist, create it with a unique name
  // if the window exists, it is reused since its opened with the same unique name

  // calculate resolution of the window
  screenWidth = 800;
  screenHeight = 600;
  if (screen.width > 800)
    screenWidth = screen.width;
  if (screen.height > 600)
    screenHeight = screen.height;
  // cap a reasonable upper limit in case a browser gives bad resolution results
  if (screenWidth > 5000)
    screenWidth = 800;
  if (screenHeight > 5000)
    screenHeight = 600;

  width = 770;
  height = screenHeight - 130;
  startx = (screenWidth - width) / 2 - 6;
  starty = 40;

  helpcommand = "helpWindow = window.open(\"" + htmlPage + "\", \"apdonphilb0bbrad\", ";
  browserControls = "scrollbars=yes,resizable=yes,status=yes,toolbar=yes,location=yes,menubar=yes,directories=yes";
  helpcommand1 = "\"left=" + startx +",top=" + starty + ",screenx=" + startx +",screeny=" + starty + ",width=770,height=" + height + ","+browserControls+"\");";
  eval(helpcommand + helpcommand1);
  helpWindow.focus();
}