
//	This script generates an optimal frameset for different browsers.
//	The resulting frameset is exactly (Microsoft) or close to (Netscape) the following:
//
//	<frameset rows='105,*' framespacing=0 frameborder='NO' BORDER='0'>
//		<frame src='[your top frame source as defined in index.html]' frameborder=0 name='navigation_top' marginwidth=0 marginheight=0 scrolling='no'>
//		<frame src='[your content frame source as defined in index.html]' name='content' frameborder=0 marginwidth=0 marginheight=0 noresize scrolling='auto'>
//		<frame src='[your bottom frame source as defined in index.html]' frameborder=0 name='navigation_bottom' marginwidth=0 marginheight=0 scrolling='no'>
//	</frameset>
//
//	NOTE:
//
//	top frame's name is "navigation_top" 
//	content frame's name is "content" 
//	bottom frame's name is "navigation_bottom"

//--BEGIN minimal top frame height, do not edit   --//
var topFrameMinimum = 105;	// actually 102, Netscape crops one more px here
//--END minimal top frame height, do not edit   --//

//--BEGIN minimal bottom frame height, do not edit   --//
var bottomFrameMinimum = 1;	// actually 20, Netscape crops one more px here
//--END minimal bottom frame height, do not edit   --//

//--BEGIN basic variables for Netscape workaround, do not edit   --//
var theHeight = window.innerHeight;
var thePercent = (theHeight/100);
var currentWidth = window.innerWidth;
var currentHeight = window.innerHeight;
var tmpTop = 0;
var tmpBottom = 0;
var allDefined = 0;
var checkTopHeight = true;
var checkBottomHeight = true;
var iAgent = window.navigator.userAgent;
//--END basic variables for Netscape workaround, do not edit   --//

//--BEGIN basic functions for Netscape workaround, do not edit   --//
function IsIE()
	{//	get browser type
	return iAgent.indexOf("MSIE") > 0;
	}
function checkForResize()
	{//	Netscape workaround if window gets resized
	if ((window.innerWidth != currentWidth) || (window.innerHeight != currentHeight))
		window.location.href = frameset_url;
	//else
	//	setTimeout('checkForResize()',1000);
	}
//--END basic functions for Netscape workaround, do not edit   --//

//--BEGIN Netscape workaround, do not edit   --//
if (!IsIE() && !document.getElementById)
	{//--BEGIN frameset definition for Netscape
	for (i = 1; i < 100; i++)
		{
		if (checkTopHeight)
			if (Math.floor(thePercent*i) >= topFrameMinimum)
				{
				tmpTop = i;
				checkTopHeight = false;
				allDefined++;
				}
		if (checkBottomHeight)
			if (Math.floor(thePercent*i) >= bottomFrameMinimum)
				{
				tmpBottom = i;
				checkBottomHeight = false;
				allDefined++;
				}
			if (allDefined == 2)
			{ 
				var html = "<frameset rows='111,*,21' framespacing=0 frameborder='NO' BORDER='0'>"
					+ "<frame src='" + topFrameSource + "' frameborder=0 name='top_navigation' marginwidth=0 marginheight=0 SCROLLING='NO'>"
					+ "<frame src='" + contentFrameSource + "' name='content' frameborder=0 marginwidth=0 marginheight=0 noresize SCROLLING='AUTO'>"			
					+ "<frame src='" + bottomFrameSource + "' frameborder=0 name='bottom_navigation' marginwidth=0 marginheight=0 SCROLLING='NO'>"
					+ "<\/frameset>";				

				document.write(html);
				i = 100;
			}
		//setTimeout('checkForResize()',1000);
		}
	}//--END frameset definition for Netscape
    else
	{//--BEGIN frameset definition for MS Internet Explorer
			document.write("<frameset rows='111,*,21' framespacing=0 frameborder='NO' BORDER='0'>");
			document.write("<frame src='" + topFrameSource + "' frameborder=0 name='top_navigation' marginwidth=0 marginheight=0 SCROLLING='NO'>");
			document.write("<frame src='" + contentFrameSource + "' name='content' frameborder=0 marginwidth=0 marginheight=0 noresize SCROLLING='AUTO'>");
			document.write("<frame src='" + bottomFrameSource + "' frameborder=0 name='bottom_navigation' marginwidth=0 marginheight=0 SCROLLING='NO'>");
			document.write("<\/frameset>");
	}//--END frameset definition for MS Internet Explorer
//--END Netscape workaround, do not edit   --//

// RASTER CONTROL START //
/* um das zwischen den neuen und den alten Frame Booster hin und her zu schalten, müssen wir sicher
   gehen, das die zu änerten Objekte auch da sind. Um dies sicherzustellen warten wir so lange,
   bis die werte topframeload & bottomframeload (werden entsprechend von den jeweiligen TOP / BOTTOM Seiten gesetzt)
   auf TRUE stehen. Erst dann setzen wir den entsprechenden Raster*/

/* RASTER CONTROL not in use since Relaunch 24.03.2004
var topframeload = false;
var bottomframeload = false;

function check_style(get_stylekind){
	if(get_stylekind == "main"){setTimeout('timehold("main")', 1);}
	else {setTimeout('timehold("new")', 1);}	
}

function timehold(stylekind){
    if (((topframeload == true) && (bottomframeload == true)) && (stylekind != "")){
        if (stylekind == "main"){			
         top_navigation.logoPos(0);
        	bottom_navigation.SetBottomStyle("main");
        } else {
        	top_navigation.logoPos(1);
        	bottom_navigation.SetBottomStyle("new");
		}
	} else {
        	check_style(stylekind);
	}
}
*/
// RASTER CONTROL END //  