var maxdir = 3; var maxdoc=1; var submaxdoc = 9;
var dirs = new Array(maxdir); var docs = new Array(maxdoc); var subdocs = new Array(submaxdoc);
for (i=0; i<maxdir; i++) { dirs[i] = new Array(3); dirs[i].open = 0; dirs[i].nr = i;}
for (j=0; j<maxdoc; j++) { docs[j] = new Array(5); docs[j].nr = j; docs[j].target = "center";}
for (k=0; k<submaxdoc; k++) { subdocs[k] = new Array(3); subdocs[0].target = "center";}

var headline = "Latest News";

dirs[0].name = "General";
dirs[1].name = "Operations";
dirs[2].name = "Public relations";

docs[0].name = "Find us";
docs[0].link = "findus.htm";
docs[0].last = 1;

subdocs[0].name = "Association";
subdocs[0].parent = 0;
subdocs[0].link = "associat.htm";
subdocs[0].last = 0;
subdocs[0].target = "center";

subdocs[1].name = "Railway line";
subdocs[1].parent = 0;
subdocs[1].link = "line.htm";
subdocs[1].last = 0;
subdocs[1].target = "center";

subdocs[2].name = "Rolling stock";
subdocs[2].parent = 0;
subdocs[2].link = "rostock.htm";
subdocs[2].last = 1;
subdocs[2].target = "center";

subdocs[3].name = "Schedule";
subdocs[3].parent = 1;
subdocs[3].link = "schedule.htm";
subdocs[3].last = 0;
subdocs[3].target = "center";

subdocs[4].name = "Special events";
subdocs[4].parent = 1;
subdocs[4].link = "special.htm";
subdocs[4].last = 0;
subdocs[4].target = "center";

subdocs[5].name = "St. Nicholas";
subdocs[5].parent = 1;
subdocs[5].link = "nicholas.htm";
subdocs[5].last = 0;
subdocs[5].target = "center";

subdocs[6].name = "Fares";
subdocs[6].parent = 1;
subdocs[6].link = "fares.htm";
subdocs[6].last = 0;
subdocs[6].target = "center";

subdocs[7].name = "Rent us";
subdocs[7].parent = 1;
subdocs[7].link = "rent.htm";
subdocs[7].last = 1;
subdocs[7].target = "center";

subdocs[8].name = "Press";
subdocs[8].parent = 2;
subdocs[8].link = "press/index.htm";
subdocs[8].last = 1;
subdocs[8].target = "center";

var typeimg = new Array(6);
typeimg[0] = new Image(); typeimg[0].src="../images/menu/closed.gif";
typeimg[1] = new Image(); typeimg[1].src="../images/menu/open.gif";
typeimg[2] = new Image(); typeimg[2].src="../images/menu/doc.gif";
typeimg[3] = new Image(); typeimg[3].src="../images/menu/node.gif";
typeimg[4] = new Image(); typeimg[4].src="../images/menu/last.gif";
typeimg[5] = new Image(); typeimg[5].src="../images/menu/docext.gif";

function initMenu() {
  var doc = top.navili.window.document
  doc.open();
  doc.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
  doc.write("<html>\n");
  doc.write("	<head>\n");
  doc.write("		<title>Dampfbahn Fr&auml;nkische Schweiz e. V.</title>\n");
  doc.write("		<meta name=\"author\" content=\"Andreas Aschenbrenner\">\n");
  doc.write("		<meta name=\"description\" lang=\"en-us\" content=\"General informationen on Dampfbahn Fr&auml;nkische Schweiz e. V., Franconian's first historic railway.\">\n");
  doc.write("		<meta name=\"keywords\" lang=\"en-us\" content=\"Dampfbahn Fr&auml;nkische Schweiz, historic, railway, DFS, steam, history, tickets, general information, contact us, railroad track, engine, Fr&auml;nkische, Franconia, train, Ebermannstadt, chronicle\">\n");
  doc.write("		<meta name=\"date\" content=\"2005-03-19T00:00:00+01:00\">\n\n");
  doc.write("		<meta http-equiv=\"Content-Script-Type\" content=\"text/javascript\">\n");
  doc.write("		<meta http-equiv=\"Content-Style-Type\" content=\"text/css\">\n");
  doc.write("		<meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\">\n");
  doc.write("		<meta http-equiv=\"expires\" content=\"0\">\n\n");
  doc.write("		<meta name=\"revisit-after\" content=\"20 days\">\n");
  doc.write("		<meta name=\"robots\" content=\"follow\">\n\n");
  doc.write("		<link rel=\"stylesheet\" type=\"text/css\" href=\"standard.css\">\n");
  doc.write("		<style>\n");
  doc.write("			<!--\n");
  doc.write("				a {\n");
  doc.write("					padding-right:30px;\n");
  doc.write("				}\n");
  doc.write("				div.layer2 {\n");
  doc.write("					padding-top:10px;\n");
  doc.write("					padding-right:15px;\n");
  doc.write("				}\n");
  doc.write("				div.narrow {\n");
  doc.write("					padding-right:30px;\n");
  doc.write("				}\n");
  doc.write("			-->\n");
  doc.write("		</style>\n\n");
  doc.write("		<script language=\"JavaScript\" type=\"text/javascript\">\n");
  doc.write("			<!--\n");
  doc.write("				if (top.fs_loaded != 1){ top.location.replace(\"index.htm\")}\n");	
  doc.write("			//-->\n");
  doc.write("		</script>\n");
  doc.write("	</head>\n");	
  doc.write("<body bgcolor=\"#6699cc\">\n");
  doc.write("	<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"right\" width=\"200\" height=\"100%\">\n");
  doc.write("		<tr>\n");
  doc.write("			<td style=\"background-image:url(../images/bg_left.gif)\" width=\"200\" height=\"150\" valign=\"top\">\n");
  doc.write("				<p><img align=\"right\" src=\"../images/dfslogo.gif\" vspace=\"15\"></p>\n");
  doc.write("			</td>\n");
  doc.write("		</tr>\n");
  doc.write("		<tr>\n");	
  doc.write("			<td style=\"background-image:url(../images/bg_left.gif)\" width=\"200\" height=\"10\">\n");
  doc.write("				<a class=\"small\" href=\"index.htm\" target=\"_top\">"+headline+"</a>\n");
  doc.write("			</td>\n");
  doc.write("		</tr>\n");
  for (i=0; i<maxdir; i++) {
  	doc.write("		<tr valign=middle align=left>\n");
  	doc.write("			<td style=\"background-image:url(../images/bg_left.gif)\" width=\"200\" height=\"10\">\n");
	doc.write("				<a class=\"small\" href=\"javascript:parent.openFolder("+dirs[i].nr+")\" target=\"_self\">\n");
	doc.write("				<img border=\"0\" align=\"absmiddle\" src=\""+typeimg[dirs[i].open].src);
	doc.write("\">&nbsp;"+dirs[i].name+"</a>\n");
	doc.write("    			</td>\n");
	doc.write("    		</tr>\n");
  }
  endMenu();
}


function openFolder(which) {
  var doc = top.navili.window.document ;
  doc.open();
  if(dirs[which].open==1){ dirs[which].open=0;}
  else {dirs[which].open=1;}
  doc.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
  doc.write("<html>\n");
  doc.write("	<head>\n");
  doc.write("		<title>Dampfbahn Fr&auml;nkische Schweiz e. V.</title>\n");
  doc.write("		<meta name=\"author\" content=\"Andreas Aschenbrenner\">\n");
  doc.write("		<meta name=\"description\" lang=\"en-us\" content=\"General informationen on Dampfbahn Fr&auml;nkische Schweiz e. V., Franconian's first historic railway.\">\n");
  doc.write("		<meta name=\"keywords\" lang=\"en-us\" content=\"Dampfbahn Fr&auml;nkische Schweiz, historic, railway, DFS, steam, history, tickets, general information, contact us, railroad track, engine, Fr&auml;nkische, Franconia, train, Ebermannstadt, chronicle\">\n");
  doc.write("		<meta name=\"date\" content=\"2005-03-19T00:00:00+01:00\">\n\n");
  doc.write("		<meta http-equiv=\"Content-Style-Type\" content=\"text/css\">\n");
  doc.write("		<meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\">\n");
  doc.write("		<meta http-equiv=\"expires\" content=\"0\">\n\n");
  doc.write("		<meta name=\"revisit-after\" content=\"20 days\">\n");
  doc.write("		<meta name=\"robots\" content=\"follow\">\n\n");
  doc.write("		<link rel=\"stylesheet\" type=\"text/css\" href=\"standard.css\">\n");
  doc.write("		<style>\n");
  doc.write("			<!--\n");
  doc.write("				a {\n");
  doc.write("					padding-right:30px;\n");
  doc.write("				}\n");
  doc.write("				div.layer2 {\n");
  doc.write("					padding-top:10px;\n");
  doc.write("					padding-right:15px;\n");
  doc.write("				}\n");
  doc.write("				div.narrow {\n");
  doc.write("					padding-right:30px;\n");
  doc.write("				}\n");
  doc.write("			-->\n");
  doc.write("		</style>\n");
  doc.write("		<script language=\"JavaScript\" type=\"text/javascript\">\n");
  doc.write("			<!--\n");
  doc.write("				if (top.fs_loaded != 1){ top.location.replace(\"index.htm\")}\n");	
  doc.write("			//-->\n");
  doc.write("		</script>\n");
  doc.write("	</head>\n");
  doc.write("<body bgcolor=\"#6699cc\">\n");
  doc.write("	<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"right\" width=\"200\" height=\"100%\">\n");
  doc.write("		<tr>\n");
  doc.write("			<td style=\"background-image:url(../images/bg_left.gif)\" width=\"200\" height=\"150\" valign=\"top\">\n");
  doc.write("				<p><img align=\"right\" src=\"../images/dfslogo.gif\" vspace=\"15\"></p>\n");
  doc.write("			</td>\n");
  doc.write("		</tr>\n");
  doc.write("		<tr>\n");
  doc.write("			<td style=\"background-image:url(../images/bg_left.gif)\" width=\"200\" height=\"10\">\n");
  doc.write("				<a class=\"small\" href=\"index.htm\" target=\"_top\">"+headline+"</a>\n");
  doc.write("			</td>\n");
  doc.write("		</tr>\n");
  for (i=0; i<maxdir; i++) {
	doc.write("		<tr valign=middle align=left>\n");
  	doc.write("			<td style=\"background-image:url(../images/bg_left.gif)\" width=\"200\" height=\"10\">\n");
	doc.write("				<a class=\"small\" href=\"javascript:parent.openFolder("+dirs[i].nr+")\" target=\"_self\">\n");
	doc.write("    				<img border=\"0\" align=\"absmiddle\" src=\""+typeimg[dirs[i].open].src);
	doc.write("\">&nbsp;"+dirs[i].name+"</a>\n");
	for (j=0; j<submaxdoc; j++) {
		if ((subdocs[j].parent==i)&&(dirs[i].open)) {
  			doc.write("				<br><img src=\"../images/menu/vert.gif\" align=\"absmiddle\">\n");
			doc.write("				<a class=\"small\" href=\""+subdocs[j].link+"\" target=\""+subdocs[j].target+"\"><img border=\"0\" align=\"absmiddle\" src=\"");
			if (subdocs[j].last) {
				doc.write(typeimg[4].src);
			}
			else {
				doc.write(typeimg[3].src);
			}
			doc.write("\">\n				<img border=\"0\" align=\"absmiddle\" src=\"");
			if (subdocs[j].target=="center") {
				doc.write(typeimg[2].src);
			}
			else {
				doc.write(typeimg[5].src);
			}
			doc.write("\">&nbsp;"+subdocs[j].name+"</a>\n");
		}
	}
	doc.write("			</td>\n");
	doc.write("		</tr>\n");
  }
endMenu();
}


function endMenu() {
  var doc = top.navili.window.document ;
  for (k=0; k<maxdoc; k++) {
  	doc.write("		<tr valign=middle align=left>\n");
    	doc.write("			<td style=\"background-image:url(../images/bg_left.gif)\" width=\"200\" height=\"10\">\n");
	doc.write("				<a class=\"small\" href=\""+docs[k].link+"\" target=\""+docs[k].target+"\"> <img border=\"0\" align=\"absmiddle\" src=\"");
	if (docs[k].last) {
		doc.write(typeimg[4].src);
	}
	else {
		doc.write(typeimg[3].src);
	}
	doc.write("\">\n				<img border=\"0\" align=\"absmiddle\" src=\"");
	if (docs[k].target=="center") {
		doc.write(typeimg[2].src);
	}
   	 else {
		doc.write(typeimg[5].src);
	}
    	doc.write("\">&nbsp;"+docs[k].name+"</a>\n");
    	doc.write("			</td>\n");
	doc.write("		</tr>\n");
  }
  doc.write("		<tr>\n");
  doc.write("			<td style=\"background-image:url(../images/bg_left.gif)\" width=\"200\">&nbsp;\n");
  doc.write("			</td>\n");
  doc.write("		</tr>\n");
  doc.write("	</table>\n");  
  doc.write("</body>\n");
  doc.write("</html>");
  doc.close();
}
