menu = new MenuObject();

function MenuObject() {
	this.level = new Array ();
	this.parent = new Array ();
	this.titel = new Array ();
	this.href = new Array ();
	this.show = new Array ();
	this.index = 0;
	this.len = 0;
	this.AddItem = AddItem;
	this.SearchMe = SearchMe;
	this.ParentIndex = ParentIndex;
	this.FindLevel = FindLevel;
	this.Hoofdlijn = Hoofdlijn;
	}

// de menu items moeten in logische volgorde staan 
// de files moeten extentie *** .html *** hebben 

menu.AddItem("m0",	"-",	"-", 			       	"--@#&",					"0");

menu.AddItem("mz",	"m0",	"Home", 		       	"index.html",				"1");
menu.AddItem("mz1",	"mz",	"Disclaimer", 		       	"support/disclaimer.html",		"0");
menu.AddItem("mz2",	"mz",	"Sitemap", 		       	"support/sitemap.html",			"0");
// menu.AddItem("mz3",	"mz",	"Search", 		       	"/cgi-bin/search.cgi",				"1");

menu.AddItem("m1",	"m0",	"About us",     	   	"about/aboutus.html",			"1");			
menu.AddItem("m13",	"m1",	"Design for manufacturing",	"about/dfm.html",			"1");
menu.AddItem("m13",	"m1",	"Design for manufacturing",	"about/dfm2.html",			"0");
menu.AddItem("m14",	"m1",	"Management team",		"about/management.html",		"1");
menu.AddItem("m16",	"m1",	"Alliances",  	  	 	"about/alliances.html",			"1");
menu.AddItem("m17",	"m1",	"Projects and Networks",	"about/projects.html",		"1");
menu.AddItem("m18",	"m1",	"Markets and applications", 	"about/markets.html",		"1");
menu.AddItem("m181",	"m18",	"Telecommunication",	 	"about/datacom.html",		"1");
menu.AddItem("m182",	"m18",	"Life sciences", 	 	"about/lifesciences.html",		"1");
menu.AddItem("m183",	"m18",	"Fine chemistry",		"about/ipc.html",			"1");
menu.AddItem("m184",	"m18",	"Space", 		 	"about/space.html",			"1");
menu.AddItem("m19",	"m1",	"Products",		 	"about/products.html",		"1");
menu.AddItem("m1a",	"m1",	"Customers",		 	"about/references.html",		"1");
menu.AddItem("m1a0",	"m1a",	"Bronkhorst", 			"about/r_bronkhorst.html",		"0");
menu.AddItem("m1a1",	"m1a",	"Corecom", 			"about/r_corecom.html",		"0");
menu.AddItem("m1a2",	"m1a",	"Mierij Meteo", 		"about/r_mierij.html",		"0");
menu.AddItem("m1a3",	"m1a",	"Siemens", 			"about/r_siemens.html",		"0");
menu.AddItem("m1a4",	"m1a",	"Océ", 				"about/r_oce.html",			"0");
menu.AddItem("m1a5",	"m1a",	"Unilever", 			"about/r_unilever.html",		"0");
menu.AddItem("m1a6",	"m1a",	"ESA", 				"about/r_esa.html",			"0");
menu.AddItem("m1a7",	"m1a",	"Vescent",			"about/r_vescent.html",		"0");
menu.AddItem("m1a9",	"m1a",	"lmc",				"about/r_lmc.html",		"0");
menu.AddItem("m19",	"m1",	"Employment", 		       	"about/employment.html",			"1");

menu.AddItem("ma",	"m0",	"Integrated optics", 		"integratedoptics/integrated_optics.html",	"1");
menu.AddItem("m325",	"ma",	"TriPleX technology", 		"integratedoptics/triplex.html",	"1");
menu.AddItem("m321",	"ma",	"SiON technology", 		"integratedoptics/sion.html",		"1");
menu.AddItem("m322",	"ma",	"(Bio)chemical sensing",	"integratedoptics/biosensor.html",	"1");
menu.AddItem("m323",	"ma",	"ZnO activation", 		"integratedoptics/zno.html",		"1");
menu.AddItem("m324",	"ma",	"Fiber to chip couplings", 	"integratedoptics/vgrooves.html",	"1");
menu.AddItem("m326",	"ma",	"Microfluidics integration ", 	"integratedoptics/young.html",		"1");

menu.AddItem("mb",	"m0",	"Microfluidics", 		"microfluidics/microfluidics.html",	"1");
menu.AddItem("mb7",	"mb",	"More about Microfluidics", "microfluidics/more_about_microfluidics.html",	"1");
menu.AddItem("mb6",	"mb",	"Microfluidic substrates",	"microfluidics/microfluidic_substrates.html",		"1");
menu.AddItem("mb9",	"mb",	"Standard processs","microfluidics/standard_process.html",		"1");
menu.AddItem("mba",	"mb",	"Mask design", 			"microfluidics/mask_design.html",	"1");
menu.AddItem("mb8",	"mb",	"Optical detection", 		"integratedoptics/young.html",		"1");
menu.AddItem("mb1",	"mb",	"MATAS platform",		"microfluidics/matas.html",		"1");
menu.AddItem("mb2",	"mb",	"Chips for CE",		  	"microfluidics/capillary_electrophoresis.html",		"1");
menu.AddItem("mb3",	"mb",	"Micromixers",		  	"microfluidics/mixer.html",		"1");
menu.AddItem("mb5",	"mb",	"Conductivity sensors",		"microfluidics/electrical_conductivity.html",		"1");

menu.AddItem("mc",	"m0",	"MEMS foundry services", 	"foundry/foundry.html",			"1");
menu.AddItem("m310",	"mc",	"PECVD SiOxNy", 		"foundry/pecvdsioxny.html",		"1");
menu.AddItem("m311",	"mc",	"LPCVD Si3N4",	 		"foundry/lpcvdsi3n4.html",		"1");
menu.AddItem("m312",	"mc",	"LPCVD SiRN", 			"foundry/lpcvdsirn.html",		"1");
menu.AddItem("m313",	"mc",	"Metal PVD",	 		"foundry/pvdmetals.html",		"1");
menu.AddItem("m314",	"mc",	"ZnO PVD",	 		"integratedoptics/zno.html",		"1");
menu.AddItem("m315",	"mc",	"DRIE etching", 		"foundry/drie.html",			"1");
menu.AddItem("m316",	"mc",	"DRIE of borosilicate glass",	"foundry/drieglass.html",		"1");
menu.AddItem("m317",	"mc",	"KOH etching", 			"foundry/koh.html",			"1");
menu.AddItem("m31a",	"mc",	"Isotropic glass etching", 	"foundry/wet_etching.html",			"1");
menu.AddItem("m318",	"mc",	"Anodic bonding",	 	"foundry/anodicbonding.html",		"1");
menu.AddItem("m319",	"mc",	"Direct / fusion bonding",	"foundry/directbonding.html",		"1");

menu.AddItem("md",	"m0",	"Events", 		       	"events/events.html",			"1");

menu.AddItem("m5",	"m0",	"News", 		       	"news/news.html",			"1");
menu.AddItem("m501",	"m5",	"LioniX in the news", 		"news/inthenews.html",			"1");
menu.AddItem("m502",	"m5",	"Innofonds", 			"news/pr_050601.html",			"0");
menu.AddItem("m503",	"m5",	"Cambridge Resolution", 	"news/pr_020701.html",			"0");
menu.AddItem("m504",	"m5",	"Dreifuss",	 		"news/pr_060801.html",			"0");
menu.AddItem("m505",	"m5",	"SensoNor", 			"news/pr_011101.html",			"0");
menu.AddItem("m506",	"m5",	"Onstream",	 		"news/pr_010102.html",			"0");
menu.AddItem("m507",	"m5",	"3T", 				"news/pr_110402.html",			"0");
menu.AddItem("m508",	"m5",	"Scientific Generics", 		"news/pr_021002.html",			"0");
menu.AddItem("m509",	"m5",	"JayWalker", 			"news/pr_021102.html",			"0");
menu.AddItem("m510",	"m5",	"Indes", 			"news/pr_300403.html",			"0");
menu.AddItem("m511",	"m5",	"NKT", 				"news/pr_180903.html",			"0");
menu.AddItem("m512",	"m5",	"Phoenix", 			"news/pr_111203.html",			"0");
menu.AddItem("m513",	"m5",	"Micraline", 			"news/pr_171203.html",			"0");
menu.AddItem("m514",	"m5",	"Olivetti", 			"news/pr_230104.html",			"0");
menu.AddItem("m515",	"m5",	"Nanosciences", 		"news/pr_010404.html",			"0");
menu.AddItem("m516",	"m5",	"Bigtec", 			"news/pr_260704.html",			"0");
menu.AddItem("m517",	"m5",	"KronenbergAward", 		"news/pr_261104.html",			"0");
menu.AddItem("m518",	"m5",	"Hull",		 		"news/pr_140206.html",			"0");
menu.AddItem("m518",	"m5",	"Mars",		 		"news/pr_250406.html",			"0");
menu.AddItem("m519",	"m5",	"Korea",		 	"news/pr_080606.html",			"0");
menu.AddItem("m520",	"m5",	"MEMSTC",		 	"news/pr_20061201.html",		"0");
menu.AddItem("m521",	"m5",	"starttrix",		 	"news/pr_20070208.html",		"0");
menu.AddItem("m522",	"m5",	"mars2",		 	"news/pr_070708.html",			"0");

menu.AddItem("mg",	"m0",	"Downloads", 		       	"download/flyers.html",			"1");	
menu.AddItem("mg1",	"mg",	"Publications", 		"download/publications.html",		"1");
menu.AddItem("mg2",	"mg",	"Rep download (password)", 	"rep/rep.html",			"1");

menu.AddItem("m7",	"m0",	"Contact",			"contact/contact.html",			"1");
menu.AddItem("m71",	"m7",	"Address",			"contact/address.html",			"1");
menu.AddItem("m72",	"m7",	"Directions",			"contact/address.html#directions",	"1");
menu.AddItem("m73",	"m7",	"MEMS TC (Scandinavia)",	"contact/rep_memstc.html",		"0");
menu.AddItem("m74",	"m7",	"Cambridge Resolution (UK)",	"contact/rep_camres.html",		"0");
menu.AddItem("m75",	"m7",	"Nanoscience (USA)",		"contact/rep_nanosciences.html",	"0");
menu.AddItem("m76",	"m7",	"JayWalker (USA)",		"contact/rep_jaywalker.html",		"0");
menu.AddItem("m77",	"m7",	"Walter Dreifuss (Israel)",	"contact/rep_dreifuss.html",		"0");
menu.AddItem("m78",	"m7",	"Technovena (Singapore)",	"contact/rep_technovena.html",		"0");
menu.AddItem("m79",	"m7",	"Bigtec (India)",		"contact/rep_bigtec.html",		"0");
menu.AddItem("m70",	"m7",	"Contact Form",			"contact/contactus.html",		"1");
menu.AddItem("m7a",	"m7",	"Thanks", 		       	"contact/thanks.html",			"0");
menu.AddItem("m7b",	"m7",	"Incomplete", 		       	"contact/incomplete_form.html",		"0");
menu.AddItem("m7c",	"m7",	"UIT-Solutions (Korea)",	"contact/rep_uit.html",			"0");

// -------- einde van alle instellingen


menu.len = menu.href.length;

function AddItem(l,p,t,h,s) {
	this.level[this.index]=l;
	this.parent[this.index]=p;
	this.titel[this.index]=t;
	this.href[this.index]=h;
	this.show[this.index]=s;
	this.index++;
	}


function SearchMe () {
// geeft de index van menu item van huidige location.href
// geeft -1 als niet bestaat
	var i=0;
	var found=false;
	var loc = unescape(location.href);
	while (found == false && i < this.len) {
		found = (loc.indexOf(this.href[i])>=0) ? true : false; 
//		document.write(i," href[i]= ",this.href[i],"<br> location.href= ",loc," found:",found,"<br><br>");
		i++; 
		};
	return (i*found-1);
}


function ParentIndex (item) {
// geeft de index van de parent van menu item; -1 als er geen parent gevonden is
	var i = 0; 
	var found = false;
	while (found == false && i < this.len) {
		found = (this.level[i] == this.parent[item]) ? true : false; i++; 
		};
	var father = i-1;
	return (i*found-1);
	}


function FindLevel (i) {
	var level = 0;
	while (this.ParentIndex(i)>=0) {
		i = this.ParentIndex(i); 
		level++;
		};
	return (level);
	};

	
function Hoofdlijn (i) {
// geeft een array met de menu indices van i, parent van i, parent van de parent van i etc, maar dan in omgekeerde volgorde.
	var level = 0;
	var lijn = new Array ();
	lijn[0] = i;
	while (this.ParentIndex(i,0)>=0) {
		i = this.ParentIndex(i,0); 
		lijn[level+1]=i; level++;
		};
	lijn.reverse();
	return (lijn);
	};


// globale functies


function backtoroot() {
	var i = menu.SearchMe();
	if (i>=0) { //relatief pad; werkt altijd maar alleen voor de bladzijden die in de menustructuur zijn opgenomen
		var path = menu.href[i];
		var pos=0;
		var toroot="";
		while (path.indexOf("/",pos)>=0) {pos=path.indexOf("/",pos)+1;toroot = toroot + "../"}
	} else { //bladzijden die niet in de menustructuur staan
		toroot="/"  					//webserver
//		toroot="D:/My Documents/lionix/web/";	//thuis
		};
	return toroot
}

function Sitemap() {
// print de sitemap; alleen de menuitems waarvan menu.show[i]=1 worden getoond
	var i = 1; // root overslaan
	while (i<=menu.len-1) {
		if (menu.show[i]==1) {
			if(menu.FindLevel(i)==1) {
				document.write('<br><b>');
				};
			for (j=1;j<menu.FindLevel(i)+1;j++) {
				document.write('<IMG src="'+backtoroot()+'iconpics/sidemenu1.gif"><IMG src="'+backtoroot()+'iconpics/sidemenu1.gif"><IMG src="'+backtoroot()+'iconpics/sidemenu1.gif">');
				};
			document.write('<a href="',backtoroot()+menu.href[i],'\">',menu.titel[i],'</a><br>');
			if(menu.FindLevel(i)==1) {
				document.write('</b>');
				};
			};
		i++;
		};
	}

function googleSitemap() {
// print de sitemap; alleen de menuitems waarvan menu.show[i]=1 worden getoond
	var i = 1; // root overslaan
	while (i<=menu.len-1) {
			document.write('<a href="http://www.lionixbv.nl',backtoroot()+menu.href[i],'\">',"http://www.lionixbv.nl/"+menu.href[i],'</a><br>');
		i++;
		};
	}


function preload() {
	if (parent.name != 'printerFriendlyWindow') {
		staticimage=document.images.banner.src;
		extensionpos=staticimage.lastIndexOf(".");
		flashimage=staticimage.substring(0,extensionpos)+"click"+staticimage.substring(extensionpos,staticimage.length);
       		preloadimage = new Image ();
		preloadimage.src=flashimage;
		};
	};
	
function lightning() {
	if (parent.name != 'printerFriendlyWindow') {
		document.images.banner.src=flashimage;
		window.setTimeout("document.images.banner.src=staticimage",1);
//		document.waterdrop.play();
		
		};
        };

function frameCheck() {
        if (parent.location.href != self.location.href) {
             	window.parent.location.replace (window.self.location.href);
             	};
        };

function printHeader1() {
// header voor de printer friendly version
 	document.write('<p><img src="'+backtoroot()+'iconpics/integrating_print.png" align=right>');
 	document.write('<img src="'+backtoroot()+'iconpics/logo_print.png"><br>');
 	document.write('<IMG src="'+backtoroot()+'iconpics/hr_blue.gif" width=100% height=1></p>');
 	document.write('<TABLE cellpadding=0 border=0 width=100%>');
	document.write('<TR>');
	document.write('<TD valign=top><p>LioniX BV<br>PO Box 456<br>7500 AH Enschede<br>The Netherlands<br>Phone: +31 (0)53 489 3827<br>Fax: +31 (0) 53 489 3601<br>Email: <A href="mailto:info@lionixbv.nl">info@lionixbv.nl</a><br></TD>');
	document.write('<TD valign=top width=150>');
	document.write('	<TABLE cellpadding=0 border=0 cellspacing=0 width=150>');
	document.write('	<TR><TD valign=top background="'+backtoroot()+'iconpics/thiswindowclose.gif" onClick="window.opener.focus();window.close()"><a href="'+backtoroot()+'index.html"><IMG src="'+backtoroot()+'iconpics/spacer.gif" width=150 height=20 border=0></a></TD></TR>');
	document.write('	<TR><TD valign=top height=5></TD></TR>');
	document.write('	<TR><TD valign=top background="'+backtoroot()+'iconpics/thiswindowprint.gif" onClick="window.print()"><a href="javascript:"><IMG src="'+backtoroot()+'iconpics/spacer.gif" width=150 height=20 border=0></a></TD></TR>');
	document.write('	</TABLE>');
	document.write('</TD>');
	document.write('<TD valign=top><p class=alignright>From LioniX\' website<br><a href="http://www.lionixbv.nl" target="lionix">http://www.lionixbv.nl</a><br> &copy 2005 LioniX BV</p></TD>');
 	document.write('</TR>');
	document.write('</TABLE>')	
	document.write('<p><IMG src="'+backtoroot()+'iconpics/hr_blue.gif" width=100% height=1></p>');
	self.focus();
	}

function printHeader2(banner,contacttop) {
// header voor de webversie; print achtereenvolgens 
// - waterdrop.wav
// - de *banner*, met imagemap
// - daaroverheen het bewegende spectrum met ID 'mover'
// - daaroverheen het loge met transparante 'IX'
// - vevolgens het 'contact- en search menuutje' op de vertikale positie *contacttop*
	
//	document.write('<embed src="'+backtoroot()+'iconpics/waterdrop.wav" volume=100 name="waterdrop" autostart=true hidden=true>');
		
	document.write('<div style="position:absolute; top:0; left:0">');
	document.write('<img src="'+backtoroot()+'iconpics/'+banner+'" ismap usemap="#smallpics" border=0 name="banner">');
	document.write('</div> ');
	document.write('<div id="mover" style="position:absolute; top:0; left:0"><img src="'+backtoroot()+'iconpics/spectrum.jpg" width=200 height=45></div> ');
	document.write('<div style="position:absolute; top:0; left:0">');
	document.write('<a href="'+backtoroot()+'index.html" target=_top><img src="'+backtoroot()+'iconpics/logo_lionix_transpix.gif" border=0></a>');
	document.write('</div>');
	document.write('<div style="position:absolute; top:'+contacttop+'; left:480">');
	document.write('<form name="search" method="get" action="/cgi-bin/search.cgi" class=header>');
	document.write('<a class=headermenu href="'+backtoroot()+'contact/contact.html">Contact Us</a>');
	document.write(' | <a class=headermenu href="'+backtoroot()+'support/sitemap.html">Sitemap</a>');
	document.write(' | Search <input type="text" name="search" size=10 value="" class=inputveld>');
	document.write(' <input type="image" src="'+backtoroot()+'iconpics/go.gif"><br>');
	document.write('</form>');
	document.write('</div>');
	document.write('<map name="smallpics">');
	document.write('<area shape="rect" coords="80,66,161,127" href="'+backtoroot()+'foundry/foundry.html">');
	document.write('<area shape="rect" coords="180,66,261,127" href="'+backtoroot()+'microfluidics/microfluidics.html">');
	document.write('<area shape="rect" coords="280,66,361,127" href="'+backtoroot()+'integratedoptics/integrated_optics.html">');
	document.write('</map>');
	}

function printHeader3(contacttop) {
// header voor de webversie; print achtereenvolgens 
// - de *banner*, met imagemap
// - daaroverheen het bewegende spectrum met ID 'mover'
// - daaroverheen het loge met transparante 'IX'
// - vevolgens het 'contact- en search menuutje' op de vertikale positie *contacttop*
	
	document.write('<div style="position:absolute; top:'+contacttop+'; left:480">');
	document.write('<form name="search" method="get" action="/cgi-bin/search.cgi" class=header>');
	document.write('<a class=headermenu href="'+backtoroot()+'contact/contact.html">Contact Us</a>');
	document.write(' | <a class=headermenu href="'+backtoroot()+'support/sitemap.html">Sitemap</a>');
	document.write(' | Search <input type="text" name="search" size=10 value="" class=inputveld>');
	document.write(' <input type="image" src="'+backtoroot()+'iconpics/go.gif"><br>');
	document.write('</form>');
	document.write('</div>');
	}

function openBodyDiv(top,left) {
	document.write('<div style="position:absolute; top:'+top+'; left:'+left+'; width:630; background-image:url('+backtoroot()+'iconpics/bgbody.gif)">');
	}

function closeBodyDiv() {
	document.write('</div>')
	}

function printFooter() {
	document.write('<br><center><img src="'+backtoroot()+'iconpics/hr_blue.gif" width=350 height=1"</center>');
	document.write('<p class=footer><br>| &copy 2010, LioniX BV | ');
	document.write('</p>');
	document.write('<p class=footer>');
	document.write(' | <a class=headermenu href="'+backtoroot()+'support/disclaimer.html"><IMG SRC="'+backtoroot()+'iconpics/doc.gif" border=0>Disclaimer</a>');
	document.write(' | <a class=headermenu href="mailto:webmaster@lionixbv.nl"><IMG SRC="'+backtoroot()+'iconpics/mail.gif" border=0> Webmaster</a>');
	document.write(' |');
	document.write('<br><br></p>');
	}

function movingLogoBg() {
// het bewegende spectrum achter het logo; doet het nog niet in Netscape
// De ID van de div met het bewegende plaatje is 'mover' en is aangemaakt in printHeader2
	var IE = document.all?true:false;
	if (!IE) document.captureEvents(Event.MOUSEMOVE);
	document.onmousemove = getMouseXY;
	function getMouseXY(e) {
		if (IE) {
			tempX = event.clientX + document.body.scrollLeft;
			tempY = event.clientY + document.body.scrollTop;
			document.all.mover.style.pixelLeft = Math.sin(tempX/50 + tempY/50)*50;
		} else {
			tempX = e.pageX;
			tempY = e.pageY;
			document.mover.left = Math.sin(tempX/50 + tempY/50)*50;
		}
		return true;
		}
	}

function printMenu2(top) {
	
	var me = (menu.SearchMe()>=0)?menu.SearchMe():0;
	var lijn = menu.Hoofdlijn(me);
	var mygen = lijn.length;
	var parent = menu.ParentIndex(me);
	var i = 1; //de root wordt overgeslagen
	var m = 2; //de index van het 'active' te markeren menuitem (wijkt af van i als menu.show[i]=0 ).
	document.write('<div style="position:absolute; top:'+top+'; left:0; width:170; height=100%; background-image:url('+backtoroot()+'iconpics/bgmenu.png)">');
//	document.write('<p> menulength: ',menu.len-1,'<br>mygen: ',mygen,'<br> lijn: ',lijn,'<br>me: ',me,'<br>parent: ',parent,'</p>');
	for (var k in lijn) {
		if (menu.show[lijn[k]] =="1") {m=lijn[k]};
		};
	while (i<=menu.len-1) {
		for (j=0;j<=lijn.length;j++) {
			if (menu.parent[i]==menu.level[lijn[j]] && menu.show[i]=="1") {  // SHOW SUBLEVELS
//			if (menu.parent[i]==menu.parent[lijn[j]] && menu.show[i]=="1") {  // DON'T SHOW SUBLEVELS
				if (menu.FindLevel(i)==1) {
//					document.write('<img src="'+backtoroot()+'iconpics/hr_blue.gif" width=170 height=1>');
					};
				if (i==m) {
//					document.write('<p class="sidemenulevel',menu.FindLevel(i),'" STYLE="background-color:#403077" onMouseover="this.style.backgroundColor=\'white\'" onMouseout="this.style.backgroundColor=\'#403077\'">');
					document.write('<p class="sidemenulevel',menu.FindLevel(i),'" STYLE="background-image:url('+backtoroot()+'iconpics/bgh2caption.gif)" >');
					document.write('<a href="'+backtoroot()+menu.href[i],'\" class="sidemenulevel',menu.FindLevel(i),'" STYLE="color:#FFFFFF">');
					}
				else {
					document.write('<p class="sidemenulevel',menu.FindLevel(i),'" onMouseover="this.style.backgroundImage=\'url('+backtoroot()+'iconpics/bgh3caption.gif)\'" onMouseout="this.style.background=\'none\'">');	
					document.write('<a href="'+backtoroot()+menu.href[i],'\" target=_top class="sidemenulevel',menu.FindLevel(i),'">');
				};
				for (k=2;k<=menu.FindLevel(i);k++) { //spaces before
					document.write('<IMG src="'+backtoroot()+'iconpics/sidemenu1.gif" border=0>'); // print a space	
					}
				document.write(menu.titel[i]);

//				for (k=2;k<=menu.FindLevel(i);k++) { //spaces after (right alignment)
//					document.write('<IMG src="../iconpics/sidemenu1.gif" border=0>'); // print a space	
//					}
				document.write('</a>','</p>');
				}	
			}
		i++;
		};
//	document.write('<img src="../iconpics/hr_blue.gif" width=170 height=1><BR>');
	document.write('</div>');
	};

function printMenu3(top) {
	
	var me = (menu.SearchMe()>=0)?menu.SearchMe():0;
	var lijn = menu.Hoofdlijn(me);
	var mygen = lijn.length;
	var parent = menu.ParentIndex(me);
	var i = 1; //de root wordt overgeslagen
	var m = 2; //de index van het 'active' te markeren menuitem (wijkt af van i als menu.show[i]=0 ).
//	document.write('<div style="position:absolute; top:'+top+'; left:0; width:170; height=100%; background-image:url('+backtoroot()+'iconpics/bgmenu.png)">');
//	document.write('<p> menulength: ',menu.len-1,'<br>mygen: ',mygen,'<br> lijn: ',lijn,'<br>me: ',me,'<br>parent: ',parent,'</p>');
	for (var k in lijn) {
		if (menu.show[lijn[k]] =="1") {m=lijn[k]};
		};
	while (i<=menu.len-1) {
		for (j=0;j<=lijn.length;j++) {
			if (menu.parent[i]==menu.level[lijn[j]] && menu.show[i]=="1") {  // SHOW SUBLEVELS
//			if (menu.parent[i]==menu.parent[lijn[j]] && menu.show[i]=="1") {  // DON'T SHOW SUBLEVELS
				if (menu.FindLevel(i)==1) {
//					document.write('<img src="'+backtoroot()+'iconpics/hr_blue.gif" width=170 height=1>');
					};
				if (i==m) {
//					document.write('<p class="sidemenulevel',menu.FindLevel(i),'" STYLE="background-color:#403077" onMouseover="this.style.backgroundColor=\'white\'" onMouseout="this.style.backgroundColor=\'#403077\'">');
					document.write('<p class="sidemenulevel',menu.FindLevel(i),'" STYLE="background-image:url('+backtoroot()+'iconpics/bgh2caption.gif)" >');
					document.write('<a href="'+backtoroot()+menu.href[i],'\" class="sidemenulevel',menu.FindLevel(i),'" STYLE="color:#FFFFFF">');
					}
				else {
					document.write('<p class="sidemenulevel',menu.FindLevel(i),'" onMouseover="this.style.backgroundImage=\'url('+backtoroot()+'iconpics/bgh3caption.gif)\'" onMouseout="this.style.background=\'none\'">');	
					document.write('<a href="'+backtoroot()+menu.href[i],'\" target=_top class="sidemenulevel',menu.FindLevel(i),'">');
				};
				for (k=2;k<=menu.FindLevel(i);k++) { //spaces before
					document.write('<IMG src="'+backtoroot()+'iconpics/sidemenu1.gif" border=0>'); // print a space	
					}
				document.write(menu.titel[i]);

//				for (k=2;k<=menu.FindLevel(i);k++) { //spaces after (right alignment)
//					document.write('<IMG src="../iconpics/sidemenu1.gif" border=0>'); // print a space	
//					}
				document.write('</a>','</p>');
				}	
			}
		i++;
		};
//	document.write('<img src="../iconpics/hr_blue.gif" width=170 height=1><BR>');
//	document.write('</div>');
	};