/* Include the style sheet */
document.write("<link rel='stylesheet' href='/dcstyles/webmail.2.12.css'>");

/**PROC+**********************************************************************/
/* Name:      HelpExplodeDynamic                                             */
/*                                                                           */
/* Purpose:   Opens a new window and displays a dynamically generated help   */
/*            page in it.                                                    */
/*                                                                           */
/* Returns:   False                                                          */
/*                                                                           */
/* Params:    IN     helpLink     - URL for the help page                    */
/*                                                                           */
/**PROC-**********************************************************************/
function HelpExplodeDynamic(helpLink)
{
  ShowHelpWindow('/servlet/AddressBookServlet?Action=HelpPage&PageTemplate=' + helpLink);
  return false;
}

/**PROC+**********************************************************************/
/* Name:      HelpExplode                                                    */
/*                                                                           */
/* Purpose:   Opens a new window and displays a help page in it.             */
/*                                                                           */
/* Returns:   False                                                          */
/*                                                                           */
/* Params:    IN     helpLink     - URL for the help page                    */
/*                                                                           */
/**PROC-**********************************************************************/
function HelpExplode(helpLink)
{
  return(HelpExplodeDynamic(helpLink));
}

/**PROC+**********************************************************************/
/* Name:      ShowHelpBeforeLogin                                            */
/*                                                                           */
/* Purpose:   Opens a new window and displays a static help page in it.      */
/*                                                                           */
/* Returns:   False                                                          */
/*                                                                           */
/* Params:    IN     helpLink     - URL for the help page                    */
/*            IN     language     - language to display                      */
/*                                                                           */
/**PROC-**********************************************************************/
function ShowHelpBeforeLogin(helpLink, language)
{
  ShowHelpWindow('/dchelp/' + language + '/' + encodeURI(helpLink));
  return false;
}

//-PROC{-----------------------------------------------------------------------
//
// Name:        ShowHelpWindow
//
// Description: Attempts to bring up a help window - though in the age of popup
//              blockers this may not be achieved.
//
// Params:      fullURL - the URL to show in the window
//
//-PROC}-----------------------------------------------------------------------
function ShowHelpWindow(fullURL)
{
  // Attempt to open the window
  var win = window.open(fullURL,
                        commonjs1,
                        "left=50,top=50,width=600,height=450,menubar=yes,toolbar=yes,status=yes,resizable=yes,scrollbars=yes");

  // If we opened a window (without it being blocked by a popup blocker) then
  // set the focus to it.
  if (win)
  {
    win.focus();
  }
}

