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))
  {
  	var arUrlParams = LCLib_ParseUrlParams(self.location.search);
	
		for(var i = 0; i < arUrlParams.length; i += 2)
		{
			if(arUrlParams[i] == 'SELECTEDMENU')
			{
				SetCookie('SELECTEDMENU', arUrlParams[i + 1]);
			}
		}
  	
    // ?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
    {
            // cookie is not set: use default page as parameter in querystring
            if(strStartPage.length > 0)
            {
                strContentURL = strStartPage;
            }
            else 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="*,33" frameborder="NO" border="0" framespacing="0">');
document.writeln('    <frameset cols="*,950,*" frameborder="NO" border="0" framespacing="0">');
document.writeln('        <frame src="leftFrame.htm" name="leftFrame" id="leftFrame" scrolling="no" frameborder="0" noresize marginwidth="0" marginheight="0">');
document.writeln('        <frameset rows="104,*,33" frameborder="NO" border="0" framespacing="0">');
document.writeln('            <frame src="logoFrame.htm" name="logoFrame" id="logoFrame" scrolling="no" frameborder="0" noresize marginwidth="0" marginheight="0">');
document.writeln('            <frameset cols="180,770" frameborder="NO" border="0" framespacing="0">');
document.writeln('                <frame src="menuFrame_'+ displayMenu +'.htm" name="menuFrame" id="menuFrame" scrolling="no" frameborder="0" noresize marginwidth="0" marginheight="0">');
document.writeln('                <frameset rows="152,*" frameborder="NO" border="0" framespacing="0">');
document.writeln('                    <frame src="actionFrame.htm" name="actionFrame" id="actionFrame" scrolling="no" frameborder="0" noresize marginwidth="0" marginheight="0">');
document.writeln('            				<frameset cols="586,180,4" frameborder="NO" border="0" framespacing="0">');

if(bIFrameProblemBrowser){
document.writeln('                    <frame src="' + strContentURL + '" name="bodyFrame" id="bodyFrame" scrolling="auto" frameborder="0" noresize marginwidth="0" marginheight="0">');
}else{
if (strContentURL.length == 0) {
document.writeln('            <FRAME SRC="content.htm" NAME="contentFrame" ID="contentFrame" FRAMEBORDER="0" SCROLLING="No" NORESIZE MARGINWIDTH="0" MARGINHEIGHT="0" BORDER="0">');
} else {
document.writeln('            <FRAME SRC="content.htm?SHOW_URL=' + strContentURL + '" NAME="contentFrame" ID="contentFrame" FRAMEBORDER="0" SCROLLING="No" NORESIZE MARGINWIDTH="0" MARGINHEIGHT="0" BORDER="0">');
}
}
//document.writeln('                    <frame src="news1topFrame.htm" name="newsrightFrame" id="newsrightFrame" scrolling="no" frameborder="0" noresize marginwidth="0" marginheight="0">');

document.writeln('                		<frameset rows="30,*,4,26,*" frameborder="NO" border="0" framespacing="0">');
document.writeln('                    <frame src="news1topFrame.htm" name="news1topFrame" id="news1topFrame" scrolling="no" frameborder="0" noresize marginwidth="0" marginheight="0">');
document.writeln('                    <frame src="newsfirstFrame.htm" name="newsfirstFrame" id="newsfirstFrame" scrolling="no" frameborder="0" noresize marginwidth="0" marginheight="0">');
document.writeln('                    <frame src="newsspacerFrame.htm" name="newsspacerFrame" id="newsspacerFrame" scrolling="no" frameborder="0" noresize marginwidth="0" marginheight="0">');
document.writeln('                    <frame src="news2topFrame.htm" name="news2topFrame" id="news2topFrame" scrolling="no" frameborder="0" noresize marginwidth="0" marginheight="0">');
document.writeln('                    <frame src="newssecondFrame.htm" name="newssecondFrame" id="newssecondFrame" scrolling="no" frameborder="0" noresize marginwidth="0" marginheight="0">');

document.writeln('                		</frameset>');
document.writeln('                	</frameset>');
document.writeln('                </frameset>');
document.writeln('            </frameset>');
document.writeln('    <frameset cols="*,951,*" frameborder="NO" border="0" framespacing="0">');
document.writeln('        <frame src="bottomleftFrame.htm" name="bottomleftFrame" id="bottomleftFrame" scrolling="no" frameborder="0" noresize marginwidth="0" marginheight="0">');
document.writeln('        <frame src="bottomFrame_'+ displayMenu +'.htm" name="bottomFrame" id="bottomFrame" scrolling="no" frameborder="0" noresize marginwidth="0" marginheight="0">');
document.writeln('        <frame src="bottomrightFrame.htm" name="bottomrightFrame" id="bottomrightFrame" scrolling="no" frameborder="0" noresize marginwidth="0" marginheight="0">');
document.writeln('    </frameset>');
document.writeln('        </frameset>');
document.writeln('        <frame src="rightFrame.htm" name="rightFrame" id="rightFrame" scrolling="no" frameborder="0" noresize marginwidth="0" marginheight="0">');
document.writeln('    </frameset>');
//document.writeln('</frameset>');
