// banner
i_div++;
iheight[i_div] = 60;
icont[i_div] = "<img src=" + img_loc + "/banner1.jpg width=800 height=60>";
itype[i_div] = "banner";
idivid[i_div] = " ";
itop[i_div] = 0;
ileft[i_div] = 0;
iwidth[i_div] = 800;

// navigation
i_div++;
iheight[i_div] = 0;
icont[i_div] = "instab(0)";
itype[i_div] = "leftcol";
idivid[i_div] = "navbar";
itop[i_div] = 61;
ileft[i_div] = 0;
iwidth[i_div] = 196;

var i_link = -1;
var iLabel = new Array();
var iHref = new Array();
var iSuper = new Array();
var iNewCategory = new Array();

i_link++;
iLabel[i_link] = "Startseite";
iHref[i_link] = "index.htm";
iSuper[i_link] = "navigation";
iNewCategory[i_link] = " ";

i_link++;
iLabel[i_link] = "E-Mail";
iHref[i_link] = "mailto:ff-luppa@web.de";
iSuper[i_link] = "navigation";
iNewCategory[i_link] = " ";

i_link++;
iLabel[i_link] = "G&auml;stebuch";
iHref[i_link] = "gb.htm";
iSuper[i_link] = "navigation";
iNewCategory[i_link] = " ";

i_link++;
iLabel[i_link] = "Archiv";
iHref[i_link] = "archiv.htm";
iSuper[i_link] = "navigation";
iNewCategory[i_link] = " ";

i_link++;
iLabel[i_link] = "Extras";
iHref[i_link] = "extras.htm";
iSuper[i_link] = "navigation";
iNewCategory[i_link] = " ";

i_link++;
iLabel[i_link] = "Glossar";
iHref[i_link] = "glossar.htm";
iSuper[i_link] = "navigation";
iNewCategory[i_link] = " ";

i_link++;
iLabel[i_link] = "Impressum";
iHref[i_link] = "impressum.htm";
iSuper[i_link] = "navigation";
iNewCategory[i_link] = " ";

i_link++;
iLabel[i_link] = "Aktive";
iHref[i_link] = "#";
iSuper[i_link] = "navigation";
iNewCategory[i_link] = "ff";

i_link++;
iLabel[i_link] = "Wir &uuml;ber uns";
iHref[i_link] = "ff_ffw.htm";
iSuper[i_link] = "ff";
iNewCategory[i_link] = " ";

i_link++;
iLabel[i_link] = "Geschichte";
iHref[i_link] = "ff_geschichte.htm";
iSuper[i_link] = "ff";
iNewCategory[i_link] = " ";

i_link++;
iLabel[i_link] = "Technik";
iHref[i_link] = "ff_technik.htm";
iSuper[i_link] = "ff";
iNewCategory[i_link] = " ";

i_link++;
iLabel[i_link] = "Eins&auml;tze";
iHref[i_link] = "ff_einsatz.htm";
iSuper[i_link] = "ff";
iNewCategory[i_link] = " ";

i_link++;
iLabel[i_link] = "Termine";
iHref[i_link] = "ff_termine.htm";
iSuper[i_link] = "ff";
iNewCategory[i_link] = " ";

i_link++;
iLabel[i_link] = "Jugendfeuerwehr";
iHref[i_link] = "#";
iSuper[i_link] = "navigation";
iNewCategory[i_link] = "jf";

i_link++;
iLabel[i_link] = "Kurz vorgestellt";
iHref[i_link] = "jf_jf.htm";
iSuper[i_link] = "jf";
iNewCategory[i_link] = " ";

i_link++;
iLabel[i_link] = "Historik";
iHref[i_link] = "jf_historik.htm";
iSuper[i_link] = "jf";
iNewCategory[i_link] = " ";

i_link++;
iLabel[i_link] = "Termine";
iHref[i_link] = "jf_termine.htm";
iSuper[i_link] = "jf";
iNewCategory[i_link] = " ";

function inslink() {
	return ret = insertCategory("navigation",0);
}

function insertCategory(categoryName,indent) {
	var ret = "";
	for (var i=0;i<=i_link;i++) {
		if (iSuper[i]==categoryName) {
			if (iNewCategory[i]!=" " && ret.length>=14 && ret.substr(ret.length-14,14)!="<br></div><br>") {
				ret += "<br>";
			}
			
			for (var j=0;j<indent;j++) {
				ret += "&nbsp;&nbsp;";
			}
			
			if (iNewCategory[i]==" ") {
				ret += "<img width=\"13\" height=\"13\" hspace=\"0\" vspace=\"0\" src=\"" + img_loc + "/ar_def.png\" id=\"ar" + i + "\">&nbsp;";
			} else {
				ret += "<img width=\"13\" height=\"13\" hspace=\"0\" vspace=\"0\" src=\"" + img_loc + "/fc_def.png\" id=\"fc" + i + "\">&nbsp;";
			}
			
			ret += "<a href=\"" + iHref[i] + "\"";

			if (iNewCategory[i]==" ") {
				ret += " onmouseover=\"swlimg('ar" + i + "',1)\" onmouseout=\"swlimg('ar" + i + "',0)\"";
				ret += ">" + iLabel[i] + "</a><br>";
			} else {
				ret += " onmouseover=\"swlimg('fc" + i + "',1)\" onmouseout=\"swlimg('fc" + i + "',0)\"";
				ret += " onclick=\"swnavig(\'" + iNewCategory[i] + "\')\;swlimg('fc" + i + "',1);return false\;\"";
				ret += "><b>" + iLabel[i] + "</b></a><br>";
				
				ret += "<div class=\"red\" id=\"navig_" + iNewCategory[i] + "\" style=\"display:none\">";
				ret += insertCategory(iNewCategory[i],indent+1);
				ret += "</div>";
				if (i<i_link)
					ret += "<br>";
				
			}
		}
	}
	
	return ret;
}

// switchNavigation
function swnavig(item) {
	switchNavigation(item,"toggle");
}

function switchNavigation(item,mode) {
	var obj = document.getElementById("navig_" + item);
	if (mode=="expand") {
		if (obj.style.display=="none") {
			obj.style.display = "block";
		} else {
			return;
		}
	}
	if (mode=="toggle") {
		if (obj.style.display=="none") {
			obj.style.display = "block";
		} else {
			obj.style.display = "none";
		}
	}
	if (mode=="collapse") {
		if (obj.style.display=="block") {
			obj.style.display = "none";
		} else {
			return;
		}
	}
	
	var i;
	for (i=0;i<=i_link;i++) {
		if (iNewCategory[i]==item) {
			break;
		} 
	}
	var img = document.getElementById("fc" + i);

	// icon austauschen
	if (obj.style.display=="block") {
		img.src = img_loc + "/fe_def.png";
	} else {
		img.src = img_loc + "/fc_def.png";
	}
	
	// alle untermenues schliessen
	if (mode=="toggle" || mode=="collapse") {
		for (var j=0;j<=i_link;j++) {
			if (iSuper[j]==item && iNewCategory[j]!=" ") {
				switchNavigation(iNewCategory[j],"collapse");
			}
		}
	}
	
	// alle uebergeordneten menues oeffnen und alle anderen menues auf gleicher ebene schliessen
	if (mode=="toggle" || mode=="expand") {
		for (var j=0;j<=i_link;j++) {
			if (iSuper[i]==iNewCategory[j]) {
				switchNavigation(iNewCategory[j],"expand");
			}
			if (iSuper[j]==iSuper[i] && iNewCategory[j]!=" " && iNewCategory[j]!=item) {
				switchNavigation(iNewCategory[j],"collapse");
			}
		}
	}
	
}

// switchLinkImage
function swlimg(item,shw) {
	var obj = document.getElementById(item);
	if (shw==1) {
		obj.src =  img_loc + '/' + obj.src.substring(obj.src.length-10,obj.src.length-8) + "_hov.png";
	} else {
		obj.src =  img_loc + '/' + obj.src.substring(obj.src.length-10,obj.src.length-8) + "_def.png";
	}
}

tables[0] = insimg(1) + ncell() + insimg(3) + ncell() + insimg(4) + "</td>" + nrow() + "<td>" + insimg(5,"w150") + ncell() + insimg(6) + ncell("rowspan=\"3\"") + "&nbsp;</td>" + nrow() + "<td bgcolor=\"#FFFFFF\" valign=\"top\"><div class=\"red\">" + inslink() + "</div>" + ncell('b12') + "&nbsp;</td>" + nrow() + "<td>" + insimg(7,"w150") + ncell() + insimg(8) + "</td>" + nrow() + "<td colspan=3><img src=\"" + img_loc + "/grey_space.png\" width=196 height=1></td>" + nrow() + "<td>" + insimg(2) + ncell() + insimg(3) + ncell() + insimg(4) + "</td>" + nrow() + "<td>" + insimg(5,"w150") + ncell() + insimg(6) + ncell("rowspan=\"3\"") + "&nbsp;</td>" + nrow() + "<td bgcolor=\"#FFFFFF\"><font class=\"nextterm\"><b>FFW:</b>&nbsp;" + nextdate(true)  + "<hr size=\"1\" color=\"#848283\"><b>JF:</b>&nbsp;" + nextdate(false) + "</font>" + ncell('b12') + "&nbsp;</td>" + nrow() + "<td>" + insimg(7,"w150") + ncell() + insimg(8);
