function _wcOpenPopup (url, width, height, optionalTarget, optionalProperties)
{
  if (typeof width == typeof undefined || width == null || width.length == 0)
    width = 600;
  if (typeof height == typeof undefined || height == null || height.length == 0)
    height = 600;
  if (typeof wcPopUpWidthAddition != typeof undefined)
    width += wcPopUpWidthAddition;
  if (typeof wcPopUpHeightAddition != typeof undefined)
    height += wcPopUpHeightAddition;
  var popUpProperties = {"height":height,"width": width,"status":"yes","toolbar":"no","menubar":"no","location":"no","resizable":"yes","scrollbars":"yes"};

  if (optionalProperties != null && optionalProperties.length > 0)
  {
    var optionalPairs = optionalProperties.split(",");
    for (var i = 0; i < optionalPairs.length; optionalPairs++)
    {
      var nameValuePair = optionalPairs[i].split("=");
      if (popUpProperties[nameValuePair[0]])
        popUpProperties[nameValuePair[0]] = nameValuePair[1];
    }
  }
  if (!optionalTarget)
    optionalTarget = "_blank";

  var propertiesString = "";
  for (var checKey in popUpProperties)
  {
    propertiesString +=  checKey + "=" + popUpProperties[checKey] + ",";
  }

  var urlParts = url.split('#');

  url = wsmlMakeStandaloneUrl(urlParts.join('#'));

  var w = window.open(url, optionalTarget, propertiesString);
  if (w == null)
    return;
  w.focus();
}
