/*
 * JavaScript functions to handle URLs and request parameters.
 */

/*
 * Build secure URL using HTTPS
 *
 * _httpsContextPath - HTTPS port number and context path of the request.
 *    Port number is present if different from 443
 *    The path starts with a "/" character but does not end with a "/" character.
 *    For servlets in the default (root) context, context is empty. E.g.:
 *       :445/admin
 *
 * _webpage  - page URL without domain but with (optional) parameters, e.g.:
 *    login.jsp?w=1234&x=y
 */

function getSecureUrl( _httpsContextPath, _webpage)
{
  var server = document.domain;   // server domain name, localhost, or ip address
  var secureUrl = "https://" + server + _httpsContextPath + '/' + _webpage;
  //alert(secureUrl);
  return secureUrl;
}


