var WindowObjectReference; // global variable
var PreviousUrl; /* global variable which will store
the url currently in the secondary window */
function openRequestedSinglePopup(strUrl)
{
if(WindowObjectReference == null || WindowObjectReference.closed)
  {
  WindowObjectReference = window.open(strUrl, "SingleSecondaryWindowName",
  "resizable=no,scrollbars=no,status=no,width=600,height=300");
  }
else if(previousUrl != strUrl)
  {
  WindowObjectReference = window.open(strUrl, "SingleSecondaryWindowName",
  "resizable=no,scrollbars=no,status=no,width=600,height=300");
  if(WindowObjectReference.focus)
    {
    WindowObjectReference.focus();
    };
  /* explanation: if the resource to load is different,
  then we load it in the already opened secondary window and then
  we bring such window back on top/in front of its parent window.

  We verify first the support of the focus() function before
  calling it. */
  }
else
  {
  if(WindowObjectReference.focus)
    {
    WindowObjectReference.focus();
    };
  };
PreviousUrl = strUrl;
/* explanation: we store the current url in order to compare url
in the event of another call of this function. */
}