if (navigator.appName.toLowerCase().indexOf("explorer") > -1) {
	var mdi=textSizes[1], sml=textSizes[2];
        var backImg="image/leftback.gif";
}
else {
	var mdi=textSizes[3], sml=textSizes[4];
        var backImg="image/leftback.gif";
}

function reDisplay(currentNumber,currentIsExpanded) {
	toc.document.open();
	toc.document.writeln("<HTML><HEAD><TITLE>TEBOLO Einrichtungshaus</TITLE>");
	toc.document.writeln("<style TYPE='text/css'>");
	toc.document.writeln(" a:hover { font-family: tahoma,arial,helvetica; color: rgb(0,0,0); text-decoration: underline; }");
	toc.document.writeln(" a:link { font-family: tahoma,arial,helvetica; color: rgb(0,0,0); text-decoration: none; }");
	toc.document.writeln(" a:visited { font-family: tahoma,arial,helvetica; color: rgb(204,0,0); text-decoration: none; }");
	toc.document.writeln(" a:visited:hover { font-family: tahoma,arial,helvetica; color: rgb(204,0,0); text-decoration: underline; }");
	toc.document.writeln(" span { color: rgb(0,0,0); text-decoration: underline; } ");
	toc.document.writeln("</style></HEAD>");
	
    toc.document.writeln("<BODY ");
        toc.document.writeln("	BGCOLOR=#FFF2AB TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES=fixed BACKGROUND="+backImg+">");
        toc.document.writeln("<A HREF='home.html' target='_top'><IMG SRC='image/tebologo2.gif' WIDTH=190 HEIGHT=58 BORDER=0 HSPACE=3 VSPACE=7 ALT='zurück zur Homepage'></A><BR>");
        toc.document.writeln("<TABLE BORDER=0 CELLPADDING='0' CELLSPACING='0' WIDTH='195'>");
        toc.document.writeln("<TR><TD ALIGN=center><TABLE BORDER=0 CELLPADDING='+0' ");
        toc.document.writeln("CELLSPACING=0 WIDTH=170>");

	var currentNumArray = currentNumber.split(".");
	var currentLevel = currentNumArray.length-1;
	var scrollY=0, addScroll=true, theHref="";
	for (i=0; i<tocTab.length; i++) {
                img="img"+i;
		thisNumber = tocTab[i][0];
		var isCurrentNumber = (thisNumber == currentNumber);
		if (isCurrentNumber) theHref=tocTab[i][2];
		var thisNumArray = thisNumber.split(".");
		var thisLevel = thisNumArray.length-1;
		var toDisplay = true;
		if (thisLevel > 0) {
		for (j=0; j<thisLevel; j++) {
			toDisplay = (j>currentLevel)?false:toDisplay && (thisNumArray[j] == currentNumArray[j]);
			}
		}
		thisIsExpanded = toDisplay && (thisNumArray[thisLevel] == currentNumArray[thisLevel])
		if (currentIsExpanded) {
			toDisplay = toDisplay && (thisLevel<=currentLevel);
			if (isCurrentNumber) { thisIsExpanded = false; }
		}
		
		if (toDisplay) {			
		if (i != 0) {
			if (addScroll) scrollY+=((thisLevel<2)?mdi:sml)*25;
			if (isCurrentNumber) addScroll=false;
                        if (thisIsExpanded == true) { 
			    myColor="#CC0000";
 			    imgBack="image/mback2.gif";
			    imgSrc=tocTab[i][3];
			    imgHi=30;
			    imgWi=170;
                         } else { 
			    myColor="#000000";
			    imgBack="image/mback.gif"
			    imgSrc="image/blank.gif";
			    imgHi=5;
			    imgWi=170;}

		if (thisLevel==0) {
	toc.document.writeln("<TD VALIGN=MIDDLE WIDTH=170 HEIGHT=25");
	toc.document.writeln("	BACKGROUND='"+imgBack+"'>  <A ");
	toc.document.writeln(" 	HREF=\"javaScript:\parent.reDisplay('" + thisNumber + "'," + thisIsExpanded + ");\" ");
	toc.document.writeln(" 	STYLE=\" color:"+myColor+"; font-family:'" + fontTitle + "'; font-weight:bold; font-size:" + mdi + "em; \">"+tocTab[i][1] + "</A></TD></TR>");
	toc.document.writeln(" <TR><TD><IMG ");
	toc.document.writeln(" 	SRC='"+imgSrc+"' NAME='img" +i+"' HEIGHT="+imgHi+" WIDTH="+imgWi+" BORDER=0 ALT=''></TD></TR>");
		  } else {
	toc.document.writeln("	<TD WIDTH=170 BACKGROUND='image/mback3.gif' BGCOLOR='#FFFFCC' VALIGN=MIDDLE HEIGHT=5>  <A ");
	toc.document.writeln(" 		HREF=\"javaScript:\parent.reDisplay('" + thisNumber + "'," + thisIsExpanded + ");\" ");
	toc.document.writeln(" 		STYLE=\" font-family: "+ fontLines +"; font-weight:bold; font-size:" + sml + "em; \">" + tocTab[i][1] + "</A>\n\t</TD>\n</TR>");

		  }
		}
	     }
	}
	toc.document.writeln("</TABLE>\n</TD></TR></TABLE></BODY></HTML>");
	toc.document.close();
	toc.scroll(0,scrollY);
	
	if (theHref != "") main.location.href = theHref;
}


