/*------------------------------------------------------------------- 
This script is based on ideas of Dieter Bungers GMD www.gmd.de
Additional programming by Heibel Multimedia: www.heibel.nl
--------------------------------------------------------------------*/
	var mdi=textSizes[1], sml=textSizes[2], tst=0, gotopage="0",theHrefcurrent="",theHrefTemp="", par=0;

function reDisplay(currentNumber,currentIsExpanded,gotopage,par) {
	if (currentNumber=="0") {
			currentNumber=start;
			start="0";
			tst=1;
		}

		toc.document.open();
	toc.document.write("<html>\n<head></head>\n<body scroll='no'  oncontextmenu='return false' onselectstart='return false' ondragstart='return false' background=\ " + backColor +" \>\n<center><a href=\"http://www.heibel.nl/index.html\" target=\"_top\"><IMG height=40 alt='home' SRC='./pix/home2.gif' width=40 border=0></a></center><br><table border=0 cellspacing=0 cellpadding=0>\n<tr>");;
	var currentNumArray = currentNumber.split(".");
	var currentLevel = currentNumArray.length-1;
	var scrollY=0, addScroll=true, theHref="";
	for (i=0; i<tocTab.length; i++) {
		isCurrent_ = tocTab[i][3];
		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) {
				toc.document.writeln("\n<td colspan=" + (nCols+1) + "><center><a href=\"javaScript:\parent.reDisplay('" + thisNumber + "'," + thisIsExpanded + ")\" onMouseover=\"window.status='startpage';return true\" onMouseout=\"window.status=''\" style=\"font-size:5pt\">" + logo1 +  "<font  style=\"font-family: " + fontTitle + "; font-weight:bold; font-size:" + textSizes[0] + "pt; color: " + titleColor + "; text-decoration:none\">" +tocTab[i][1] + "<font  style=\"font-size:5pt\"><br>" + logo2 + "</center>" + "<br><center><IMG height=41 alt='startpage' SRC='./pix/paint2.gif' width=180 border=0></a></center></td></tr>");


				for (k=0; k<nCols; k++) {
					toc.document.write("<td>&nbsp;</td>");
				}
				toc.document.write("<td width=290>&nbsp;</td></tr>");
				}
			else {
				
	
			if (addScroll) scrollY+=((thisLevel<2)?mdi:sml)*25;
				if (isCurrentNumber) addScroll=false;
				var isLeaf = (i==tocTab.length-1) || (thisLevel >= tocTab[i+1][0].split(".").length-1);
				img = (isLeaf)?"leaf":(thisIsExpanded)?"minus":"plus";
				toc.document.writeln("<tr>");
				for (k=1; k<=thisLevel; k++) {
					toc.document.writeln("<td>&nbsp;</td>");
				}
if (isCurrent_ == 4 & thisIsExpanded==false) thisIsExpanded=true;
				toc.document.writeln("<td valign=top><a href=\"javaScript:parent.reDisplay('" + thisNumber + "'," + thisIsExpanded + ");\" onMouseover=\"window.status=this.innerText;return true\" onMouseout=\"window.status=''\"><img src=\"pic/" + img + ".gif\" width=13 height=12 border=0></a></td> <td colspan=" + (nCols-thisLevel) + "><a href=\"javaScript:\parent.reDisplay('" + thisNumber + "'," + thisIsExpanded + ")\" onMouseover=\"window.status=this.innerText;return true\" onMouseout=\"window.status=''\" style=\"font-family: " + fontLines + ";" + ((thisLevel<=mLevel)?"font-weight:bold":"") +  "; font-size:" + ((thisLevel<=mLevel)?mdi:sml) + "pt; color: " + ((isCurrentNumber|(par==0 & thisIsExpanded))?currentColor:normalColor) + "; text-decoration:none\">" + ((showNumbers)?(thisNumber+" "):"") + tocTab[i][1] + "</a>" + ((isCurrentNumber)?"<BGSOUND SRC=\"" + tocTab[i][3] + "\"></td></tr>":"</td></tr>"));
			}
		}
	}
	toc.document.writeln("</table>\n</body>");
	toc.document.close();
	toc.scroll(0,scrollY);
if (tst!=1) {
if (gotopage>'0'){
theHref="./m" + currentNumArray[0] + "/h" + currentNumArray[1] + "p" + gotopage +"o1.html";
}
if (par==0){
theHref="./m" + currentNumArray[0] + "/body.html";
theHrefcurrent=theHref;
theHrefTemp=theHrefcurrent;
body.location.href = theHref;
}
if (theHref != "" & theHrefcurrent!=theHref) {
theHrefcurrent=theHref;
theHrefTemp=theHrefcurrent;
body.location.href = theHref;
gotopage="0";
}
}
else {
if (theHref != "") {
theHrefcurrent=theHref;
body.location.href = starthtm;
		starthtm="./m0/h1p1o1.html";

gotopage="0";
tst=0;
}
	}
}

function theHrefCur(){
theHrefTemp=theHrefcurrent;
theHrefcurrent="";
}
function theHrefCur1(){
theHrefcurrent=theHrefTemp;
}
function Link(chap,par,page){
theHrefcurrent="";
var gr=chap + '.' + par;
reDisplay(gr,true,page,par);
}
V_MenuOn=true;
function switchFrameSet(V_spanvar){
if (V_spanvar){
V_MenuOn=true
if (top.parent.frames.length==3){
top.parent.frames('header1').document.all.togglemenu.src='./pic/minus.gif';
}}else{	if (V_MenuOn==true){
document.body.cols = "0, *";
V_MenuOn=false;
if (top.parent.frames.length==3){
top.parent.frames('header1').document.all.togglemenu.src='./pic/plus.gif';
}}else{document.body.cols = "200,*";V_MenuOn=true;
if (top.parent.frames.length==3){
top.parent.frames('header1').document.all.togglemenu.src='./pic/minus.gif';
}}}}