//////////////////////////////////////////////////////////////////////
// This code is (c) 2000 by kci:dnd / ZPiDER.
// kci - design & development / Marcel Bricman aka ZPiDER
//////////////////////////////////////////////////////////////////////

// subMenu value       displayed string     href           highlight if
// xxx@@@link          xxx                  link (absolute) never
// xxx@@link           xxx                  link           current is in same
//                                                         dir as link
// xxx@link            xxx                  link           current == link
// xxx.htm#yyy         yyy                  xxx.htm#yyy    current == xxx.htm
// xxx.htm             xxx                  xxx.htm        current == xxx.htm
// xxx                 xxx                  xxx/index.htm  current == href

document.write ('<TR><TD CLASS="subMenu">&nbsp;</TD></TR>');

for (i = 0; i < subMenu.length; i++)
{
	var ititle = subMenu[i];
	var ihref = subMenu[i];
	var hrefmatch = '';
	var abs = false;
	var highlight = true;
	var url = document.URL;
	var k;
	if ((k = ititle.indexOf('@@@')) > -1) {
		ititle = ititle.substring(0,k);
		ihref = ihref.substring(k+3);
		abs = true;
		highlight = false;
	} else if ((k = ititle.indexOf('@@')) > -1) {
		ititle = ititle.substring(0,k);
		ihref = ihref.substring(k+2);
		j = url.lastIndexOf('/');
		url = url.substring(0,j);
		j = ihref.lastIndexOf('/');
		hrefmatch = ihref.substring(0,j);
	} else if ((k = ititle.indexOf('@')) > -1) {
		ititle = ititle.substring(0,k);
		ihref = ihref.substring(k+1);
	} else if ((k = ititle.indexOf('#')) > -1) {
		ititle = ititle.substring(k+1);
		ihref = ihref.substring(0, k) + '#' + ihref.substring(k+1);
		highlight = false;    // because this code will not be executed upon click
	} else if ((k = ititle.indexOf('.htm')) > -1) {
		ititle = ititle.substring(0, k);
	} else if ((k = ititle.indexOf('.php')) > -1) {
		ititle = ititle.substring(0, k);
	} else {
		ihref += '/index.htm';
	}
	if (!abs) {
		ihref = basePath + 'html/' + areaName + '/' + ihref;
		if (hrefmatch.length == 0) {
			hrefmatch = ihref;
		} else {
			hrefmatch = basePath + 'html/' + areaName + '/' + hrefmatch;
		}
		if ((k = url.indexOf('#')) > -1) {
			url = url.substring(0, k);
		}
	}
	if (highlight && hrefmatch == unescape(url))
	{
		document.write ('<TR><TD CLASS="subMenuA">' +
				'<A HREF="' + ihref + '">' + ititle + '</A></TD></TR>');
	} else {
		document.write ('<TR><TD CLASS="subMenu">' +
				'<A HREF="' + ihref + '">' + ititle + '</A></TD></TR>');
	}
}

document.write ('<TR><TD CLASS="subMenu">&nbsp;</TD></TR>');
