
var strContentURL = '';

// catch all errors
function handleError() { return(true); }
window.onerror = handleError;

    // 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 = '';
      top.location.replace(self.location.href.substring(0, self.location.href.indexOf('?SHOW_URL=')));
    }
    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
    {
        strContentURL = 'index.php?lccrossproxyRequestUrl=http://www.invent.or.at/' + Startseite_StartseiteDeutsch_link.replace('?', '&');
/*            // cookie is not set: use default page as parameter in querystring
            if (typeof(Menu1) != "undefined" && typeof(Menu1[1]) != "undefined")
            {
                strContentURL = Menu1[1];
            }
            else if (typeof(JSGenericMenuItems) != "undefined" && typeof(JSGenericMenuItems[2]) != "undefined")
            {
                strContentURL = JSGenericMenuItems[2];
            }*/

        }
  }

document.writeln('<frameset rows="*,1" frameborder="NO" border="0" framespacing="0">');
document.writeln('    <frame src="' + strContentURL + '" name="bodyFrame" id="bodyFrame" scrolling="auto" frameborder="0" noresize marginwidth="0" marginheight="0">');
document.writeln('    <frame src="blank.htm" scrolling="no" frameborder="0" noresize marginwidth="0" marginheight="0">');
document.writeln('</frameset>');
