function GoTo(page_hash)
{
  strLocHash = new String(location);
  if (strLocHash.indexOf('#') != -1)
    strLocHash = strLocHash.substring(strLocHash.indexOf('#'),strLocHash.length);
  else
    strLocHash = '';
  strHash = new String(page_hash);
  strHash = strHash.substring(1,strHash.length);
  strPage = new String(strHash);
  strPage = strPage.substring(0,strHash.indexOf('#'));
  if (strLocHash.length == 0)
    strHash = strHash.substring(strHash.indexOf('#'),strHash.length);
  else
    strHash = strLocHash;
      
  if (parent.new_window != null && !parent.new_window.closed)
  {
    if (parent.new_page.indexOf(strPage) == 0)
      parent.new_window.main.location.hash = strHash;
    else
    {
      parent.new_page = strPage;
      parent.new_window.main.location = strPage + '_body_help.htm' + strHash;
    }
    window.external.LexFocus('','');
  }
  else
  {
    strLocation = new String(parent.captions.location);
    parent.new_window = window.open('all_body_help_index.htm');
    parent.new_page = strPage;
    parent.new_window.var_header = parent.header;    
  }
}

function MayBeGoTo(page_hash)
{
  if (parent.new_window != null && !parent.new_window.closed)
  {
    strLocation = new String(parent.new_window.main.location);
    strPage = new String(page_hash);
    strPage = strPage.substring(1,strPage.length);
    strPage = strPage.substring(0,strPage.indexOf('#'));
    if (strLocation.indexOf(strPage + '_') == -1)
      GoTo(page_hash);
  }
  else
    GoTo(page_hash);
}

function LoadBody(body)
{
  if (parent.bLexUpper)
  {
    if (parent.new_window != null && !parent.new_window.closed)
    {
      window.external.LexFocus('','');
      parent.new_window.body.location = body;
    }
    else
      parent.new_window = window.open('all_index_lex.htm' + '#' + body);
  }
  else
  {
    if (typeof parent.body == "object")
      parent.body.location.replace(body);
    else
    {
      body_save = body;
      setTimeout('LoadBody(body_save)',100);   
    }
  }
}

function GoToLink(link)
{
  if (parent.new_window != null && !parent.new_window.closed)
  {
    parent.new_window.body.frame_body.location.hash = link.substring(link.indexOf('#'),link.length);
    window.external.LexFocus('','');
  }
  else
    parent.new_window = window.open('all_index_lex.htm' + '#' + link);
}

function IfNotInFrameLoadPage(frame,page)
{
  if (self.name != frame)
  {
    top.location.href=page;
    return true;    
  }
  else
    return false;
}  
