/* Format: E[id] = [Level,ParentId,Name,url] */
/* leere Einträge: E[id] = [-1,0,"",""] */
/* E,max = 22 */
   
/*home="http://matthiasstamm.de/en/";*/
/*home="http://localhost/matthiasstamm.de/en/";*/
home="/cahir/en/";

E = new Array();
E[0] = [0,-1,"",""];
E[5] = [1,0,"Homepage",home+"index.html"];
E[1] = [2,0,"Landmark",home+"lm/index.html"];
	E[7] = [21,1,"Series",home+"lm/serien.html"];
		E[13] = [211,7,"Andalusia",home+"lm/andalusia1.html"];
			E[15] = [2111,13,"Alhambra/Granada",home+"lm/andalusia1.html"];
			E[17] = [2113,13,"Cordoba/Mijas",home+"lm/andalusia2.html"];
			E[19] = [2115,13,"Sevilla/Rest",home+"lm/andalusia3.html"];
		E[14] = [212,7,"Castles",home+"lm/castles1.html"];
		E[21] = [213,7,"Architecture",home+"lm/architecture1.html"];
		E[22] = [214,7,"Heathland",home+"lm/heathland1.html"];
		E[16] = [215,7,"2nd Floor",home+"lm/cgs.html"];
	E[8] = [22,1,"Info",home+"lm/infos.html"];
	E[9] = [23,1,"Copyrights",home+"lm/copyright.html"];
	E[10] = [24,1,"Links",home+"lm/links.html"];
E[4] = [5,0,"Hopp&eacute; - England",home+"hoppe.html"];
	E[12] = [51,4,"Homepage","http://home.arcor-online.de/stamm007/frameset.htm"];
	E[11] = [52,4,"Copyright",home+"hpdiscl.html"];
E[2] = [7,0,"Private",home+"privat.html"];
E[6] = [8,0,"Sitemap",home+"sitemap.html"];
E[3] = [9,0,"Imprint",home+"impressum.html"]; 

E[18] = [-1,0,"",""];
E[20] = [-1,0,"",""];

function getMenu(id) {
	M = new Array();
	dummy = new Array();
	do { 
		for (i=1;i<=E.length-1;i++) 
			if (E[i][1] == E[id][1] && E[i][0] != -1) 
				M.push(E[i]);	
		id = E[id][1];			
	} while (id != -1);
	M.sort(sortRule);
	result="";
	for (i=0;i<=M.length-1;i++) {
		if (M[i][0].toString().length==1) {
			result = result + "<a href='" + M[i][3] + "' id='nav1'>" + M[i][2] + "</a><br>";
		} else if (M[i][0].toString().length==2) {
			result = result + "<a href='" + M[i][3] + "' id='nav2'>. " + M[i][2] + "</a><br>";
		} else if (M[i][0].toString().length==3) {
			result = result + "<a href='" + M[i][3] + "' id='nav3'>.. " + M[i][2] + "</a><br>";
		} else if (M[i][0].toString().length==4) {
			result = result + "<a href='" + M[i][3] + "' id='nav4'>..." + M[i][2] + "</a><br>";
		}
	}
	return(result);
}

function sortRule(a,b) {
	if (a[0].toString()>b[0].toString()) 
		return 1
	else
		return -1;
}

