// Copyright (c) 2005 Rowley Associates Limited.

function
initialiseContentPage() 
{
  if (top.frames)
    {
      if (top.frames.length)
        {
          if (!top.frames[1].initialised || !top.frames[0].initialised)
            {
              /* Try again later if other frames have not loaded yet */
              setTimeout("initialiseContentPage()", 500);
              return;
            }
          top.frames[1].updateCurrentNode(document.location.href);
          top.frames[0].updateCurrentNode();
        }
      else
        {
          /* Page not begin opened in a frame, attempt to redirect to frame window */
          var element = document.getElementsByTagName("SCRIPT").item(0);
          var src = element.getAttribute("SRC");
          if (src)
            {
              src = src.split('/');
              src.pop();
              src = src.join('/');
              window.location = src + "/../index.htm?" + window.location;
            }
        }
    }
}

