<!--

/*
Copyright © TrefIC 2001, All Rights Reserved.
Version: 1.0
Developed by: TrefIC
*/

// menuSettings = [border_size, menu_width, border_color, link_width, link_low_color, link_high_color, link_align, header_bg_color, font_size, font_face, text_color, menu_type, highlight_current, item_height, link_disabled_color]
//   0 = border_size
//   1 = menu_width
//   2 = border_color
//   3 = link_width
//   4 = link_low_color
//   5 = link_high_color
//   6 = link_align
//   7 = header_bg_color
//   8 = font_size
//   9 = font_face
//  10 = text_color
//  11 = menu_type
//  12 = highlight_current
//  13 = item_height
//  14 = link_disabled_color
// addLink(link_name, the_link, link_target, status_text, disable_link, onlick_actie)
// addHeader(header_name)
// addEmpty(hoogte)

menuSettings = new Array();
theLinks = new Array();i=0
thisLoc = "" + this.location + "";

// Layer Click fuction
function goTo(e) {
	if (document.getElementById || document.all) {		goLoc = theLinks[e][0]		}
	else {		goLoc = this.link;		e = this.name.substring(4, this.name.length)		};
	if (theLinks[e][4] != "") {	// onclick functie
		eval(theLinks[e][4]);
		};		
	if (theLinks[e][0] != "") {	// link navigatie
		if (theLinks[e][1] == "_top") {			top.location=goLoc			}
		else {			if (theLinks[e][1] == "_blank") {				window.open(goLoc)				}			else {				if (theLinks[e][1] > "" && top.frames[theLinks[e][1]]) {					top.frames[theLinks[e][1]].location=goLoc					}
				else {					location=goLoc					};
				};			};		};
	}

function beginLight() {
	if (!menuSettings[1]&&menuSettings[10]=='vertical') {			menuSettings[1]="WIDTH='"+menuSettings[3]+"'"		}
	else {		if (menuSettings[1]) {			menuSettings[1]="WIDTH='"+menuSettings[1]+"'"			}; 		};	document.write("<TABLE BGCOLOR='"+menuSettings[2]+"' CELLPADDING='0' CELLSPACING='0' BORDER='0' "+menuSettings[1]+">");
	document.write("  <TR>");
	document.write("    <TD WIDTH='100%'>");
	document.write("      <TABLE CELLPADDING='0' CELLSPACING='"+menuSettings[0]+"' BORDER='0' WIDTH='100%'>");
	}

function addHeader(name) {
	if (menuSettings[11]=="vertical") {		document.write("<TR>")		};
	document.write("<TD WIDTH='"+menuSettings[3]+"' HEIGHT='"+menuSettings[13]+"' BGCOLOR='"+menuSettings[7]+"' ALIGN='"+menuSettings[6]+"'>");
	document.write("  <FONT FACE='"+menuSettings[9]+"' COLOR='"+menuSettings[10]+"'>");
	document.write("    &nbsp;"+name+"&nbsp;");
	document.write("  </FONT>");
	document.write("</TD>");
	if (menuSettings[11]=="vertical") {		document.write("</TR>")		};
	}

function addEmpty(hoogte) {	hoogte = hoogte ? hoogte : menuSettings[13];
	if (menuSettings[11]=='vertical') {		document.write("<TR>")		};
	document.write("<TD WIDTH='"+menuSettings[3]+"' HEIGHT='"+hoogte+"' BGCOLOR='"+menuSettings[2]+"'> </TD>");
	if (menuSettings[11]=='vertical') {		document.write("</TR>")		};
	}

function addLink(name, link, target, status_text, disable_link, onlick_actie) {	var t_onmouseover, t_onmouseout;
	i++;
	if (!link) {		link = "";		};
	if (!target) {		target = "";		};
	if (!status_text) {		status_text=link;		};
	theLinks[i] = [link, target, status_text, disable_link, onlick_actie];
	for (j=thisLoc.length; j>-1; j--) {
		if (thisLoc.substring(j,thisLoc.length)==link&&menuSettings[12]=='yes') {			theBGC = menuSettings[5];			j = -1;			}
		else {			theBGC = menuSettings[4];			};		};
			t_onmouseover = " onmouseover='";	if (disable_link != "yes") {		if (menuSettings[5] != "") {
			t_onmouseover = t_onmouseover + "this.bgColor=\"" + menuSettings[5] + "\";";			};
		};	t_onmouseover = t_onmouseover + "window.status=theLinks["+i+"][2];";
	t_onmouseover = t_onmouseover + "return true;'";
	t_onmouseout = " onmouseout='";
	if (theBGC != "") {
		t_onmouseout = t_onmouseout + "this.bgColor=\"" + theBGC + "\";";		};	t_onmouseout = t_onmouseout + "window.status=\"\";'";
		
	if (menuSettings[11]=='vertical') {		document.write("<TR>")		};
	if (disable_link != "yes") {		document.write("<TD CLASS='menuLink' WIDTH='"+menuSettings[3]+"' HEIGHT='"+menuSettings[13]+"' ALIGN='"+menuSettings[6]+"' VALIGN='middle' onclick='goTo("+i+")'");		if (theBGC != "") {
			document.write(" BGCOLOR='" + theBGC + "'");
			};		document.write(" " + t_onmouseover + t_onmouseout + ">");
		document.write("  <ILAYER NAME='link"+i+"' visibility='hide'>");
		document.write("    <LAYER LEFT='0' NAME='sub1' ALIGN='"+menuSettings[6]+"'" + t_onmouseover + t_onmouseout + " WIDTH='100%' Z-INDEX='1'>");
		document.write("      <DIV ALIGN='"+menuSettings[6]+"'>");
		document.write("        <A HREF='"+link+"' CLASS='menuLink' TARGET='"+target+"' onclick='return false'>");		document.write("          <FONT FACE='"+menuSettings[9]+"' COLOR='"+menuSettings[10]+"'>");
		document.write("            &nbsp;"+name+"&nbsp;");
		document.write("          </FONT>");
		document.write("        </A>");		document.write("      </DIV>");		document.write("    </LAYER>");		document.write("  </ILAYER>");		document.write("</TD>");		if (document.layers) {
			document.layers['link'+i].captureEvents(Event.MOUSEUP);
			document.layers['link'+i].onmouseup=goTo;
			document.layers['link'+i].link=link;
			};
		}
	else {
		document.write("<TD CLASS='menuLink' WIDTH='"+menuSettings[3]+"' HEIGHT='"+menuSettings[13]+"' ALIGN='"+menuSettings[6]+"' VALIGN='middle'");		if (theBGC != "") {
			document.write(" BGCOLOR='" + theBGC + "'");
			};		document.write("  <DIV ALIGN='"+menuSettings[6]+"'>");
		document.write("    <FONT FACE='"+menuSettings[9]+"' COLOR='"+menuSettings[14]+"'>");
		document.write("      &nbsp;"+name+"&nbsp;");
		document.write("    </FONT>");
		document.write("  </DIV>");		document.write("</TD>");		};	if (menuSettings[11]=='vertical') {		document.write("</TR>")		};
	}

function endLight() {	document.write("      </TABLE>");
	document.write("    </TD>");
	document.write("  </TR>");
	document.write("</TABLE>");	setTimeout("showLayers()", 500);	}

function showLayers() {
	if (document.layers) {		for (i=1; i<theLinks.length; i++) {
			if (document.layers["link"+i]) {				document.layers["link"+i].visibility="show"
				};			};
		};	}
	
