
var strContentURL = DEFAULT_CONTENT_PAGE;

// catch all errors
function handleError() { return(true); }
window.onerror = handleError;

if (top != self) 
{ 
  // page is framed, reload in top frame
  top.location.replace(self.location.href);
}
else
{ 
  // test on ?SHOW_URL parameter in URL
  if ((self.location.search.length > 0) && (self.location.search.indexOf('?SHOW_URL=') == 0))
  {
    // ?SHOW_URL parameter in URL
    top.name = '';
    strContentURL = self.location.search.substring(10);
    
    // try to set cookie SHOW_URL & test if cookie SHOW_URL is set
    SetCookie(DEFAULT_SHOW_URL_COOKIE, strContentURL);
    if (GetCookie(DEFAULT_SHOW_URL_COOKIE) == strContentURL)
    {
      // cookies enabled: remove URL from querystring 
      strContentURL = '';
    }
    else
    {
      // cookies not enabled: use default page as parameter in querystring
    }
  }
  else
  { 
    // ?SHOW_URL parameter not in URL
    // try to read cookie
    var strCookie = GetCookie(DEFAULT_SHOW_URL_COOKIE);
    if (strCookie && (strCookie.length > 0))
    { 
      // cookie is set: remove URL from querystring
      strContentURL = '';
    }
    else
    {
      // cookie is not set: use default page as parameter in querystring
    }
  }
}

document.writeln('<FRAMESET COLS="*,780,*" FRAMESPACING="0" FRAMEBORDER="0" BORDER="0">');
document.writeln('  <FRAME SRC="blank.htm" NAME="leftEmpty" FRAMEBORDER="0" SCROLLING="No" NORESIZE MARGINWIDTH="0" MARGINHEIGHT="0" BORDER="0">');
document.writeln('  <FRAMESET ROWS="120,*,40" FRAMESPACING="0" FRAMEBORDER="0" BORDER="0"> ');
document.writeln('    <FRAME SRC="header.htm" NAME="headerFrame" FRAMEBORDER="0" SCROLLING="No" NORESIZE MARGINWIDTH="0" MARGINHEIGHT="0" BORDER="0">');
document.writeln('    <FRAMESET COLS="160,*">');
document.writeln('      <FRAME SRC="menu.htm" NAME="' + DEFAULT_MENU_FRAME_NAME + '" FRAMEBORDER="0" SCROLLING="No" NORESIZE MARGINWIDTH="0" MARGINHEIGHT="0" BORDER="0">');
if (strContentURL.length == 0) 
{
  document.writeln('    <FRAME SRC="content.htm" NAME="contentFrame" FRAMEBORDER="0" SCROLLING="NO" NORESIZE MARGINWIDTH="0" MARGINHEIGHT="0" BORDER="0">');
}
else
{
  document.writeln('    <FRAME SRC="content.htm?SHOW_URL=' + strContentURL + '" NAME="contentFrame" FRAMEBORDER="0" SCROLLING="NO" NORESIZE MARGINWIDTH="0" MARGINHEIGHT="0" BORDER="0">');
}
document.writeln('    </FRAMESET>');
document.writeln('    <FRAME SRC="footer.htm" NAME="footerFrame" FRAMEBORDER="0" SCROLLING="NO" NORESIZE MARGINWIDTH="0" MARGINHEIGHT="0" BORDER="0">');
document.writeln('  </FRAMESET>');
document.writeln('  <FRAME SRC="blank.htm" NAME="rightEmpty" FRAMEBORDER="0" SCROLLING="NO" NORESIZE MARGINWIDTH="0" MARGINHEIGHT="0" BORDER="0">');
document.writeln('</FRAMESET>');
document.writeln('<NOFRAMES>');
document.writeln('  <BODY BGCOLOR="#FFFFFF">');
document.writeln('  </BODY>');
document.writeln('</NOFRAMES>');

